<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Memotaro</title>
    <description>I'm haltaro, a data scientist at an advertising agency in Tokyo, Japan. I love machine learning, marketing science, network engineering and shiba-inu:)</description>
    <link>https://haltaro.github.io/</link>
    <atom:link href="https://haltaro.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 06 Mar 2021 06:14:54 +0000</pubDate>
    <lastBuildDate>Sat, 06 Mar 2021 06:14:54 +0000</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>Vagrantで立てたUbuntu 16.04上のWireSharkで遊ぶ</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://qiita.com/advent-calendar/2018/network-engineering&quot;&gt;Network engineering Advent Calendar 2018&lt;/a&gt;の8日目の記事．諸事情により&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;で立てたUbuntu 16.04上で&lt;a href=&quot;https://www.wireshark.org/&quot;&gt;WireShark&lt;/a&gt;を操作する必要があったため，環境設定をまとめておく．&lt;/p&gt;

&lt;h1 id=&quot;前提&quot;&gt;前提&lt;/h1&gt;

&lt;h2 id=&quot;virtualbox&quot;&gt;Virtualbox&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;Oracle VM VirtualBox&lt;/a&gt;は，言わずと知れたx86仮想化ソフトウェア・パッケージ．ホストOSとして，Windows，Linux，Mac OS X，そしてSolarisに対応している．ホストOS上で実行できるゲストOSとして，Windows，Linux，OpenSolaris，OS/2，そしてOpenBSDに対応している．Webエンジニアがサーバ/クライアントの検証環境として使っていたり，ネットワークエンジニアが検証用ネットワークの構築に使っていたりする．&lt;/p&gt;

&lt;p&gt;今回は，ゲストOSとしてUbuntu 16.04を立ち上げ，そこにWireShark環境を構築する．&lt;/p&gt;

&lt;h2 id=&quot;vagrant&quot;&gt;Vagrant&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;は仮想環境の設定自動化ツール．Rubyで実装されており，Debian，Windows，Centos，Linux，macOS，Arch Linux上で動作する．Vagrantを使うと，超簡単に仮想マシンを構築できるようになるし，検証環境を統一化できる．詳細は&lt;a href=&quot;https://qiita.com/ozawan/items/160728f7c6b10c73b97e&quot;&gt;Vagrant + VirtualBoxでWindows上に開発環境をサクッと構築する - Qiita&lt;/a&gt;が参考になる．&lt;/p&gt;

&lt;h2 id=&quot;wireshark&quot;&gt;WireShark&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.wireshark.org/&quot;&gt;WireShark&lt;/a&gt;は，最もメジャーなプロトコル・アナライザの一つ．プロトコル・アナライザとは，ネットワークに流れるデータを解析する装置やプログラムのこと．ノートパソコン上で動作する軽量かつ無料なものから，専用装置上で動作するプロ向けの高価なものまで様々なものが存在するが，WireSharkは前者に属する．無料であるにもかかわらず，多様な機能を提供していることから，多くの企業・非営利団体・政府組織・学術機関でデファクトスタンダードとして利用されている．&lt;/p&gt;

&lt;p&gt;WireSharkを&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apt install&lt;/code&gt;すると対話画面に遷移するため，プロビジョニングを完全に自動化するには&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Vagrantfile&lt;/code&gt;に工夫が必要．&lt;/p&gt;

&lt;h1 id=&quot;事前準備&quot;&gt;事前準備&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt;と&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;のインストールが必要．それぞれ，公式ページの指示に従ってインストーラーをダウンロードすれば簡単にインストールできる．&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;また，今回はX Window Systemを使ってゲストOS上で動作するWireSharkの画面をホストOSで表示するため，ホストOSにXサーバ環境を構築する必要がある．10.6以降のmacOS Xについては，&lt;a href=&quot;https://www.xquartz.org/&quot;&gt;XQuartz&lt;/a&gt;プロジェクトからX11をインストールすれば良いらしい．他のOSについては，各自ご対応願いたい．以下，参考記事．&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://support.apple.com/ja-jp/HT201341&quot;&gt;Mac 用の X11 について - Apple&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://msyksphinz.hatenablog.com/entry/2015/11/24/020000&quot;&gt;Vagrantの環境でGUIを立ち上げるための環境構築 - FPGA開発日記&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;実験&quot;&gt;実験&lt;/h1&gt;

&lt;h2 id=&quot;環境構築&quot;&gt;環境構築&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/haltaro/wireshark-vagrant&quot;&gt;私のGitHubレポジトリ&lt;/a&gt;からVagrantfileを任意のディレクトリにダウンロードして，以下のコマンドを入力する．&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vagrant up&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;wireshark-1&quot;&gt;WireShark&lt;/h2&gt;

&lt;p&gt;ホストOSでXサーバが起動していることを確認し，ゲストOSにSSH接続する．&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vagrant ssh
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; Welcome to Ubuntu 16.04.5 LTS &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;GNU/Linux 4.4.0-139-generic x86_64&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; Documentation:  https://help.ubuntu.com
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; Management:     https://landscape.canonical.com
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; Support:        https://ubuntu.com/advantage
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;   Get cloud support with Ubuntu Advantage Cloud Guest:
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;     http://www.ubuntu.com/business/services/cloud
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; 13 packages can be updated.
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; 6 updates are security updates.
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; New release &lt;span class=&quot;s1&quot;&gt;'18.04.1 LTS'&lt;/span&gt; available.
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; Run &lt;span class=&quot;s1&quot;&gt;'do-release-upgrade'&lt;/span&gt; to upgrade to it.
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
vagrant@ubuntu-xenial:~&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;この状態で，WireSharkを起動する．&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;vagrant@ubuntu-xenial:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;wireshark&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;すると，以下のような画面が立ち上がる．&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/2018-12-09-wireshark.png&quot; alt=&quot;wireshark&quot; /&gt;&lt;/p&gt;

&lt;p&gt;できた．&lt;/p&gt;

&lt;h1 id=&quot;感想&quot;&gt;感想&lt;/h1&gt;

&lt;p&gt;正直，このままだと使いようがないが，例えば複数の仮想マシンを起動して，ゲストOS間でやりとりされるパケットをキャプチャするときなどに使える．時間が見つかれば書く．&lt;/p&gt;
</description>
        <pubDate>Sun, 09 Dec 2018 00:00:00 +0000</pubDate>
        <link>https://haltaro.github.io/2018/12/09/wireshark-on-vagrant</link>
        <guid isPermaLink="true">https://haltaro.github.io/2018/12/09/wireshark-on-vagrant</guid>
        
        
        <category>network</category>
        
        <category>vagrant</category>
        
      </item>
    
      <item>
        <title>VirtualBox+Vagrantでns-3.27環境を構築する</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://qiita.com/advent-calendar/2018/network-engineering&quot;&gt;Network engineering Advent Calendar 2018&lt;/a&gt;の1日目の記事．一年以上前にQiitaで&lt;a href=&quot;https://qiita.com/haltaro/items/b474d924f63692c155c8&quot;&gt;ns-3.26の環境構築に関する記事&lt;/a&gt;を書いた．この一年で私も少しだけ成長して，&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;を使えるようになった&lt;sup id=&quot;fnref:toolate&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:toolate&quot; class=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;ので，コマンド一発でns-3.27の環境を構築できるよう，Vagrantfileを作成した．これからns3で遊びたいという方のお役に立てれば幸い．&lt;/p&gt;

&lt;p&gt;なお，&lt;a href=&quot;https://github.com/diogomg/vagrant-ns-3-setup&quot;&gt;diogomg/vagrant-ns-3-setup - GitHub&lt;/a&gt;を大いに参考にさせて頂いた．&lt;/p&gt;

&lt;h1 id=&quot;前提&quot;&gt;前提&lt;/h1&gt;

&lt;h2 id=&quot;ns-3&quot;&gt;ns-3&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.nsnam.org/&quot;&gt;ns-3&lt;/a&gt;は，オープンソースの離散事象ネットワークシミュレータ．前職ではこれを使って独自のプロトコルを実装し，実験結果を論文化する仕事をしていた．基本的にLinux上でしか動かず，また環境構築がやや煩雑なので，一般ユーザにとっては敷居が高い&lt;sup id=&quot;fnref:me&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:me&quot; class=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;．ns-3で何ができるかについては，&lt;a href=&quot;https://haltaro.github.io/2018/07/13/tcp-ns3&quot;&gt;ns-3でTCPの輻輳制御を観察する - Memotaro&lt;/a&gt;を参照されたい．&lt;/p&gt;

&lt;p&gt;今回は，VirtualBoxとVagrantを使うことで仮想マシン上にns-3.27環境を自動構築できるようにし，敷居を下げたいと考えている．こんな風に書くとns-3の達人のように捉えられてしまうかもしれないが，私はコントリビューターでも何でもなく，ペーペーの素人であることは強調しておきたい．&lt;/p&gt;

&lt;h2 id=&quot;virtualbox&quot;&gt;Virtualbox&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;Oracle VM VirtualBox&lt;/a&gt;は，言わずと知れたx86仮想化ソフトウェア・パッケージ．ホストOSとして，Windows，Linux，Mac OS X，そしてSolarisに対応している．ホストOS上で実行できるゲストOSとして，Windows，Linux，OpenSolaris，OS/2，そしてOpenBSDに対応している．Webエンジニアがサーバ/クライアントの検証環境として使っていたり，ネットワークエンジニアが検証用ネットワークの構築に使っていたりする．&lt;/p&gt;

&lt;p&gt;今回は，ゲストOSとしてUbuntu 16.04を立ち上げ，そこにns-3.27環境を構築する．&lt;/p&gt;

&lt;h2 id=&quot;vagrant&quot;&gt;Vagrant&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;は仮想環境の設定自動化ツール．Rubyで実装されており，Debian，Windows，Centos，Linux，macOS，Arch Linux上で動作する．Vagrantを使うと，超簡単に仮想マシンを構築できるようになるし，検証環境を統一化できる．詳細は&lt;a href=&quot;https://qiita.com/ozawan/items/160728f7c6b10c73b97e&quot;&gt;Vagrant + VirtualBoxでWindows上に開発環境をサクッと構築する - Qiita&lt;/a&gt;が参考になる．&lt;/p&gt;

&lt;p&gt;ns-3のインストールは事前準備が多くとにかく面倒&lt;sup id=&quot;fnref:bake&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:bake&quot; class=&quot;footnote&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;．Vagrantのシェルスクリプトによるプロビジョニング機能を使い，依存ライブラリのインストール，ns-3のインストール，テストまで一気に自動化する．&lt;/p&gt;

&lt;h1 id=&quot;事前準備&quot;&gt;事前準備&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt;と&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;のインストールが必要．逆に言えば，これさえ入っていれば，WindowsでもMacOSでもLinuxでも，ns-3の環境が構築できる．それぞれ，公式ページの指示に従ってインストーラーをダウンロードすれば簡単にインストールできる．&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;実験&quot;&gt;実験&lt;/h1&gt;

&lt;h2 id=&quot;環境構築&quot;&gt;環境構築&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/haltaro/ns3-vagrant&quot;&gt;私のGitHubレポジトリ&lt;/a&gt;からVagrantfileを任意のディレクトリにダウンロードして，以下のコマンドを打てば，依存パッケージのインストールからns-3のテストまで全部やってくれる．便利すぎる．私の環境だと，ns-3のテストが完了するまでに1時間ほどかかった．&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ vagrant up
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;ssh&quot;&gt;ssh&lt;/h2&gt;

&lt;p&gt;Vagrantなら，仮想マシンへのSSH接続も簡単．&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ vagrant ssh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ちなみに，デフォルトで&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vagrant&lt;/code&gt;ユーザ（パスワードはユーザ名と同じ）でログインする形になる．root化（&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;su&lt;/code&gt;）する際にパスワードは不要．&lt;/p&gt;

&lt;h1 id=&quot;感想&quot;&gt;感想&lt;/h1&gt;

&lt;p&gt;今までセットアップに苦労していたのがバカみたいだ．さっさと使えばよかった．&lt;/p&gt;
&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:toolate&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;いくらなんでも今更すぎるが，ご容赦いただきたい． &lt;a href=&quot;#fnref:toolate&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:me&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;少なくとも私はそうだった． &lt;a href=&quot;#fnref:me&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:bake&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;bakeが導入されてだいぶマシになったらしいが． &lt;a href=&quot;#fnref:bake&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
        <pubDate>Fri, 30 Nov 2018 00:00:00 +0000</pubDate>
        <link>https://haltaro.github.io/2018/11/30/ns3-vagrant</link>
        <guid isPermaLink="true">https://haltaro.github.io/2018/11/30/ns3-vagrant</guid>
        
        
        <category>network</category>
        
        <category>ns3</category>
        
        <category>vagrant</category>
        
      </item>
    
      <item>
        <title>Pythonでディレクトリの有無を確認して自動作成する</title>
        <description>&lt;p&gt;Pythonでディレクトリの有無を確認して，自動生成するスクリプトをメモしておく．例えばCross validationでフォールドごとにデータを分けるときなどに使う．&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/haltaro/0af917fa66c2f07a7375829b43e66bee.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;os.path.exists(path)&lt;/code&gt;で&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;path&lt;/code&gt;の有無を確認し，無い場合は&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;os.mkdir(path)&lt;/code&gt;で作成する．&lt;/p&gt;
</description>
        <pubDate>Sun, 14 Oct 2018 00:00:00 +0000</pubDate>
        <link>https://haltaro.github.io/2018/10/14/directory</link>
        <guid isPermaLink="true">https://haltaro.github.io/2018/10/14/directory</guid>
        
        
        <category>python</category>
        
      </item>
    
      <item>
        <title>Customized Regression Model for Airbnb Dynamic Pricingを読んだ</title>
        <description>&lt;p&gt;&lt;a href=&quot;http://www.kdd.org/kdd2018/accepted-papers/view/customized-regression-model-for-airbnb-dynamic-pricing&quot;&gt;Peng Ye, et al., Customized Regression Model for Airbnb Dynamic Pricing, KDD2018&lt;/a&gt;を読んだ．&lt;a href=&quot;https://www.airbnb.jp/&quot;&gt;Airbnb&lt;/a&gt;で実際に使われている価格推奨モデルについて，非常にわかりやすくまとめられている．&lt;/p&gt;

&lt;p&gt;この分野で初めて読んだ論文．時間はかかったが，読み通すことができた．実装しろと言われてすぐ実装できるとは言えないが，大筋は理解できたと思う．心理的なハードルは下がったので，他の論文もどんどん読んでいきたい．&lt;/p&gt;

&lt;h1 id=&quot;abstract&quot;&gt;Abstract&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;Airbnbの商品は基本的に過去にない唯一のもの．よって，過去の実績をもとに需要曲線を予測するのが非常に難しい．&lt;/li&gt;
  &lt;li&gt;Airbnbが提案するシステムは３つのモデルで構成される．
    &lt;ul&gt;
      &lt;li&gt;特定の日にちの予約確率を予測するモデル．&lt;/li&gt;
      &lt;li&gt;特定の日にちの最適な売値を予測するモデル．&lt;/li&gt;
      &lt;li&gt;二番目の予測値を，さらにパーソナライズして売値をサジェストするモデル．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;本論文では，二番目の売値予測モデルについて述べる．このモデルは，Price TipsとSmart Pricing toolとして実際にAirbnbのシステムに組み込まれている．A/Bテストでこのモデルの効果を確認した．&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;プラットフォーマーとして，Airbnbは，ホストが設定する価格を直接的に制御していないが，ツールを使って適正値をアドバイスしている．
    &lt;ul&gt;
      &lt;li&gt;Price Tips：暦情報をもとに，適正価格をサジェストする機能．&lt;/li&gt;
      &lt;li&gt;Smart Pricing：ユーザが設定した希望価格の下限と上限をもとに，自動的に適正価格を計算する機能．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;適正価格は機械学習で算出されており，モデルは日々更新されている．&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;related-works&quot;&gt;Related works&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Airbnbの値付けに関して，いくつかの論文が公開されている[8, 9, 11, 16]．&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;dynamic-pricing-at-airbnb&quot;&gt;Dynamic pricing at airbnb&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;AirbnbでDynamic Pricingするにあたり，大きく２つの課題がある．&lt;/li&gt;
  &lt;li&gt;Demand Estimation
    &lt;ul&gt;
      &lt;li&gt;従来は，大量生産品に対するDemand estimationが研究されてきた．この領域では，需要曲線\(F(P)\)を予測することが最大の目的である．ここで，\(P\)は価格．近年では，機械学習を用いて\(F(P)\)を予測するモデルも提案されている[2, 15]．一方で，Airbnbにおける需要曲線は価格\(P\)だけでなく，時間\(t\)や個別の物件\(id\)に依存すると考えられる．&lt;/li&gt;
      &lt;li&gt;需要曲線が時間に依存する原因として，季節性とリードタイムがある．&lt;/li&gt;
      &lt;li&gt;需要曲線が物件に依存する原因として，Airbnbが扱う物件の特殊性と，人気の格差がある．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;以上から，需要曲線\(F(P, t, id)\)を予測するのは非常に難しい．&lt;/li&gt;
  &lt;li&gt;また，我々が提示した価格を，ホストが必ずしも採用しないことも，問題の複雑さを一層増す原因となっている．&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;our-approach&quot;&gt;Our approach&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;\(F(P, t, id)\)を適正価格にマッピングするPricing strategy modelを提案する．このモデルは，独自に設定した損失関数を最小化するよう学習したモデルである．&lt;/li&gt;
  &lt;li&gt;従来手法では，製品の特徴に対して線形な価値関数を想定していた[1, 4, 5]が，我々のモデルは非線形である．
    &lt;ul&gt;
      &lt;li&gt;需要関数をGradient boosting machine (GBM)で予測する．&lt;/li&gt;
      &lt;li&gt;損失関数はSupport vector regression (SVR)で利用されている\(\epsilon\)-incentive loss functionをもとにしているが，正確な目的変数を持たず，\(\epsilon\)の値をtraining sampleごとに変えている．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;本論文の貢献は以下の二点：
    &lt;ul&gt;
      &lt;li&gt;適正価格の効率を放火する指標を提案する．&lt;/li&gt;
      &lt;li&gt;上記の指標をもとに，適正な価格戦略を学習する回帰モデルを提案する．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;pricing-system-overview&quot;&gt;Pricing system overview&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;Airbnbの価格推奨モデルは，以下の３つから成る．
    &lt;ul&gt;
      &lt;li&gt;Booking probability model&lt;/li&gt;
      &lt;li&gt;Strategy model&lt;/li&gt;
      &lt;li&gt;Personalization&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;以下では，特にStrategy modelに焦点をあてつつ，それぞれの特徴について述べる&lt;sup id=&quot;fnref:configuration&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:configuration&quot; class=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;．&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;booking-probability-model&quot;&gt;Booking probability model&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;特定日に予約されるかどうかを，二値の識別問題として解く．&lt;/li&gt;
  &lt;li&gt;特徴量として，部屋の特徴，季節性，周辺地域の繁忙度などを用いる．&lt;/li&gt;
  &lt;li&gt;Grandient boosting machine（GBM）で学習する．地理情報を考慮してサンプリングレートを調整したら，精度があがった．&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;strategy-model&quot;&gt;Strategy model&lt;/h1&gt;

&lt;h2 id=&quot;evaluatinge-price-suggestion&quot;&gt;Evaluatinge Price suggestion&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;特定日の適正価格を推薦するために，回帰問題を解く．&lt;/li&gt;
  &lt;li&gt;通常の回帰問題と異なり，適正価格が教師データとして与えられないところに難しさがある．加えて，ホストはAirbnbが推奨する価格をそのまま採用するわけではない．&lt;/li&gt;
  &lt;li&gt;教師データは，以下の4パターンに分類できる．
    &lt;ul&gt;
      &lt;li&gt;ホストが推奨価格より小さい価格を設定し，予約された（a）&lt;/li&gt;
      &lt;li&gt;ホストが推奨価格より小さい価格を設定し，予約されなかった（b）&lt;/li&gt;
      &lt;li&gt;ホストが推奨価格以上の価格を設定し，予約された（c）&lt;/li&gt;
      &lt;li&gt;ホストが推奨価格以上の価格を設定し，予約されなかった（d）&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;以下のような評価指標を導入した&lt;sup id=&quot;fnref:precision-recall&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:precision-recall&quot; class=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;sup id=&quot;fnref:complicated&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:complicated&quot; class=&quot;footnote&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;．
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Price Decrease Recall (PDR)&lt;/strong&gt; ：実際に予約されなかったデータのうち，予約されないと予測された（設定価格が推奨価格より大きい）データの割合．
\(PDR = \frac{d}{b+d}\)&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Price Decrease Precision (PDP)&lt;/strong&gt; ：予約されないと予測された（設定価格が推奨価格より大きい）データのうち，実際に予約されなかったデータの割合．\(PDR = \frac{d}{c+d}\)&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Price Increase Recall (PIR)&lt;/strong&gt; ：実際に予約されたデータのうち，予約されると予測された（設定価格が推奨価格より小さい）データの割合．
\(PDR = \frac{a}{a+c}\)&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Price Increase Precision (PIP)&lt;/strong&gt; ：予約されると予測された（設定価格が推奨価格より小さい）データのうち，実際に予約されたデータの割合．\(PDR = \frac{a}{a+b}\)&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Booking Regret (BR)&lt;/strong&gt;：\(BR = median_{bookings}(max(0, \frac{P-P_{sug}}{P}))\)&lt;sup id=&quot;fnref:br&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:br&quot; class=&quot;footnote&quot;&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;ビジネス的な指標と相関が高かったのは，PDRとBRだった．
    &lt;ul&gt;
      &lt;li&gt;PDRが高いほど，ホストはより市場競争力の高い値付けをしていることになるため，成約率が高まると考えられる．&lt;/li&gt;
      &lt;li&gt;BRが小さいほど，成約価格と推奨価格が近いことになるため，ホストからより大きな信頼を勝ち取るれると考えられる．&lt;/li&gt;
      &lt;li&gt;両者はトレードオフの関係にあるため，同時に最適化する必要がある．一般に推奨価格を下げれば下げるほど，PDRが改善するが，BRが悪化する．&lt;/li&gt;
      &lt;li&gt;オフラインでの評価では，上記の二指標を用いる．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;objective-function&quot;&gt;Objective function&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;以上の考察を踏まえて，損失関数を設定する．ただし：
    &lt;ul&gt;
      &lt;li&gt;\(\mathbf{x}_i\)：案件\(i\)の特徴量．ホストの設定価格\(P_i\)，我々のモデルが予測した成約確率\(q_i\)，およびその他の市場需要指標を含む．&lt;/li&gt;
      &lt;li&gt;\(y_i\)：案件\(i\)の成約状況．成約した場合は\(1\)，成約しなかった場合は\(0\)．&lt;/li&gt;
      &lt;li&gt;\(f_{\theta}(\mathbf{x}_i)\)：案件\(i\)の特徴量\(\mathbf{x}_i\)とパラメータ\(\theta\)から推奨価格を計算する関数．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;損失関数：\(\mathcal{L} = \mathrm{argmin}_{\theta}\sum_{i=1}^{N}(L(P_i, y_i) - f_{\theta}(\mathbf{x}_i))^{+} + (f_{\theta}(\mathbf{x}_i) - U(P_i, y_i))^{+}\)
    &lt;ul&gt;
      &lt;li&gt;\((\cdot)^{+}\)は\(\mathrm{max}(\cdot, 0)\)を表す．&lt;/li&gt;
      &lt;li&gt;下限：\(L(P_i, y_i) = y_i \cdot P_i + (1-y_i)\cdot c_1 P_i\)．成約した案件については設定価格\(P_i\)を下限とし，成約しなかった案件については\(0 &amp;lt; c_1 \leq 1\)倍に値引きした価格を下限とする．&lt;/li&gt;
      &lt;li&gt;上限：\(U(P_i, y_i) = (1-y_i) \cdot P_i + y_i\cdot c_2 P_i\)．成約しなかった案件については設定価格\(P_i\)を上限とし，成約した案件については\(c_2 \geq 1\)倍に値上げした価格を上限とする．&lt;/li&gt;
      &lt;li&gt;このタスクでは最適価格がわからないため，上記のようなヒンジ型の損失関数（\(\epsilon\)-insensitive loss）を定義する．&lt;/li&gt;
      &lt;li&gt;なお，\(c_1=c_2=1\)と設定した場合は，\(U=L\)となり，実効的にホストによる設定価格\(P_i\)を教師データとした最適化が行われることになる．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;価格計算モデル：\(P_{sug} = f_{\theta}(\mathrm{x}) = P_i \cdot V\)．
    &lt;ul&gt;
      &lt;li&gt;デマンドスコアが高い（\(D \geq 0\)）とき：\(V = 1 + \theta_1 (q^{\phi_H^{-qD}} - \theta_2)\)．&lt;/li&gt;
      &lt;li&gt;デマンドスコアが低い（\(D &amp;lt; 0\)）とき：\(V = 1 + \theta_1 (q^{\phi_L^{-(1-q)D}} - \theta_2)\)．&lt;/li&gt;
      &lt;li&gt;デマンドスコア\(D\)は，クラスターレベルでガウス正規化されている．\(D\)が大きいとき，クラスター内の他の案件と比較してデマンドが高いことを意味する．&lt;/li&gt;
      &lt;li&gt;Demand constraint&lt;sup id=&quot;fnref:constraint&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:constraint&quot; class=&quot;footnote&quot;&gt;5&lt;/a&gt;&lt;/sup&gt; \(1 &amp;lt; \phi_L &amp;lt; \phi_H &amp;lt; 2\)は，デマンド曲線の曲がり具合を制御するためのパラメータ．デマンドが大きいときと小さいときで曲がり具合を変えるため，あえて別の定数として定めている．&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;粒度：基本的に案件レベルでパラメータ学習を行う．しかし十分なデータがない場合は，クラスターレベルや全体レベルで学習したパラメータを用いる場合もある．&lt;/li&gt;
  &lt;li&gt;制約：\(\theta_1\)や\(\theta_2\)は，現実的な値になるよう上下に制約条件を設けている．&lt;/li&gt;
  &lt;li&gt;頻度：Sparkを用いて，SGD（Stochastic Gradient Descent）で毎日学習する．&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;references&quot;&gt;References&lt;/h1&gt;

&lt;p&gt;個人的に気になったもののみ抜粋．&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;[1] Yasin Abbasi-Yadkori, Dávid Pál, and Csaba Szepesvári. 2011. Improved Algorithms for Linear Stochastic Bandits. In Proceedings of the 24th International Conference on Neural Information Processing Systems (NIPS’11). Curran Associates Inc., USA, 2312–2320.&lt;/li&gt;
  &lt;li&gt;[2] Patrick Bajari, Denis Nekipelov, Stephen P. Ryan, and Miaoyu Yang. 2015. Demand estimation with machine learning and model combination. National Bureau of Economic Research (2015).&lt;/li&gt;
  &lt;li&gt;[4] Wei Chu, Lihong Li, Lev Reyzin, and Robert Schapire. 2011. Contextual Bandits with Linear Payoff Functions. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics (Proceedings of Machine Learning Research), Geoffrey Gordon, David Dunson, and Miroslav DudÃŋk (Eds.), Vol. 15. PMLR, Fort Lauderdale, FL, USA, 208–214.&lt;/li&gt;
  &lt;li&gt;[5] Maxime Cohen, Ilan Lobel, and Renato Paes Leme. 2016. Feature-based Dynamic Pricing. In Proceedings of the 2016 ACM Conference on Economics and Computation. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2737045&lt;/li&gt;
  &lt;li&gt;[8] hihua Zhang, Rachel J. C. Chen, Lee D. Han, and Lu Yang. 2017. Defining the price of hospitality: networked hospitality exchange via Airbnb. sustainability 9, 1635 (2017).&lt;/li&gt;
  &lt;li&gt;[9] A Ikkala, T.; Lampinen. 2014. Defining the price of hospitality: networked
hospitality exchange via Airbnb. In Proceedings of the Companion Publication of
the 17th ACM Conference on Computer Supported Cooperative Work and Social Computing, (Proceedings of Machine Learning Research). Baltimore, MD, USA,
73âĂŞ–176.&lt;/li&gt;
  &lt;li&gt;[11] Q.; Yang T.; Guo L Li, Y.; Pan. 2016. Reasonable price recommendation on Airbnb using Multi-Scale clustering. In Proceedings of the 2016 35th Control Conference (CCC),. Chengdu, China, 7038âĂŞ7041.&lt;/li&gt;
  &lt;li&gt;[15] H. Varian. 2014. Big data: New tricks for econometrics. Journal of Economic Perspectives 28, 2 (2014), 3 – 28.&lt;/li&gt;
  &lt;li&gt;[16] J.L. Wang, D.; Nicolau. 2017. Price determinants of sharing economy based
accommodation rental: A study oflistings from 33 cities on Airbnb.com. Int. J.
Hosp. Manag. 62 (2017), 120–131.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;参考&quot;&gt;参考&lt;/h1&gt;

&lt;p&gt;以下の記事を参考にさせて頂いた．&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://honawork.hatenablog.com/entry/2018/08/24/181947&quot;&gt;【KDD2018】論文『Customized Regression Model for Airbnb Dynamic Pricing』を読んでまとめた - 港区で苦しむマーケティングサイエンティストのメモ帳&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:configuration&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;論文の章構成を一部変更している． &lt;a href=&quot;#fnref:configuration&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:precision-recall&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;いつもPrecision（精度）とRecall（再現率）を忘れてしまう．Precisionは，正と予測したデータのうち，実際に正であるデータの割合．一方Recallは，実際に正であるデータのうち，正と予測したデータの割合．&lt;a href=&quot;http://ibisforest.org/index.php?F%E5%80%A4&quot;&gt;F値 (F-measure) - 朱鷺の杜Wiki&lt;/a&gt;を参考にさせて頂いた． &lt;a href=&quot;#fnref:precision-recall&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:complicated&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;ややこしい．推奨価格は，予約されうる最大の価格と考えると理解できる．設定価格が推奨価格より大きい場合，Airbnbの予測としては「予約されない」となる．逆に，設定価格が推奨価格より小さい場合，Airbnbの予測としては「予約される」となる． &lt;a href=&quot;#fnref:complicated&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:br&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;BRについては，何を表しているかよくわからなかった． &lt;a href=&quot;#fnref:br&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:constraint&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;適切な日本語訳が浮かばなかった．デマンド制約？ &lt;a href=&quot;#fnref:constraint&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
        <pubDate>Sun, 14 Oct 2018 00:00:00 +0000</pubDate>
        <link>https://haltaro.github.io/2018/10/14/airbnb-dynamic-pricing</link>
        <guid isPermaLink="true">https://haltaro.github.io/2018/10/14/airbnb-dynamic-pricing</guid>
        
        
        <category>machine learning</category>
        
        <category>papers</category>
        
      </item>
    
      <item>
        <title>PlotlyでSeabornライクに色指定する</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://plot.ly/feed/#/&quot;&gt;Plotly&lt;/a&gt;はとても便利だが，&lt;a href=&quot;https://seaborn.pydata.org/&quot;&gt;Seaborn&lt;/a&gt;の&lt;a href=&quot;https://seaborn.pydata.org/generated/seaborn.color_palette.html&quot;&gt;color_palette&lt;/a&gt;のように柔軟に色指定ができない．そこで，Plotlyの&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;color&lt;/code&gt;引数として使用可能なRGB値を，Seabornの&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;color_palette&lt;/code&gt;から取得するラッパー関数を作成した．&lt;/p&gt;

&lt;h1 id=&quot;plotly&quot;&gt;Plotly&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://plot.ly/feed/#/&quot;&gt;Plotly&lt;/a&gt;はインタラクティブで美麗なグラフ描画に強みを持つライブラリ．&lt;a href=&quot;https://www.python.org/&quot;&gt;Python&lt;/a&gt;，&lt;a href=&quot;https://www.r-project.org/&quot;&gt;R&lt;/a&gt;，あるいは&lt;a href=&quot;https://developer.mozilla.org/ja/docs/Web/JavaScript&quot;&gt;JavaScript&lt;/a&gt;から呼び出して使える．私は&lt;a href=&quot;http://jupyter.org/&quot;&gt;Jupyter Notebook&lt;/a&gt;上で作図したグラフをグリグリ動かしてドヤることが多いので，この記事ではPythonからの利用を前提とする&lt;sup id=&quot;fnref:python&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:python&quot; class=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;．&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://pypi.org/project/pip/&quot;&gt;pip&lt;/a&gt;でインストールする場合は&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pip install plotly&lt;/code&gt;．&lt;a href=&quot;https://conda.io/docs/&quot;&gt;Conda&lt;/a&gt;でインストールする場合は&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;conda install -c plotly plotly&lt;/code&gt;．&lt;/p&gt;

&lt;h1 id=&quot;seaborn&quot;&gt;Seaborn&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://seaborn.pydata.org/&quot;&gt;Seaborn&lt;/a&gt;は，&lt;a href=&quot;https://matplotlib.org/&quot;&gt;matplotlib&lt;/a&gt;をベースとしたグラフ描画ライブラリ．&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;color_palette(palette, n_colors)&lt;/code&gt;で，特定の&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;palette&lt;/code&gt;の&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n_colors&lt;/code&gt;個の色リストを直感的に取得できる．Plotlyでこれを使いたい．&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/2018-10-14-seaborn.png&quot; alt=&quot;seaborn&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://pypi.org/project/pip/&quot;&gt;pip&lt;/a&gt;でインストールする場合は&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pip install seaborn&lt;/code&gt;．&lt;a href=&quot;https://conda.io/docs/&quot;&gt;Conda&lt;/a&gt;でインストールする場合は&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;conda install -c anaconda seaborn&lt;/code&gt;．&lt;/p&gt;

&lt;h1 id=&quot;plotlyにおける色指定&quot;&gt;Plotlyにおける色指定&lt;/h1&gt;

&lt;p&gt;Plotlyでは，非常に色指定をし辛い&lt;sup id=&quot;fnref:plotly&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:plotly&quot; class=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;sup id=&quot;fnref:tutorial&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:tutorial&quot; class=&quot;footnote&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;．&lt;a href=&quot;https://github.com/jackparmer/colorlover&quot;&gt;colorlover - GitHub&lt;/a&gt;を使ってカラーパレット的なものを使う&lt;a href=&quot;https://plot.ly/ipython-notebooks/color-scales/&quot;&gt;チュートリアル&lt;/a&gt;が公開されているが，パレットの種類が少ないし，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;interp&lt;/code&gt;で任意のスケールに拡張したときにムラが出たり，エラーがでたりする場合がある．あるいは，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;marker&lt;/code&gt;の&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;colorscale&lt;/code&gt;でパレットを指定する&lt;a href=&quot;https://plot.ly/python/line-and-scatter/&quot;&gt;チュートリアル&lt;/a&gt;も公開されているが，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;color&lt;/code&gt;でサンプルごとにスケール値を指定する必要があり，凡例ごとに色を塗り分けるときなど，直感的なコーディングがしづらそう．&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/2018-10-14-input.png&quot; alt=&quot;input&quot; /&gt;
&lt;img src=&quot;/assets/2018-10-14-output.png&quot; alt=&quot;output&quot; /&gt;&lt;/p&gt;

&lt;p&gt;そこで，&lt;a href=&quot;https://seaborn.pydata.org/&quot;&gt;Seaborn&lt;/a&gt;ライクに色を指定するための関数を作成した．&lt;/p&gt;

&lt;h1 id=&quot;作成した関数&quot;&gt;作成した関数&lt;/h1&gt;

&lt;script src=&quot;https://gist.github.com/haltaro/46ae7cf74affbf6fc8dc1b735131e824.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;関数の内部で&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sns.color_palette&lt;/code&gt;を呼び出し，RGB値を取得している．ただし，Plotly用のフォーマット&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rgb({}, {}, {})&lt;/code&gt;に変換している．&lt;/p&gt;

&lt;h1 id=&quot;実験&quot;&gt;実験&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/haltaro/plotly-with-seaborn-color_palette/blob/master/plotly_colorpalette.ipynb&quot;&gt;こちら&lt;/a&gt;のJupyter notebookで実験してみた．15パターンの凡例を折れ線グラフで表示する．&lt;/p&gt;

&lt;h2 id=&quot;ライブラリのインポート&quot;&gt;ライブラリのインポート&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/haltaro/2d6873cb97e56e6d7766b96355b69db3.js&quot;&gt;&lt;/script&gt;

&lt;h2 id=&quot;データセット生成&quot;&gt;データセット生成&lt;/h2&gt;

&lt;p&gt;15種類のランダムな100点からなるサンプルを作成する．&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/haltaro/a81373e40b135577fb733da9931049e8.js&quot;&gt;&lt;/script&gt;

&lt;h2 id=&quot;plotlyで素直にプロット&quot;&gt;Plotlyで素直にプロット&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/haltaro/6ffb22849b80846411c43309dc678dab.js&quot;&gt;&lt;/script&gt;

&lt;html&gt;&lt;head&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;/head&gt;&lt;body&gt;&lt;script type=&quot;text/javascript&quot;&gt;/**
* plotly.js v1.41.3
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(t){if(&quot;object&quot;==typeof exports&amp;&amp;&quot;undefined&quot;!=typeof module)module.exports=t();else if(&quot;function&quot;==typeof define&amp;&amp;define.amd)define([],t);else{(&quot;undefined&quot;!=typeof window?window:&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:this).Plotly=t()}}(function(){return function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l=&quot;function&quot;==typeof require&amp;&amp;require;if(!s&amp;&amp;l)return l(o,!0);if(a)return a(o,!0);var c=new Error(&quot;Cannot find module '&quot;+o+&quot;'&quot;);throw c.code=&quot;MODULE_NOT_FOUND&quot;,c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return i(e[o][1][t]||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a=&quot;function&quot;==typeof require&amp;&amp;require,o=0;o&lt;n.length;o++)i(n[o]);return i}}()({1:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../src/lib&quot;),i={&quot;X,X div&quot;:&quot;direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;&quot;,&quot;X input,X button&quot;:&quot;font-family:'Open Sans', verdana, arial, sans-serif;&quot;,&quot;X input:focus,X button:focus&quot;:&quot;outline:none;&quot;,&quot;X a&quot;:&quot;text-decoration:none;&quot;,&quot;X a:hover&quot;:&quot;text-decoration:none;&quot;,&quot;X .crisp&quot;:&quot;shape-rendering:crispEdges;&quot;,&quot;X .user-select-none&quot;:&quot;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;&quot;,&quot;X svg&quot;:&quot;overflow:hidden;&quot;,&quot;X svg a&quot;:&quot;fill:#447adb;&quot;,&quot;X svg a:hover&quot;:&quot;fill:#3c6dc5;&quot;,&quot;X .main-svg&quot;:&quot;position:absolute;top:0;left:0;pointer-events:none;&quot;,&quot;X .main-svg .draglayer&quot;:&quot;pointer-events:all;&quot;,&quot;X .cursor-default&quot;:&quot;cursor:default;&quot;,&quot;X .cursor-pointer&quot;:&quot;cursor:pointer;&quot;,&quot;X .cursor-crosshair&quot;:&quot;cursor:crosshair;&quot;,&quot;X .cursor-move&quot;:&quot;cursor:move;&quot;,&quot;X .cursor-col-resize&quot;:&quot;cursor:col-resize;&quot;,&quot;X .cursor-row-resize&quot;:&quot;cursor:row-resize;&quot;,&quot;X .cursor-ns-resize&quot;:&quot;cursor:ns-resize;&quot;,&quot;X .cursor-ew-resize&quot;:&quot;cursor:ew-resize;&quot;,&quot;X .cursor-sw-resize&quot;:&quot;cursor:sw-resize;&quot;,&quot;X .cursor-s-resize&quot;:&quot;cursor:s-resize;&quot;,&quot;X .cursor-se-resize&quot;:&quot;cursor:se-resize;&quot;,&quot;X .cursor-w-resize&quot;:&quot;cursor:w-resize;&quot;,&quot;X .cursor-e-resize&quot;:&quot;cursor:e-resize;&quot;,&quot;X .cursor-nw-resize&quot;:&quot;cursor:nw-resize;&quot;,&quot;X .cursor-n-resize&quot;:&quot;cursor:n-resize;&quot;,&quot;X .cursor-ne-resize&quot;:&quot;cursor:ne-resize;&quot;,&quot;X .cursor-grab&quot;:&quot;cursor:-webkit-grab;cursor:grab;&quot;,&quot;X .modebar&quot;:&quot;position:absolute;top:2px;right:2px;z-index:1001;background:rgba(255,255,255,0.7);&quot;,&quot;X .modebar--hover&quot;:&quot;opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;&quot;,&quot;X:hover .modebar--hover&quot;:&quot;opacity:1;&quot;,&quot;X .modebar-group&quot;:&quot;float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;&quot;,&quot;X .modebar-group:first-child&quot;:&quot;margin-left:0px;&quot;,&quot;X .modebar-btn&quot;:&quot;position:relative;font-size:16px;padding:3px 4px;cursor:pointer;line-height:normal;box-sizing:border-box;&quot;,&quot;X .modebar-btn svg&quot;:&quot;position:relative;top:2px;&quot;,&quot;X .modebar-btn path&quot;:&quot;fill:rgba(0,31,95,0.3);&quot;,&quot;X .modebar-btn.active path,X .modebar-btn:hover path&quot;:&quot;fill:rgba(0,22,72,0.5);&quot;,&quot;X .modebar-btn.modebar-btn--logo&quot;:&quot;padding:3px 1px;&quot;,&quot;X .modebar-btn.modebar-btn--logo path&quot;:&quot;fill:#447adb !important;&quot;,&quot;X [data-title]:before,X [data-title]:after&quot;:&quot;position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;&quot;,&quot;X [data-title]:hover:before,X [data-title]:hover:after&quot;:&quot;display:block;opacity:1;&quot;,&quot;X [data-title]:before&quot;:&quot;content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;&quot;,&quot;X [data-title]:after&quot;:&quot;content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;&quot;,&quot;X .select-outline&quot;:&quot;fill:none;stroke-width:1;shape-rendering:crispEdges;&quot;,&quot;X .select-outline-1&quot;:&quot;stroke:white;&quot;,&quot;X .select-outline-2&quot;:&quot;stroke:black;stroke-dasharray:2px 2px;&quot;,Y:&quot;font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;&quot;,&quot;Y p&quot;:&quot;margin:0;&quot;,&quot;Y .notifier-note&quot;:&quot;min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;&quot;,&quot;Y .notifier-close&quot;:&quot;color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;&quot;,&quot;Y .notifier-close:hover&quot;:&quot;color:#444;text-decoration:none;cursor:pointer;&quot;};for(var a in i){var o=a.replace(/^,/,&quot; ,&quot;).replace(/X/g,&quot;.js-plotly-plot .plotly&quot;).replace(/Y/g,&quot;.plotly-notifier&quot;);n.addStyleRule(o,i[a])}},{&quot;../src/lib&quot;:693}],2:[function(t,e,r){&quot;use strict&quot;;e.exports={undo:{width:857.1,height:1e3,path:&quot;m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},home:{width:928.6,height:1e3,path:&quot;m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},&quot;camera-retro&quot;:{width:1e3,height:1e3,path:&quot;m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},zoombox:{width:1e3,height:1e3,path:&quot;m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},pan:{width:1e3,height:1e3,path:&quot;m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},zoom_plus:{width:1e3,height:1e3,path:&quot;m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},zoom_minus:{width:1e3,height:1e3,path:&quot;m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},autoscale:{width:1e3,height:1e3,path:&quot;m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},tooltip_basic:{width:1500,height:1e3,path:&quot;m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},tooltip_compare:{width:1125,height:1e3,path:&quot;m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},plotlylogo:{width:1542,height:1e3,path:&quot;m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},&quot;z-axis&quot;:{width:1e3,height:1e3,path:&quot;m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},&quot;3d_rotate&quot;:{width:1e3,height:1e3,path:&quot;m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},camera:{width:1e3,height:1e3,path:&quot;m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},movie:{width:1e3,height:1e3,path:&quot;m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},question:{width:857.1,height:1e3,path:&quot;m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},disk:{width:857.1,height:1e3,path:&quot;m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},lasso:{width:1031,height:1e3,path:&quot;m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},selectbox:{width:1e3,height:1e3,path:&quot;m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},spikeline:{width:1e3,height:1e3,path:&quot;M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z&quot;,transform:&quot;matrix(1.5 0 0 -1.5 0 850)&quot;}}},{}],3:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/aggregate&quot;)},{&quot;../src/transforms/aggregate&quot;:1144}],4:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/bar&quot;)},{&quot;../src/traces/bar&quot;:840}],5:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/barpolar&quot;)},{&quot;../src/traces/barpolar&quot;:852}],6:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/box&quot;)},{&quot;../src/traces/box&quot;:862}],7:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/components/calendars&quot;)},{&quot;../src/components/calendars&quot;:565}],8:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/candlestick&quot;)},{&quot;../src/traces/candlestick&quot;:871}],9:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/carpet&quot;)},{&quot;../src/traces/carpet&quot;:890}],10:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/choropleth&quot;)},{&quot;../src/traces/choropleth&quot;:904}],11:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/cone&quot;)},{&quot;../src/traces/cone&quot;:912}],12:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/contour&quot;)},{&quot;../src/traces/contour&quot;:927}],13:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/contourcarpet&quot;)},{&quot;../src/traces/contourcarpet&quot;:938}],14:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/core&quot;)},{&quot;../src/core&quot;:672}],15:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/filter&quot;)},{&quot;../src/transforms/filter&quot;:1145}],16:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/groupby&quot;)},{&quot;../src/transforms/groupby&quot;:1146}],17:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/heatmap&quot;)},{&quot;../src/traces/heatmap&quot;:950}],18:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/heatmapgl&quot;)},{&quot;../src/traces/heatmapgl&quot;:960}],19:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/histogram&quot;)},{&quot;../src/traces/histogram&quot;:971}],20:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/histogram2d&quot;)},{&quot;../src/traces/histogram2d&quot;:977}],21:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/histogram2dcontour&quot;)},{&quot;../src/traces/histogram2dcontour&quot;:981}],22:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./core&quot;);n.register([t(&quot;./bar&quot;),t(&quot;./box&quot;),t(&quot;./heatmap&quot;),t(&quot;./histogram&quot;),t(&quot;./histogram2d&quot;),t(&quot;./histogram2dcontour&quot;),t(&quot;./pie&quot;),t(&quot;./contour&quot;),t(&quot;./scatterternary&quot;),t(&quot;./violin&quot;),t(&quot;./scatter3d&quot;),t(&quot;./surface&quot;),t(&quot;./mesh3d&quot;),t(&quot;./cone&quot;),t(&quot;./streamtube&quot;),t(&quot;./scattergeo&quot;),t(&quot;./choropleth&quot;),t(&quot;./scattergl&quot;),t(&quot;./splom&quot;),t(&quot;./pointcloud&quot;),t(&quot;./heatmapgl&quot;),t(&quot;./parcoords&quot;),t(&quot;./scattermapbox&quot;),t(&quot;./sankey&quot;),t(&quot;./table&quot;),t(&quot;./carpet&quot;),t(&quot;./scattercarpet&quot;),t(&quot;./contourcarpet&quot;),t(&quot;./ohlc&quot;),t(&quot;./candlestick&quot;),t(&quot;./scatterpolar&quot;),t(&quot;./scatterpolargl&quot;),t(&quot;./barpolar&quot;)]),n.register([t(&quot;./aggregate&quot;),t(&quot;./filter&quot;),t(&quot;./groupby&quot;),t(&quot;./sort&quot;)]),n.register([t(&quot;./calendars&quot;)]),e.exports=n},{&quot;./aggregate&quot;:3,&quot;./bar&quot;:4,&quot;./barpolar&quot;:5,&quot;./box&quot;:6,&quot;./calendars&quot;:7,&quot;./candlestick&quot;:8,&quot;./carpet&quot;:9,&quot;./choropleth&quot;:10,&quot;./cone&quot;:11,&quot;./contour&quot;:12,&quot;./contourcarpet&quot;:13,&quot;./core&quot;:14,&quot;./filter&quot;:15,&quot;./groupby&quot;:16,&quot;./heatmap&quot;:17,&quot;./heatmapgl&quot;:18,&quot;./histogram&quot;:19,&quot;./histogram2d&quot;:20,&quot;./histogram2dcontour&quot;:21,&quot;./mesh3d&quot;:23,&quot;./ohlc&quot;:24,&quot;./parcoords&quot;:25,&quot;./pie&quot;:26,&quot;./pointcloud&quot;:27,&quot;./sankey&quot;:28,&quot;./scatter3d&quot;:29,&quot;./scattercarpet&quot;:30,&quot;./scattergeo&quot;:31,&quot;./scattergl&quot;:32,&quot;./scattermapbox&quot;:33,&quot;./scatterpolar&quot;:34,&quot;./scatterpolargl&quot;:35,&quot;./scatterternary&quot;:36,&quot;./sort&quot;:37,&quot;./splom&quot;:38,&quot;./streamtube&quot;:39,&quot;./surface&quot;:40,&quot;./table&quot;:41,&quot;./violin&quot;:42}],23:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/mesh3d&quot;)},{&quot;../src/traces/mesh3d&quot;:986}],24:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/ohlc&quot;)},{&quot;../src/traces/ohlc&quot;:991}],25:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/parcoords&quot;)},{&quot;../src/traces/parcoords&quot;:1002}],26:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/pie&quot;)},{&quot;../src/traces/pie&quot;:1013}],27:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/pointcloud&quot;)},{&quot;../src/traces/pointcloud&quot;:1022}],28:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/sankey&quot;)},{&quot;../src/traces/sankey&quot;:1028}],29:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatter3d&quot;)},{&quot;../src/traces/scatter3d&quot;:1064}],30:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattercarpet&quot;)},{&quot;../src/traces/scattercarpet&quot;:1070}],31:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattergeo&quot;)},{&quot;../src/traces/scattergeo&quot;:1077}],32:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattergl&quot;)},{&quot;../src/traces/scattergl&quot;:1085}],33:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattermapbox&quot;)},{&quot;../src/traces/scattermapbox&quot;:1091}],34:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatterpolar&quot;)},{&quot;../src/traces/scatterpolar&quot;:1098}],35:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatterpolargl&quot;)},{&quot;../src/traces/scatterpolargl&quot;:1102}],36:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatterternary&quot;)},{&quot;../src/traces/scatterternary&quot;:1108}],37:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/sort&quot;)},{&quot;../src/transforms/sort&quot;:1148}],38:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/splom&quot;)},{&quot;../src/traces/splom&quot;:1113}],39:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/streamtube&quot;)},{&quot;../src/traces/streamtube&quot;:1118}],40:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/surface&quot;)},{&quot;../src/traces/surface&quot;:1123}],41:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/table&quot;)},{&quot;../src/traces/table&quot;:1131}],42:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/violin&quot;)},{&quot;../src/traces/violin&quot;:1139}],43:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){t=t||document.body,e=e||{};var r=[.01,1/0];&quot;distanceLimits&quot;in e&amp;&amp;(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]);&quot;zoomMin&quot;in e&amp;&amp;(r[0]=e.zoomMin);&quot;zoomMax&quot;in e&amp;&amp;(r[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||&quot;orbit&quot;,distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay;c.idle(e-r),c.flush(e-(100+2*r));var i=e-2*r;c.recalcMatrix(i);for(var a=!0,o=c.computedMatrix,s=0;s&lt;16;++s)a=a&amp;&amp;u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&amp;&amp;t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(d,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){return c.setMode(t),c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(&quot;contextmenu&quot;,function(t){return t.preventDefault(),!1});var g=0,m=0,v={shift:!1,control:!1,alt:!1,meta:!1};function y(e,r,i,a){var o=1/t.clientHeight,s=o*(r-g),l=o*(i-m),u=d.flipX?1:-1,h=d.flipY?1:-1,p=Math.PI*d.rotateSpeed,y=n();if(1&amp;e)a.shift?c.rotate(y,0,0,-s*p):c.rotate(y,u*p*s,-h*p*l,0);else if(2&amp;e)c.pan(y,-d.translateSpeed*s*f,d.translateSpeed*l*f,0);else if(4&amp;e){var x=d.zoomSpeed*l/window.innerHeight*(y-c.lastT())*50;c.pan(y,0,0,f*(Math.exp(x)-1))}g=r,m=i,v=a}return a(t,y),t.addEventListener(&quot;touchstart&quot;,function(e){var r=s(e.changedTouches[0],t);y(0,r[0],r[1],v),y(1,r[0],r[1],v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),t.addEventListener(&quot;touchmove&quot;,function(e){var r=s(e.changedTouches[0],t);y(1,r[0],r[1],v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),t.addEventListener(&quot;touchend&quot;,function(e){s(e.changedTouches[0],t),y(0,g,m,v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),o(t,function(t,e,r){var i=d.flipX?1:-1,a=d.flipY?1:-1,o=n();if(Math.abs(t)&gt;Math.abs(e))c.rotate(o,0,0,-t*i*Math.PI*d.rotateSpeed/window.innerWidth);else{var s=d.zoomSpeed*a*e/window.innerHeight*(o-c.lastT())/100;c.pan(o,0,0,f*(Math.exp(s)-1))}},!0),d};var n=t(&quot;right-now&quot;),i=t(&quot;3d-view&quot;),a=t(&quot;mouse-change&quot;),o=t(&quot;mouse-wheel&quot;),s=t(&quot;mouse-event-offset&quot;),l=t(&quot;has-passive-events&quot;)},{&quot;3d-view&quot;:44,&quot;has-passive-events&quot;:392,&quot;mouse-change&quot;:415,&quot;mouse-event-offset&quot;:416,&quot;mouse-wheel&quot;:418,&quot;right-now&quot;:477}],44:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||&quot;turntable&quot;,u=n(),f=i(),h=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:u,orbit:f,matrix:h},c)};var n=t(&quot;turntable-camera-controller&quot;),i=t(&quot;orbit-camera-controller&quot;),a=t(&quot;matrix-camera-controller&quot;);function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode=&quot;turntable&quot;,this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[[&quot;flush&quot;,1],[&quot;idle&quot;,1],[&quot;lookAt&quot;,4],[&quot;rotate&quot;,4],[&quot;pan&quot;,4],[&quot;translate&quot;,4],[&quot;setMatrix&quot;,2],[&quot;setDistanceLimits&quot;,2],[&quot;setDistance&quot;,2]].forEach(function(t){for(var e=t[0],r=[],n=0;n&lt;t[1];++n)r.push(&quot;a&quot;+n);var i=&quot;var cc=this._controllerList;for(var i=0;i&lt;cc.length;++i){cc[i].&quot;+t[0]+&quot;(&quot;+r.join()+&quot;)}&quot;;s[e]=Function.apply(null,r.concat(i))}),s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e&lt;0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},{&quot;matrix-camera-controller&quot;:413,&quot;orbit-camera-controller&quot;:436,&quot;turntable-camera-controller&quot;:516}],45:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n){&quot;use strict&quot;;t.sankey=function(){var t={},i=24,a=8,o=[1,1],s=[],l=[];function c(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}s.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),s.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function u(t){return t.y+t.dy/2}function f(t){return t.value}return t.nodeWidth=function(e){return arguments.length?(i=+e,t):i},t.nodePadding=function(e){return arguments.length?(a=+e,t):a},t.nodes=function(e){return arguments.length?(s=e,t):s},t.links=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(o=e,t):o},t.layout=function(n){return s.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),l.forEach(function(t,e){var r=t.source,n=t.target;&quot;number&quot;==typeof r&amp;&amp;(r=t.source=s[t.source]),&quot;number&quot;==typeof n&amp;&amp;(n=t.target=s[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),s.forEach(function(t){t.value=Math.max(e.sum(t.sourceLinks,f),e.sum(t.targetLinks,f))}),function(){for(var t,e,r=s,n=0;r.length;)t=[],r.forEach(function(e){e.x=n,e.dx=i,e.sourceLinks.forEach(function(e){t.indexOf(e.target)&lt;0&amp;&amp;t.push(e.target)})}),r=t,++n;(function(t){s.forEach(function(e){e.sourceLinks.length||(e.x=t-1)})})(n),e=(o[0]-i)/(n-1),s.forEach(function(t){t.x*=e})}(),function(t){var n,i=r.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(s).map(function(t){return t.values});n=e.min(i,function(t){return(o[1]-(t.length-1)*a)/e.sum(t,f)}),i.forEach(function(t){t.forEach(function(t,e){t.y=e,t.dy=t.value*n})}),l.forEach(function(t){t.dy=t.value*n}),d();for(var c=1;t&gt;0;--t)p(c*=.99),d(),h(c),d();function h(t){function r(t){return u(t.source)*t.value}i.forEach(function(n){n.forEach(function(n){if(n.targetLinks.length){var i=e.sum(n.targetLinks,r)/e.sum(n.targetLinks,f);n.y+=(i-u(n))*t}})})}function p(t){function r(t){return u(t.target)*t.value}i.slice().reverse().forEach(function(n){n.forEach(function(n){if(n.sourceLinks.length){var i=e.sum(n.sourceLinks,r)/e.sum(n.sourceLinks,f);n.y+=(i-u(n))*t}})})}function d(){i.forEach(function(t){var e,r,n,i=0,s=t.length;for(t.sort(g),n=0;n&lt;s;++n)e=t[n],(r=i-e.y)&gt;0&amp;&amp;(e.y+=r),i=e.y+e.dy+a;if((r=i-a-o[1])&gt;0)for(i=e.y-=r,n=s-2;n&gt;=0;--n)e=t[n],(r=e.y+e.dy+a-i)&gt;0&amp;&amp;(e.y-=r),i=e.y})}function g(t,e){return t.y-e.y}}(n),c(),t},t.relayout=function(){return c(),t},t.link=function(){var t=.5;function e(e){var r=e.source.x+e.source.dx,i=e.target.x,a=n.interpolateNumber(r,i),o=a(t),s=a(1-t),l=e.source.y+e.sy,c=l+e.dy,u=e.target.y+e.ty,f=u+e.dy;return&quot;M&quot;+r+&quot;,&quot;+l+&quot;C&quot;+o+&quot;,&quot;+l+&quot; &quot;+s+&quot;,&quot;+u+&quot; &quot;+i+&quot;,&quot;+u+&quot;L&quot;+i+&quot;,&quot;+f+&quot;C&quot;+s+&quot;,&quot;+f+&quot; &quot;+o+&quot;,&quot;+c+&quot; &quot;+r+&quot;,&quot;+c+&quot;Z&quot;}return e.curvature=function(r){return arguments.length?(t=+r,e):t},e},t},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?i(r,t(&quot;d3-array&quot;),t(&quot;d3-collection&quot;),t(&quot;d3-interpolate&quot;)):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{&quot;d3-array&quot;:139,&quot;d3-collection&quot;:140,&quot;d3-interpolate&quot;:144}],46:[function(t,e,r){&quot;use strict&quot;;var n=&quot;undefined&quot;==typeof WeakMap?t(&quot;weak-map&quot;):WeakMap,i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=new n;e.exports=function(t){var e=o.get(t),r=e&amp;&amp;(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308,&quot;weak-map&quot;:526}],47:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map(function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case&quot;a&quot;:t[6]+=n,t[7]+=i;break;case&quot;v&quot;:t[1]+=i;break;case&quot;h&quot;:t[1]+=n;break;default:for(var s=1;s&lt;t.length;)t[s++]+=n,t[s++]+=i}switch(o){case&quot;Z&quot;:n=e,i=r;break;case&quot;H&quot;:n=t[1];break;case&quot;V&quot;:i=t[1];break;case&quot;M&quot;:n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t})}},{}],48:[function(t,e,r){var n=t(&quot;pad-left&quot;);e.exports=function(t,e,r){e=&quot;number&quot;==typeof e?e:1,r=r||&quot;: &quot;;var i=t.split(/\r?\n/),a=String(i.length+e-1).length;return i.map(function(t,i){var o=i+e,s=String(o).length,l=n(o,a-s);return l+r+t}).join(&quot;\n&quot;)}},{&quot;pad-left&quot;:437}],49:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,n=[t[0]],a=[0],o=1;o&lt;e;++o)if(n.push(t[o]),i(n,r)){if(a.push(o),a.length===r+1)return a}else n.pop();return a};var n=t(&quot;robust-orientation&quot;);function i(t,e){for(var r=new Array(e+1),i=0;i&lt;t.length;++i)r[i]=t[i];for(i=0;i&lt;=t.length;++i){for(var a=t.length;a&lt;=e;++a){for(var o=new Array(e),s=0;s&lt;e;++s)o[s]=Math.pow(a+1-i,s);r[a]=o}if(n.apply(void 0,r))return!0}return!1}},{&quot;robust-orientation&quot;:483}],50:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return n(e).filter(function(r){for(var n=new Array(r.length),a=0;a&lt;r.length;++a)n[a]=e[r[a]];return i(n)*t&lt;1})};var n=t(&quot;delaunay-triangulate&quot;),i=t(&quot;circumradius&quot;)},{circumradius:101,&quot;delaunay-triangulate&quot;:149}],51:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t(&quot;alpha-complex&quot;),i=t(&quot;simplicial-complex-boundary&quot;)},{&quot;alpha-complex&quot;:50,&quot;simplicial-complex-boundary&quot;:490}],52:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){if(!t||null==t.length)throw Error(&quot;Argument should be an array&quot;);e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n&lt;e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o&lt;s;o+=e)t[o]&gt;i&amp;&amp;(i=t[o]),t[o]&lt;a&amp;&amp;(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],53:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;array-bounds&quot;);e.exports=function(t,e,r){if(!t||null==t.length)throw Error(&quot;Argument should be an array&quot;);null==e&amp;&amp;(e=1);null==r&amp;&amp;(r=n(t,e));for(var i=0;i&lt;e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&amp;&amp;o===-1/0)for(s=i;s&lt;l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s&lt;l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s&lt;l;s+=e)t[s]=t[s]===o?0:1;else{var c=a-o;for(s=i;s&lt;l;s+=e)t[s]=0===c?.5:(t[s]-o)/c}}return t}},{&quot;array-bounds&quot;:52}],54:[function(t,e,r){e.exports=function(t,e){var r=&quot;number&quot;==typeof t,n=&quot;number&quot;==typeof e;r&amp;&amp;!n?(e=t,t=0):r||n||(t=0,e=0);var i=(e|=0)-(t|=0);if(i&lt;0)throw new Error(&quot;array length must be positive&quot;);for(var a=new Array(i),o=0,s=t;o&lt;i;o++,s++)a[o]=s;return a}},{}],55:[function(t,e,r){(function(r){&quot;use strict&quot;;function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i&lt;a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r&lt;n?-1:n&lt;r?1:0}function i(t){return r.Buffer&amp;&amp;&quot;function&quot;==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=t(&quot;util/&quot;),o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,l=&quot;foo&quot;===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function u(t){return!i(t)&amp;&amp;(&quot;function&quot;==typeof r.ArrayBuffer&amp;&amp;(&quot;function&quot;==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&amp;&amp;(t instanceof DataView||!!(t.buffer&amp;&amp;t.buffer instanceof ArrayBuffer))))}var f=e.exports=v,h=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(a.isFunction(t)){if(l)return t.name;var e=t.toString().match(h);return e&amp;&amp;e[1]}}function d(t,e){return&quot;string&quot;==typeof t?t.length&lt;e?t:t.slice(0,e):t}function g(t){if(l||!a.isFunction(t))return a.inspect(t);var e=p(t);return&quot;[Function&quot;+(e?&quot;: &quot;+e:&quot;&quot;)+&quot;]&quot;}function m(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function v(t,e){t||m(t,!0,e,&quot;==&quot;,f.ok)}function y(t,e,r,o){if(t===e)return!0;if(i(t)&amp;&amp;i(e))return 0===n(t,e);if(a.isDate(t)&amp;&amp;a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&amp;&amp;a.isRegExp(e))return t.source===e.source&amp;&amp;t.global===e.global&amp;&amp;t.multiline===e.multiline&amp;&amp;t.lastIndex===e.lastIndex&amp;&amp;t.ignoreCase===e.ignoreCase;if(null!==t&amp;&amp;&quot;object&quot;==typeof t||null!==e&amp;&amp;&quot;object&quot;==typeof e){if(u(t)&amp;&amp;u(e)&amp;&amp;c(t)===c(e)&amp;&amp;!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var l=(o=o||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&amp;&amp;l===o.expected.indexOf(e)||(o.actual.push(t),o.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(r&amp;&amp;Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=x(t),o=x(e);if(i&amp;&amp;!o||!i&amp;&amp;o)return!1;if(i)return t=s.call(t),e=s.call(e),y(t,e,r);var l,c,u=w(t),f=w(e);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),c=u.length-1;c&gt;=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c&gt;=0;c--)if(l=u[c],!y(t[l],e[l],r,n))return!1;return!0}(t,e,r,o))}return r?t===e:t==e}function x(t){return&quot;[object Arguments]&quot;==Object.prototype.toString.call(t)}function b(t,e){if(!t||!e)return!1;if(&quot;[object RegExp]&quot;==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&amp;&amp;!0===e.call({},t)}function _(t,e,r,n){var i;if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;block&quot; argument must be a function');&quot;string&quot;==typeof r&amp;&amp;(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&amp;&amp;r.name?&quot; (&quot;+r.name+&quot;).&quot;:&quot;.&quot;)+(n?&quot; &quot;+n:&quot;.&quot;),t&amp;&amp;!i&amp;&amp;m(i,r,&quot;Missing expected exception&quot;+n);var o=&quot;string&quot;==typeof n,s=!t&amp;&amp;i&amp;&amp;!r;if((!t&amp;&amp;a.isError(i)&amp;&amp;o&amp;&amp;b(i,r)||s)&amp;&amp;m(i,r,&quot;Got unwanted exception&quot;+n),t&amp;&amp;i&amp;&amp;r&amp;&amp;!b(i,r)||!t&amp;&amp;i)throw i}f.AssertionError=function(t){var e;this.name=&quot;AssertionError&quot;,this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g((e=this).actual),128)+&quot; &quot;+e.operator+&quot; &quot;+d(g(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,a=p(r),o=i.indexOf(&quot;\n&quot;+a);if(o&gt;=0){var s=i.indexOf(&quot;\n&quot;,o+1);i=i.substring(s+1)}this.stack=i}}},a.inherits(f.AssertionError,Error),f.fail=m,f.ok=v,f.equal=function(t,e,r){t!=e&amp;&amp;m(t,e,r,&quot;==&quot;,f.equal)},f.notEqual=function(t,e,r){t==e&amp;&amp;m(t,e,r,&quot;!=&quot;,f.notEqual)},f.deepEqual=function(t,e,r){y(t,e,!1)||m(t,e,r,&quot;deepEqual&quot;,f.deepEqual)},f.deepStrictEqual=function(t,e,r){y(t,e,!0)||m(t,e,r,&quot;deepStrictEqual&quot;,f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){y(t,e,!1)&amp;&amp;m(t,e,r,&quot;notDeepEqual&quot;,f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&amp;&amp;m(e,r,n,&quot;notDeepStrictEqual&quot;,t)},f.strictEqual=function(t,e,r){t!==e&amp;&amp;m(t,e,r,&quot;===&quot;,f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&amp;&amp;m(t,e,r,&quot;!==&quot;,f.notStrictEqual)},f.throws=function(t,e,r){_(!0,t,e,r)},f.doesNotThrow=function(t,e,r){_(!1,t,e,r)},f.ifError=function(t){if(t)throw t};var w=Object.keys||function(t){var e=[];for(var r in t)o.call(t,r)&amp;&amp;e.push(r);return e}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;util/&quot;:58}],56:[function(t,e,r){&quot;function&quot;==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],57:[function(t,e,r){e.exports=function(t){return t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;&quot;function&quot;==typeof t.copy&amp;&amp;&quot;function&quot;==typeof t.fill&amp;&amp;&quot;function&quot;==typeof t.readUInt8}},{}],58:[function(t,e,r){(function(e,n){var i=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r&lt;arguments.length;r++)e.push(s(arguments[r]));return e.join(&quot; &quot;)}r=1;for(var n=arguments,a=n.length,o=String(t).replace(i,function(t){if(&quot;%%&quot;===t)return&quot;%&quot;;if(r&gt;=a)return t;switch(t){case&quot;%s&quot;:return String(n[r++]);case&quot;%d&quot;:return Number(n[r++]);case&quot;%j&quot;:try{return JSON.stringify(n[r++])}catch(t){return&quot;[Circular]&quot;}default:return t}}),l=n[r];r&lt;a;l=n[++r])g(l)||!b(l)?o+=&quot; &quot;+l:o+=&quot; &quot;+s(l);return o},r.deprecate=function(t,i){if(y(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var a,o={};function s(t,e){var n={seen:[],stylize:c};return arguments.length&gt;=3&amp;&amp;(n.depth=arguments[2]),arguments.length&gt;=4&amp;&amp;(n.colors=arguments[3]),d(e)?n.showHidden=e:e&amp;&amp;r._extend(n,e),y(n.showHidden)&amp;&amp;(n.showHidden=!1),y(n.depth)&amp;&amp;(n.depth=2),y(n.colors)&amp;&amp;(n.colors=!1),y(n.customInspect)&amp;&amp;(n.customInspect=!0),n.colors&amp;&amp;(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?&quot;\x1b[&quot;+s.colors[r][0]+&quot;m&quot;+t+&quot;\x1b[&quot;+s.colors[r][1]+&quot;m&quot;:t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&amp;&amp;e&amp;&amp;k(e.inspect)&amp;&amp;e.inspect!==r.inspect&amp;&amp;(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize(&quot;undefined&quot;,&quot;undefined&quot;);if(v(e)){var r=&quot;'&quot;+JSON.stringify(e).replace(/^&quot;|&quot;$/g,&quot;&quot;).replace(/'/g,&quot;\\'&quot;).replace(/\\&quot;/g,'&quot;')+&quot;'&quot;;return t.stylize(r,&quot;string&quot;)}if(m(e))return t.stylize(&quot;&quot;+e,&quot;number&quot;);if(d(e))return t.stylize(&quot;&quot;+e,&quot;boolean&quot;);if(g(e))return t.stylize(&quot;null&quot;,&quot;null&quot;)}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&amp;&amp;(o=Object.getOwnPropertyNames(e)),w(e)&amp;&amp;(o.indexOf(&quot;message&quot;)&gt;=0||o.indexOf(&quot;description&quot;)&gt;=0))return f(e);if(0===o.length){if(k(e)){var l=e.name?&quot;: &quot;+e.name:&quot;&quot;;return t.stylize(&quot;[Function&quot;+l+&quot;]&quot;,&quot;special&quot;)}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),&quot;regexp&quot;);if(_(e))return t.stylize(Date.prototype.toString.call(e),&quot;date&quot;);if(w(e))return f(e)}var c,b=&quot;&quot;,M=!1,A=[&quot;{&quot;,&quot;}&quot;];(p(e)&amp;&amp;(M=!0,A=[&quot;[&quot;,&quot;]&quot;]),k(e))&amp;&amp;(b=&quot; [Function&quot;+(e.name?&quot;: &quot;+e.name:&quot;&quot;)+&quot;]&quot;);return x(e)&amp;&amp;(b=&quot; &quot;+RegExp.prototype.toString.call(e)),_(e)&amp;&amp;(b=&quot; &quot;+Date.prototype.toUTCString.call(e)),w(e)&amp;&amp;(b=&quot; &quot;+f(e)),0!==o.length||M&amp;&amp;0!=e.length?n&lt;0?x(e)?t.stylize(RegExp.prototype.toString.call(e),&quot;regexp&quot;):t.stylize(&quot;[Object]&quot;,&quot;special&quot;):(t.seen.push(e),c=M?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o&lt;s;++o)S(e,String(o))?a.push(h(t,e,r,n,String(o),!0)):a.push(&quot;&quot;);return i.forEach(function(i){i.match(/^\d+$/)||a.push(h(t,e,r,n,i,!0))}),a}(t,e,n,s,o):o.map(function(r){return h(t,e,n,s,r,M)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf(&quot;\n&quot;)&gt;=0&amp;&amp;0,t+e.replace(/\u001b\[\d\d?m/g,&quot;&quot;).length+1},0)&gt;60)return r[0]+(&quot;&quot;===e?&quot;&quot;:e+&quot;\n &quot;)+&quot; &quot;+t.join(&quot;,\n  &quot;)+&quot; &quot;+r[1];return r[0]+e+&quot; &quot;+t.join(&quot;, &quot;)+&quot; &quot;+r[1]}(c,b,A)):A[0]+b+A[1]}function f(t){return&quot;[&quot;+Error.prototype.toString.call(t)+&quot;]&quot;}function h(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize(&quot;[Getter/Setter]&quot;,&quot;special&quot;):t.stylize(&quot;[Getter]&quot;,&quot;special&quot;):l.set&amp;&amp;(s=t.stylize(&quot;[Setter]&quot;,&quot;special&quot;)),S(n,i)||(o=&quot;[&quot;+i+&quot;]&quot;),s||(t.seen.indexOf(l.value)&lt;0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf(&quot;\n&quot;)&gt;-1&amp;&amp;(s=a?s.split(&quot;\n&quot;).map(function(t){return&quot;  &quot;+t}).join(&quot;\n&quot;).substr(2):&quot;\n&quot;+s.split(&quot;\n&quot;).map(function(t){return&quot;   &quot;+t}).join(&quot;\n&quot;)):s=t.stylize(&quot;[Circular]&quot;,&quot;special&quot;)),y(o)){if(a&amp;&amp;i.match(/^\d+$/))return s;(o=JSON.stringify(&quot;&quot;+i)).match(/^&quot;([a-zA-Z_][a-zA-Z_0-9]*)&quot;$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,&quot;name&quot;)):(o=o.replace(/'/g,&quot;\\'&quot;).replace(/\\&quot;/g,'&quot;').replace(/(^&quot;|&quot;$)/g,&quot;'&quot;),o=t.stylize(o,&quot;string&quot;))}return o+&quot;: &quot;+s}function p(t){return Array.isArray(t)}function d(t){return&quot;boolean&quot;==typeof t}function g(t){return null===t}function m(t){return&quot;number&quot;==typeof t}function v(t){return&quot;string&quot;==typeof t}function y(t){return void 0===t}function x(t){return b(t)&amp;&amp;&quot;[object RegExp]&quot;===M(t)}function b(t){return&quot;object&quot;==typeof t&amp;&amp;null!==t}function _(t){return b(t)&amp;&amp;&quot;[object Date]&quot;===M(t)}function w(t){return b(t)&amp;&amp;(&quot;[object Error]&quot;===M(t)||t instanceof Error)}function k(t){return&quot;function&quot;==typeof t}function M(t){return Object.prototype.toString.call(t)}function A(t){return t&lt;10?&quot;0&quot;+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&amp;&amp;(a=e.env.NODE_DEBUG||&quot;&quot;),t=t.toUpperCase(),!o[t])if(new RegExp(&quot;\\b&quot;+t+&quot;\\b&quot;,&quot;i&quot;).test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error(&quot;%s %d: %s&quot;,t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:&quot;cyan&quot;,number:&quot;yellow&quot;,boolean:&quot;yellow&quot;,undefined:&quot;grey&quot;,null:&quot;bold&quot;,string:&quot;green&quot;,date:&quot;magenta&quot;,regexp:&quot;red&quot;},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=m,r.isString=v,r.isSymbol=function(t){return&quot;symbol&quot;==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||&quot;boolean&quot;==typeof t||&quot;number&quot;==typeof t||&quot;string&quot;==typeof t||&quot;symbol&quot;==typeof t||&quot;undefined&quot;==typeof t},r.isBuffer=t(&quot;./support/isBuffer&quot;);var T=[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log(&quot;%s - %s&quot;,(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(&quot;:&quot;),[t.getDate(),T[t.getMonth()],e].join(&quot; &quot;)),r.format.apply(r,arguments))},r.inherits=t(&quot;inherits&quot;),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t(&quot;_process&quot;),&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;./support/isBuffer&quot;:57,_process:462,inherits:56}],59:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],60:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o&lt;r;++o){for(var s=new Array(r+1),l=0;l&lt;=r;++l)s[l]=t[l][o];a[o]=s}a[r]=new Array(r+1);for(var o=0;o&lt;=r;++o)a[r][o]=1;for(var c=new Array(r+1),o=0;o&lt;r;++o)c[o]=e[o];c[r]=1;var u=n(a,c),f=i(u[r+1]);0===f&amp;&amp;(f=1);for(var h=new Array(r+1),o=0;o&lt;=r;++o)h[o]=i(u[o])/f;return h};var n=t(&quot;robust-linear-solve&quot;);function i(t){for(var e=0,r=0;r&lt;t.length;++r)e+=t[r];return e}},{&quot;robust-linear-solve&quot;:482}],61:[function(t,e,r){&quot;use strict&quot;;r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=c(t),n=r[0],o=r[1],s=new a(function(t,e,r){return 3*(e+r)/4-r}(0,n,o)),l=0,u=o&gt;0?n-4:n,f=0;f&lt;u;f+=4)e=i[t.charCodeAt(f)]&lt;&lt;18|i[t.charCodeAt(f+1)]&lt;&lt;12|i[t.charCodeAt(f+2)]&lt;&lt;6|i[t.charCodeAt(f+3)],s[l++]=e&gt;&gt;16&amp;255,s[l++]=e&gt;&gt;8&amp;255,s[l++]=255&amp;e;2===o&amp;&amp;(e=i[t.charCodeAt(f)]&lt;&lt;2|i[t.charCodeAt(f+1)]&gt;&gt;4,s[l++]=255&amp;e);1===o&amp;&amp;(e=i[t.charCodeAt(f)]&lt;&lt;10|i[t.charCodeAt(f+1)]&lt;&lt;4|i[t.charCodeAt(f+2)]&gt;&gt;2,s[l++]=e&gt;&gt;8&amp;255,s[l++]=255&amp;e);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;o&lt;s;o+=16383)a.push(u(t,o,o+16383&gt;s?s:o+16383));1===i?(e=t[r-1],a.push(n[e&gt;&gt;2]+n[e&lt;&lt;4&amp;63]+&quot;==&quot;)):2===i&amp;&amp;(e=(t[r-2]&lt;&lt;8)+t[r-1],a.push(n[e&gt;&gt;10]+n[e&gt;&gt;4&amp;63]+n[e&lt;&lt;2&amp;63]+&quot;=&quot;));return a.join(&quot;&quot;)};for(var n=[],i=[],a=&quot;undefined&quot;!=typeof Uint8Array?Uint8Array:Array,o=&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&quot;,s=0,l=o.length;s&lt;l;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4&gt;0)throw new Error(&quot;Invalid string. Length must be a multiple of 4&quot;);var r=t.indexOf(&quot;=&quot;);return-1===r&amp;&amp;(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var i,a,o=[],s=e;s&lt;r;s+=3)i=(t[s]&lt;&lt;16&amp;16711680)+(t[s+1]&lt;&lt;8&amp;65280)+(255&amp;t[s+2]),o.push(n[(a=i)&gt;&gt;18&amp;63]+n[a&gt;&gt;12&amp;63]+n[a&gt;&gt;6&amp;63]+n[63&amp;a]);return o.join(&quot;&quot;)}i[&quot;-&quot;.charCodeAt(0)]=62,i[&quot;_&quot;.charCodeAt(0)]=63},{}],62:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{&quot;./lib/rationalize&quot;:72}],63:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],64:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{&quot;./lib/rationalize&quot;:72}],65:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-rat&quot;),i=t(&quot;./lib/is-bn&quot;),a=t(&quot;./lib/num-to-bn&quot;),o=t(&quot;./lib/str-to-bn&quot;),s=t(&quot;./lib/rationalize&quot;),l=t(&quot;./div&quot;);e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,f;if(i(e))u=e.clone();else if(&quot;string&quot;==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=a(e)}}if(n(r))u.mul(r[1]),f=r[0].clone();else if(i(r))f=r.clone();else if(&quot;string&quot;==typeof r)f=o(r);else if(r)if(r===Math.floor(r))f=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;f=a(r)}else f=a(1);c&gt;0?u=u.ushln(c):c&lt;0&amp;&amp;(f=f.ushln(-c));return s(u,f)}},{&quot;./div&quot;:64,&quot;./is-rat&quot;:66,&quot;./lib/is-bn&quot;:70,&quot;./lib/num-to-bn&quot;:71,&quot;./lib/rationalize&quot;:72,&quot;./lib/str-to-bn&quot;:73}],66:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/is-bn&quot;);e.exports=function(t){return Array.isArray(t)&amp;&amp;2===t.length&amp;&amp;n(t[0])&amp;&amp;n(t[1])}},{&quot;./lib/is-bn&quot;:70}],67:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bn.js&quot;);e.exports=function(t){return t.cmp(new n(0))}},{&quot;bn.js&quot;:81}],68:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./bn-sign&quot;);e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a&lt;e;a++){var o=r[a];i+=o*Math.pow(67108864,a)}return n(t)*i}},{&quot;./bn-sign&quot;:67}],69:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;double-bits&quot;),i=t(&quot;bit-twiddle&quot;).countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e&lt;32)return e;var r=i(n.hi(t));if(r&gt;20)return 52;return r+32}},{&quot;bit-twiddle&quot;:79,&quot;double-bits&quot;:151}],70:[function(t,e,r){&quot;use strict&quot;;t(&quot;bn.js&quot;);e.exports=function(t){return t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;Boolean(t.words)}},{&quot;bn.js&quot;:81}],71:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bn.js&quot;),i=t(&quot;double-bits&quot;);e.exports=function(t){var e=i.exponent(t);return e&lt;52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{&quot;bn.js&quot;:81,&quot;double-bits&quot;:151}],72:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./num-to-bn&quot;),i=t(&quot;./bn-sign&quot;);e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a&lt;0&amp;&amp;(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{&quot;./bn-sign&quot;:67,&quot;./num-to-bn&quot;:71}],73:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bn.js&quot;);e.exports=function(t){return new n(t)}},{&quot;bn.js&quot;:81}],74:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{&quot;./lib/rationalize&quot;:72}],75:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/bn-sign&quot;);e.exports=function(t){return n(t[0])*n(t[1])}},{&quot;./lib/bn-sign&quot;:67}],76:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{&quot;./lib/rationalize&quot;:72}],77:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/bn-to-num&quot;),i=t(&quot;./lib/ctz&quot;);e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,f=n(l.ushln(u).divRound(r));return c*(s+f*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53,f=n(l.ushln(h).divRound(r));return h&lt;1023?c*f*Math.pow(2,-h):(f*=Math.pow(2,-1023),c*f*Math.pow(2,1023-h))}},{&quot;./lib/bn-to-num&quot;:68,&quot;./lib/ctz&quot;:69}],78:[function(t,e,r){&quot;use strict&quot;;function n(t,e,r,n,i,a){var o=[&quot;function &quot;,t,&quot;(a,l,h,&quot;,n.join(&quot;,&quot;),&quot;){&quot;,a?&quot;&quot;:&quot;var i=&quot;,r?&quot;l-1&quot;:&quot;h+1&quot;,&quot;;while(l&lt;=h){var m=(l+h)&gt;&gt;&gt;1,x=a&quot;,i?&quot;.get(m)&quot;:&quot;[m]&quot;];return a?e.indexOf(&quot;c&quot;)&lt;0?o.push(&quot;;if(x===y){return m}else if(x&lt;=y){&quot;):o.push(&quot;;var p=c(x,y);if(p===0){return m}else if(p&lt;=0){&quot;):o.push(&quot;;if(&quot;,e,&quot;){i=m;&quot;),r?o.push(&quot;l=m+1}else{h=m-1}&quot;):o.push(&quot;h=m-1}else{l=m+1}&quot;),o.push(&quot;}&quot;),a?o.push(&quot;return -1};&quot;):o.push(&quot;return i};&quot;),o.join(&quot;&quot;)}function i(t,e,r,i){return new Function([n(&quot;A&quot;,&quot;x&quot;+t+&quot;y&quot;,e,[&quot;y&quot;],!1,i),n(&quot;B&quot;,&quot;x&quot;+t+&quot;y&quot;,e,[&quot;y&quot;],!0,i),n(&quot;P&quot;,&quot;c(x,y)&quot;+t+&quot;0&quot;,e,[&quot;y&quot;,&quot;c&quot;],!1,i),n(&quot;Q&quot;,&quot;c(x,y)&quot;+t+&quot;0&quot;,e,[&quot;y&quot;,&quot;c&quot;],!0,i),&quot;function dispatchBsearch&quot;,r,&quot;(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch&quot;,r].join(&quot;&quot;))()}e.exports={ge:i(&quot;&gt;=&quot;,!1,&quot;GE&quot;),gt:i(&quot;&gt;&quot;,!1,&quot;GT&quot;),lt:i(&quot;&lt;&quot;,!0,&quot;LT&quot;),le:i(&quot;&lt;=&quot;,!0,&quot;LE&quot;),eq:i(&quot;-&quot;,!0,&quot;EQ&quot;,!0)}},{}],79:[function(t,e,r){&quot;use strict&quot;;function n(t){var e=32;return(t&amp;=-t)&amp;&amp;e--,65535&amp;t&amp;&amp;(e-=16),16711935&amp;t&amp;&amp;(e-=8),252645135&amp;t&amp;&amp;(e-=4),858993459&amp;t&amp;&amp;(e-=2),1431655765&amp;t&amp;&amp;(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1&lt;&lt;31,r.sign=function(t){return(t&gt;0)-(t&lt;0)},r.abs=function(t){var e=t&gt;&gt;31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&amp;-(t&lt;e)},r.max=function(t,e){return t^(t^e)&amp;-(t&lt;e)},r.isPow2=function(t){return!(t&amp;t-1||!t)},r.log2=function(t){var e,r;return e=(t&gt;65535)&lt;&lt;4,e|=r=((t&gt;&gt;&gt;=e)&gt;255)&lt;&lt;3,e|=r=((t&gt;&gt;&gt;=r)&gt;15)&lt;&lt;2,(e|=r=((t&gt;&gt;&gt;=r)&gt;3)&lt;&lt;1)|(t&gt;&gt;&gt;=r)&gt;&gt;1},r.log10=function(t){return t&gt;=1e9?9:t&gt;=1e8?8:t&gt;=1e7?7:t&gt;=1e6?6:t&gt;=1e5?5:t&gt;=1e4?4:t&gt;=1e3?3:t&gt;=100?2:t&gt;=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&amp;(t-=t&gt;&gt;&gt;1&amp;1431655765))+(t&gt;&gt;&gt;2&amp;858993459))+(t&gt;&gt;&gt;4)&amp;252645135)&gt;&gt;&gt;24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t&gt;&gt;&gt;1,t|=t&gt;&gt;&gt;2,t|=t&gt;&gt;&gt;4,t|=t&gt;&gt;&gt;8,(t|=t&gt;&gt;&gt;16)+1},r.prevPow2=function(t){return t|=t&gt;&gt;&gt;1,t|=t&gt;&gt;&gt;2,t|=t&gt;&gt;&gt;4,t|=t&gt;&gt;&gt;8,(t|=t&gt;&gt;&gt;16)-(t&gt;&gt;&gt;1)},r.parity=function(t){return t^=t&gt;&gt;&gt;16,t^=t&gt;&gt;&gt;8,t^=t&gt;&gt;&gt;4,27030&gt;&gt;&gt;(t&amp;=15)&amp;1};var i=new Array(256);!function(t){for(var e=0;e&lt;256;++e){var r=e,n=e,i=7;for(r&gt;&gt;&gt;=1;r;r&gt;&gt;&gt;=1)n&lt;&lt;=1,n|=1&amp;r,--i;t[e]=n&lt;&lt;i&amp;255}}(i),r.reverse=function(t){return i[255&amp;t]&lt;&lt;24|i[t&gt;&gt;&gt;8&amp;255]&lt;&lt;16|i[t&gt;&gt;&gt;16&amp;255]&lt;&lt;8|i[t&gt;&gt;&gt;24&amp;255]},r.interleave2=function(t,e){return(t=1431655765&amp;((t=858993459&amp;((t=252645135&amp;((t=16711935&amp;((t&amp;=65535)|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2))|t&lt;&lt;1))|(e=1431655765&amp;((e=858993459&amp;((e=252645135&amp;((e=16711935&amp;((e&amp;=65535)|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))|e&lt;&lt;1))&lt;&lt;1},r.deinterleave2=function(t,e){return(t=65535&amp;((t=16711935&amp;((t=252645135&amp;((t=858993459&amp;((t=t&gt;&gt;&gt;e&amp;1431655765)|t&gt;&gt;&gt;1))|t&gt;&gt;&gt;2))|t&gt;&gt;&gt;4))|t&gt;&gt;&gt;16))&lt;&lt;16&gt;&gt;16},r.interleave3=function(t,e,r){return t=1227133513&amp;((t=3272356035&amp;((t=251719695&amp;((t=4278190335&amp;((t&amp;=1023)|t&lt;&lt;16))|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2),(t|=(e=1227133513&amp;((e=3272356035&amp;((e=251719695&amp;((e=4278190335&amp;((e&amp;=1023)|e&lt;&lt;16))|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))&lt;&lt;1)|(r=1227133513&amp;((r=3272356035&amp;((r=251719695&amp;((r=4278190335&amp;((r&amp;=1023)|r&lt;&lt;16))|r&lt;&lt;8))|r&lt;&lt;4))|r&lt;&lt;2))&lt;&lt;2},r.deinterleave3=function(t,e){return(t=1023&amp;((t=4278190335&amp;((t=251719695&amp;((t=3272356035&amp;((t=t&gt;&gt;&gt;e&amp;1227133513)|t&gt;&gt;&gt;2))|t&gt;&gt;&gt;4))|t&gt;&gt;&gt;8))|t&gt;&gt;&gt;16))&lt;&lt;22&gt;&gt;22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&amp;-~e)-1&gt;&gt;&gt;n(t)+1}},{}],80:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;clamp&quot;);e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,f,h,p,d,g,m=null==e.cutoff?.25:e.cutoff,v=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error(&quot;For raw data width and height should be provided by options&quot;);r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&amp;&amp;t instanceof window.HTMLCanvasElement?(f=(h=t).getContext(&quot;2d&quot;),r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&amp;&amp;t instanceof window.CanvasRenderingContext2D?(h=t.canvas,f=t,r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&amp;&amp;t instanceof window.ImageData&amp;&amp;(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&amp;&amp;l instanceof window.Uint8ClampedArray||window.Uint8Array&amp;&amp;l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d&lt;g;d++)l[d]=c[d*u+y]/255;else if(1!==u)throw Error(&quot;Raw data can have only 1 value per pixel&quot;);var x=Array(r*o),b=Array(r*o),_=Array(s),w=Array(s),k=Array(s+1),M=Array(s);for(d=0,g=r*o;d&lt;g;d++){var A=l[d];x[d]=1===A?0:0===A?i:Math.pow(Math.max(0,.5-A),2),b[d]=1===A?i:0===A?0:Math.pow(Math.max(0,A-.5),2)}a(x,r,o,_,w,M,k),a(b,r,o,_,w,M,k);var T=window.Float32Array?new Float32Array(r*o):new Array(r*o);for(d=0,g=r*o;d&lt;g;d++)T[d]=n(1-((x[d]-b[d])/v+m),0,1);return T};var i=1e20;function a(t,e,r,n,i,a,s){for(var l=0;l&lt;e;l++){for(var c=0;c&lt;r;c++)n[c]=t[c*e+l];for(o(n,i,a,s,r),c=0;c&lt;r;c++)t[c*e+l]=i[c]}for(c=0;c&lt;r;c++){for(l=0;l&lt;e;l++)n[l]=t[c*e+l];for(o(n,i,a,s,e),l=0;l&lt;e;l++)t[c*e+l]=Math.sqrt(i[l])}}function o(t,e,r,n,a){r[0]=0,n[0]=-i,n[1]=+i;for(var o=1,s=0;o&lt;a;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l&lt;=n[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,n[s]=l,n[s+1]=+i}for(o=0,s=0;o&lt;a;o++){for(;n[s+1]&lt;o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}},{clamp:102}],81:[function(t,e,r){!function(e,r){&quot;use strict&quot;;function n(t,e){if(!t)throw new Error(e||&quot;Assertion failed&quot;)}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&amp;&amp;(&quot;le&quot;!==e&amp;&amp;&quot;be&quot;!==e||(r=e,e=10),this._init(t||0,e||10,r||&quot;be&quot;))}var o;&quot;object&quot;==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o=t(&quot;buffer&quot;).Buffer}catch(t){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a&lt;i;a++){var o=t.charCodeAt(a)-48;n&lt;&lt;=4,n|=o&gt;=49&amp;&amp;o&lt;=54?o-49+10:o&gt;=17&amp;&amp;o&lt;=22?o-17+10:15&amp;o}return n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o&lt;a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s&gt;=49?s-49+10:s&gt;=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;t.constructor.wordSize===a.wordSize&amp;&amp;Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)&gt;0?t:e},a.min=function(t,e){return t.cmp(e)&lt;0?t:e},a.prototype._init=function(t,e,r){if(&quot;number&quot;==typeof t)return this._initNumber(t,e,r);if(&quot;object&quot;==typeof t)return this._initArray(t,e,r);&quot;hex&quot;===e&amp;&amp;(e=16),n(e===(0|e)&amp;&amp;e&gt;=2&amp;&amp;e&lt;=36);var i=0;&quot;-&quot;===(t=t.toString().replace(/\s+/g,&quot;&quot;))[0]&amp;&amp;i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),&quot;-&quot;===t[0]&amp;&amp;(this.negative=1),this.strip(),&quot;le&quot;===r&amp;&amp;this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t&lt;0&amp;&amp;(this.negative=1,t=-t),t&lt;67108864?(this.words=[67108863&amp;t],this.length=1):t&lt;4503599627370496?(this.words=[67108863&amp;t,t/67108864&amp;67108863],this.length=2):(n(t&lt;9007199254740992),this.words=[67108863&amp;t,t/67108864&amp;67108863,1],this.length=3),&quot;le&quot;===r&amp;&amp;this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n(&quot;number&quot;==typeof t.length),t.length&lt;=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i&lt;this.length;i++)this.words[i]=0;var a,o,s=0;if(&quot;be&quot;===r)for(i=t.length-1,a=0;i&gt;=0;i-=3)o=t[i]|t[i-1]&lt;&lt;8|t[i-2]&lt;&lt;16,this.words[a]|=o&lt;&lt;s&amp;67108863,this.words[a+1]=o&gt;&gt;&gt;26-s&amp;67108863,(s+=24)&gt;=26&amp;&amp;(s-=26,a++);else if(&quot;le&quot;===r)for(i=0,a=0;i&lt;t.length;i+=3)o=t[i]|t[i+1]&lt;&lt;8|t[i+2]&lt;&lt;16,this.words[a]|=o&lt;&lt;s&amp;67108863,this.words[a+1]=o&gt;&gt;&gt;26-s&amp;67108863,(s+=24)&gt;=26&amp;&amp;(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r&lt;this.length;r++)this.words[r]=0;var n,i,a=0;for(r=t.length-6,n=0;r&gt;=e;r-=6)i=s(t,r,r+6),this.words[n]|=i&lt;&lt;a&amp;67108863,this.words[n+1]|=i&gt;&gt;&gt;26-a&amp;4194303,(a+=24)&gt;=26&amp;&amp;(a-=26,n++);r+6!==e&amp;&amp;(i=s(t,e,r+6),this.words[n]|=i&lt;&lt;a&amp;67108863,this.words[n+1]|=i&gt;&gt;&gt;26-a&amp;4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i&lt;=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u&lt;s;u+=n)c=l(t,u,u+n,e),this.imuln(i),this.words[0]+c&lt;67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var f=1;for(c=l(t,u,t.length,e),u=0;u&lt;o;u++)f*=e;this.imuln(f),this.words[0]+c&lt;67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e&lt;this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length&lt;t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length&gt;1&amp;&amp;0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&amp;&amp;0===this.words[0]&amp;&amp;(this.negative=0),this},a.prototype.inspect=function(){return(this.red?&quot;&lt;BN-R: &quot;:&quot;&lt;BN: &quot;)+this.toString(16)+&quot;&gt;&quot;};var c=[&quot;&quot;,&quot;0&quot;,&quot;00&quot;,&quot;000&quot;,&quot;0000&quot;,&quot;00000&quot;,&quot;000000&quot;,&quot;0000000&quot;,&quot;00000000&quot;,&quot;000000000&quot;,&quot;0000000000&quot;,&quot;00000000000&quot;,&quot;000000000000&quot;,&quot;0000000000000&quot;,&quot;00000000000000&quot;,&quot;000000000000000&quot;,&quot;0000000000000000&quot;,&quot;00000000000000000&quot;,&quot;000000000000000000&quot;,&quot;0000000000000000000&quot;,&quot;00000000000000000000&quot;,&quot;000000000000000000000&quot;,&quot;0000000000000000000000&quot;,&quot;00000000000000000000000&quot;,&quot;000000000000000000000000&quot;,&quot;0000000000000000000000000&quot;],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&amp;o,l=o/67108864|0;r.words[0]=s;for(var c=1;c&lt;n;c++){for(var u=l&gt;&gt;&gt;26,f=67108863&amp;l,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p&lt;=h;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&amp;o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||&quot;hex&quot;===t){r=&quot;&quot;;for(var i=0,a=0,o=0;o&lt;this.length;o++){var s=this.words[o],l=(16777215&amp;(s&lt;&lt;i|a)).toString(16);r=0!==(a=s&gt;&gt;&gt;24-i&amp;16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)&gt;=26&amp;&amp;(i-=26,o--)}for(0!==a&amp;&amp;(r=a.toString(16)+r);r.length%e!=0;)r=&quot;0&quot;+r;return 0!==this.negative&amp;&amp;(r=&quot;-&quot;+r),r}if(t===(0|t)&amp;&amp;t&gt;=2&amp;&amp;t&lt;=36){var h=u[t],p=f[t];r=&quot;&quot;;var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&amp;&amp;(r=&quot;0&quot;+r);r.length%e!=0;)r=&quot;0&quot;+r;return 0!==this.negative&amp;&amp;(r=&quot;-&quot;+r),r}n(!1,&quot;Base should be between 2 and 36&quot;)},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&amp;&amp;1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length&gt;2&amp;&amp;n(!1,&quot;Number can only safely store up to 53 bits&quot;),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(&quot;undefined&quot;!=typeof o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i&lt;=a,&quot;byte array longer than desired length&quot;),n(a&gt;0,&quot;Requested array length &lt;= 0&quot;),this.strip();var o,s,l=&quot;le&quot;===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s&lt;a;s++)c[s]=0}else{for(s=0;s&lt;a-i;s++)c[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e&gt;=4096&amp;&amp;(r+=13,e&gt;&gt;&gt;=13),e&gt;=64&amp;&amp;(r+=7,e&gt;&gt;&gt;=7),e&gt;=8&amp;&amp;(r+=4,e&gt;&gt;&gt;=4),e&gt;=2&amp;&amp;(r+=2,e&gt;&gt;&gt;=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&amp;e)&amp;&amp;(r+=13,e&gt;&gt;&gt;=13),0==(127&amp;e)&amp;&amp;(r+=7,e&gt;&gt;&gt;=7),0==(15&amp;e)&amp;&amp;(r+=4,e&gt;&gt;&gt;=4),0==(3&amp;e)&amp;&amp;(r+=2,e&gt;&gt;&gt;=2),0==(1&amp;e)&amp;&amp;r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e&lt;this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length&lt;t.length;)this.words[this.length++]=0;for(var e=0;e&lt;t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length&gt;t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length&gt;t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length&gt;t.length?t:this;for(var r=0;r&lt;e.length;r++)this.words[r]=this.words[r]&amp;t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length&gt;t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length&gt;t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length&gt;t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n&lt;r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n&lt;e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length&gt;t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length&gt;t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r&gt;0&amp;&amp;e--;for(var i=0;i&lt;e;i++)this.words[i]=67108863&amp;~this.words[i];return r&gt;0&amp;&amp;(this.words[i]=~this.words[i]&amp;67108863&gt;&gt;26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1&lt;&lt;i:this.words[r]&amp;~(1&lt;&lt;i),this.strip()},a.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&amp;&amp;0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&amp;&amp;0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length&gt;t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a&lt;n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&amp;e,i=e&gt;&gt;&gt;26;for(;0!==i&amp;&amp;a&lt;r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&amp;e,i=e&gt;&gt;&gt;26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a&lt;r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&amp;&amp;0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&amp;&amp;0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length&gt;t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i&gt;0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o&lt;n.length;o++)a=(e=(0|r.words[o])-(0|n.words[o])+a)&gt;&gt;26,this.words[o]=67108863&amp;e;for(;0!==a&amp;&amp;o&lt;r.length;o++)a=(e=(0|r.words[o])+a)&gt;&gt;26,this.words[o]=67108863&amp;e;if(0===a&amp;&amp;o&lt;r.length&amp;&amp;r!==this)for(;o&lt;r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&amp;&amp;(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,c=0,u=0|o[0],f=8191&amp;u,h=u&gt;&gt;&gt;13,p=0|o[1],d=8191&amp;p,g=p&gt;&gt;&gt;13,m=0|o[2],v=8191&amp;m,y=m&gt;&gt;&gt;13,x=0|o[3],b=8191&amp;x,_=x&gt;&gt;&gt;13,w=0|o[4],k=8191&amp;w,M=w&gt;&gt;&gt;13,A=0|o[5],T=8191&amp;A,S=A&gt;&gt;&gt;13,E=0|o[6],C=8191&amp;E,L=E&gt;&gt;&gt;13,z=0|o[7],P=8191&amp;z,O=z&gt;&gt;&gt;13,I=0|o[8],D=8191&amp;I,R=I&gt;&gt;&gt;13,B=0|o[9],F=8191&amp;B,N=B&gt;&gt;&gt;13,j=0|s[0],V=8191&amp;j,U=j&gt;&gt;&gt;13,q=0|s[1],H=8191&amp;q,G=q&gt;&gt;&gt;13,W=0|s[2],Y=8191&amp;W,X=W&gt;&gt;&gt;13,Z=0|s[3],$=8191&amp;Z,J=Z&gt;&gt;&gt;13,K=0|s[4],Q=8191&amp;K,tt=K&gt;&gt;&gt;13,et=0|s[5],rt=8191&amp;et,nt=et&gt;&gt;&gt;13,it=0|s[6],at=8191&amp;it,ot=it&gt;&gt;&gt;13,st=0|s[7],lt=8191&amp;st,ct=st&gt;&gt;&gt;13,ut=0|s[8],ft=8191&amp;ut,ht=ut&gt;&gt;&gt;13,pt=0|s[9],dt=8191&amp;pt,gt=pt&gt;&gt;&gt;13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,V))|0)+((8191&amp;(i=(i=Math.imul(f,U))+Math.imul(h,V)|0))&lt;&lt;13)|0;c=((a=Math.imul(h,U))+(i&gt;&gt;&gt;13)|0)+(mt&gt;&gt;&gt;26)|0,mt&amp;=67108863,n=Math.imul(d,V),i=(i=Math.imul(d,U))+Math.imul(g,V)|0,a=Math.imul(g,U);var vt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,G)|0)+(i&gt;&gt;&gt;13)|0)+(vt&gt;&gt;&gt;26)|0,vt&amp;=67108863,n=Math.imul(v,V),i=(i=Math.imul(v,U))+Math.imul(y,V)|0,a=Math.imul(y,U),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,X)|0)+(i&gt;&gt;&gt;13)|0)+(yt&gt;&gt;&gt;26)|0,yt&amp;=67108863,n=Math.imul(b,V),i=(i=Math.imul(b,U))+Math.imul(_,V)|0,a=Math.imul(_,U),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,$)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,J)|0)+(i&gt;&gt;&gt;13)|0)+(xt&gt;&gt;&gt;26)|0,xt&amp;=67108863,n=Math.imul(k,V),i=(i=Math.imul(k,U))+Math.imul(M,V)|0,a=Math.imul(M,U),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,J)|0;var bt=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,tt)|0)+(i&gt;&gt;&gt;13)|0)+(bt&gt;&gt;&gt;26)|0,bt&amp;=67108863,n=Math.imul(T,V),i=(i=Math.imul(T,U))+Math.imul(S,V)|0,a=Math.imul(S,U),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,nt)|0)+(i&gt;&gt;&gt;13)|0)+(_t&gt;&gt;&gt;26)|0,_t&amp;=67108863,n=Math.imul(C,V),i=(i=Math.imul(C,U))+Math.imul(L,V)|0,a=Math.imul(L,U),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,ot)|0)+(i&gt;&gt;&gt;13)|0)+(wt&gt;&gt;&gt;26)|0,wt&amp;=67108863,n=Math.imul(P,V),i=(i=Math.imul(P,U))+Math.imul(O,V)|0,a=Math.imul(O,U),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,ct)|0)+(i&gt;&gt;&gt;13)|0)+(kt&gt;&gt;&gt;26)|0,kt&amp;=67108863,n=Math.imul(D,V),i=(i=Math.imul(D,U))+Math.imul(R,V)|0,a=Math.imul(R,U),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,G)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var Mt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,ht)|0)+(i&gt;&gt;&gt;13)|0)+(Mt&gt;&gt;&gt;26)|0,Mt&amp;=67108863,n=Math.imul(F,V),i=(i=Math.imul(F,U))+Math.imul(N,V)|0,a=Math.imul(N,U),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,X)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ft)|0,a=a+Math.imul(g,ht)|0;var At=(c+(n=n+Math.imul(f,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,gt)|0)+(i&gt;&gt;&gt;13)|0)+(At&gt;&gt;&gt;26)|0,At&amp;=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(O,$)|0,a=a+Math.imul(O,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(g,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Tt&gt;&gt;&gt;26)|0,Tt&amp;=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(N,Y)|0,a=Math.imul(N,X),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(v,gt)|0)+Math.imul(y,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(y,gt)|0)+(i&gt;&gt;&gt;13)|0)+(St&gt;&gt;&gt;26)|0,St&amp;=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,J))+Math.imul(N,$)|0,a=Math.imul(N,J),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(O,rt)|0,a=a+Math.imul(O,nt)|0,n=n+Math.imul(C,at)|0,i=(i=i+Math.imul(C,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(M,ft)|0,a=a+Math.imul(M,ht)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(_,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Et&gt;&gt;&gt;26)|0,Et&amp;=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(P,at)|0,i=(i=i+Math.imul(P,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Ct=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(k,gt)|0)+Math.imul(M,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(M,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Ct&gt;&gt;&gt;26)|0,Ct&amp;=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Lt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(T,gt)|0)+Math.imul(S,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(S,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Lt&gt;&gt;&gt;26)|0,Lt&amp;=67108863,n=Math.imul(F,at),i=(i=Math.imul(F,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(O,ft)|0,a=a+Math.imul(O,ht)|0;var zt=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(L,gt)|0)+(i&gt;&gt;&gt;13)|0)+(zt&gt;&gt;&gt;26)|0,zt&amp;=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var Pt=(c+(n=n+Math.imul(P,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(P,gt)|0)+Math.imul(O,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(O,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Pt&gt;&gt;&gt;26)|0,Pt&amp;=67108863,n=Math.imul(F,ft),i=(i=Math.imul(F,ht))+Math.imul(N,ft)|0,a=Math.imul(N,ht);var Ot=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(R,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Ot&gt;&gt;&gt;26)|0,Ot&amp;=67108863;var It=(c+(n=Math.imul(F,dt))|0)+((8191&amp;(i=(i=Math.imul(F,gt))+Math.imul(N,dt)|0))&lt;&lt;13)|0;return c=((a=Math.imul(N,gt))+(i&gt;&gt;&gt;13)|0)+(It&gt;&gt;&gt;26)|0,It&amp;=67108863,l[0]=mt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Mt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=zt,l[16]=Pt,l[17]=Ot,l[18]=It,0!==c&amp;&amp;(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&amp;&amp;10===t.length?p(this,t,e):r&lt;63?h(this,t,e):r&lt;1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a&lt;r.length-1;a++){var o=i;i=0;for(var s=67108863&amp;n,l=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c&lt;=l;c++){var u=a-c,f=(0|t.words[u])*(0|e.words[c]),h=67108863&amp;f;s=67108863&amp;(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h&gt;&gt;&gt;26)|0)&gt;&gt;&gt;26,o&amp;=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n&lt;t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i&lt;e;i++)n|=(1&amp;t)&lt;&lt;e-i-1,t&gt;&gt;=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o&lt;a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},g.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o&lt;i;o&lt;&lt;=1)for(var s=o&lt;&lt;1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u&lt;i;u+=s)for(var f=l,h=c,p=0;p&lt;o;p++){var d=r[u+p],g=n[u+p],m=r[u+p+o],v=n[u+p+o],y=f*m-h*v;v=f*v+h*m,m=y,r[u+p]=d+m,n[u+p]=g+v,r[u+p+o]=d-m,n[u+p+o]=g-v,p!==s&amp;&amp;(y=l*f-c*h,h=l*h+c*f,f=y)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&amp;r,i=0;for(r=r/2|0;r;r&gt;&gt;&gt;=1)i++;return 1&lt;&lt;i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r&lt;=1))for(var n=0;n&lt;r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n&lt;e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&amp;i,r=i&lt;67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o&lt;e;o++)a+=0|t[o],r[2*o]=8191&amp;a,a&gt;&gt;&gt;=13,r[2*o+1]=8191&amp;a,a&gt;&gt;&gt;=13;for(o=2*e;o&lt;i;++o)r[o]=0;n(0===a),n(0==(-8192&amp;a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r&lt;t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,c,n),this.transform(o,a,s,l,n,i),this.transform(c,a,u,f,n,i);for(var p=0;p&lt;n;p++){var d=s[p]*u[p]-l[p]*f[p];l[p]=s[p]*f[p]+l[p]*u[p],s[p]=d}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),d(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n(&quot;number&quot;==typeof t),n(t&lt;67108864);for(var e=0,r=0;r&lt;this.length;r++){var i=(0|this.words[r])*t,a=(67108863&amp;i)+(67108863&amp;e);e&gt;&gt;=26,e+=i/67108864|0,e+=a&gt;&gt;&gt;26,this.words[r]=67108863&amp;a}return 0!==e&amp;&amp;(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r&lt;e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&amp;1&lt;&lt;i)&gt;&gt;&gt;i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n&lt;e.length&amp;&amp;0===e[n];n++,r=r.sqr());if(++n&lt;e.length)for(var i=r.sqr();n&lt;e.length;n++,i=i.sqr())0!==e[n]&amp;&amp;(r=r.mul(i));return r},a.prototype.iushln=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e,r=t%26,i=(t-r)/26,a=67108863&gt;&gt;&gt;26-r&lt;&lt;26-r;if(0!==r){var o=0;for(e=0;e&lt;this.length;e++){var s=this.words[e]&amp;a,l=(0|this.words[e])-s&lt;&lt;r;this.words[e]=l|o,o=s&gt;&gt;&gt;26-r}o&amp;&amp;(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e&gt;=0;e--)this.words[e+i]=this.words[e];for(e=0;e&lt;i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var i;n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863&gt;&gt;&gt;a&lt;&lt;a,l=r;if(i-=o,i=Math.max(0,i),l){for(var c=0;c&lt;o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length&gt;o)for(this.length-=o,c=0;c&lt;this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c&gt;=0&amp;&amp;(0!==u||c&gt;=i);c--){var f=0|this.words[c];this.words[c]=u&lt;&lt;26-a|f&gt;&gt;&gt;a,u=f&amp;s}return l&amp;&amp;0!==u&amp;&amp;(l.words[l.length++]=u),0===this.length&amp;&amp;(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e=t%26,r=(t-e)/26,i=1&lt;&lt;e;return!(this.length&lt;=r)&amp;&amp;!!(this.words[r]&amp;i)},a.prototype.imaskn=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,&quot;imaskn works only with positive numbers&quot;),this.length&lt;=r)return this;if(0!==e&amp;&amp;r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863&gt;&gt;&gt;e&lt;&lt;e;this.words[this.length-1]&amp;=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n(&quot;number&quot;==typeof t),n(t&lt;67108864),t&lt;0?this.isubn(-t):0!==this.negative?1===this.length&amp;&amp;(0|this.words[0])&lt;t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e&lt;this.length&amp;&amp;this.words[e]&gt;=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n(&quot;number&quot;==typeof t),n(t&lt;67108864),t&lt;0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&amp;&amp;this.words[0]&lt;0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e&lt;this.length&amp;&amp;this.words[e]&lt;0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a,o=t.length+r;this._expand(o);var s=0;for(i=0;i&lt;t.length;i++){a=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((a-=67108863&amp;l)&gt;&gt;26)-(l/67108864|0),this.words[i+r]=67108863&amp;a}for(;i&lt;this.length-r;i++)s=(a=(0|this.words[i+r])+s)&gt;&gt;26,this.words[i+r]=67108863&amp;a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i&lt;this.length;i++)s=(a=-(0|this.words[i])+s)&gt;&gt;26,this.words[i]=67108863&amp;a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&amp;&amp;(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if(&quot;mod&quot;!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c&lt;s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&amp;&amp;(n=u,s&amp;&amp;(s.words[l]=1));for(var f=l-1;f&gt;=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&amp;&amp;(s.words[f]=h)}return s&amp;&amp;s.strip(),n.strip(),&quot;div&quot;!==e&amp;&amp;0!==r&amp;&amp;n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&amp;&amp;0===t.negative?(s=this.neg().divmod(t,e),&quot;mod&quot;!==e&amp;&amp;(i=s.div.neg()),&quot;div&quot;!==e&amp;&amp;(o=s.mod.neg(),r&amp;&amp;0!==o.negative&amp;&amp;o.iadd(t)),{div:i,mod:o}):0===this.negative&amp;&amp;0!==t.negative?(s=this.divmod(t.neg(),e),&quot;mod&quot;!==e&amp;&amp;(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&amp;t.negative)?(s=this.neg().divmod(t.neg(),e),&quot;div&quot;!==e&amp;&amp;(o=s.mod.neg(),r&amp;&amp;0!==o.negative&amp;&amp;o.isub(t)),{div:s.div,mod:o}):t.length&gt;this.length||this.cmp(t)&lt;0?{div:new a(0),mod:this}:1===t.length?&quot;div&quot;===e?{div:this.divn(t.words[0]),mod:null}:&quot;mod&quot;===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,&quot;div&quot;,!1).div},a.prototype.mod=function(t){return this.divmod(t,&quot;mod&quot;,!1).mod},a.prototype.umod=function(t){return this.divmod(t,&quot;mod&quot;,!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a&lt;0||1===i&amp;&amp;0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t&lt;=67108863);for(var e=(1&lt;&lt;26)%t,r=0,i=this.length-1;i&gt;=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t&lt;=67108863);for(var e=0,r=this.length-1;r&gt;=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&amp;&amp;r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&amp;p)&amp;&amp;h&lt;26;++h,p&lt;&lt;=1);if(h&gt;0)for(e.iushrn(h);h-- &gt;0;)(i.isOdd()||o.isOdd())&amp;&amp;(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&amp;g)&amp;&amp;d&lt;26;++d,g&lt;&lt;=1);if(d&gt;0)for(r.iushrn(d);d-- &gt;0;)(s.isOdd()||l.isOdd())&amp;&amp;(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)&gt;=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)&gt;0&amp;&amp;r.cmpn(1)&gt;0;){for(var c=0,u=1;0==(e.words[0]&amp;u)&amp;&amp;c&lt;26;++c,u&lt;&lt;=1);if(c&gt;0)for(e.iushrn(c);c-- &gt;0;)o.isOdd()&amp;&amp;o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&amp;h)&amp;&amp;f&lt;26;++f,h&lt;&lt;=1);if(f&gt;0)for(r.iushrn(f);f-- &gt;0;)s.isOdd()&amp;&amp;s.iadd(l),s.iushrn(1);e.cmp(r)&gt;=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)&lt;0&amp;&amp;i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&amp;&amp;r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i&lt;0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&amp;this.words[0])},a.prototype.isOdd=function(){return 1==(1&amp;this.words[0])},a.prototype.andln=function(t){return this.words[0]&amp;t},a.prototype.bincn=function(t){n(&quot;number&quot;==typeof t);var e=t%26,r=(t-e)/26,i=1&lt;&lt;e;if(this.length&lt;=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&amp;&amp;o&lt;this.length;o++){var s=0|this.words[o];a=(s+=a)&gt;&gt;&gt;26,s&amp;=67108863,this.words[o]=s}return 0!==a&amp;&amp;(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&amp;&amp;0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t&lt;0;if(0!==this.negative&amp;&amp;!r)return-1;if(0===this.negative&amp;&amp;r)return 1;if(this.strip(),this.length&gt;1)e=1;else{r&amp;&amp;(t=-t),n(t&lt;=67108863,&quot;Number is too big&quot;);var i=0|this.words[0];e=i===t?0:i&lt;t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&amp;&amp;0===t.negative)return-1;if(0===this.negative&amp;&amp;0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length&gt;t.length)return 1;if(this.length&lt;t.length)return-1;for(var e=0,r=this.length-1;r&gt;=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n&lt;i?e=-1:n&gt;i&amp;&amp;(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)&gt;=0},a.prototype.gte=function(t){return this.cmp(t)&gt;=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)&lt;=0},a.prototype.lte=function(t){return this.cmp(t)&lt;=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return n(!this.red,&quot;Already a number in reduction context&quot;),n(0===this.negative,&quot;red works only with positives&quot;),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,&quot;fromRed works only with numbers in reduction context&quot;),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,&quot;Already a number in reduction context&quot;),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,&quot;redAdd works only with red numbers&quot;),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,&quot;redIAdd works only with red numbers&quot;),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,&quot;redSub works only with red numbers&quot;),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,&quot;redISub works only with red numbers&quot;),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,&quot;redShl works only with red numbers&quot;),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,&quot;redMul works only with red numbers&quot;),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,&quot;redMul works only with red numbers&quot;),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,&quot;redSqr works only with red numbers&quot;),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,&quot;redISqr works only with red numbers&quot;),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,&quot;redSqrt works only with red numbers&quot;),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,&quot;redInvm works only with red numbers&quot;),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,&quot;redNeg works only with red numbers&quot;),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&amp;&amp;!t.red,&quot;redPow(normalNum)&quot;),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,&quot;k256&quot;,&quot;ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f&quot;)}function x(){v.call(this,&quot;p224&quot;,&quot;ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001&quot;)}function b(){v.call(this,&quot;p192&quot;,&quot;ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff&quot;)}function _(){v.call(this,&quot;25519&quot;,&quot;7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed&quot;)}function w(t){if(&quot;string&quot;==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),&quot;modulus must be greater than 1&quot;),this.m=t,this.prime=null}function k(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&amp;&amp;(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e&gt;this.n);var n=e&lt;this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n&gt;0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n&lt;r;n++)e.words[n]=t.words[n];if(e.length=r,t.length&lt;=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&amp;i,n=10;n&lt;t.length;n++){var a=0|t.words[n];t.words[n-10]=(4194303&amp;a)&lt;&lt;4|i&gt;&gt;&gt;22,i=a}i&gt;&gt;&gt;=22,t.words[n-10]=i,0===i&amp;&amp;t.length&gt;10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r&lt;t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&amp;e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&amp;&amp;(t.length--,0===t.words[t.length-1]&amp;&amp;t.length--),t},i(x,v),i(b,v),i(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r&lt;t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&amp;n;n&gt;&gt;&gt;=26,t.words[r]=i,e=n}return 0!==e&amp;&amp;(t.words[t.length++]=e),t},a._prime=function(t){if(m[t])return m[t];var e;if(&quot;k256&quot;===t)e=new y;else if(&quot;p224&quot;===t)e=new x;else if(&quot;p192&quot;===t)e=new b;else{if(&quot;p25519&quot;!==t)throw new Error(&quot;Unknown prime &quot;+t);e=new _}return m[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,&quot;red works only with positives&quot;),n(t.red,&quot;red works only with red numbers&quot;)},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),&quot;red works only with positives&quot;),n(t.red&amp;&amp;t.red===e.red,&quot;red works only with red numbers&quot;)},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)&gt;=0&amp;&amp;r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)&gt;=0&amp;&amp;r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)&lt;0&amp;&amp;r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)&lt;0&amp;&amp;r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&amp;&amp;0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m&lt;d);var v=this.pow(f,new a(1).iushln(d-m-1));h=h.redMul(v),f=v.redSqr(),p=p.redMul(f),d=m}return h},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n&lt;r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&amp;&amp;(l=26),n=e.length-1;n&gt;=0;n--){for(var c=e.words[n],u=l-1;u&gt;=0;u--){var f=c&gt;&gt;u&amp;1;i!==r[0]&amp;&amp;(i=this.sqr(i)),0!==f||0!==o?(o&lt;&lt;=1,o|=f,(4===++s||0===n&amp;&amp;0===u)&amp;&amp;(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)&gt;=0?a=i.isub(this.m):i.cmpn(0)&lt;0&amp;&amp;(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)&gt;=0?o=i.isub(this.m):i.cmpn(0)&lt;0&amp;&amp;(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(&quot;undefined&quot;==typeof e||e,this)},{buffer:90}],82:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e&lt;i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e&lt;i;++e){var l=t[e],c=l.length;for(r=0;r&lt;c;++r){var u=o[s++]=new Array(c-1),f=0;for(n=0;n&lt;c;++n)n!==r&amp;&amp;(u[f++]=l[n]);if(1&amp;r){var h=u[1];u[1]=u[0],u[0]=h}}}return o}},{}],83:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){switch(arguments.length){case 1:return n=[],c(i=t,i,u,!0),n;case 2:return&quot;function&quot;==typeof e?c(t,t,e,!0):function(t,e){return n=[],c(t,e,u,!1),n}(t,e);case 3:return c(t,e,r,!1);default:throw new Error(&quot;box-intersect: Invalid arguments&quot;)}var i};var n,i=t(&quot;typedarray-pool&quot;),a=t(&quot;./lib/sweep&quot;),o=t(&quot;./lib/intersect&quot;);function s(t,e){for(var r=0;r&lt;t;++r)if(!(e[r]&lt;=e[r+t]))return!0;return!1}function l(t,e,r,n){for(var i=0,a=0,o=0,l=t.length;o&lt;l;++o){var c=t[o];if(!s(e,c)){for(var u=0;u&lt;2*e;++u)r[i++]=c[u];n[a++]=o}}return a}function c(t,e,r,n){var s=t.length,c=e.length;if(!(s&lt;=0||c&lt;=0)){var u=t[0].length&gt;&gt;&gt;1;if(!(u&lt;=0)){var f,h=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,h,p))&gt;0){if(1===u&amp;&amp;n)a.init(s),f=a.sweepComplete(u,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(e,u,d,g))&gt;0&amp;&amp;(a.init(s+c),f=1===u?a.sweepBipartite(u,r,0,s,h,p,0,c,d,g):o(u,r,n,s,h,p,c,d,g),i.free(d),i.free(g))}i.free(h),i.free(p)}return f}}}function u(t,e){n.push([t,e])}},{&quot;./lib/intersect&quot;:85,&quot;./lib/sweep&quot;:89,&quot;typedarray-pool&quot;:519}],84:[function(t,e,r){&quot;use strict&quot;;var n=&quot;d&quot;,i=&quot;ax&quot;,a=&quot;vv&quot;,o=&quot;fp&quot;,s=&quot;es&quot;,l=&quot;rs&quot;,c=&quot;re&quot;,u=&quot;rb&quot;,f=&quot;ri&quot;,h=&quot;rp&quot;,p=&quot;bs&quot;,d=&quot;be&quot;,g=&quot;bb&quot;,m=&quot;bi&quot;,v=&quot;bp&quot;,y=&quot;rv&quot;,x=&quot;Q&quot;,b=[n,i,a,l,c,u,f,p,d,g,m];function _(t){var e=&quot;bruteForce&quot;+(t?&quot;Full&quot;:&quot;Partial&quot;),r=[],_=b.slice();t||_.splice(3,0,o);var w=[&quot;function &quot;+e+&quot;(&quot;+_.join()+&quot;){&quot;];function k(e,o){var _=function(t,e,r){var o=&quot;bruteForce&quot;+(t?&quot;Red&quot;:&quot;Blue&quot;)+(e?&quot;Flip&quot;:&quot;&quot;)+(r?&quot;Full&quot;:&quot;&quot;),_=[&quot;function &quot;,o,&quot;(&quot;,b.join(),&quot;){&quot;,&quot;var &quot;,s,&quot;=2*&quot;,n,&quot;;&quot;],w=&quot;for(var i=&quot;+l+&quot;,&quot;+h+&quot;=&quot;+s+&quot;*&quot;+l+&quot;;i&lt;&quot;+c+&quot;;++i,&quot;+h+&quot;+=&quot;+s+&quot;){var x0=&quot;+u+&quot;[&quot;+i+&quot;+&quot;+h+&quot;],x1=&quot;+u+&quot;[&quot;+i+&quot;+&quot;+h+&quot;+&quot;+n+&quot;],xi=&quot;+f+&quot;[i];&quot;,k=&quot;for(var j=&quot;+p+&quot;,&quot;+v+&quot;=&quot;+s+&quot;*&quot;+p+&quot;;j&lt;&quot;+d+&quot;;++j,&quot;+v+&quot;+=&quot;+s+&quot;){var y0=&quot;+g+&quot;[&quot;+i+&quot;+&quot;+v+&quot;],&quot;+(r?&quot;y1=&quot;+g+&quot;[&quot;+i+&quot;+&quot;+v+&quot;+&quot;+n+&quot;],&quot;:&quot;&quot;)+&quot;yi=&quot;+m+&quot;[j];&quot;;return t?_.push(w,x,&quot;:&quot;,k):_.push(k,x,&quot;:&quot;,w),r?_.push(&quot;if(y1&lt;x0||x1&lt;y0)continue;&quot;):e?_.push(&quot;if(y0&lt;=x0||x1&lt;y0)continue;&quot;):_.push(&quot;if(y0&lt;x0||x1&lt;y0)continue;&quot;),_.push(&quot;for(var k=&quot;+i+&quot;+1;k&lt;&quot;+n+&quot;;++k){var r0=&quot;+u+&quot;[k+&quot;+h+&quot;],r1=&quot;+u+&quot;[k+&quot;+n+&quot;+&quot;+h+&quot;],b0=&quot;+g+&quot;[k+&quot;+v+&quot;],b1=&quot;+g+&quot;[k+&quot;+n+&quot;+&quot;+v+&quot;];if(r1&lt;b0||b1&lt;r0)continue &quot;+x+&quot;;}var &quot;+y+&quot;=&quot;+a+&quot;(&quot;),e?_.push(&quot;yi,xi&quot;):_.push(&quot;xi,yi&quot;),_.push(&quot;);if(&quot;+y+&quot;!==void 0)return &quot;+y+&quot;;}}}&quot;),{name:o,code:_.join(&quot;&quot;)}}(e,o,t);r.push(_.code),w.push(&quot;return &quot;+_.name+&quot;(&quot;+b.join()+&quot;);&quot;)}w.push(&quot;if(&quot;+c+&quot;-&quot;+l+&quot;&gt;&quot;+d+&quot;-&quot;+p+&quot;){&quot;),t?(k(!0,!1),w.push(&quot;}else{&quot;),k(!1,!1)):(w.push(&quot;if(&quot;+o+&quot;){&quot;),k(!0,!0),w.push(&quot;}else{&quot;),k(!0,!1),w.push(&quot;}}else{if(&quot;+o+&quot;){&quot;),k(!1,!0),w.push(&quot;}else{&quot;),k(!1,!1),w.push(&quot;}&quot;)),w.push(&quot;}}return &quot;+e);var M=r.join(&quot;&quot;)+w.join(&quot;&quot;);return new Function(M)()}r.partial=_(!1),r.full=_(!0)},{}],85:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,a,u,S,E,C,L){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(b*r);w.length&lt;a&amp;&amp;(n.free(w),w=n.mallocInt32(a));var o=i.nextPow2(_*r);k&lt;o&amp;&amp;(n.free(k),k=n.mallocDouble(o))}(t,a+E);var z,P=0,O=2*t;M(P++,0,0,a,0,E,r?16:0,-1/0,1/0),r||M(P++,0,0,E,0,a,1,-1/0,1/0);for(;P&gt;0;){var I=(P-=1)*b,D=w[I],R=w[I+1],B=w[I+2],F=w[I+3],N=w[I+4],j=w[I+5],V=P*_,U=k[V],q=k[V+1],H=1&amp;j,G=!!(16&amp;j),W=u,Y=S,X=C,Z=L;if(H&amp;&amp;(W=C,Y=L,X=u,Z=S),!(2&amp;j&amp;&amp;(B=m(t,D,R,B,W,Y,q),R&gt;=B)||4&amp;j&amp;&amp;(R=v(t,D,R,B,W,Y,U))&gt;=B)){var $=B-R,J=N-F;if(G){if(t*$*($+J)&lt;p){if(void 0!==(z=l.scanComplete(t,D,e,R,B,W,Y,F,N,X,Z)))return z;continue}}else{if(t*Math.min($,J)&lt;f){if(void 0!==(z=o(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}if(t*$*J&lt;h){if(void 0!==(z=l.scanBipartite(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}}var K=d(t,D,R,B,W,Y,U,q);if(R&lt;K)if(t*(K-R)&lt;f){if(void 0!==(z=s(t,D+1,e,R,K,W,Y,F,N,X,Z)))return z}else if(D===t-2){if(void 0!==(z=H?l.sweepBipartite(t,e,F,N,X,Z,R,K,W,Y):l.sweepBipartite(t,e,R,K,W,Y,F,N,X,Z)))return z}else M(P++,D+1,R,K,F,N,H,-1/0,1/0),M(P++,D+1,F,N,R,K,1^H,-1/0,1/0);if(K&lt;B){var Q=c(t,D,F,N,X,Z),tt=X[O*Q+D],et=g(t,D,Q,N,X,Z,tt);if(et&lt;N&amp;&amp;M(P++,D,K,B,et,N,(4|H)+(G?16:0),tt,q),F&lt;Q&amp;&amp;M(P++,D,K,B,F,Q,(2|H)+(G?16:0),U,tt),Q+1===et){if(void 0!==(z=G?T(t,D,e,K,B,W,Y,Q,X,Z[Q]):A(t,D,e,H,K,B,W,Y,Q,X,Z[Q])))return z}else if(Q&lt;et){var rt;if(G){if(rt=y(t,D,K,B,W,Y,tt),K&lt;rt){var nt=g(t,D,K,rt,W,Y,tt);if(D===t-2){if(K&lt;nt&amp;&amp;void 0!==(z=l.sweepComplete(t,e,K,nt,W,Y,Q,et,X,Z)))return z;if(nt&lt;rt&amp;&amp;void 0!==(z=l.sweepBipartite(t,e,nt,rt,W,Y,Q,et,X,Z)))return z}else K&lt;nt&amp;&amp;M(P++,D+1,K,nt,Q,et,16,-1/0,1/0),nt&lt;rt&amp;&amp;(M(P++,D+1,nt,rt,Q,et,0,-1/0,1/0),M(P++,D+1,Q,et,nt,rt,1,-1/0,1/0))}}else rt=H?x(t,D,K,B,W,Y,tt):y(t,D,K,B,W,Y,tt),K&lt;rt&amp;&amp;(D===t-2?z=H?l.sweepBipartite(t,e,Q,et,X,Z,K,rt,W,Y):l.sweepBipartite(t,e,K,rt,W,Y,Q,et,X,Z):(M(P++,D+1,K,rt,Q,et,H,-1/0,1/0),M(P++,D+1,Q,et,K,rt,1^H,-1/0,1/0)))}}}}};var n=t(&quot;typedarray-pool&quot;),i=t(&quot;bit-twiddle&quot;),a=t(&quot;./brute&quot;),o=a.partial,s=a.full,l=t(&quot;./sweep&quot;),c=t(&quot;./median&quot;),u=t(&quot;./partition&quot;),f=128,h=1&lt;&lt;22,p=1&lt;&lt;22,d=u(&quot;!(lo&gt;=p0)&amp;&amp;!(p1&gt;=hi)&quot;,[&quot;p0&quot;,&quot;p1&quot;]),g=u(&quot;lo===p0&quot;,[&quot;p0&quot;]),m=u(&quot;lo&lt;p0&quot;,[&quot;p0&quot;]),v=u(&quot;hi&lt;=p0&quot;,[&quot;p0&quot;]),y=u(&quot;lo&lt;=p0&amp;&amp;p0&lt;=hi&quot;,[&quot;p0&quot;]),x=u(&quot;lo&lt;p0&amp;&amp;p0&lt;=hi&quot;,[&quot;p0&quot;]),b=6,_=2,w=n.mallocInt32(1024),k=n.mallocDouble(1024);function M(t,e,r,n,i,a,o,s,l){var c=b*t;w[c]=e,w[c+1]=r,w[c+2]=n,w[c+3]=i,w[c+4]=a,w[c+5]=o;var u=_*t;k[u]=s,k[u+1]=l}function A(t,e,r,n,i,a,o,s,l,c,u){var f=2*t,h=l*f,p=c[h+e];t:for(var d=i,g=i*f;d&lt;a;++d,g+=f){var m=o[g+e],v=o[g+e+t];if(!(p&lt;m||v&lt;p)&amp;&amp;(!n||p!==m)){for(var y,x=s[d],b=e+1;b&lt;t;++b){m=o[g+b],v=o[g+b+t];var _=c[h+b],w=c[h+b+t];if(v&lt;_||w&lt;m)continue t}if(void 0!==(y=n?r(u,x):r(x,u)))return y}}}function T(t,e,r,n,i,a,o,s,l,c){var u=2*t,f=s*u,h=l[f+e];t:for(var p=n,d=n*u;p&lt;i;++p,d+=u){var g=o[p];if(g!==c){var m=a[d+e],v=a[d+e+t];if(!(h&lt;m||v&lt;h)){for(var y=e+1;y&lt;t;++y){m=a[d+y],v=a[d+y+t];var x=l[f+y],b=l[f+y+t];if(v&lt;x||b&lt;m)continue t}var _=r(g,c);if(void 0!==_)return _}}}}},{&quot;./brute&quot;:84,&quot;./median&quot;:86,&quot;./partition&quot;:87,&quot;./sweep&quot;:89,&quot;bit-twiddle&quot;:79,&quot;typedarray-pool&quot;:519}],86:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,o,s,l){if(o&lt;=r+1)return r;var c=r,u=o,f=o+r&gt;&gt;&gt;1,h=2*t,p=f,d=s[h*f+e];for(;c&lt;u;){if(u-c&lt;i){a(t,e,c,u,s,l),d=s[h*f+e];break}var g=u-c,m=Math.random()*g+c|0,v=s[h*m+e],y=Math.random()*g+c|0,x=s[h*y+e],b=Math.random()*g+c|0,_=s[h*b+e];v&lt;=x?_&gt;=x?(p=y,d=x):v&gt;=_?(p=m,d=v):(p=b,d=_):x&gt;=_?(p=y,d=x):_&gt;=v?(p=m,d=v):(p=b,d=_);for(var w=h*(u-1),k=h*p,M=0;M&lt;h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];l[u-1]=l[p],l[p]=T,p=n(t,e,c,u-1,s,l,d);for(var w=h*(u-1),k=h*p,M=0;M&lt;h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];if(l[u-1]=l[p],l[p]=T,f&lt;p){for(u=p-1;c&lt;u&amp;&amp;s[h*(u-1)+e]===d;)u-=1;u+=1}else{if(!(p&lt;f))break;for(c=p+1;c&lt;u&amp;&amp;s[h*c+e]===d;)c+=1}}return n(t,e,r,f,s,l,s[h*f+e])};var n=t(&quot;./partition&quot;)(&quot;lo&lt;p0&quot;,[&quot;p0&quot;]),i=8;function a(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l&lt;n;++l,s+=o)for(var c=i[s],u=l,f=o*(l-1);u&gt;r&amp;&amp;i[f+e]&gt;c;--u,f-=o){for(var h=f,p=f+o,d=0;d&lt;o;++d,++h,++p){var g=i[h];i[h]=i[p],i[p]=g}var m=a[u];a[u]=a[u-1],a[u-1]=m}}},{&quot;./partition&quot;:87}],87:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=&quot;abcdef&quot;.split(&quot;&quot;).concat(e),i=[];t.indexOf(&quot;lo&quot;)&gt;=0&amp;&amp;i.push(&quot;lo=e[k+n]&quot;);t.indexOf(&quot;hi&quot;)&gt;=0&amp;&amp;i.push(&quot;hi=e[k+o]&quot;);return r.push(n.replace(&quot;_&quot;,i.join()).replace(&quot;$&quot;,t)),Function.apply(void 0,r)};var n=&quot;for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d&gt;p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j&gt;s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m&quot;},{}],88:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){e&lt;=4*n?i(0,e-1,t):function t(e,r,f){var h=(r-e+1)/6|0,p=e+h,d=r-h,g=e+r&gt;&gt;1,m=g-h,v=g+h,y=p,x=m,b=g,_=v,w=d,k=e+1,M=r-1,A=0;c(y,x,f)&amp;&amp;(A=y,y=x,x=A);c(_,w,f)&amp;&amp;(A=_,_=w,w=A);c(y,b,f)&amp;&amp;(A=y,y=b,b=A);c(x,b,f)&amp;&amp;(A=x,x=b,b=A);c(y,_,f)&amp;&amp;(A=y,y=_,_=A);c(b,_,f)&amp;&amp;(A=b,b=_,_=A);c(x,w,f)&amp;&amp;(A=x,x=w,w=A);c(x,b,f)&amp;&amp;(A=x,x=b,b=A);c(_,w,f)&amp;&amp;(A=_,_=w,w=A);var T=f[2*x];var S=f[2*x+1];var E=f[2*_];var C=f[2*_+1];var L=2*y;var z=2*b;var P=2*w;var O=2*p;var I=2*g;var D=2*d;for(var R=0;R&lt;2;++R){var B=f[L+R],F=f[z+R],N=f[P+R];f[O+R]=B,f[I+R]=F,f[D+R]=N}o(m,e,f);o(v,r,f);for(var j=k;j&lt;=M;++j)if(u(j,T,S,f))j!==k&amp;&amp;a(j,k,f),++k;else if(!u(j,E,C,f))for(;;){if(u(M,E,C,f)){u(M,T,S,f)?(s(j,k,M,f),++k,--M):(a(j,M,f),--M);break}if(--M&lt;j)break}l(e,k-1,T,S,f);l(r,M+1,E,C,f);k-2-e&lt;=n?i(e,k-2,f):t(e,k-2,f);r-(M+2)&lt;=n?i(M+2,r,f):t(M+2,r,f);M-k&lt;=n?i(k,M,f):t(k,M,f)}(0,e-1,t)};var n=32;function i(t,e,r){for(var n=2*(t+1),i=t+1;i&lt;=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- &gt;t;){var c=r[l-2],u=r[l-1];if(c&lt;a)break;if(c===a&amp;&amp;u&lt;o)break;r[l]=c,r[l+1]=u,l-=2}r[l]=a,r[l+1]=o}}function a(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function o(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function s(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function l(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function c(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n&lt;i)&amp;&amp;(n!==i||r[t+1]&gt;r[e+1])}function u(t,e,r,n){var i=n[t*=2];return i&lt;e||i===e&amp;&amp;n[t+1]&lt;r}},{}],89:[function(t,e,r){&quot;use strict&quot;;e.exports={init:function(t){var e=i.nextPow2(t);s.length&lt;e&amp;&amp;(n.free(s),s=n.mallocInt32(e));l.length&lt;e&amp;&amp;(n.free(l),l=n.mallocInt32(e));c.length&lt;e&amp;&amp;(n.free(c),c=n.mallocInt32(e));u.length&lt;e&amp;&amp;(n.free(u),u=n.mallocInt32(e));f.length&lt;e&amp;&amp;(n.free(f),f=n.mallocInt32(e));h.length&lt;e&amp;&amp;(n.free(h),h=n.mallocInt32(e));var r=8*e;p.length&lt;r&amp;&amp;(n.free(p),p=n.mallocDouble(r))},sweepBipartite:function(t,e,r,n,i,f,h,m,v,y){for(var x=0,b=2*t,_=t-1,w=b-1,k=r;k&lt;n;++k){var M=f[k],A=b*k;p[x++]=i[A+_],p[x++]=-(M+1),p[x++]=i[A+w],p[x++]=M}for(var k=h;k&lt;m;++k){var M=y[k]+o,T=b*k;p[x++]=v[T+_],p[x++]=-M,p[x++]=v[T+w],p[x++]=M}var S=x&gt;&gt;&gt;1;a(p,S);for(var E=0,C=0,k=0;k&lt;S;++k){var L=0|p[2*k+1];if(L&gt;=o)d(c,u,C--,L=L-o|0);else if(L&gt;=0)d(s,l,E--,L);else if(L&lt;=-o){L=-L-o|0;for(var z=0;z&lt;E;++z){var P=e(s[z],L);if(void 0!==P)return P}g(c,u,C++,L)}else{L=-L-1|0;for(var z=0;z&lt;C;++z){var P=e(L,c[z]);if(void 0!==P)return P}g(s,l,E++,L)}}},sweepComplete:function(t,e,r,n,i,o,m,v,y,x){for(var b=0,_=2*t,w=t-1,k=_-1,M=r;M&lt;n;++M){var A=o[M]+1&lt;&lt;1,T=_*M;p[b++]=i[T+w],p[b++]=-A,p[b++]=i[T+k],p[b++]=A}for(var M=m;M&lt;v;++M){var A=x[M]+1&lt;&lt;1,S=_*M;p[b++]=y[S+w],p[b++]=1|-A,p[b++]=y[S+k],p[b++]=1|A}var E=b&gt;&gt;&gt;1;a(p,E);for(var C=0,L=0,z=0,M=0;M&lt;E;++M){var P=0|p[2*M+1],O=1&amp;P;if(M&lt;E-1&amp;&amp;P&gt;&gt;1==p[2*M+3]&gt;&gt;1&amp;&amp;(O=2,M+=1),P&lt;0){for(var I=-(P&gt;&gt;1)-1,D=0;D&lt;z;++D){var R=e(f[D],I);if(void 0!==R)return R}if(0!==O)for(var D=0;D&lt;C;++D){var R=e(s[D],I);if(void 0!==R)return R}if(1!==O)for(var D=0;D&lt;L;++D){var R=e(c[D],I);if(void 0!==R)return R}0===O?g(s,l,C++,I):1===O?g(c,u,L++,I):2===O&amp;&amp;g(f,h,z++,I)}else{var I=(P&gt;&gt;1)-1;0===O?d(s,l,C--,I):1===O?d(c,u,L--,I):2===O&amp;&amp;d(f,h,z--,I)}}},scanBipartite:function(t,e,r,n,i,c,u,f,h,m,v,y){var x=0,b=2*t,_=e,w=e+t,k=1,M=1;n?M=o:k=o;for(var A=i;A&lt;c;++A){var T=A+k,S=b*A;p[x++]=u[S+_],p[x++]=-T,p[x++]=u[S+w],p[x++]=T}for(var A=h;A&lt;m;++A){var T=A+M,E=b*A;p[x++]=v[E+_],p[x++]=-T}var C=x&gt;&gt;&gt;1;a(p,C);for(var L=0,A=0;A&lt;C;++A){var z=0|p[2*A+1];if(z&lt;0){var T=-z,P=!1;if(T&gt;=o?(P=!n,T-=o):(P=!!n,T-=1),P)g(s,l,L++,T);else{var O=y[T],I=b*T,D=v[I+e+1],R=v[I+e+1+t];t:for(var B=0;B&lt;L;++B){var F=s[B],N=b*F;if(!(R&lt;u[N+e+1]||u[N+e+1+t]&lt;D)){for(var j=e+2;j&lt;t;++j)if(v[I+j+t]&lt;u[N+j]||u[N+j+t]&lt;v[I+j])continue t;var V,U=f[F];if(void 0!==(V=n?r(O,U):r(U,O)))return V}}}}else d(s,l,L--,z-k)}},scanComplete:function(t,e,r,n,i,l,c,u,f,h,d){for(var g=0,m=2*t,v=e,y=e+t,x=n;x&lt;i;++x){var b=x+o,_=m*x;p[g++]=l[_+v],p[g++]=-b,p[g++]=l[_+y],p[g++]=b}for(var x=u;x&lt;f;++x){var b=x+1,w=m*x;p[g++]=h[w+v],p[g++]=-b}var k=g&gt;&gt;&gt;1;a(p,k);for(var M=0,x=0;x&lt;k;++x){var A=0|p[2*x+1];if(A&lt;0){var b=-A;if(b&gt;=o)s[M++]=b-o;else{var T=d[b-=1],S=m*b,E=h[S+e+1],C=h[S+e+1+t];t:for(var L=0;L&lt;M;++L){var z=s[L],P=c[z];if(P===T)break;var O=m*z;if(!(C&lt;l[O+e+1]||l[O+e+1+t]&lt;E)){for(var I=e+2;I&lt;t;++I)if(h[S+I+t]&lt;l[O+I]||l[O+I+t]&lt;h[S+I])continue t;var D=r(P,T);if(void 0!==D)return D}}}}else{for(var b=A-o,L=M-1;L&gt;=0;--L)if(s[L]===b){for(var I=L+1;I&lt;M;++I)s[I-1]=s[I];break}--M}}}};var n=t(&quot;typedarray-pool&quot;),i=t(&quot;bit-twiddle&quot;),a=t(&quot;./sort&quot;),o=1&lt;&lt;28,s=n.mallocInt32(1024),l=n.mallocInt32(1024),c=n.mallocInt32(1024),u=n.mallocInt32(1024),f=n.mallocInt32(1024),h=n.mallocInt32(1024),p=n.mallocDouble(8192);function d(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function g(t,e,r,n){t[r]=n,e[n]=r}},{&quot;./sort&quot;:88,&quot;bit-twiddle&quot;:79,&quot;typedarray-pool&quot;:519}],90:[function(t,e,r){},{}],91:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&amp;&amp;e.push(r);return r},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&amp;&amp;Object.prototype.hasOwnProperty.call(this,&quot;_events&quot;)||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,l=10;try{var c={};Object.defineProperty&amp;&amp;Object.defineProperty(c,&quot;x&quot;,{value:0}),s=0===c.x}catch(t){s=!1}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var a,o,s;if(&quot;function&quot;!=typeof r)throw new TypeError('&quot;listener&quot; argument must be a function');if((o=t._events)?(o.newListener&amp;&amp;(t.emit(&quot;newListener&quot;,e,r.listener?r.listener:r),o=t._events),s=o[e]):(o=t._events=n(null),t._eventsCount=0),s){if(&quot;function&quot;==typeof s?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&amp;&amp;(a=u(t))&amp;&amp;a&gt;0&amp;&amp;s.length&gt;a){s.warned=!0;var l=new Error(&quot;Possible EventEmitter memory leak detected. &quot;+s.length+' &quot;'+String(e)+'&quot; listeners added. Use emitter.setMaxListeners() to increase limit.');l.name=&quot;MaxListenersExceededWarning&quot;,l.emitter=t,l.type=e,l.count=s.length,&quot;object&quot;==typeof console&amp;&amp;console.warn&amp;&amp;console.warn(&quot;%s: %s&quot;,l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e&lt;t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=a.call(h,n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?&quot;function&quot;==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r&lt;e.length;++r)e[r]=t[r].listener||t[r];return e}(i):m(i,i.length):[]}function g(t){var e=this._events;if(e){var r=e[t];if(&quot;function&quot;==typeof r)return 1;if(r)return r.length}return 0}function m(t,e){for(var r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n];return r}s?Object.defineProperty(o,&quot;defaultMaxListeners&quot;,{enumerable:!0,get:function(){return l},set:function(t){if(&quot;number&quot;!=typeof t||t&lt;0||t!=t)throw new TypeError('&quot;defaultMaxListeners&quot; must be a positive number');l=t}}):o.defaultMaxListeners=l,o.prototype.setMaxListeners=function(t){if(&quot;number&quot;!=typeof t||t&lt;0||isNaN(t))throw new TypeError('&quot;n&quot; argument must be a positive number');return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){var e,r,n,i,a,o,s=&quot;error&quot;===t;if(o=this._events)s=s&amp;&amp;null==o.error;else if(!s)return!1;if(s){if(arguments.length&gt;1&amp;&amp;(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled &quot;error&quot; event. ('+e+&quot;)&quot;);throw l.context=e,l}if(!(r=o[t]))return!1;var c=&quot;function&quot;==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=m(t,n),a=0;a&lt;n;++a)i[a].call(r)}(r,c,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,a=m(t,i),o=0;o&lt;i;++o)a[o].call(r,n)}(r,c,this,arguments[1]);break;case 3:!function(t,e,r,n,i){if(e)t.call(r,n,i);else for(var a=t.length,o=m(t,a),s=0;s&lt;a;++s)o[s].call(r,n,i)}(r,c,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,i,a){if(e)t.call(r,n,i,a);else for(var o=t.length,s=m(t,o),l=0;l&lt;o;++l)s[l].call(r,n,i,a)}(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),a=1;a&lt;n;a++)i[a-1]=arguments[a];!function(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,a=m(t,i),o=0;o&lt;i;++o)a[o].apply(r,n)}(r,c,this,i)}return!0},o.prototype.addListener=function(t,e){return f(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return f(this,t,e,!0)},o.prototype.once=function(t,e){if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;listener&quot; argument must be a function');return this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;listener&quot; argument must be a function');return this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,i,a,o,s;if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;listener&quot; argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&amp;&amp;this.emit(&quot;removeListener&quot;,t,r.listener||e));else if(&quot;function&quot;!=typeof r){for(a=-1,o=r.length-1;o&gt;=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,a=o;break}if(a&lt;0)return this;0===a?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n&lt;i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,a),1===r.length&amp;&amp;(i[t]=r[0]),i.removeListener&amp;&amp;this.emit(&quot;removeListener&quot;,t,s||e)}return this},o.prototype.removeAllListeners=function(t){var e,r,a;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&amp;&amp;(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var o,s=i(r);for(a=0;a&lt;s.length;++a)&quot;removeListener&quot;!==(o=s[a])&amp;&amp;this.removeAllListeners(o);return this.removeAllListeners(&quot;removeListener&quot;),this._events=n(null),this._eventsCount=0,this}if(&quot;function&quot;==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(a=e.length-1;a&gt;=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return&quot;function&quot;==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount&gt;0?Reflect.ownKeys(this._events):[]}},{}],92:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;base64-js&quot;),i=t(&quot;ieee754&quot;);r.Buffer=s,r.SlowBuffer=function(t){+t!=t&amp;&amp;(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t&gt;a)throw new RangeError('The value &quot;'+t+'&quot; is invalid for option &quot;size&quot;');var e=new Uint8Array(t);return e.__proto__=s.prototype,e}function s(t,e,r){if(&quot;number&quot;==typeof t){if(&quot;string&quot;==typeof e)throw new TypeError('The &quot;string&quot; argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,e,r){if(&quot;string&quot;==typeof t)return function(t,e){&quot;string&quot;==typeof e&amp;&amp;&quot;&quot;!==e||(e=&quot;utf8&quot;);if(!s.isEncoding(e))throw new TypeError(&quot;Unknown encoding: &quot;+e);var r=0|p(t,e),n=o(r),i=n.write(t,e);i!==r&amp;&amp;(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw TypeError(&quot;The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type &quot;+typeof t);if(j(t,ArrayBuffer)||t&amp;&amp;j(t.buffer,ArrayBuffer))return function(t,e,r){if(e&lt;0||t.byteLength&lt;e)throw new RangeError('&quot;offset&quot; is outside of buffer bounds');if(t.byteLength&lt;e+(r||0))throw new RangeError('&quot;length&quot; is outside of buffer bounds');var n;n=void 0===e&amp;&amp;void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=s.prototype,n}(t,e,r);if(&quot;number&quot;==typeof t)throw new TypeError('The &quot;value&quot; argument must not be of type number. Received type number');var n=t.valueOf&amp;&amp;t.valueOf();if(null!=n&amp;&amp;n!==t)return s.from(n,e,r);var i=function(t){if(s.isBuffer(t)){var e=0|h(t.length),r=o(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return&quot;number&quot;!=typeof t.length||V(t.length)?o(0):f(t);if(&quot;Buffer&quot;===t.type&amp;&amp;Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if(&quot;undefined&quot;!=typeof Symbol&amp;&amp;null!=Symbol.toPrimitive&amp;&amp;&quot;function&quot;==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive](&quot;string&quot;),e,r);throw new TypeError(&quot;The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type &quot;+typeof t)}function c(t){if(&quot;number&quot;!=typeof t)throw new TypeError('&quot;size&quot; argument must be of type number');if(t&lt;0)throw new RangeError('The value &quot;'+t+'&quot; is invalid for option &quot;size&quot;')}function u(t){return c(t),o(t&lt;0?0:0|h(t))}function f(t){for(var e=t.length&lt;0?0:0|h(t.length),r=o(e),n=0;n&lt;e;n+=1)r[n]=255&amp;t[n];return r}function h(t){if(t&gt;=a)throw new RangeError(&quot;Attempt to allocate Buffer larger than maximum size: 0x&quot;+a.toString(16)+&quot; bytes&quot;);return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if(&quot;string&quot;!=typeof t)throw new TypeError('The &quot;string&quot; argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length&gt;2&amp;&amp;!0===arguments[2];if(!n&amp;&amp;0===r)return 0;for(var i=!1;;)switch(e){case&quot;ascii&quot;:case&quot;latin1&quot;:case&quot;binary&quot;:return r;case&quot;utf8&quot;:case&quot;utf-8&quot;:return B(t).length;case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return 2*r;case&quot;hex&quot;:return r&gt;&gt;&gt;1;case&quot;base64&quot;:return F(t).length;default:if(i)return n?-1:B(t).length;e=(&quot;&quot;+e).toLowerCase(),i=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if(&quot;string&quot;==typeof r?(n=r,r=0):r&gt;2147483647?r=2147483647:r&lt;-2147483648&amp;&amp;(r=-2147483648),V(r=+r)&amp;&amp;(r=i?0:t.length-1),r&lt;0&amp;&amp;(r=t.length+r),r&gt;=t.length){if(i)return-1;r=t.length-1}else if(r&lt;0){if(!i)return-1;r=0}if(&quot;string&quot;==typeof e&amp;&amp;(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if(&quot;number&quot;==typeof e)return e&amp;=255,&quot;function&quot;==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError(&quot;val must be string, number or Buffer&quot;)}function m(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&amp;&amp;(&quot;ucs2&quot;===(n=String(n).toLowerCase())||&quot;ucs-2&quot;===n||&quot;utf16le&quot;===n||&quot;utf-16le&quot;===n)){if(t.length&lt;2||e.length&lt;2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;a&lt;s;a++)if(c(t,a)===c(e,-1===u?0:a-u)){if(-1===u&amp;&amp;(u=a),a-u+1===l)return u*o}else-1!==u&amp;&amp;(a-=a-u),u=-1}else for(r+l&gt;s&amp;&amp;(r=s-l),a=r;a&gt;=0;a--){for(var f=!0,h=0;h&lt;l;h++)if(c(t,a+h)!==c(e,h)){f=!1;break}if(f)return a}return-1}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))&gt;i&amp;&amp;(n=i):n=i;var a=e.length;n&gt;a/2&amp;&amp;(n=a/2);for(var o=0;o&lt;n;++o){var s=parseInt(e.substr(2*o,2),16);if(V(s))return o;t[r+o]=s}return o}function y(t,e,r,n){return N(B(e,t.length-r),t,r,n)}function x(t,e,r,n){return N(function(t){for(var e=[],r=0;r&lt;t.length;++r)e.push(255&amp;t.charCodeAt(r));return e}(e),t,r,n)}function b(t,e,r,n){return x(t,e,r,n)}function _(t,e,r,n){return N(F(e),t,r,n)}function w(t,e,r,n){return N(function(t,e){for(var r,n,i,a=[],o=0;o&lt;t.length&amp;&amp;!((e-=2)&lt;0);++o)r=t.charCodeAt(o),n=r&gt;&gt;8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&amp;&amp;r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i&lt;r;){var a,o,s,l,c=t[i],u=null,f=c&gt;239?4:c&gt;223?3:c&gt;191?2:1;if(i+f&lt;=r)switch(f){case 1:c&lt;128&amp;&amp;(u=c);break;case 2:128==(192&amp;(a=t[i+1]))&amp;&amp;(l=(31&amp;c)&lt;&lt;6|63&amp;a)&gt;127&amp;&amp;(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;(l=(15&amp;c)&lt;&lt;12|(63&amp;a)&lt;&lt;6|63&amp;o)&gt;2047&amp;&amp;(l&lt;55296||l&gt;57343)&amp;&amp;(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;128==(192&amp;s)&amp;&amp;(l=(15&amp;c)&lt;&lt;18|(63&amp;a)&lt;&lt;12|(63&amp;o)&lt;&lt;6|63&amp;s)&gt;65535&amp;&amp;l&lt;1114112&amp;&amp;(u=l)}null===u?(u=65533,f=1):u&gt;65535&amp;&amp;(u-=65536,n.push(u&gt;&gt;&gt;10&amp;1023|55296),u=56320|1023&amp;u),n.push(u),i+=f}return function(t){var e=t.length;if(e&lt;=A)return String.fromCharCode.apply(String,t);var r=&quot;&quot;,n=0;for(;n&lt;e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=A));return r}(n)}r.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||&quot;undefined&quot;==typeof console||&quot;function&quot;!=typeof console.error||console.error(&quot;This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.&quot;),Object.defineProperty(s.prototype,&quot;parent&quot;,{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,&quot;offset&quot;,{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),&quot;undefined&quot;!=typeof Symbol&amp;&amp;null!=Symbol.species&amp;&amp;s[Symbol.species]===s&amp;&amp;Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(t,e,r){return l(t,e,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(t,e,r){return function(t,e,r){return c(t),t&lt;=0?o(t):void 0!==e?&quot;string&quot;==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},s.allocUnsafe=function(t){return u(t)},s.allocUnsafeSlow=function(t){return u(t)},s.isBuffer=function(t){return null!=t&amp;&amp;!0===t._isBuffer&amp;&amp;t!==s.prototype},s.compare=function(t,e){if(j(t,Uint8Array)&amp;&amp;(t=s.from(t,t.offset,t.byteLength)),j(e,Uint8Array)&amp;&amp;(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The &quot;buf1&quot;, &quot;buf2&quot; arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i&lt;a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r&lt;n?-1:n&lt;r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case&quot;hex&quot;:case&quot;utf8&quot;:case&quot;utf-8&quot;:case&quot;ascii&quot;:case&quot;latin1&quot;:case&quot;binary&quot;:case&quot;base64&quot;:case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('&quot;list&quot; argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r&lt;t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r&lt;t.length;++r){var a=t[r];if(j(a,Uint8Array)&amp;&amp;(a=s.from(a)),!s.isBuffer(a))throw new TypeError('&quot;list&quot; argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(&quot;Buffer size must be a multiple of 16-bits&quot;);for(var e=0;e&lt;t;e+=2)d(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(&quot;Buffer size must be a multiple of 32-bits&quot;);for(var e=0;e&lt;t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(&quot;Buffer size must be a multiple of 64-bits&quot;);for(var e=0;e&lt;t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?&quot;&quot;:0===arguments.length?M(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e&lt;0)&amp;&amp;(e=0),e&gt;this.length)return&quot;&quot;;if((void 0===r||r&gt;this.length)&amp;&amp;(r=this.length),r&lt;=0)return&quot;&quot;;if((r&gt;&gt;&gt;=0)&lt;=(e&gt;&gt;&gt;=0))return&quot;&quot;;for(t||(t=&quot;utf8&quot;);;)switch(t){case&quot;hex&quot;:return E(this,e,r);case&quot;utf8&quot;:case&quot;utf-8&quot;:return M(this,e,r);case&quot;ascii&quot;:return T(this,e,r);case&quot;latin1&quot;:case&quot;binary&quot;:return S(this,e,r);case&quot;base64&quot;:return k(this,e,r);case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return C(this,e,r);default:if(n)throw new TypeError(&quot;Unknown encoding: &quot;+t);t=(t+&quot;&quot;).toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError(&quot;Argument must be a Buffer&quot;);return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t=&quot;&quot;,e=r.INSPECT_MAX_BYTES;return t=this.toString(&quot;hex&quot;,0,e).replace(/(.{2})/g,&quot;$1 &quot;).trim(),this.length&gt;e&amp;&amp;(t+=&quot; ... &quot;),&quot;&lt;Buffer &quot;+t+&quot;&gt;&quot;},s.prototype.compare=function(t,e,r,n,i){if(j(t,Uint8Array)&amp;&amp;(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The &quot;target&quot; argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&amp;&amp;(e=0),void 0===r&amp;&amp;(r=t?t.length:0),void 0===n&amp;&amp;(n=0),void 0===i&amp;&amp;(i=this.length),e&lt;0||r&gt;t.length||n&lt;0||i&gt;this.length)throw new RangeError(&quot;out of range index&quot;);if(n&gt;=i&amp;&amp;e&gt;=r)return 0;if(n&gt;=i)return-1;if(e&gt;=r)return 1;if(this===t)return 0;for(var a=(i&gt;&gt;&gt;=0)-(n&gt;&gt;&gt;=0),o=(r&gt;&gt;&gt;=0)-(e&gt;&gt;&gt;=0),l=Math.min(a,o),c=this.slice(n,i),u=t.slice(e,r),f=0;f&lt;l;++f)if(c[f]!==u[f]){a=c[f],o=u[f];break}return a&lt;o?-1:o&lt;a?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n=&quot;utf8&quot;,r=this.length,e=0;else if(void 0===r&amp;&amp;&quot;string&quot;==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(&quot;Buffer.write(string, encoding, offset[, length]) is no longer supported&quot;);e&gt;&gt;&gt;=0,isFinite(r)?(r&gt;&gt;&gt;=0,void 0===n&amp;&amp;(n=&quot;utf8&quot;)):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r&gt;i)&amp;&amp;(r=i),t.length&gt;0&amp;&amp;(r&lt;0||e&lt;0)||e&gt;this.length)throw new RangeError(&quot;Attempt to write outside buffer bounds&quot;);n||(n=&quot;utf8&quot;);for(var a=!1;;)switch(n){case&quot;hex&quot;:return v(this,t,e,r);case&quot;utf8&quot;:case&quot;utf-8&quot;:return y(this,t,e,r);case&quot;ascii&quot;:return x(this,t,e,r);case&quot;latin1&quot;:case&quot;binary&quot;:return b(this,t,e,r);case&quot;base64&quot;:return _(this,t,e,r);case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return w(this,t,e,r);default:if(a)throw new TypeError(&quot;Unknown encoding: &quot;+n);n=(&quot;&quot;+n).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:&quot;Buffer&quot;,data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(t,e,r){var n=&quot;&quot;;r=Math.min(t.length,r);for(var i=e;i&lt;r;++i)n+=String.fromCharCode(127&amp;t[i]);return n}function S(t,e,r){var n=&quot;&quot;;r=Math.min(t.length,r);for(var i=e;i&lt;r;++i)n+=String.fromCharCode(t[i]);return n}function E(t,e,r){var n=t.length;(!e||e&lt;0)&amp;&amp;(e=0),(!r||r&lt;0||r&gt;n)&amp;&amp;(r=n);for(var i=&quot;&quot;,a=e;a&lt;r;++a)i+=R(t[a]);return i}function C(t,e,r){for(var n=t.slice(e,r),i=&quot;&quot;,a=0;a&lt;n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function L(t,e,r){if(t%1!=0||t&lt;0)throw new RangeError(&quot;offset is not uint&quot;);if(t+e&gt;r)throw new RangeError(&quot;Trying to access beyond buffer length&quot;)}function z(t,e,r,n,i,a){if(!s.isBuffer(t))throw new TypeError('&quot;buffer&quot; argument must be a Buffer instance');if(e&gt;i||e&lt;a)throw new RangeError('&quot;value&quot; argument is out of bounds');if(r+n&gt;t.length)throw new RangeError(&quot;Index out of range&quot;)}function P(t,e,r,n,i,a){if(r+n&gt;t.length)throw new RangeError(&quot;Index out of range&quot;);if(r&lt;0)throw new RangeError(&quot;Index out of range&quot;)}function O(t,e,r,n,a){return e=+e,r&gt;&gt;&gt;=0,a||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,a){return e=+e,r&gt;&gt;&gt;=0,a||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r=this.length;(t=~~t)&lt;0?(t+=r)&lt;0&amp;&amp;(t=0):t&gt;r&amp;&amp;(t=r),(e=void 0===e?r:~~e)&lt;0?(e+=r)&lt;0&amp;&amp;(e=0):e&gt;r&amp;&amp;(e=r),e&lt;t&amp;&amp;(e=t);var n=this.subarray(t,e);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a&lt;e&amp;&amp;(i*=256);)n+=this[t+a]*i;return n},s.prototype.readUIntBE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e&gt;0&amp;&amp;(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,2,this.length),this[t]|this[t+1]&lt;&lt;8},s.prototype.readUInt16BE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,2,this.length),this[t]&lt;&lt;8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),(this[t]|this[t+1]&lt;&lt;8|this[t+2]&lt;&lt;16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]&lt;&lt;16|this[t+2]&lt;&lt;8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a&lt;e&amp;&amp;(i*=256);)n+=this[t+a]*i;return n&gt;=(i*=128)&amp;&amp;(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n&gt;0&amp;&amp;(i*=256);)a+=this[t+--n]*i;return a&gt;=(i*=128)&amp;&amp;(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,1,this.length),128&amp;this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t&gt;&gt;&gt;=0,e||L(t,2,this.length);var r=this[t]|this[t+1]&lt;&lt;8;return 32768&amp;r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t&gt;&gt;&gt;=0,e||L(t,2,this.length);var r=this[t+1]|this[t]&lt;&lt;8;return 32768&amp;r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),this[t]|this[t+1]&lt;&lt;8|this[t+2]&lt;&lt;16|this[t+3]&lt;&lt;24},s.prototype.readInt32BE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),this[t]&lt;&lt;24|this[t+1]&lt;&lt;16|this[t+2]&lt;&lt;8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e&gt;&gt;&gt;=0,r&gt;&gt;&gt;=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&amp;t;++a&lt;r&amp;&amp;(i*=256);)this[e+a]=t/i&amp;255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e&gt;&gt;&gt;=0,r&gt;&gt;&gt;=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&amp;t;--i&gt;=0&amp;&amp;(a*=256);)this[e+i]=t/a&amp;255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,1,255,0),this[e]=255&amp;t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,65535,0),this[e]=255&amp;t,this[e+1]=t&gt;&gt;&gt;8,e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,65535,0),this[e]=t&gt;&gt;&gt;8,this[e+1]=255&amp;t,e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,4294967295,0),this[e+3]=t&gt;&gt;&gt;24,this[e+2]=t&gt;&gt;&gt;16,this[e+1]=t&gt;&gt;&gt;8,this[e]=255&amp;t,e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,4294967295,0),this[e]=t&gt;&gt;&gt;24,this[e+1]=t&gt;&gt;&gt;16,this[e+2]=t&gt;&gt;&gt;8,this[e+3]=255&amp;t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e&gt;&gt;&gt;=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&amp;t;++a&lt;r&amp;&amp;(o*=256);)t&lt;0&amp;&amp;0===s&amp;&amp;0!==this[e+a-1]&amp;&amp;(s=1),this[e+a]=(t/o&gt;&gt;0)-s&amp;255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e&gt;&gt;&gt;=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&amp;t;--a&gt;=0&amp;&amp;(o*=256);)t&lt;0&amp;&amp;0===s&amp;&amp;0!==this[e+a+1]&amp;&amp;(s=1),this[e+a]=(t/o&gt;&gt;0)-s&amp;255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,1,127,-128),t&lt;0&amp;&amp;(t=255+t+1),this[e]=255&amp;t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,32767,-32768),this[e]=255&amp;t,this[e+1]=t&gt;&gt;&gt;8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,32767,-32768),this[e]=t&gt;&gt;&gt;8,this[e+1]=255&amp;t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,2147483647,-2147483648),this[e]=255&amp;t,this[e+1]=t&gt;&gt;&gt;8,this[e+2]=t&gt;&gt;&gt;16,this[e+3]=t&gt;&gt;&gt;24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,2147483647,-2147483648),t&lt;0&amp;&amp;(t=4294967295+t+1),this[e]=t&gt;&gt;&gt;24,this[e+1]=t&gt;&gt;&gt;16,this[e+2]=t&gt;&gt;&gt;8,this[e+3]=255&amp;t,e+4},s.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError(&quot;argument should be a Buffer&quot;);if(r||(r=0),n||0===n||(n=this.length),e&gt;=t.length&amp;&amp;(e=t.length),e||(e=0),n&gt;0&amp;&amp;n&lt;r&amp;&amp;(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e&lt;0)throw new RangeError(&quot;targetStart out of bounds&quot;);if(r&lt;0||r&gt;=this.length)throw new RangeError(&quot;Index out of range&quot;);if(n&lt;0)throw new RangeError(&quot;sourceEnd out of bounds&quot;);n&gt;this.length&amp;&amp;(n=this.length),t.length-e&lt;n-r&amp;&amp;(n=t.length-e+r);var i=n-r;if(this===t&amp;&amp;&quot;function&quot;==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&amp;&amp;r&lt;e&amp;&amp;e&lt;n)for(var a=i-1;a&gt;=0;--a)t[a+e]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},s.prototype.fill=function(t,e,r,n){if(&quot;string&quot;==typeof t){if(&quot;string&quot;==typeof e?(n=e,e=0,r=this.length):&quot;string&quot;==typeof r&amp;&amp;(n=r,r=this.length),void 0!==n&amp;&amp;&quot;string&quot;!=typeof n)throw new TypeError(&quot;encoding must be a string&quot;);if(&quot;string&quot;==typeof n&amp;&amp;!s.isEncoding(n))throw new TypeError(&quot;Unknown encoding: &quot;+n);if(1===t.length){var i=t.charCodeAt(0);(&quot;utf8&quot;===n&amp;&amp;i&lt;128||&quot;latin1&quot;===n)&amp;&amp;(t=i)}}else&quot;number&quot;==typeof t&amp;&amp;(t&amp;=255);if(e&lt;0||this.length&lt;e||this.length&lt;r)throw new RangeError(&quot;Out of range index&quot;);if(r&lt;=e)return this;var a;if(e&gt;&gt;&gt;=0,r=void 0===r?this.length:r&gt;&gt;&gt;0,t||(t=0),&quot;number&quot;==typeof t)for(a=e;a&lt;r;++a)this[a]=t;else{var o=s.isBuffer(t)?t:s.from(t,n),l=o.length;if(0===l)throw new TypeError('The value &quot;'+t+'&quot; is invalid for argument &quot;value&quot;');for(a=0;a&lt;r-e;++a)this[a+e]=o[a%l]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function R(t){return t&lt;16?&quot;0&quot;+t.toString(16):t.toString(16)}function B(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o&lt;n;++o){if((r=t.charCodeAt(o))&gt;55295&amp;&amp;r&lt;57344){if(!i){if(r&gt;56319){(e-=3)&gt;-1&amp;&amp;a.push(239,191,189);continue}if(o+1===n){(e-=3)&gt;-1&amp;&amp;a.push(239,191,189);continue}i=r;continue}if(r&lt;56320){(e-=3)&gt;-1&amp;&amp;a.push(239,191,189),i=r;continue}r=65536+(i-55296&lt;&lt;10|r-56320)}else i&amp;&amp;(e-=3)&gt;-1&amp;&amp;a.push(239,191,189);if(i=null,r&lt;128){if((e-=1)&lt;0)break;a.push(r)}else if(r&lt;2048){if((e-=2)&lt;0)break;a.push(r&gt;&gt;6|192,63&amp;r|128)}else if(r&lt;65536){if((e-=3)&lt;0)break;a.push(r&gt;&gt;12|224,r&gt;&gt;6&amp;63|128,63&amp;r|128)}else{if(!(r&lt;1114112))throw new Error(&quot;Invalid code point&quot;);if((e-=4)&lt;0)break;a.push(r&gt;&gt;18|240,r&gt;&gt;12&amp;63|128,r&gt;&gt;6&amp;63|128,63&amp;r|128)}}return a}function F(t){return n.toByteArray(function(t){if((t=(t=t.split(&quot;=&quot;)[0]).trim().replace(D,&quot;&quot;)).length&lt;2)return&quot;&quot;;for(;t.length%4!=0;)t+=&quot;=&quot;;return t}(t))}function N(t,e,r,n){for(var i=0;i&lt;n&amp;&amp;!(i+r&gt;=e.length||i&gt;=t.length);++i)e[i+r]=t[i];return i}function j(t,e){return t instanceof e||null!=t&amp;&amp;null!=t.constructor&amp;&amp;null!=t.constructor.name&amp;&amp;t.constructor.name===e.name}function V(t){return t!=t}},{&quot;base64-js&quot;:61,ieee754:393}],93:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/monotone&quot;),i=t(&quot;./lib/triangulation&quot;),a=t(&quot;./lib/delaunay&quot;),o=t(&quot;./lib/filter&quot;);function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,&quot;delaunay&quot;,!0),f=!!c(r,&quot;interior&quot;,!0),h=!!c(r,&quot;exterior&quot;,!0),p=!!c(r,&quot;infinity&quot;,!1);if(!f&amp;&amp;!h||0===t.length)return[];var d=n(t,e);if(u||f!==h||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),m=0;m&lt;d.length;++m){var v=d[m];g.addTriangle(v[0],v[1],v[2])}return u&amp;&amp;a(t,g),h?f?p?o(g,0,p):g.cells():o(g,1,p):o(g,-1)}return d}},{&quot;./lib/delaunay&quot;:94,&quot;./lib/filter&quot;:95,&quot;./lib/monotone&quot;:96,&quot;./lib/triangulation&quot;:97}],94:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-in-sphere&quot;)[4];t(&quot;binary-search-bounds&quot;);function i(t,e,r,i,a,o){var s=e.opposite(i,a);if(!(s&lt;0)){if(a&lt;i){var l=i;i=a,a=l,l=o,o=s,s=l}e.isConstraint(i,a)||n(t[i],t[a],t[o],t[s])&lt;0&amp;&amp;r.push(i,a)}}e.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s&lt;a;++s)for(var l=o[s],c=1;c&lt;l.length;c+=2){var u=l[c];if(!(u&lt;s)&amp;&amp;!e.isConstraint(s,u)){for(var f=l[c-1],h=-1,p=1;p&lt;l.length;p+=2)if(l[p-1]===u){h=l[p];break}h&lt;0||n(t[s],t[u],t[f],t[h])&lt;0&amp;&amp;r.push(s,u)}}for(;r.length&gt;0;){for(var u=r.pop(),s=r.pop(),f=-1,h=-1,l=o[s],d=1;d&lt;l.length;d+=2){var g=l[d-1],m=l[d];g===u?h=m:m===u&amp;&amp;(f=g)}f&lt;0||h&lt;0||(n(t[s],t[u],t[f],t[h])&gt;=0||(e.flip(s,u),i(t,e,r,f,s,h),i(t,e,r,s,h,f),i(t,e,r,h,u,f),i(t,e,r,u,f,h)))}}},{&quot;binary-search-bounds&quot;:98,&quot;robust-in-sphere&quot;:481}],95:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;binary-search-bounds&quot;);function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i&lt;n;++i){var s=r[i],l=s[0],c=s[1],u=s[2];c&lt;u?c&lt;l&amp;&amp;(s[0]=c,s[1]=u,s[2]=l):u&lt;l&amp;&amp;(s[0]=u,s[1]=l,s[2]=c)}r.sort(o);for(var f=new Array(n),i=0;i&lt;f.length;++i)f[i]=0;var h=[],p=[],d=new Array(3*n),g=new Array(3*n),m=null;e&amp;&amp;(m=[]);for(var v=new a(r,d,g,f,h,p,m),i=0;i&lt;n;++i)for(var s=r[i],y=0;y&lt;3;++y){var l=s[y],c=s[(y+1)%3],x=d[3*i+y]=v.locate(c,l,t.opposite(c,l)),b=g[3*i+y]=t.isConstraint(l,c);x&lt;0&amp;&amp;(b?p.push(i):(h.push(i),f[i]=1),e&amp;&amp;m.push([c,l,-1]))}return v}(t,r);if(0===e)return r?n.cells.concat(n.boundary):n.cells;var i=1,s=n.active,l=n.next,c=n.flags,u=n.cells,f=n.constraint,h=n.neighbor;for(;s.length&gt;0||l.length&gt;0;){for(;s.length&gt;0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d&lt;3;++d){var g=h[3*p+d];g&gt;=0&amp;&amp;0===c[g]&amp;&amp;(f[3*p+d]?l.push(g):(s.push(g),c[g]=i))}}}var m=l;l=s,s=m,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i&lt;t.length;++i)e[i]===r&amp;&amp;(t[n++]=t[i]);return t.length=n,t}(u,c,e);if(r)return v.concat(n.boundary);return v},a.prototype.locate=(n=[0,0,0],function(t,e,r){var a=t,s=e,l=r;return e&lt;r?e&lt;t&amp;&amp;(a=e,s=r,l=t):r&lt;t&amp;&amp;(a=r,s=t,l=e),a&lt;0?-1:(n[0]=a,n[1]=s,n[2]=l,i.eq(this.cells,n,o))})},{&quot;binary-search-bounds&quot;:98}],96:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;robust-orientation&quot;)[3],a=0,o=1,s=2;function l(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function c(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function u(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(t.type!==a&amp;&amp;(r=i(t.a,t.b,e.b))?r:t.idx-e.idx)}function f(t,e){return i(t.a,t.b,e)}function h(t,e,r,a,o){for(var s=n.lt(e,a,f),l=n.gt(e,a,f),c=s;c&lt;l;++c){for(var u=e[c],h=u.lowerIds,p=h.length;p&gt;1&amp;&amp;i(r[h[p-2]],r[h[p-1]],a)&gt;0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=u.upperIds;for(p=d.length;p&gt;1&amp;&amp;i(r[d[p-2]],r[d[p-1]],a)&lt;0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]&lt;e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?r:(r=e.b[0]&lt;t.b[0]?i(t.a,t.b,e.b):i(e.b,e.a,t.b))||t.idx-e.idx}function d(t,e,r){var i=n.le(t,r,p),a=t[i],o=a.upperIds,s=o[o.length-1];a.upperIds=[s],t.splice(i+1,0,new l(r.a,r.b,r.idx,[s],o))}function g(t,e,r){var i=r.a;r.a=r.b,r.b=i;var a=n.eq(t,r,p),o=t[a];t[a-1].upperIds=o.upperIds,t.splice(a,1)}e.exports=function(t,e){for(var r=t.length,n=e.length,i=[],f=0;f&lt;r;++f)i.push(new c(t[f],null,a,f));for(var f=0;f&lt;n;++f){var p=e[f],m=t[p[0]],v=t[p[1]];m[0]&lt;v[0]?i.push(new c(m,v,s,f),new c(v,m,o,f)):m[0]&gt;v[0]&amp;&amp;i.push(new c(v,m,s,f),new c(m,v,o,f))}i.sort(u);for(var y=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],f=0,_=i.length;f&lt;_;++f){var w=i[f],k=w.type;k===a?h(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{&quot;binary-search-bounds&quot;:98,&quot;robust-orientation&quot;:483}],97:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;);function i(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n&lt;t;++n)r[n]=[];return new i(r,e)};var a=i.prototype;function o(t,e,r){for(var n=1,i=t.length;n&lt;i;n+=2)if(t[n-1]===e&amp;&amp;t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}a.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(r,i){return t[0]=Math.min(r,i),t[1]=Math.max(r,i),n.eq(this.edges,t,e)&gt;=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n&lt;i;n+=2)if(r[n]===t)return r[n-1];return-1},a.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},a.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0,o=i.length;a&lt;o;a+=2)e.push([i[a],i[a+1]]);return e},a.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0,o=i.length;a&lt;o;a+=2){var s=i[a],l=i[a+1];r&lt;Math.min(s,l)&amp;&amp;e.push([r,s,l])}return e}},{&quot;binary-search-bounds&quot;:98}],98:[function(t,e,r){&quot;use strict&quot;;function n(t,e,r,n,i){var a=[&quot;function &quot;,t,&quot;(a,l,h,&quot;,n.join(&quot;,&quot;),&quot;){&quot;,i?&quot;&quot;:&quot;var i=&quot;,r?&quot;l-1&quot;:&quot;h+1&quot;,&quot;;while(l&lt;=h){var m=(l+h)&gt;&gt;&gt;1,x=a[m]&quot;];return i?e.indexOf(&quot;c&quot;)&lt;0?a.push(&quot;;if(x===y){return m}else if(x&lt;=y){&quot;):a.push(&quot;;var p=c(x,y);if(p===0){return m}else if(p&lt;=0){&quot;):a.push(&quot;;if(&quot;,e,&quot;){i=m;&quot;),r?a.push(&quot;l=m+1}else{h=m-1}&quot;):a.push(&quot;h=m-1}else{l=m+1}&quot;),a.push(&quot;}&quot;),i?a.push(&quot;return -1};&quot;):a.push(&quot;return i};&quot;),a.join(&quot;&quot;)}function i(t,e,r,i){return new Function([n(&quot;A&quot;,&quot;x&quot;+t+&quot;y&quot;,e,[&quot;y&quot;],i),n(&quot;P&quot;,&quot;c(x,y)&quot;+t+&quot;0&quot;,e,[&quot;y&quot;,&quot;c&quot;],i),&quot;function dispatchBsearch&quot;,r,&quot;(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch&quot;,r].join(&quot;&quot;))()}e.exports={ge:i(&quot;&gt;=&quot;,!1,&quot;GE&quot;),gt:i(&quot;&gt;&quot;,!1,&quot;GT&quot;),lt:i(&quot;&lt;&quot;,!0,&quot;LT&quot;),le:i(&quot;&lt;=&quot;,!0,&quot;LE&quot;),eq:i(&quot;-&quot;,!0,&quot;EQ&quot;,!0)}},{}],99:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=1,r=1;r&lt;t.length;++r)for(var n=0;n&lt;r;++n)if(t[r]&lt;t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],100:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;dup&quot;),i=t(&quot;robust-linear-solve&quot;);function a(t,e){for(var r=0,n=t.length,i=0;i&lt;n;++i)r+=t[i]*e[i];return r}function o(t){var e=t.length;if(0===e)return[];t[0].length;var r=n([t.length+1,t.length+1],1),o=n([t.length+1],1);r[e][e]=0;for(var s=0;s&lt;e;++s){for(var l=0;l&lt;=s;++l)r[l][s]=r[s][l]=2*a(t[s],t[l]);o[s]=a(t[s],t[s])}var c=i(r,o),u=0,f=c[e+1];for(s=0;s&lt;f.length;++s)u+=f[s];var h=new Array(e);for(s=0;s&lt;e;++s){f=c[s];var p=0;for(l=0;l&lt;f.length;++l)p+=f[l];h[s]=p/u}return h}function s(t){if(0===t.length)return[];for(var e=t[0].length,r=n([e]),i=o(t),a=0;a&lt;t.length;++a)for(var s=0;s&lt;e;++s)r[s]+=t[a][s]*i[a];return r}s.barycenetric=o,e.exports=s},{dup:154,&quot;robust-linear-solve&quot;:482}],101:[function(t,e,r){e.exports=function(t){for(var e=n(t),r=0,i=0;i&lt;t.length;++i)for(var a=t[i],o=0;o&lt;e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=t(&quot;circumcenter&quot;)},{circumcenter:100}],102:[function(t,e,r){e.exports=function(t,e,r){return e&lt;r?t&lt;e?e:t&gt;r?r:t:t&lt;r?r:t&gt;e?e:t}},{}],103:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a&lt;e.length;++a){var o=e[a];i[a]=[o[0],o[1],r[a]]}e=i}var s=function(t,e,r){var n=d(t,[],p(t));return v(e,n,r),!!n}(t,e,!!r);for(;y(t,e,!!r);)s=!0;if(r&amp;&amp;s){n.length=0,r.length=0;for(var a=0;a&lt;e.length;++a){var o=e[a];n.push([o[0],o[1]]),r.push(o[2])}}return s};var n=t(&quot;union-find&quot;),i=t(&quot;box-intersect&quot;),a=t(&quot;robust-segment-intersect&quot;),o=t(&quot;big-rat&quot;),s=t(&quot;big-rat/cmp&quot;),l=t(&quot;big-rat/to-float&quot;),c=t(&quot;rat-vec&quot;),u=t(&quot;nextafter&quot;),f=t(&quot;./lib/rat-seg-intersect&quot;);function h(t){var e=l(t);return[u(e,-1/0),u(e,1/0)]}function p(t){for(var e=new Array(t.length),r=0;r&lt;t.length;++r){var n=t[r];e[r]=[u(n[0],-1/0),u(n[1],-1/0),u(n[0],1/0),u(n[1],1/0)]}return e}function d(t,e,r){for(var a=e.length,o=new n(a),s=[],l=0;l&lt;e.length;++l){var c=e[l],f=h(c[0]),p=h(c[1]);s.push([u(f[0],-1/0),u(p[0],-1/0),u(f[1],1/0),u(p[1],1/0)])}i(s,function(t,e){o.link(t,e)});var d=!0,g=new Array(a);for(l=0;l&lt;a;++l){(v=o.find(l))!==l&amp;&amp;(d=!1,t[v]=[Math.min(t[l][0],t[v][0]),Math.min(t[l][1],t[v][1])])}if(d)return null;var m=0;for(l=0;l&lt;a;++l){var v;(v=o.find(l))===l?(g[l]=m,t[m++]=t[l]):g[l]=-1}t.length=m;for(l=0;l&lt;a;++l)g[l]&lt;0&amp;&amp;(g[l]=g[o.find(l)]);return g}function g(t,e){return t[0]-e[0]||t[1]-e[1]}function m(t,e){var r=t[0]-e[0]||t[1]-e[1];return r||(t[2]&lt;e[2]?-1:t[2]&gt;e[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n&lt;t.length;++n){var i=e[(o=t[n])[0]],a=e[o[1]];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}else for(n=0;n&lt;t.length;++n){var o;i=(o=t[n])[0],a=o[1];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}r?t.sort(m):t.sort(g);var s=1;for(n=1;n&lt;t.length;++n){var l=t[n-1],c=t[n];(c[0]!==l[0]||c[1]!==l[1]||r&amp;&amp;c[2]!==l[2])&amp;&amp;(t[s++]=c)}t.length=s}}function y(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n&lt;e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[u(Math.min(a[0],o[0]),-1/0),u(Math.min(a[1],o[1]),-1/0),u(Math.max(a[0],o[0]),1/0),u(Math.max(a[1],o[1]),1/0)]}return r}(t,e),h=function(t,e,r){var n=[];return i(r,function(r,i){var o=e[r],s=e[i];if(o[0]!==s[0]&amp;&amp;o[0]!==s[1]&amp;&amp;o[1]!==s[0]&amp;&amp;o[1]!==s[1]){var l=t[o[0]],c=t[o[1]],u=t[s[0]],f=t[s[1]];a(l,c,u,f)&amp;&amp;n.push([r,i])}}),n}(t,e,n),g=p(t),m=function(t,e,r,n){var o=[];return i(r,n,function(r,n){var i=e[r];if(i[0]!==n&amp;&amp;i[1]!==n){var s=t[n],l=t[i[0]],c=t[i[1]];a(l,c,s,s)&amp;&amp;o.push([r,n])}}),o}(t,e,n,g),y=d(t,function(t,e,r,n,i){var a,u,h=t.map(function(t){return[o(t[0]),o(t[1])]});for(a=0;a&lt;r.length;++a){var p=r[a];u=p[0];var d=p[1],g=e[u],m=e[d],v=f(c(t[g[0]]),c(t[g[1]]),c(t[m[0]]),c(t[m[1]]));if(v){var y=t.length;t.push([l(v[0]),l(v[1])]),h.push(v),n.push([u,y],[d,y])}}for(n.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=h[t[1]],n=h[e[1]];return s(r[0],n[0])||s(r[1],n[1])}),a=n.length-1;a&gt;=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])&lt;0){var M=b;b=_,_=M}x[0]=b;var A,T=x[1]=S[1];for(i&amp;&amp;(A=x[2]);a&gt;0&amp;&amp;n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?e.push([T,E,A]):e.push([T,E]),T=E}i?e.push([T,_,A]):e.push([T,_])}return h}(t,e,h,m,r));return v(e,y,r),!!y||(h.length&gt;0||m.length&gt;0)}},{&quot;./lib/rat-seg-intersect&quot;:104,&quot;big-rat&quot;:65,&quot;big-rat/cmp&quot;:63,&quot;big-rat/to-float&quot;:77,&quot;box-intersect&quot;:83,nextafter:431,&quot;rat-vec&quot;:466,&quot;robust-segment-intersect&quot;:486,&quot;union-find&quot;:520}],104:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=u(a,f);if(0===o(h))return null;var p=s(t,r),d=u(f,p),g=i(d,h),m=c(a,g);return l(t,m)};var n=t(&quot;big-rat/mul&quot;),i=t(&quot;big-rat/div&quot;),a=t(&quot;big-rat/sub&quot;),o=t(&quot;big-rat/sign&quot;),s=t(&quot;rat-vec/sub&quot;),l=t(&quot;rat-vec/add&quot;),c=t(&quot;rat-vec/muls&quot;);function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{&quot;big-rat/div&quot;:64,&quot;big-rat/mul&quot;:74,&quot;big-rat/sign&quot;:75,&quot;big-rat/sub&quot;:76,&quot;rat-vec/add&quot;:465,&quot;rat-vec/muls&quot;:467,&quot;rat-vec/sub&quot;:468}],105:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;clamp&quot;);function i(t,e){null==e&amp;&amp;(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&amp;&amp;(o=e?1:255),e&amp;&amp;(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&amp;n(r,0,255))+((i=255&amp;n(i,0,255))&lt;&lt;16)+((a=255&amp;n(a,0,255))&lt;&lt;8)+(o=255&amp;n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(t,e){var r=(t=+t)&gt;&gt;&gt;24,n=(16711680&amp;t)&gt;&gt;&gt;16,i=(65280&amp;t)&gt;&gt;&gt;8,a=255&amp;t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:102}],106:[function(t,e,r){&quot;use strict&quot;;e.exports={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],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],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],rebeccapurple:[102,51,153],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]}},{}],107:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-rgba&quot;),i=t(&quot;clamp&quot;),a=t(&quot;dtype&quot;);e.exports=function(t,e){&quot;float&quot;!==e&amp;&amp;e||(e=&quot;array&quot;),&quot;uint&quot;===e&amp;&amp;(e=&quot;uint8&quot;),&quot;uint_clamped&quot;===e&amp;&amp;(e=&quot;uint8_clamped&quot;);var r=new(a(e))(4),o=&quot;uint8&quot;!==e&amp;&amp;&quot;uint8_clamped&quot;!==e;return t.length&amp;&amp;&quot;string&quot;!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&amp;&amp;(t[0]&gt;1||0===t[0])&amp;&amp;(t[1]&gt;1||0===t[1])&amp;&amp;(t[2]&gt;1||0===t[2])&amp;&amp;(!t[3]||t[3]&gt;1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&amp;&amp;(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},{clamp:102,&quot;color-rgba&quot;:109,dtype:153}],108:[function(t,e,r){(function(r){&quot;use strict&quot;;var n=t(&quot;color-name&quot;),i=t(&quot;is-plain-obj&quot;),a=t(&quot;defined&quot;);e.exports=function(t){var e,s,l=[],c=1;if(&quot;string&quot;==typeof t)if(n[t])l=n[t].slice(),s=&quot;rgb&quot;;else if(&quot;transparent&quot;===t)c=0,s=&quot;rgb&quot;,l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),f=u.length,h=f&lt;=4;c=1,h?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===f&amp;&amp;(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===f&amp;&amp;(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s=&quot;rgb&quot;}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var p=e[1],u=p.replace(/a$/,&quot;&quot;);s=u;var f=&quot;cmyk&quot;===u?4:&quot;gray&quot;===u?1:3;l=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===f?parseFloat(t)/100:&quot;rgb&quot;===u?255*parseFloat(t)/100:parseFloat(t);if(&quot;h&quot;===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&amp;&amp;l.push(1),c=void 0===l[f]?1:l[f],l=l.slice(0,f)}else t.length&gt;10&amp;&amp;/[0-9](?:\s|\/)/.test(t)&amp;&amp;(l=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),s=t.match(/([a-z])/gi).join(&quot;&quot;).toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s=&quot;rgb&quot;,l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s=&quot;hsl&quot;,l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&amp;&amp;(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&amp;&amp;ArrayBuffer.isView&amp;&amp;ArrayBuffer.isView(t))&amp;&amp;(l=[t[0],t[1],t[2]],s=&quot;rgb&quot;,c=4===t.length?t[3]:1);else s=&quot;rgb&quot;,l=[t&gt;&gt;&gt;16,(65280&amp;t)&gt;&gt;&gt;8,255&amp;t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;color-name&quot;:106,defined:148,&quot;is-plain-obj&quot;:403}],109:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-parse&quot;),i=t(&quot;color-space/hsl&quot;),a=t(&quot;clamp&quot;);e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),&quot;h&quot;===r.space[0]&amp;&amp;(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:102,&quot;color-parse&quot;:108,&quot;color-space/hsl&quot;:110}],110:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./rgb&quot;);e.exports={name:&quot;hsl&quot;,min:[0,0,0],max:[360,100,100],channel:[&quot;hue&quot;,&quot;saturation&quot;,&quot;lightness&quot;],alias:[&quot;HSL&quot;],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l&lt;.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c&lt;3;c++)(n=o+1/3*-(c-1))&lt;0?n++:n&gt;1&amp;&amp;n--,a=6*n&lt;1?e+6*(r-e)*n:2*n&lt;1?r:3*n&lt;2?e+(r-e)*(2/3-n)*6:e,i[c]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&amp;&amp;(e=4+(n-i)/l),(e=Math.min(60*e,360))&lt;0&amp;&amp;(e+=360),r=(o+s)/2,[e,100*(s===o?0:r&lt;=.5?l/(s+o):l/(2-s-o)),100*r]}},{&quot;./rgb&quot;:111}],111:[function(t,e,r){&quot;use strict&quot;;e.exports={name:&quot;rgb&quot;,min:[0,0,0],max:[255,255,255],channel:[&quot;red&quot;,&quot;green&quot;,&quot;blue&quot;],alias:[&quot;RGB&quot;]}},{}],112:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],&quot;rainbow-soft&quot;:[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],&quot;freesurface-blue&quot;:[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],&quot;freesurface-red&quot;:[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],&quot;velocity-blue&quot;:[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],&quot;velocity-green&quot;:[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],113:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./colorScale&quot;),i=t(&quot;lerp&quot;);function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r=&quot;#&quot;,n=0;n&lt;3;++n)r+=(&quot;00&quot;+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return&quot;rgba(&quot;+t.join(&quot;,&quot;)+&quot;)&quot;}e.exports=function(t){var e,r,l,c,u,f,h,p,d,g;t||(t={});p=(t.nshades||72)-1,h=t.format||&quot;hex&quot;,(f=t.colormap)||(f=&quot;jet&quot;);if(&quot;string&quot;==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+&quot; not a supported colorscale&quot;);u=n[f]}else{if(!Array.isArray(f))throw Error(&quot;unsupported colormap option&quot;,f);u=f.slice()}if(u.length&gt;p)throw new Error(f+&quot; map requires nshades to be at least size &quot;+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():&quot;number&quot;==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var m=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&amp;&amp;n[3]&gt;=0&amp;&amp;n[3]&lt;=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),v=[];for(g=0;g&lt;e.length-1;++g){c=e[g+1]-e[g],r=m[g],l=m[g+1];for(var y=0;y&lt;c;y++){var x=y/c;v.push([Math.round(i(r[0],l[0],x)),Math.round(i(r[1],l[1],x)),Math.round(i(r[2],l[2],x)),i(r[3],l[3],x)])}}v.push(u[u.length-1].rgb.concat(d[1])),&quot;hex&quot;===h?v=v.map(o):&quot;rgbaString&quot;===h?v=v.map(s):&quot;float&quot;===h&amp;&amp;(v=v.map(a));return v}},{&quot;./colorScale&quot;:112,lerp:405}],114:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,a){var o=n(e,r,a);if(0===o){var s=i(n(t,e,r)),c=i(n(t,e,a));if(s===c){if(0===s){var u=l(t,e,r),f=l(t,e,a);return u===f?0:u?1:-1}return 0}return 0===c?s&gt;0?-1:l(t,e,a)?-1:1:0===s?c&gt;0?1:l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);if(h&gt;0)return o&gt;0&amp;&amp;n(t,e,a)&gt;0?1:-1;if(h&lt;0)return o&gt;0||n(t,e,a)&gt;0?1:-1;var p=n(t,e,a);return p&gt;0?1:l(t,e,r)?1:-1};var n=t(&quot;robust-orientation&quot;),i=t(&quot;signum&quot;),a=t(&quot;two-sum&quot;),o=t(&quot;robust-product&quot;),s=t(&quot;robust-sum&quot;);function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]&gt;=0}},{&quot;robust-orientation&quot;:483,&quot;robust-product&quot;:484,&quot;robust-sum&quot;:488,signum:489,&quot;two-sum&quot;:518}],115:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],p=t[3],d=e[0],g=e[1],m=e[2],v=e[3];return u+f+h+p-(d+g+m+v)||n(u,f,h,p)-n(d,g,m,v,d)||n(u+f,u+h,u+p,f+h,f+p,h+p)-n(d+g,d+m,d+v,g+m,g+v,m+v)||n(u+f+h,u+f+p,u+h+p,f+h+p)-n(d+g+m,d+g+v,d+m+v,g+m+v);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;b&lt;r;++b)if(a=y[b]-x[b])return a;return 0}};var n=Math.min;function i(t,e){return t-e}},{}],116:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;compare-cell&quot;),i=t(&quot;cell-orientation&quot;);e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{&quot;cell-orientation&quot;:99,&quot;compare-cell&quot;:115}],117:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/ch1d&quot;),i=t(&quot;./lib/ch2d&quot;),a=t(&quot;./lib/chnd&quot;);e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;if(0===r)return[];if(1===r)return n(t);if(2===r)return i(t);return a(t,r)}},{&quot;./lib/ch1d&quot;:118,&quot;./lib/ch2d&quot;:119,&quot;./lib/chnd&quot;:120}],118:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=0,r=0,n=1;n&lt;t.length;++n)t[n][0]&lt;t[e][0]&amp;&amp;(e=n),t[n][0]&gt;t[r][0]&amp;&amp;(r=n);return e&lt;r?[[e],[r]]:e&gt;r?[[r],[e]]:[[e]]}},{}],119:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=n(t),r=e.length;if(r&lt;=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o&lt;r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=t(&quot;monotone-convex-hull-2d&quot;)},{&quot;monotone-convex-hull-2d&quot;:414}],120:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){try{return n(t,!0)}catch(s){var r=i(t);if(r.length&lt;=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i&lt;e.length;++i)n[i]=t[e[i]];for(var a=e.length,i=0;i&lt;r;++i)e.indexOf(i)&lt;0&amp;&amp;(n[a++]=t[i]);return n}(t,r),o=n(a,!0);return function(t,e){for(var r=t.length,n=e.length,i=0;i&lt;r;++i)for(var a=t[i],o=0;o&lt;a.length;++o){var s=a[o];if(s&lt;n)a[o]=e[s];else{s-=n;for(var l=0;l&lt;n;++l)s&gt;=e[l]&amp;&amp;(s+=1);a[o]=s}}return t}(o,r)}};var n=t(&quot;incremental-convex-hull&quot;),i=t(&quot;affine-hull&quot;)},{&quot;affine-hull&quot;:49,&quot;incremental-convex-hull&quot;:394}],121:[function(t,e,r){e.exports={AFG:&quot;afghan&quot;,ALA:&quot;\\b\\wland&quot;,ALB:&quot;albania&quot;,DZA:&quot;algeria&quot;,ASM:&quot;^(?=.*americ).*samoa&quot;,AND:&quot;andorra&quot;,AGO:&quot;angola&quot;,AIA:&quot;anguill?a&quot;,ATA:&quot;antarctica&quot;,ATG:&quot;antigua&quot;,ARG:&quot;argentin&quot;,ARM:&quot;armenia&quot;,ABW:&quot;^(?!.*bonaire).*\\baruba&quot;,AUS:&quot;australia&quot;,AUT:&quot;^(?!.*hungary).*austria|\\baustri.*\\bemp&quot;,AZE:&quot;azerbaijan&quot;,BHS:&quot;bahamas&quot;,BHR:&quot;bahrain&quot;,BGD:&quot;bangladesh|^(?=.*east).*paki?stan&quot;,BRB:&quot;barbados&quot;,BLR:&quot;belarus|byelo&quot;,BEL:&quot;^(?!.*luxem).*belgium&quot;,BLZ:&quot;belize|^(?=.*british).*honduras&quot;,BEN:&quot;benin|dahome&quot;,BMU:&quot;bermuda&quot;,BTN:&quot;bhutan&quot;,BOL:&quot;bolivia&quot;,BES:&quot;^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands&quot;,BIH:&quot;herzegovina|bosnia&quot;,BWA:&quot;botswana|bechuana&quot;,BVT:&quot;bouvet&quot;,BRA:&quot;brazil&quot;,IOT:&quot;british.?indian.?ocean&quot;,BRN:&quot;brunei&quot;,BGR:&quot;bulgaria&quot;,BFA:&quot;burkina|\\bfaso|upper.?volta&quot;,BDI:&quot;burundi&quot;,CPV:&quot;verde&quot;,KHM:&quot;cambodia|kampuchea|khmer&quot;,CMR:&quot;cameroon&quot;,CAN:&quot;canada&quot;,CYM:&quot;cayman&quot;,CAF:&quot;\\bcentral.african.republic&quot;,TCD:&quot;\\bchad&quot;,CHL:&quot;\\bchile&quot;,CHN:&quot;^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china&quot;,CXR:&quot;christmas&quot;,CCK:&quot;\\bcocos|keeling&quot;,COL:&quot;colombia&quot;,COM:&quot;comoro&quot;,COG:&quot;^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo&quot;,COK:&quot;\\bcook&quot;,CRI:&quot;costa.?rica&quot;,CIV:&quot;ivoire|ivory&quot;,HRV:&quot;croatia&quot;,CUB:&quot;\\bcuba&quot;,CUW:&quot;^(?!.*bonaire).*\\bcura(c|\xe7)ao&quot;,CYP:&quot;cyprus&quot;,CSK:&quot;czechoslovakia&quot;,CZE:&quot;^(?=.*rep).*czech|czechia|bohemia&quot;,COD:&quot;\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc&quot;,DNK:&quot;denmark&quot;,DJI:&quot;djibouti&quot;,DMA:&quot;dominica(?!n)&quot;,DOM:&quot;dominican.rep&quot;,ECU:&quot;ecuador&quot;,EGY:&quot;egypt&quot;,SLV:&quot;el.?salvador&quot;,GNQ:&quot;guine.*eq|eq.*guine|^(?=.*span).*guinea&quot;,ERI:&quot;eritrea&quot;,EST:&quot;estonia&quot;,ETH:&quot;ethiopia|abyssinia&quot;,FLK:&quot;falkland|malvinas&quot;,FRO:&quot;faroe|faeroe&quot;,FJI:&quot;fiji&quot;,FIN:&quot;finland&quot;,FRA:&quot;^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul&quot;,GUF:&quot;^(?=.*french).*guiana&quot;,PYF:&quot;french.?polynesia|tahiti&quot;,ATF:&quot;french.?southern&quot;,GAB:&quot;gabon&quot;,GMB:&quot;gambia&quot;,GEO:&quot;^(?!.*south).*georgia&quot;,DDR:&quot;german.?democratic.?republic|democratic.?republic.*germany|east.germany&quot;,DEU:&quot;^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german&quot;,GHA:&quot;ghana|gold.?coast&quot;,GIB:&quot;gibraltar&quot;,GRC:&quot;greece|hellenic|hellas&quot;,GRL:&quot;greenland&quot;,GRD:&quot;grenada&quot;,GLP:&quot;guadeloupe&quot;,GUM:&quot;\\bguam&quot;,GTM:&quot;guatemala&quot;,GGY:&quot;guernsey&quot;,GIN:&quot;^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea&quot;,GNB:&quot;bissau|^(?=.*portu).*guinea&quot;,GUY:&quot;guyana|british.?guiana&quot;,HTI:&quot;haiti&quot;,HMD:&quot;heard.*mcdonald&quot;,VAT:&quot;holy.?see|vatican|papal.?st&quot;,HND:&quot;^(?!.*brit).*honduras&quot;,HKG:&quot;hong.?kong&quot;,HUN:&quot;^(?!.*austr).*hungary&quot;,ISL:&quot;iceland&quot;,IND:&quot;india(?!.*ocea)&quot;,IDN:&quot;indonesia&quot;,IRN:&quot;\\biran|persia&quot;,IRQ:&quot;\\biraq|mesopotamia&quot;,IRL:&quot;(^ireland)|(^republic.*ireland)&quot;,IMN:&quot;^(?=.*isle).*\\bman&quot;,ISR:&quot;israel&quot;,ITA:&quot;italy&quot;,JAM:&quot;jamaica&quot;,JPN:&quot;japan&quot;,JEY:&quot;jersey&quot;,JOR:&quot;jordan&quot;,KAZ:&quot;kazak&quot;,KEN:&quot;kenya|british.?east.?africa|east.?africa.?prot&quot;,KIR:&quot;kiribati&quot;,PRK:&quot;^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)&quot;,KWT:&quot;kuwait&quot;,KGZ:&quot;kyrgyz|kirghiz&quot;,LAO:&quot;\\blaos?\\b&quot;,LVA:&quot;latvia&quot;,LBN:&quot;lebanon&quot;,LSO:&quot;lesotho|basuto&quot;,LBR:&quot;liberia&quot;,LBY:&quot;libya&quot;,LIE:&quot;liechtenstein&quot;,LTU:&quot;lithuania&quot;,LUX:&quot;^(?!.*belg).*luxem&quot;,MAC:&quot;maca(o|u)&quot;,MDG:&quot;madagascar|malagasy&quot;,MWI:&quot;malawi|nyasa&quot;,MYS:&quot;malaysia&quot;,MDV:&quot;maldive&quot;,MLI:&quot;\\bmali\\b&quot;,MLT:&quot;\\bmalta&quot;,MHL:&quot;marshall&quot;,MTQ:&quot;martinique&quot;,MRT:&quot;mauritania&quot;,MUS:&quot;mauritius&quot;,MYT:&quot;\\bmayotte&quot;,MEX:&quot;\\bmexic&quot;,FSM:&quot;fed.*micronesia|micronesia.*fed&quot;,MCO:&quot;monaco&quot;,MNG:&quot;mongolia&quot;,MNE:&quot;^(?!.*serbia).*montenegro&quot;,MSR:&quot;montserrat&quot;,MAR:&quot;morocco|\\bmaroc&quot;,MOZ:&quot;mozambique&quot;,MMR:&quot;myanmar|burma&quot;,NAM:&quot;namibia&quot;,NRU:&quot;nauru&quot;,NPL:&quot;nepal&quot;,NLD:&quot;^(?!.*\\bant)(?!.*\\bcarib).*netherlands&quot;,ANT:&quot;^(?=.*\\bant).*(nether|dutch)&quot;,NCL:&quot;new.?caledonia&quot;,NZL:&quot;new.?zealand&quot;,NIC:&quot;nicaragua&quot;,NER:&quot;\\bniger(?!ia)&quot;,NGA:&quot;nigeria&quot;,NIU:&quot;niue&quot;,NFK:&quot;norfolk&quot;,MNP:&quot;mariana&quot;,NOR:&quot;norway&quot;,OMN:&quot;\\boman|trucial&quot;,PAK:&quot;^(?!.*east).*paki?stan&quot;,PLW:&quot;palau&quot;,PSE:&quot;palestin|\\bgaza|west.?bank&quot;,PAN:&quot;panama&quot;,PNG:&quot;papua|new.?guinea&quot;,PRY:&quot;paraguay&quot;,PER:&quot;peru&quot;,PHL:&quot;philippines&quot;,PCN:&quot;pitcairn&quot;,POL:&quot;poland&quot;,PRT:&quot;portugal&quot;,PRI:&quot;puerto.?rico&quot;,QAT:&quot;qatar&quot;,KOR:&quot;^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)&quot;,MDA:&quot;moldov|b(a|e)ssarabia&quot;,REU:&quot;r(e|\xe9)union&quot;,ROU:&quot;r(o|u|ou)mania&quot;,RUS:&quot;\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics&quot;,RWA:&quot;rwanda&quot;,BLM:&quot;barth(e|\xe9)lemy&quot;,SHN:&quot;helena&quot;,KNA:&quot;kitts|\\bnevis&quot;,LCA:&quot;\\blucia&quot;,MAF:&quot;^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)&quot;,SPM:&quot;miquelon&quot;,VCT:&quot;vincent&quot;,WSM:&quot;^(?!.*amer).*samoa&quot;,SMR:&quot;san.?marino&quot;,STP:&quot;\\bs(a|\xe3)o.?tom(e|\xe9)&quot;,SAU:&quot;\\bsa\\w*.?arabia&quot;,SEN:&quot;senegal&quot;,SRB:&quot;^(?!.*monte).*serbia&quot;,SYC:&quot;seychell&quot;,SLE:&quot;sierra&quot;,SGP:&quot;singapore&quot;,SXM:&quot;^(?!.*martin)(?!.*saba).*maarten&quot;,SVK:&quot;^(?!.*cze).*slovak&quot;,SVN:&quot;slovenia&quot;,SLB:&quot;solomon&quot;,SOM:&quot;somali&quot;,ZAF:&quot;south.africa|s\\\\..?africa&quot;,SGS:&quot;south.?georgia|sandwich&quot;,SSD:&quot;\\bs\\w*.?sudan&quot;,ESP:&quot;spain&quot;,LKA:&quot;sri.?lanka|ceylon&quot;,SDN:&quot;^(?!.*\\bs(?!u)).*sudan&quot;,SUR:&quot;surinam|dutch.?guiana&quot;,SJM:&quot;svalbard&quot;,SWZ:&quot;swaziland&quot;,SWE:&quot;sweden&quot;,CHE:&quot;switz|swiss&quot;,SYR:&quot;syria&quot;,TWN:&quot;taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china&quot;,TJK:&quot;tajik&quot;,THA:&quot;thailand|\\bsiam&quot;,MKD:&quot;macedonia|fyrom&quot;,TLS:&quot;^(?=.*leste).*timor|^(?=.*east).*timor&quot;,TGO:&quot;togo&quot;,TKL:&quot;tokelau&quot;,TON:&quot;tonga&quot;,TTO:&quot;trinidad|tobago&quot;,TUN:&quot;tunisia&quot;,TUR:&quot;turkey&quot;,TKM:&quot;turkmen&quot;,TCA:&quot;turks&quot;,TUV:&quot;tuvalu&quot;,UGA:&quot;uganda&quot;,UKR:&quot;ukrain&quot;,ARE:&quot;emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em&quot;,GBR:&quot;united.?kingdom|britain|^u\\.?k\\.?$&quot;,TZA:&quot;tanzania&quot;,USA:&quot;united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)&quot;,UMI:&quot;minor.?outlying.?is&quot;,URY:&quot;uruguay&quot;,UZB:&quot;uzbek&quot;,VUT:&quot;vanuatu|new.?hebrides&quot;,VEN:&quot;venezuela&quot;,VNM:&quot;^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam&quot;,VGB:&quot;^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin&quot;,VIR:&quot;^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin&quot;,WLF:&quot;futuna|wallis&quot;,ESH:&quot;western.sahara&quot;,YEM:&quot;^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen&quot;,YMD:&quot;^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen&quot;,YUG:&quot;yugoslavia&quot;,ZMB:&quot;zambia|northern.?rhodesia&quot;,EAZ:&quot;zanzibar&quot;,ZWE:&quot;zimbabwe|^(?!.*northern).*rhodesia&quot;}},{}],122:[function(t,e,r){e.exports=[&quot;xx-small&quot;,&quot;x-small&quot;,&quot;small&quot;,&quot;medium&quot;,&quot;large&quot;,&quot;x-large&quot;,&quot;xx-large&quot;,&quot;larger&quot;,&quot;smaller&quot;]},{}],123:[function(t,e,r){e.exports=[&quot;normal&quot;,&quot;condensed&quot;,&quot;semi-condensed&quot;,&quot;extra-condensed&quot;,&quot;ultra-condensed&quot;,&quot;expanded&quot;,&quot;semi-expanded&quot;,&quot;extra-expanded&quot;,&quot;ultra-expanded&quot;]},{}],124:[function(t,e,r){e.exports=[&quot;normal&quot;,&quot;italic&quot;,&quot;oblique&quot;]},{}],125:[function(t,e,r){e.exports=[&quot;normal&quot;,&quot;bold&quot;,&quot;bolder&quot;,&quot;lighter&quot;,&quot;100&quot;,&quot;200&quot;,&quot;300&quot;,&quot;400&quot;,&quot;500&quot;,&quot;600&quot;,&quot;700&quot;,&quot;800&quot;,&quot;900&quot;]},{}],126:[function(t,e,r){&quot;use strict&quot;;e.exports={parse:t(&quot;./parse&quot;),stringify:t(&quot;./stringify&quot;)}},{&quot;./parse&quot;:128,&quot;./stringify&quot;:129}],127:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;css-font-size-keywords&quot;);e.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf(&quot;/&quot;)||-1!==n.indexOf(t)}}},{&quot;css-font-size-keywords&quot;:122}],128:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;unquote&quot;),i=t(&quot;css-global-keywords&quot;),a=t(&quot;css-system-font-keywords&quot;),o=t(&quot;css-font-weight-keywords&quot;),s=t(&quot;css-font-style-keywords&quot;),l=t(&quot;css-font-stretch-keywords&quot;),c=t(&quot;string-split-by&quot;),u=t(&quot;./lib/util&quot;).isSize;e.exports=h;var f=h.cache={};function h(t){if(&quot;string&quot;!=typeof t)throw new Error(&quot;Font argument must be a string.&quot;);if(f[t])return f[t];if(&quot;&quot;===t)throw new Error(&quot;Cannot parse an empty string.&quot;);if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:&quot;normal&quot;,variant:&quot;normal&quot;,weight:&quot;normal&quot;,stretch:&quot;normal&quot;,lineHeight:&quot;normal&quot;,size:&quot;1rem&quot;,family:[&quot;serif&quot;]},h=c(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return[&quot;style&quot;,&quot;variant&quot;,&quot;weight&quot;,&quot;stretch&quot;].forEach(function(t){r[t]=e}),f[t]=r;if(-1===s.indexOf(e))if(&quot;normal&quot;!==e&amp;&amp;&quot;small-caps&quot;!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(u(e)){var d=c(e,&quot;/&quot;);if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):&quot;/&quot;===h[0]&amp;&amp;(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error(&quot;Missing required font-family.&quot;);return r.family=c(h.join(&quot; &quot;),/\s*,\s*/).map(n),f[t]=r}throw new Error(&quot;Unknown or unsupported font token: &quot;+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error(&quot;Missing required font-size.&quot;)}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},{&quot;./lib/util&quot;:127,&quot;css-font-stretch-keywords&quot;:123,&quot;css-font-style-keywords&quot;:124,&quot;css-font-weight-keywords&quot;:125,&quot;css-global-keywords&quot;:130,&quot;css-system-font-keywords&quot;:131,&quot;string-split-by&quot;:502,unquote:522}],129:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;pick-by-alias&quot;),i=t(&quot;./lib/util&quot;).isSize,a=g(t(&quot;css-global-keywords&quot;)),o=g(t(&quot;css-system-font-keywords&quot;)),s=g(t(&quot;css-font-weight-keywords&quot;)),l=g(t(&quot;css-font-style-keywords&quot;)),c=g(t(&quot;css-font-stretch-keywords&quot;)),u={normal:1,&quot;small-caps&quot;:1},f={serif:1,&quot;sans-serif&quot;:1,monospace:1,cursive:1,fantasy:1,&quot;system-ui&quot;:1},h=&quot;1rem&quot;,p=&quot;serif&quot;;function d(t,e){if(t&amp;&amp;!e[t]&amp;&amp;!a[t])throw Error(&quot;Unknown keyword `&quot;+t+&quot;`&quot;);return t}function g(t){for(var e={},r=0;r&lt;t.length;r++)e[t[r]]=1;return e}e.exports=function(t){if((t=n(t,{style:&quot;style fontstyle fontStyle font-style slope distinction&quot;,variant:&quot;variant font-variant fontVariant fontvariant var capitalization&quot;,weight:&quot;weight w font-weight fontWeight fontweight&quot;,stretch:&quot;stretch font-stretch fontStretch fontstretch width&quot;,size:&quot;size s font-size fontSize fontsize height em emSize&quot;,lineHeight:&quot;lh line-height lineHeight lineheight leading&quot;,family:&quot;font family fontFamily font-family fontfamily type typeface face&quot;,system:&quot;system reserved default global&quot;})).system)return t.system&amp;&amp;d(t.system,o),t.system;if(d(t.style,l),d(t.variant,u),d(t.weight,s),d(t.stretch,c),null==t.size&amp;&amp;(t.size=h),&quot;number&quot;==typeof t.size&amp;&amp;(t.size+=&quot;px&quot;),!i)throw Error(&quot;Bad size value `&quot;+t.size+&quot;`&quot;);t.family||(t.family=p),Array.isArray(t.family)&amp;&amp;(t.family.length||(t.family=[p]),t.family=t.family.map(function(t){return f[t]?t:'&quot;'+t+'&quot;'}).join(&quot;, &quot;));var e=[];return e.push(t.style),t.variant!==t.style&amp;&amp;e.push(t.variant),t.weight!==t.variant&amp;&amp;t.weight!==t.style&amp;&amp;e.push(t.weight),t.stretch!==t.weight&amp;&amp;t.stretch!==t.variant&amp;&amp;t.stretch!==t.style&amp;&amp;e.push(t.stretch),e.push(t.size+(null==t.lineHeight||&quot;normal&quot;===t.lineHeight||t.lineHeight+&quot;&quot;==&quot;1&quot;?&quot;&quot;:&quot;/&quot;+t.lineHeight)),e.push(t.family),e.filter(Boolean).join(&quot; &quot;)}},{&quot;./lib/util&quot;:127,&quot;css-font-stretch-keywords&quot;:123,&quot;css-font-style-keywords&quot;:124,&quot;css-font-weight-keywords&quot;:125,&quot;css-global-keywords&quot;:130,&quot;css-system-font-keywords&quot;:131,&quot;pick-by-alias&quot;:445}],130:[function(t,e,r){e.exports=[&quot;inherit&quot;,&quot;initial&quot;,&quot;unset&quot;]},{}],131:[function(t,e,r){e.exports=[&quot;caption&quot;,&quot;icon&quot;,&quot;menu&quot;,&quot;message-box&quot;,&quot;small-caption&quot;,&quot;status-bar&quot;]},{}],132:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;p&gt;=0;--p)a[p]=c*t[p]+u*e[p]+f*r[p]+h*n[p];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u&gt;=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],133:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/thunk.js&quot;);function i(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName=&quot;&quot;,this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var a=0;a&lt;r.length;++a){var o=r[a];if(&quot;array&quot;===o||&quot;object&quot;==typeof o&amp;&amp;o.blockIndices){if(e.argTypes[a]=&quot;array&quot;,e.arrayArgs.push(a),e.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),e.shimArgs.push(&quot;array&quot;+a),a&lt;e.pre.args.length&amp;&amp;e.pre.args[a].count&gt;0)throw new Error(&quot;cwise: pre() block may not reference array args&quot;);if(a&lt;e.post.args.length&amp;&amp;e.post.args[a].count&gt;0)throw new Error(&quot;cwise: post() block may not reference array args&quot;)}else if(&quot;scalar&quot;===o)e.scalarArgs.push(a),e.shimArgs.push(&quot;scalar&quot;+a);else if(&quot;index&quot;===o){if(e.indexArgs.push(a),a&lt;e.pre.args.length&amp;&amp;e.pre.args[a].count&gt;0)throw new Error(&quot;cwise: pre() block may not reference array index&quot;);if(a&lt;e.body.args.length&amp;&amp;e.body.args[a].lvalue)throw new Error(&quot;cwise: body() block may not write to array index&quot;);if(a&lt;e.post.args.length&amp;&amp;e.post.args[a].count&gt;0)throw new Error(&quot;cwise: post() block may not reference array index&quot;)}else if(&quot;shape&quot;===o){if(e.shapeArgs.push(a),a&lt;e.pre.args.length&amp;&amp;e.pre.args[a].lvalue)throw new Error(&quot;cwise: pre() block may not write to array shape&quot;);if(a&lt;e.body.args.length&amp;&amp;e.body.args[a].lvalue)throw new Error(&quot;cwise: body() block may not write to array shape&quot;);if(a&lt;e.post.args.length&amp;&amp;e.post.args[a].lvalue)throw new Error(&quot;cwise: post() block may not write to array shape&quot;)}else{if(&quot;object&quot;!=typeof o||!o.offset)throw new Error(&quot;cwise: Unknown argument type &quot;+r[a]);e.argTypes[a]=&quot;offset&quot;,e.offsetArgs.push({array:o.array,offset:o.offset}),e.offsetArgIndex.push(a)}}if(e.arrayArgs.length&lt;=0)throw new Error(&quot;cwise: No array arguments specified&quot;);if(e.pre.args.length&gt;r.length)throw new Error(&quot;cwise: Too many arguments in pre() block&quot;);if(e.body.args.length&gt;r.length)throw new Error(&quot;cwise: Too many arguments in body() block&quot;);if(e.post.args.length&gt;r.length)throw new Error(&quot;cwise: Too many arguments in post() block&quot;);return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||&quot;cwise&quot;,e.blockSize=t.blockSize||64,n(e)}},{&quot;./lib/thunk.js&quot;:135}],134:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;uniq&quot;);function i(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length&gt;0,l=[],c=[],u=0,f=0;for(n=0;n&lt;a;++n)c.push([&quot;i&quot;,n,&quot;=0&quot;].join(&quot;&quot;));for(i=0;i&lt;o;++i)for(n=0;n&lt;a;++n)f=u,u=t[n],0===n?c.push([&quot;d&quot;,i,&quot;s&quot;,n,&quot;=t&quot;,i,&quot;p&quot;,u].join(&quot;&quot;)):c.push([&quot;d&quot;,i,&quot;s&quot;,n,&quot;=(t&quot;,i,&quot;p&quot;,u,&quot;-s&quot;,f,&quot;*t&quot;,i,&quot;p&quot;,f,&quot;)&quot;].join(&quot;&quot;));for(c.length&gt;0&amp;&amp;l.push(&quot;var &quot;+c.join(&quot;,&quot;)),n=a-1;n&gt;=0;--n)u=t[n],l.push([&quot;for(i&quot;,n,&quot;=0;i&quot;,n,&quot;&lt;s&quot;,u,&quot;;++i&quot;,n,&quot;){&quot;].join(&quot;&quot;));for(l.push(r),n=0;n&lt;a;++n){for(f=u,u=t[n],i=0;i&lt;o;++i)l.push([&quot;p&quot;,i,&quot;+=d&quot;,i,&quot;s&quot;,n].join(&quot;&quot;));s&amp;&amp;(n&gt;0&amp;&amp;l.push([&quot;index[&quot;,f,&quot;]-=s&quot;,f].join(&quot;&quot;)),l.push([&quot;++index[&quot;,u,&quot;]&quot;].join(&quot;&quot;))),l.push(&quot;}&quot;)}return l.join(&quot;\n&quot;)}function a(t,e,r){for(var n=t.body,i=[],a=[],o=0;o&lt;t.args.length;++o){var s=t.args[o];if(!(s.count&lt;=0)){var l=new RegExp(s.name,&quot;g&quot;),c=&quot;&quot;,u=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case&quot;offset&quot;:var f=e.offsetArgIndex.indexOf(o);u=e.offsetArgs[f].array,c=&quot;+q&quot;+f;case&quot;array&quot;:c=&quot;p&quot;+u+c;var h=&quot;l&quot;+o,p=&quot;a&quot;+u;if(0===e.arrayBlockIndices[u])1===s.count?&quot;generic&quot;===r[u]?s.lvalue?(i.push([&quot;var &quot;,h,&quot;=&quot;,p,&quot;.get(&quot;,c,&quot;)&quot;].join(&quot;&quot;)),n=n.replace(l,h),a.push([p,&quot;.set(&quot;,c,&quot;,&quot;,h,&quot;)&quot;].join(&quot;&quot;))):n=n.replace(l,[p,&quot;.get(&quot;,c,&quot;)&quot;].join(&quot;&quot;)):n=n.replace(l,[p,&quot;[&quot;,c,&quot;]&quot;].join(&quot;&quot;)):&quot;generic&quot;===r[u]?(i.push([&quot;var &quot;,h,&quot;=&quot;,p,&quot;.get(&quot;,c,&quot;)&quot;].join(&quot;&quot;)),n=n.replace(l,h),s.lvalue&amp;&amp;a.push([p,&quot;.set(&quot;,c,&quot;,&quot;,h,&quot;)&quot;].join(&quot;&quot;))):(i.push([&quot;var &quot;,h,&quot;=&quot;,p,&quot;[&quot;,c,&quot;]&quot;].join(&quot;&quot;)),n=n.replace(l,h),s.lvalue&amp;&amp;a.push([p,&quot;[&quot;,c,&quot;]=&quot;,h].join(&quot;&quot;)));else{for(var d=[s.name],g=[c],m=0;m&lt;Math.abs(e.arrayBlockIndices[u]);m++)d.push(&quot;\\s*\\[([^\\]]+)\\]&quot;),g.push(&quot;$&quot;+(m+1)+&quot;*t&quot;+u+&quot;b&quot;+m);if(l=new RegExp(d.join(&quot;&quot;),&quot;g&quot;),c=g.join(&quot;+&quot;),&quot;generic&quot;===r[u])throw new Error(&quot;cwise: Generic arrays not supported in combination with blocks!&quot;);n=n.replace(l,[p,&quot;[&quot;,c,&quot;]&quot;].join(&quot;&quot;))}break;case&quot;scalar&quot;:n=n.replace(l,&quot;Y&quot;+e.scalarArgs.indexOf(o));break;case&quot;index&quot;:n=n.replace(l,&quot;index&quot;);break;case&quot;shape&quot;:n=n.replace(l,&quot;shape&quot;)}}}return[i.join(&quot;\n&quot;),n,a.join(&quot;\n&quot;)].join(&quot;\n&quot;).trim()}e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,o=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),l=0;l&lt;t.arrayArgs.length;++l)s[l]=e[2*l],o[l]=e[2*l+1];var c=[],u=[],f=[],h=[],p=[];for(l=0;l&lt;t.arrayArgs.length;++l){t.arrayBlockIndices[l]&lt;0?(f.push(0),h.push(r),c.push(r),u.push(r+t.arrayBlockIndices[l])):(f.push(t.arrayBlockIndices[l]),h.push(t.arrayBlockIndices[l]+r),c.push(0),u.push(t.arrayBlockIndices[l]));for(var d=[],g=0;g&lt;o[l].length;g++)f[l]&lt;=o[l][g]&amp;&amp;o[l][g]&lt;h[l]&amp;&amp;d.push(o[l][g]-f[l]);p.push(d)}var m=[&quot;SS&quot;],v=[&quot;'use strict'&quot;],y=[];for(g=0;g&lt;r;++g)y.push([&quot;s&quot;,g,&quot;=SS[&quot;,g,&quot;]&quot;].join(&quot;&quot;));for(l=0;l&lt;t.arrayArgs.length;++l){for(m.push(&quot;a&quot;+l),m.push(&quot;t&quot;+l),m.push(&quot;p&quot;+l),g=0;g&lt;r;++g)y.push([&quot;t&quot;,l,&quot;p&quot;,g,&quot;=t&quot;,l,&quot;[&quot;,f[l]+g,&quot;]&quot;].join(&quot;&quot;));for(g=0;g&lt;Math.abs(t.arrayBlockIndices[l]);++g)y.push([&quot;t&quot;,l,&quot;b&quot;,g,&quot;=t&quot;,l,&quot;[&quot;,c[l]+g,&quot;]&quot;].join(&quot;&quot;))}for(l=0;l&lt;t.scalarArgs.length;++l)m.push(&quot;Y&quot;+l);if(t.shapeArgs.length&gt;0&amp;&amp;y.push(&quot;shape=SS.slice(0)&quot;),t.indexArgs.length&gt;0){var x=new Array(r);for(l=0;l&lt;r;++l)x[l]=&quot;0&quot;;y.push([&quot;index=[&quot;,x.join(&quot;,&quot;),&quot;]&quot;].join(&quot;&quot;))}for(l=0;l&lt;t.offsetArgs.length;++l){var b=t.offsetArgs[l],_=[];for(g=0;g&lt;b.offset.length;++g)0!==b.offset[g]&amp;&amp;(1===b.offset[g]?_.push([&quot;t&quot;,b.array,&quot;p&quot;,g].join(&quot;&quot;)):_.push([b.offset[g],&quot;*t&quot;,b.array,&quot;p&quot;,g].join(&quot;&quot;)));0===_.length?y.push(&quot;q&quot;+l+&quot;=0&quot;):y.push([&quot;q&quot;,l,&quot;=&quot;,_.join(&quot;+&quot;)].join(&quot;&quot;))}var w=n([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for((y=y.concat(w)).length&gt;0&amp;&amp;v.push(&quot;var &quot;+y.join(&quot;,&quot;)),l=0;l&lt;t.arrayArgs.length;++l)v.push(&quot;p&quot;+l+&quot;|=0&quot;);t.pre.body.length&gt;3&amp;&amp;v.push(a(t.pre,t,s));var k=a(t.body,t,s),M=function(t){for(var e=0,r=t[0].length;e&lt;r;){for(var n=1;n&lt;t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}(p);M&lt;r?v.push(function(t,e,r,n){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length&gt;0,c=[],u=0;u&lt;o;++u)c.push([&quot;var offset&quot;,u,&quot;=p&quot;,u].join(&quot;&quot;));for(u=t;u&lt;a;++u)c.push([&quot;for(var j&quot;+u+&quot;=SS[&quot;,e[u],&quot;]|0;j&quot;,u,&quot;&gt;0;){&quot;].join(&quot;&quot;)),c.push([&quot;if(j&quot;,u,&quot;&lt;&quot;,s,&quot;){&quot;].join(&quot;&quot;)),c.push([&quot;s&quot;,e[u],&quot;=j&quot;,u].join(&quot;&quot;)),c.push([&quot;j&quot;,u,&quot;=0&quot;].join(&quot;&quot;)),c.push([&quot;}else{s&quot;,e[u],&quot;=&quot;,s].join(&quot;&quot;)),c.push([&quot;j&quot;,u,&quot;-=&quot;,s,&quot;}&quot;].join(&quot;&quot;)),l&amp;&amp;c.push([&quot;index[&quot;,e[u],&quot;]=j&quot;,u].join(&quot;&quot;));for(u=0;u&lt;o;++u){for(var f=[&quot;offset&quot;+u],h=t;h&lt;a;++h)f.push([&quot;j&quot;,h,&quot;*t&quot;,u,&quot;p&quot;,e[h]].join(&quot;&quot;));c.push([&quot;p&quot;,u,&quot;=(&quot;,f.join(&quot;+&quot;),&quot;)&quot;].join(&quot;&quot;))}for(c.push(i(e,r,n)),u=t;u&lt;a;++u)c.push(&quot;}&quot;);return c.join(&quot;\n&quot;)}(M,p[0],t,k)):v.push(i(p[0],t,k)),t.post.body.length&gt;3&amp;&amp;v.push(a(t.post,t,s)),t.debug&amp;&amp;console.log(&quot;-----Generated cwise routine for &quot;,e,&quot;:\n&quot;+v.join(&quot;\n&quot;)+&quot;\n----------&quot;);var A=[t.funcName||&quot;unnamed&quot;,&quot;_cwise_loop_&quot;,o[0].join(&quot;s&quot;),&quot;m&quot;,M,function(t){for(var e=new Array(t.length),r=!0,n=0;n&lt;t.length;++n){var i=t[n],a=i.match(/\d+/);a=a?a[0]:&quot;&quot;,0===i.charAt(0)?e[n]=&quot;u&quot;+i.charAt(1)+a:e[n]=i.charAt(0)+a,n&gt;0&amp;&amp;(r=r&amp;&amp;e[n]===e[n-1])}return r?e[0]:e.join(&quot;&quot;)}(s)].join(&quot;&quot;);return new Function([&quot;function &quot;,A,&quot;(&quot;,m.join(&quot;,&quot;),&quot;){&quot;,v.join(&quot;\n&quot;),&quot;} return &quot;,A].join(&quot;&quot;))()}},{uniq:521}],135:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./compile.js&quot;);e.exports=function(t){var e=[&quot;'use strict'&quot;,&quot;var CACHED={}&quot;],r=[],i=t.funcName+&quot;_cwise_thunk&quot;;e.push([&quot;return function &quot;,i,&quot;(&quot;,t.shimArgs.join(&quot;,&quot;),&quot;){&quot;].join(&quot;&quot;));for(var a=[],o=[],s=[[&quot;array&quot;,t.arrayArgs[0],&quot;.shape.slice(&quot;,Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]&lt;0?&quot;,&quot;+t.arrayBlockIndices[0]+&quot;)&quot;:&quot;)&quot;].join(&quot;&quot;)],l=[],c=[],u=0;u&lt;t.arrayArgs.length;++u){var f=t.arrayArgs[u];r.push([&quot;t&quot;,f,&quot;=array&quot;,f,&quot;.dtype,&quot;,&quot;r&quot;,f,&quot;=array&quot;,f,&quot;.order&quot;].join(&quot;&quot;)),a.push(&quot;t&quot;+f),a.push(&quot;r&quot;+f),o.push(&quot;t&quot;+f),o.push(&quot;r&quot;+f+&quot;.join()&quot;),s.push(&quot;array&quot;+f+&quot;.data&quot;),s.push(&quot;array&quot;+f+&quot;.stride&quot;),s.push(&quot;array&quot;+f+&quot;.offset|0&quot;),u&gt;0&amp;&amp;(l.push(&quot;array&quot;+t.arrayArgs[0]+&quot;.shape.length===array&quot;+f+&quot;.shape.length+&quot;+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push(&quot;array&quot;+t.arrayArgs[0]+&quot;.shape[shapeIndex+&quot;+Math.max(0,t.arrayBlockIndices[0])+&quot;]===array&quot;+f+&quot;.shape[shapeIndex+&quot;+Math.max(0,t.arrayBlockIndices[u])+&quot;]&quot;))}for(t.arrayArgs.length&gt;1&amp;&amp;(e.push(&quot;if (!(&quot;+l.join(&quot; &amp;&amp; &quot;)+&quot;)) throw new Error('cwise: Arrays do not all have the same dimensionality!')&quot;),e.push(&quot;for(var shapeIndex=array&quot;+t.arrayArgs[0]+&quot;.shape.length-&quot;+Math.abs(t.arrayBlockIndices[0])+&quot;; shapeIndex--\x3e0;) {&quot;),e.push(&quot;if (!(&quot;+c.join(&quot; &amp;&amp; &quot;)+&quot;)) throw new Error('cwise: Arrays do not all have the same shape!')&quot;),e.push(&quot;}&quot;)),u=0;u&lt;t.scalarArgs.length;++u)s.push(&quot;scalar&quot;+t.scalarArgs[u]);return r.push([&quot;type=[&quot;,o.join(&quot;,&quot;),&quot;].join()&quot;].join(&quot;&quot;)),r.push(&quot;proc=CACHED[type]&quot;),e.push(&quot;var &quot;+r.join(&quot;,&quot;)),e.push([&quot;if(!proc){&quot;,&quot;CACHED[type]=proc=compile([&quot;,a.join(&quot;,&quot;),&quot;])}&quot;,&quot;return proc(&quot;,s.join(&quot;,&quot;),&quot;)}&quot;].join(&quot;&quot;)),t.debug&amp;&amp;console.log(&quot;-----Generated thunk:\n&quot;+e.join(&quot;\n&quot;)+&quot;\n----------&quot;),new Function(&quot;compile&quot;,e.join(&quot;\n&quot;))(n.bind(void 0,t))}},{&quot;./compile.js&quot;:134}],136:[function(t,e,r){e.exports=t(&quot;cwise-compiler&quot;)},{&quot;cwise-compiler&quot;:133}],137:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/copy&quot;),a=t(&quot;es5-ext/object/normalize-options&quot;),o=t(&quot;es5-ext/object/valid-callable&quot;),s=t(&quot;es5-ext/object/map&quot;),l=t(&quot;es5-ext/object/valid-callable&quot;),c=t(&quot;es5-ext/object/valid-value&quot;),u=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,a=c(e)&amp;&amp;l(e.value);return delete(n=i(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&amp;&amp;h.call(this,t)?a:(e.value=u.call(a,r.resolveContext?r.resolveContext(this):this),f(this,t,e),this[t])},n},e.exports=function(t){var e=a(arguments[1]);return null!=e.resolveContext&amp;&amp;o(e.resolveContext),s(t,function(t,r){return n(r,t,e)})}},{&quot;es5-ext/object/copy&quot;:173,&quot;es5-ext/object/map&quot;:182,&quot;es5-ext/object/normalize-options&quot;:183,&quot;es5-ext/object/valid-callable&quot;:187,&quot;es5-ext/object/valid-value&quot;:189}],138:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/object/assign&quot;),i=t(&quot;es5-ext/object/normalize-options&quot;),a=t(&quot;es5-ext/object/is-callable&quot;),o=t(&quot;es5-ext/string/#/contains&quot;);(e.exports=function(t,e){var r,a,s,l,c;return arguments.length&lt;2||&quot;string&quot;!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,a=!1):(r=o.call(t,&quot;c&quot;),a=o.call(t,&quot;e&quot;),s=o.call(t,&quot;w&quot;)),c={value:e,configurable:r,enumerable:a,writable:s},l?n(i(l),c):c}).gs=function(t,e,r){var s,l,c,u;return&quot;string&quot;!=typeof t?(c=r,r=e,e=t,t=null):c=arguments[3],null==e?e=void 0:a(e)?null==r?r=void 0:a(r)||(c=r,r=void 0):(c=e,e=r=void 0),null==t?(s=!0,l=!1):(s=o.call(t,&quot;c&quot;),l=o.call(t,&quot;e&quot;)),u={get:e,set:r,configurable:s,enumerable:l},c?n(i(c),u):u}},{&quot;es5-ext/object/assign&quot;:170,&quot;es5-ext/object/is-callable&quot;:176,&quot;es5-ext/object/normalize-options&quot;:183,&quot;es5-ext/string/#/contains&quot;:190}],139:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e=function(t,e){return t&lt;e?-1:t&gt;e?1:t&gt;=e?0:NaN},r=function(t){var r;return 1===t.length&amp;&amp;(r=t,t=function(t,n){return e(r(t),n)}),{left:function(e,r,n,i){for(null==n&amp;&amp;(n=0),null==i&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&lt;0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&amp;&amp;(n=0),null==i&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&gt;0?i=a:n=a+1}return n}}};var n=r(e),i=n.right,a=n.left;function o(t,e){return[t,e]}var s=function(t){return null===t?NaN:+t},l=function(t,e){var r,n,i=t.length,a=0,o=-1,l=0,c=0;if(null==e)for(;++o&lt;i;)isNaN(r=s(t[o]))||(c+=(n=r-l)*(r-(l+=n/++a)));else for(;++o&lt;i;)isNaN(r=s(e(t[o],o,t)))||(c+=(n=r-l)*(r-(l+=n/++a)));if(a&gt;1)return c/(a-1)},c=function(t,e){var r=l(t,e);return r?Math.sqrt(r):r},u=function(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o&lt;a;)if(null!=(r=t[o])&amp;&amp;r&gt;=r)for(n=i=r;++o&lt;a;)null!=(r=t[o])&amp;&amp;(n&gt;r&amp;&amp;(n=r),i&lt;r&amp;&amp;(i=r))}else for(;++o&lt;a;)if(null!=(r=e(t[o],o,t))&amp;&amp;r&gt;=r)for(n=i=r;++o&lt;a;)null!=(r=e(t[o],o,t))&amp;&amp;(n&gt;r&amp;&amp;(n=r),i&lt;r&amp;&amp;(i=r));return[n,i]},f=Array.prototype,h=f.slice,p=f.map,d=function(t){return function(){return t}},g=function(t){return t},m=function(t,e,r){t=+t,e=+e,r=(i=arguments.length)&lt;2?(e=t,t=0,1):i&lt;3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n&lt;i;)a[n]=t+n*r;return a},v=Math.sqrt(50),y=Math.sqrt(10),x=Math.sqrt(2);function b(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i&gt;=0?(a&gt;=v?10:a&gt;=y?5:a&gt;=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a&gt;=v?10:a&gt;=y?5:a&gt;=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a&gt;=v?i*=10:a&gt;=y?i*=5:a&gt;=x&amp;&amp;(i*=2),e&lt;t?-i:i}var w=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},k=function(t,e,r){if(null==r&amp;&amp;(r=s),n=t.length){if((e=+e)&lt;=0||n&lt;2)return+r(t[0],0,t);if(e&gt;=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}},M=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a&lt;i;)if(null!=(r=t[a])&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=t[a])&amp;&amp;n&gt;r&amp;&amp;(n=r)}else for(;++a&lt;i;)if(null!=(r=e(t[a],a,t))&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=e(t[a],a,t))&amp;&amp;n&gt;r&amp;&amp;(n=r);return n},A=function(t){if(!(i=t.length))return[];for(var e=-1,r=M(t,T),n=new Array(r);++e&lt;r;)for(var i,a=-1,o=n[e]=new Array(i);++a&lt;i;)o[a]=t[a][e];return n};function T(t){return t.length}t.bisect=i,t.bisectRight=i,t.bisectLeft=a,t.ascending=e,t.bisector=r,t.cross=function(t,e,r){var n,i,a,s,l=t.length,c=e.length,u=new Array(l*c);for(null==r&amp;&amp;(r=o),n=a=0;n&lt;l;++n)for(s=t[n],i=0;i&lt;c;++i,++a)u[a]=r(s,e[i]);return u},t.descending=function(t,e){return e&lt;t?-1:e&gt;t?1:e&gt;=t?0:NaN},t.deviation=c,t.extent=u,t.histogram=function(){var t=g,e=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;a&lt;s;++a)l[a]=t(n[a],a,n);var c=e(l),u=c[0],f=c[1],h=r(l,u,f);Array.isArray(h)||(h=_(u,f,h),h=m(Math.ceil(u/h)*h,Math.floor(f/h)*h,h));for(var p=h.length;h[0]&lt;=u;)h.shift(),--p;for(;h[p-1]&gt;f;)h.pop(),--p;var d,g=new Array(p+1);for(a=0;a&lt;=p;++a)(d=g[a]=[]).x0=a&gt;0?h[a-1]:u,d.x1=a&lt;p?h[a]:f;for(a=0;a&lt;s;++a)u&lt;=(o=l[a])&amp;&amp;o&lt;=f&amp;&amp;g[i(h,o,0,p)].push(n[a]);return g}return n.value=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:d(e),n):t},n.domain=function(t){return arguments.length?(e=&quot;function&quot;==typeof t?t:d([t[0],t[1]]),n):e},n.thresholds=function(t){return arguments.length?(r=&quot;function&quot;==typeof t?t:Array.isArray(t)?d(h.call(t)):d(t),n):r},n},t.thresholdFreedmanDiaconis=function(t,r,n){return t=p.call(t,s).sort(e),Math.ceil((n-r)/(2*(k(t,.75)-k(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*c(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=w,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a&lt;i;)if(null!=(r=t[a])&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=t[a])&amp;&amp;r&gt;n&amp;&amp;(n=r)}else for(;++a&lt;i;)if(null!=(r=e(t[a],a,t))&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=e(t[a],a,t))&amp;&amp;r&gt;n&amp;&amp;(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a&lt;n;)isNaN(r=s(t[a]))?--i:o+=r;else for(;++a&lt;n;)isNaN(r=s(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,r){var n,i=t.length,a=-1,o=[];if(null==r)for(;++a&lt;i;)isNaN(n=s(t[a]))||o.push(n);else for(;++a&lt;i;)isNaN(n=s(r(t[a],a,t)))||o.push(n);return k(o.sort(e),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a&lt;i;)o+=t[a].length;for(r=new Array(o);--i&gt;=0;)for(e=(n=t[i]).length;--e&gt;=0;)r[--o]=n[e];return r},t.min=M,t.pairs=function(t,e){null==e&amp;&amp;(e=o);for(var r=0,n=t.length-1,i=t[0],a=new Array(n&lt;0?0:n);r&lt;n;)a[r]=e(i,i=t[++r]);return a},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=k,t.range=m,t.scan=function(t,r){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==r&amp;&amp;(r=e);++a&lt;n;)(r(i=t[a],s)&lt;0||0!==r(s,s))&amp;&amp;(s=i,o=a);return 0===r(s,s)?o:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i&lt;n;)(r=+t[i])&amp;&amp;(a+=r);else for(;++i&lt;n;)(r=+e(t[i],i,t))&amp;&amp;(a+=r);return a},t.ticks=function(t,e,r){var n,i,a,o,s=-1;if(r=+r,(t=+t)==(e=+e)&amp;&amp;r&gt;0)return[t];if((n=e&lt;t)&amp;&amp;(i=t,t=e,e=i),0===(o=b(t,e,r))||!isFinite(o))return[];if(o&gt;0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s&lt;i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s&lt;i;)a[s]=(t-s)/o;return n&amp;&amp;a.reverse(),a},t.tickIncrement=b,t.tickStep=_,t.transpose=A,t.variance=l,t.zip=function(){return A(arguments)},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],140:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;function e(){}function r(t,r){var n=new e;if(t instanceof e)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==r)for(;++a&lt;o;)n.set(a,t[a]);else for(;++a&lt;o;)n.set(r(i=t[a],a,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}e.prototype=r.prototype={constructor:e,has:function(t){return&quot;$&quot;+t in this},get:function(t){return this[&quot;$&quot;+t]},set:function(t,e){return this[&quot;$&quot;+t]=e,this},remove:function(t){var e=&quot;$&quot;+t;return e in this&amp;&amp;delete this[e]},clear:function(){for(var t in this)&quot;$&quot;===t[0]&amp;&amp;delete this[t]},keys:function(){var t=[];for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)&quot;$&quot;===e[0]&amp;&amp;++t;return t},empty:function(){for(var t in this)if(&quot;$&quot;===t[0])return!1;return!0},each:function(t){for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t(this[e],e.slice(1),this)}};function n(){return{}}function i(t,e,r){t[e]=r}function a(){return r()}function o(t,e,r){t.set(e,r)}function s(){}var l=r.prototype;function c(t,e){var r=new s;if(t instanceof s)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n&lt;i;)r.add(t[n]);else for(;++n&lt;i;)r.add(e(t[n],n,t))}return r}s.prototype=c.prototype={constructor:s,has:l.has,add:function(t){return this[&quot;$&quot;+(t+=&quot;&quot;)]=t,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};t.nest=function(){var t,e,s,l=[],c=[];function u(n,i,a,o){if(i&gt;=l.length)return null!=t&amp;&amp;n.sort(t),null!=e?e(n):n;for(var s,c,f,h=-1,p=n.length,d=l[i++],g=r(),m=a();++h&lt;p;)(f=g.get(s=d(c=n[h])+&quot;&quot;))?f.push(c):g.set(s,[c]);return g.each(function(t,e){o(m,e,u(t,i,a,o))}),m}return s={object:function(t){return u(t,0,n,i)},map:function(t){return u(t,0,a,o)},entries:function(t){return function t(r,n){if(++n&gt;l.length)return r;var i,a=c[n-1];return null!=e&amp;&amp;n&gt;=l.length?i=r.entries():(i=[],r.each(function(e,r){i.push({key:r,values:t(e,n)})})),null!=a?i.sort(function(t,e){return a(t.key,e.key)}):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],141:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t};function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i=&quot;\\s*([+-]?\\d+)\\s*&quot;,a=&quot;\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*&quot;,o=&quot;\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*&quot;,s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp(&quot;^rgb\\(&quot;+[i,i,i]+&quot;\\)$&quot;),u=new RegExp(&quot;^rgb\\(&quot;+[o,o,o]+&quot;\\)$&quot;),f=new RegExp(&quot;^rgba\\(&quot;+[i,i,i,a]+&quot;\\)$&quot;),h=new RegExp(&quot;^rgba\\(&quot;+[o,o,o,a]+&quot;\\)$&quot;),p=new RegExp(&quot;^hsl\\(&quot;+[a,o,o]+&quot;\\)$&quot;),d=new RegExp(&quot;^hsla\\(&quot;+[a,o,o,a]+&quot;\\)$&quot;),g={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};function m(t){var e;return t=(t+&quot;&quot;).trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))&gt;&gt;8&amp;15|e&gt;&gt;4&amp;240,e&gt;&gt;4&amp;15|240&amp;e,(15&amp;e)&lt;&lt;4|15&amp;e,1):(e=l.exec(t))?v(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?y(e[1],e[2],e[3],e[4]):(e=h.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?v(g[t]):&quot;transparent&quot;===t?new _(NaN,NaN,NaN,0):null}function v(t){return new _(t&gt;&gt;16&amp;255,t&gt;&gt;8&amp;255,255&amp;t,1)}function y(t,e,r,n){return n&lt;=0&amp;&amp;(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=m(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))&lt;16?&quot;0&quot;:&quot;&quot;)+t.toString(16)}function k(t,e,r,n){return n&lt;=0?t=e=r=NaN:r&lt;=0||r&gt;=1?t=e=NaN:e&lt;=0&amp;&amp;(t=NaN),new A(t,e,r,n)}function M(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=m(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r&lt;i):r===o?(i-e)/l+2:(e-r)/l+4,l/=c&lt;.5?o+a:2-o-a,s*=60):l=c&gt;0&amp;&amp;c&lt;1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==i?1:i)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function T(t,e,r){return 255*(t&lt;60?e+(r-e)*t/60:t&lt;180?r:t&lt;240?e+(r-e)*(240-t)/60:e)}e(n,m,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+&quot;&quot;}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0&lt;=this.r&amp;&amp;this.r&lt;=255&amp;&amp;0&lt;=this.g&amp;&amp;this.g&lt;=255&amp;&amp;0&lt;=this.b&amp;&amp;this.b&lt;=255&amp;&amp;0&lt;=this.opacity&amp;&amp;this.opacity&lt;=1},hex:function(){return&quot;#&quot;+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?&quot;rgb(&quot;:&quot;rgba(&quot;)+Math.max(0,Math.min(255,Math.round(this.r)||0))+&quot;, &quot;+Math.max(0,Math.min(255,Math.round(this.g)||0))+&quot;, &quot;+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?&quot;)&quot;:&quot;, &quot;+t+&quot;)&quot;)}})),e(A,M,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h&lt;0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r&lt;.5?r:1-r)*e,i=2*r-n;return new _(T(t&gt;=240?t-240:t+120,i,n),T(t,i,n),T(t&lt;120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0&lt;=this.s&amp;&amp;this.s&lt;=1||isNaN(this.s))&amp;&amp;0&lt;=this.l&amp;&amp;this.l&lt;=1&amp;&amp;0&lt;=this.opacity&amp;&amp;this.opacity&lt;=1}}));var S=Math.PI/180,E=180/Math.PI,C=.96422,L=1,z=.82521,P=4/29,O=6/29,I=3*O*O,D=O*O*O;function R(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new F(t.l,0,0,t.opacity);var e=t.h*S;return new F(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,i=U(t.r),a=U(t.g),o=U(t.b),s=N((.2225045*i+.7168786*a+.0606169*o)/L);return i===a&amp;&amp;a===o?r=n=s:(r=N((.4360747*i+.3850649*a+.1430804*o)/C),n=N((.0139322*i+.0971045*a+.7141733*o)/z)),new F(116*s-16,500*(r-s),200*(s-n),t.opacity)}function B(t,e,r,n){return 1===arguments.length?R(t):new F(t,e,r,null==n?1:n)}function F(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t&gt;D?Math.pow(t,1/3):t/I+P}function j(t){return t&gt;O?t*t*t:I*(t-P)}function V(t){return 255*(t&lt;=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)&lt;=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=R(t)),0===t.a&amp;&amp;0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E;return new G(e&lt;0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(F,B,r(n,{brighter:function(t){return new F(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new F(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(V(3.1338561*(e=C*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=z*j(r))),V(-.9787684*e+1.9161415*t+.033454*r),V(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var W=-.14861,Y=1.78277,X=-.29227,Z=-.90649,$=1.97294,J=$*Z,K=$*Y,Q=Y*X-Z*W;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(Q*n+J*e-K*r)/(Q+J-K),a=n-i,o=($*(r-i)-X*a)/Z,s=Math.sqrt(o*o+a*a)/($*i*(1-i)),l=s?Math.atan2(o,a)*E-120:NaN;return new et(l&lt;0?l+360:l,s,i,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new _(255*(e+r*(W*n+Y*i)),255*(e+r*(X*n+Z*i)),255*(e+r*($*n)),this.opacity)}})),t.color=m,t.rgb=b,t.hsl=M,t.lab=B,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new F(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],142:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,i={};e&lt;r;++e){if(!(t=arguments[e]+&quot;&quot;)||t in i)throw new Error(&quot;illegal type: &quot;+t);i[t]=[]}return new n(i)}function n(t){this._=t}function i(t,e){for(var r,n=0,i=t.length;n&lt;i;++n)if((r=t[n]).name===e)return r.value}function a(t,r,n){for(var i=0,a=t.length;i&lt;a;++i)if(t[i].name===r){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&amp;&amp;t.push({name:r,value:n}),t}n.prototype=r.prototype={constructor:n,on:function(t,e){var r,n,o=this._,s=(n=o,(t+&quot;&quot;).trim().split(/^|\s+/).map(function(t){var e=&quot;&quot;,r=t.indexOf(&quot;.&quot;);if(r&gt;=0&amp;&amp;(e=t.slice(r+1),t=t.slice(0,r)),t&amp;&amp;!n.hasOwnProperty(t))throw new Error(&quot;unknown type: &quot;+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length&lt;2)){if(null!=e&amp;&amp;&quot;function&quot;!=typeof e)throw new Error(&quot;invalid callback: &quot;+e);for(;++l&lt;c;)if(r=(t=s[l]).type)o[r]=a(o[r],t.name,e);else if(null==e)for(r in o)o[r]=a(o[r],t.name,null);return this}for(;++l&lt;c;)if((r=(t=s[l]).type)&amp;&amp;(r=i(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new n(t)},call:function(t,e){if((r=arguments.length-2)&gt;0)for(var r,n,i=new Array(r),a=0;a&lt;r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(&quot;unknown type: &quot;+t);for(a=0,r=(n=this._[t]).length;a&lt;r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error(&quot;unknown type: &quot;+t);for(var n=this._[t],i=0,a=n.length;i&lt;a;++i)n[i].value.apply(e,r)}},t.dispatch=r,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],143:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n,i){&quot;use strict&quot;;var a=function(t){return function(){return t}},o=function(){return 1e-6*(Math.random()-.5)};function s(t){return t.x+t.vx}function l(t){return t.y+t.vy}function c(t){return t.index}function u(t,e){var r=t.get(e);if(!r)throw new Error(&quot;missing: &quot;+e);return r}function f(t){return t.x}function h(t){return t.y}var p=10,d=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;n&lt;a;++n)o+=(i=r[n]).x,s+=i.y;for(o=o/a-t,s=s/a-e,n=0;n&lt;a;++n)(i=r[n]).x-=o,i.y-=s}return null==t&amp;&amp;(t=0),null==e&amp;&amp;(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n},t.forceCollide=function(t){var r,n,i=1,c=1;function u(){for(var t,a,u,h,p,d,g,m=r.length,v=0;v&lt;c;++v)for(a=e.quadtree(r,s,l).visitAfter(f),t=0;t&lt;m;++t)u=r[t],d=n[u.index],g=d*d,h=u.x+u.vx,p=u.y+u.vy,a.visit(y);function y(t,e,r,n,a){var s=t.data,l=t.r,c=d+l;if(!s)return e&gt;h+c||n&lt;h-c||r&gt;p+c||a&lt;p-c;if(s.index&gt;u.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;v&lt;c*c&amp;&amp;(0===f&amp;&amp;(v+=(f=o())*f),0===m&amp;&amp;(v+=(m=o())*m),v=(c-(v=Math.sqrt(v)))/v*i,u.vx+=(f*=v)*(c=(l*=l)/(g+l)),u.vy+=(m*=v)*c,s.vx-=f*(c=1-c),s.vy-=m*c)}}}function f(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e&lt;4;++e)t[e]&amp;&amp;t[e].r&gt;t.r&amp;&amp;(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e&lt;a;++e)i=r[e],n[i.index]=+t(i,e,r)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(null==t?1:+t)),u.initialize=function(t){r=t,h()},u.iterations=function(t){return arguments.length?(c=+t,u):c},u.strength=function(t){return arguments.length?(i=+t,u):i},u.radius=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),h(),u):t},u},t.forceLink=function(t){var e,n,i,s,l,f=c,h=function(t){return 1/Math.min(s[t.source.index],s[t.target.index])},p=a(30),d=1;function g(r){for(var i=0,a=t.length;i&lt;d;++i)for(var s,c,u,f,h,p,g,m=0;m&lt;a;++m)c=(s=t[m]).source,f=(u=s.target).x+u.vx-c.x-c.vx||o(),h=u.y+u.vy-c.y-c.vy||o(),f*=p=((p=Math.sqrt(f*f+h*h))-n[m])/p*r*e[m],h*=p,u.vx-=f*(g=l[m]),u.vy-=h*g,c.vx+=f*(g=1-g),c.vy+=h*g}function m(){if(i){var a,o,c=i.length,h=t.length,p=r.map(i,f);for(a=0,s=new Array(c);a&lt;h;++a)(o=t[a]).index=a,&quot;object&quot;!=typeof o.source&amp;&amp;(o.source=u(p,o.source)),&quot;object&quot;!=typeof o.target&amp;&amp;(o.target=u(p,o.target)),s[o.source.index]=(s[o.source.index]||0)+1,s[o.target.index]=(s[o.target.index]||0)+1;for(a=0,l=new Array(h);a&lt;h;++a)o=t[a],l[a]=s[o.source.index]/(s[o.source.index]+s[o.target.index]);e=new Array(h),v(),n=new Array(h),y()}}function v(){if(i)for(var r=0,n=t.length;r&lt;n;++r)e[r]=+h(t[r],r,t)}function y(){if(i)for(var e=0,r=t.length;e&lt;r;++e)n[e]=+p(t[e],e,t)}return null==t&amp;&amp;(t=[]),g.initialize=function(t){i=t,m()},g.links=function(e){return arguments.length?(t=e,m(),g):t},g.id=function(t){return arguments.length?(f=t,g):f},g.iterations=function(t){return arguments.length?(d=+t,g):d},g.strength=function(t){return arguments.length?(h=&quot;function&quot;==typeof t?t:a(+t),v(),g):h},g.distance=function(t){return arguments.length?(p=&quot;function&quot;==typeof t?t:a(+t),y(),g):p},g},t.forceManyBody=function(){var t,r,n,i,s=a(-30),l=1,c=1/0,u=.81;function p(i){var a,o=t.length,s=e.quadtree(t,f,h).visitAfter(g);for(n=i,a=0;a&lt;o;++a)r=t[a],s.visit(m)}function d(){if(t){var e,r,n=t.length;for(i=new Array(n),e=0;e&lt;n;++e)r=t[e],i[r.index]=+s(r,e,t)}}function g(t){var e,r,n,a,o,s=0,l=0;if(t.length){for(n=a=o=0;o&lt;4;++o)(e=t[o])&amp;&amp;(r=Math.abs(e.value))&amp;&amp;(s+=e.value,l+=r,n+=r*e.x,a+=r*e.y);t.x=n/l,t.y=a/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function m(t,e,a,s){if(!t.value)return!0;var f=t.x-r.x,h=t.y-r.y,p=s-e,d=f*f+h*h;if(p*p/u&lt;d)return d&lt;c&amp;&amp;(0===f&amp;&amp;(d+=(f=o())*f),0===h&amp;&amp;(d+=(h=o())*h),d&lt;l&amp;&amp;(d=Math.sqrt(l*d)),r.vx+=f*t.value*n/d,r.vy+=h*t.value*n/d),!0;if(!(t.length||d&gt;=c)){(t.data!==r||t.next)&amp;&amp;(0===f&amp;&amp;(d+=(f=o())*f),0===h&amp;&amp;(d+=(h=o())*h),d&lt;l&amp;&amp;(d=Math.sqrt(l*d)));do{t.data!==r&amp;&amp;(p=i[t.data.index]*n/d,r.vx+=f*p,r.vy+=h*p)}while(t=t.next)}}return p.initialize=function(e){t=e,d()},p.strength=function(t){return arguments.length?(s=&quot;function&quot;==typeof t?t:a(+t),d(),p):s},p.distanceMin=function(t){return arguments.length?(l=t*t,p):Math.sqrt(l)},p.distanceMax=function(t){return arguments.length?(c=t*t,p):Math.sqrt(c)},p.theta=function(t){return arguments.length?(u=t*t,p):Math.sqrt(u)},p},t.forceRadial=function(t,e,r){var n,i,o,s=a(.1);function l(t){for(var a=0,s=n.length;a&lt;s;++a){var l=n[a],c=l.x-e||1e-6,u=l.y-r||1e-6,f=Math.sqrt(c*c+u*u),h=(o[a]-f)*i[a]*t/f;l.vx+=c*h,l.vy+=u*h}}function c(){if(n){var e,r=n.length;for(i=new Array(r),o=new Array(r),e=0;e&lt;r;++e)o[e]=+t(n[e],e,n),i[e]=isNaN(o[e])?0:+s(n[e],e,n)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(+t)),null==e&amp;&amp;(e=0),null==r&amp;&amp;(r=0),l.initialize=function(t){n=t,c()},l.strength=function(t){return arguments.length?(s=&quot;function&quot;==typeof t?t:a(+t),c(),l):s},l.radius=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),c(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(r=+t,l):r},l},t.forceSimulation=function(t){var e,a=1,o=.001,s=1-Math.pow(o,1/300),l=0,c=.6,u=r.map(),f=i.timer(g),h=n.dispatch(&quot;tick&quot;,&quot;end&quot;);function g(){m(),h.call(&quot;tick&quot;,e),a&lt;o&amp;&amp;(f.stop(),h.call(&quot;end&quot;,e))}function m(){var e,r,n=t.length;for(a+=(l-a)*s,u.each(function(t){t(a)}),e=0;e&lt;n;++e)null==(r=t[e]).fx?r.x+=r.vx*=c:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=c:(r.y=r.fy,r.vy=0)}function v(){for(var e,r=0,n=t.length;r&lt;n;++r){if((e=t[r]).index=r,isNaN(e.x)||isNaN(e.y)){var i=p*Math.sqrt(r),a=r*d;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&amp;&amp;(e.vx=e.vy=0)}}function y(e){return e.initialize&amp;&amp;e.initialize(t),e}return null==t&amp;&amp;(t=[]),v(),e={tick:m,restart:function(){return f.restart(g),e},stop:function(){return f.stop(),e},nodes:function(r){return arguments.length?(t=r,v(),u.each(y),e):t},alpha:function(t){return arguments.length?(a=+t,e):a},alphaMin:function(t){return arguments.length?(o=+t,e):o},alphaDecay:function(t){return arguments.length?(s=+t,e):+s},alphaTarget:function(t){return arguments.length?(l=+t,e):l},velocityDecay:function(t){return arguments.length?(c=1-t,e):1-c},force:function(t,r){return arguments.length&gt;1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c&lt;u;++c)(o=(i=e-(s=t[c]).x)*i+(a=r-s.y)*a)&lt;n&amp;&amp;(l=s,n=o);return l},on:function(t,r){return arguments.length&gt;1?(h.on(t,r),e):h.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a&lt;o;++a)(i=e[a]).vx+=(n[a]-i.x)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a&lt;o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=&quot;function&quot;==typeof t?t:a(+t),s(),o):i},o.x=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),s(),o):t},o},t.forceY=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a&lt;o;++a)(i=e[a]).vy+=(n[a]-i.y)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a&lt;o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=&quot;function&quot;==typeof t?t:a(+t),s(),o):i},o.y=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),s(),o):t},o},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?i(r,t(&quot;d3-quadtree&quot;),t(&quot;d3-collection&quot;),t(&quot;d3-dispatch&quot;),t(&quot;d3-timer&quot;)):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)},{&quot;d3-collection&quot;:140,&quot;d3-dispatch&quot;:142,&quot;d3-quadtree&quot;:145,&quot;d3-timer&quot;:146}],144:[function(t,e,r){var n,i;n=this,i=function(t,e){&quot;use strict&quot;;function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}var n=function(t){var e=t.length-1;return function(n){var i=n&lt;=0?n=0:n&gt;=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i&gt;0?t[i-1]:2*a-o,l=i&lt;e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,l)}},i=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)&lt;0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],l=t[(i+2)%e];return r((n-i/e)*e,a,o,s,l)}},a=function(t){return function(){return t}};function o(t,e){return function(r){return t+r*e}}function s(t,e){var r=e-t;return r?o(t,r&gt;180||r&lt;-180?r-360*Math.round(r/360):r):a(isNaN(t)?e:t)}function l(t){return 1==(t=+t)?c:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):a(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):a(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function i(t,r){var i=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+&quot;&quot;}}return i.gamma=t,i}(1);function f(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n&lt;a;++n)i=e.rgb(r[n]),o[n]=i.r||0,s[n]=i.g||0,l[n]=i.b||0;return o=t(o),s=t(s),l=t(l),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=l(t),i+&quot;&quot;}}}var h=f(n),p=f(i),d=function(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(i),o=new Array(n);for(r=0;r&lt;i;++r)a[r]=A(t[r],e[r]);for(;r&lt;n;++r)o[r]=e[r];return function(t){for(r=0;r&lt;i;++r)o[r]=a[r](t);return o}},g=function(t,e){var r=new Date;return e-=t=+t,function(n){return r.setTime(t+e*n),r}},m=function(t,e){return e-=t=+t,function(r){return t+e*r}},v=function(t,e){var r,n={},i={};for(r in null!==t&amp;&amp;&quot;object&quot;==typeof t||(t={}),null!==e&amp;&amp;&quot;object&quot;==typeof e||(e={}),e)r in t?n[r]=A(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}},y=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,x=new RegExp(y.source,&quot;g&quot;);var b,_,w,k,M=function(t,e){var r,n,i,a=y.lastIndex=x.lastIndex=0,o=-1,s=[],l=[];for(t+=&quot;&quot;,e+=&quot;&quot;;(r=y.exec(t))&amp;&amp;(n=x.exec(e));)(i=n.index)&gt;a&amp;&amp;(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:m(r,n)})),a=x.lastIndex;return a&lt;e.length&amp;&amp;(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length&lt;2?l[0]?function(t){return function(e){return t(e)+&quot;&quot;}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n&lt;e;++n)s[(r=l[n]).i]=r.x(t);return s.join(&quot;&quot;)})},A=function(t,r){var n,i=typeof r;return null==r||&quot;boolean&quot;===i?a(r):(&quot;number&quot;===i?m:&quot;string&quot;===i?(n=e.color(r))?(r=n,u):M:r instanceof e.color?u:r instanceof Date?g:Array.isArray(r)?d:&quot;function&quot;!=typeof r.valueOf&amp;&amp;&quot;function&quot;!=typeof r.toString||isNaN(r)?v:m)(t,r)},T=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},E=function(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&amp;&amp;(t/=o,e/=o),(l=t*r+e*n)&amp;&amp;(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&amp;&amp;(r/=s,n/=s,l/=s),t*n&lt;e*r&amp;&amp;(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*T,skewX:Math.atan(l)*T,scaleX:o,scaleY:s}};function C(t,e,r,n){function i(t){return t.length?t.pop()+&quot; &quot;:&quot;&quot;}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push(&quot;translate(&quot;,null,e,null,r);s.push({i:l-4,x:m(t,i)},{i:l-2,x:m(n,a)})}else(i||a)&amp;&amp;o.push(&quot;translate(&quot;+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e&gt;180?e+=360:e-t&gt;180&amp;&amp;(t+=360),a.push({i:r.push(i(r)+&quot;rotate(&quot;,null,n)-2,x:m(t,e)})):e&amp;&amp;r.push(i(r)+&quot;rotate(&quot;+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+&quot;skewX(&quot;,null,n)-2,x:m(t,e)}):e&amp;&amp;r.push(i(r)+&quot;skewX(&quot;+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+&quot;scale(&quot;,null,&quot;,&quot;,null,&quot;)&quot;);o.push({i:s-4,x:m(t,r)},{i:s-2,x:m(e,n)})}else 1===r&amp;&amp;1===n||a.push(i(a)+&quot;scale(&quot;+r+&quot;,&quot;+n+&quot;)&quot;)}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r&lt;n;)s[(e=l[r]).i]=e.x(t);return s.join(&quot;&quot;)}}}var L=C(function(t){return&quot;none&quot;===t?S:(b||(b=document.createElement(&quot;DIV&quot;),_=document.documentElement,w=document.defaultView),b.style.transform=t,t=w.getComputedStyle(_.appendChild(b),null).getPropertyValue(&quot;transform&quot;),_.removeChild(b),t=t.slice(7,-1).split(&quot;,&quot;),E(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},&quot;px, &quot;,&quot;px)&quot;,&quot;deg)&quot;),z=C(function(t){return null==t?S:(k||(k=document.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;)),k.setAttribute(&quot;transform&quot;,t),(t=k.transform.baseVal.consolidate())?(t=t.matrix,E(t.a,t.b,t.c,t.d,t.e,t.f)):S)},&quot;, &quot;,&quot;)&quot;,&quot;)&quot;),P=Math.SQRT2;function O(t){return((t=Math.exp(t))+1/t)/2}function I(t){return function(r,n){var i=t((r=e.hsl(r)).h,(n=e.hsl(n)).h),a=c(r.s,n.s),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.s=a(t),r.l=o(t),r.opacity=s(t),r+&quot;&quot;}}}var D=I(s),R=I(c);function B(t){return function(r,n){var i=t((r=e.hcl(r)).h,(n=e.hcl(n)).h),a=c(r.c,n.c),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.c=a(t),r.l=o(t),r.opacity=s(t),r+&quot;&quot;}}}var F=B(s),N=B(c);function j(t){return function r(n){function i(r,i){var a=t((r=e.cubehelix(r)).h,(i=e.cubehelix(i)).h),o=c(r.s,i.s),s=c(r.l,i.l),l=c(r.opacity,i.opacity);return function(t){return r.h=a(t),r.s=o(t),r.l=s(Math.pow(t,n)),r.opacity=l(t),r+&quot;&quot;}}return n=+n,i.gamma=r,i}(1)}var V=j(s),U=j(c);t.interpolate=A,t.interpolateArray=d,t.interpolateBasis=n,t.interpolateBasisClosed=i,t.interpolateDate=g,t.interpolateNumber=m,t.interpolateObject=v,t.interpolateRound=function(t,e){return e-=t=+t,function(r){return Math.round(t+e*r)}},t.interpolateString=M,t.interpolateTransformCss=L,t.interpolateTransformSvg=z,t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h&lt;1e-12)n=Math.log(c/o)/P,r=function(t){return[i+t*u,a+t*f,o*Math.exp(P*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+4*h)/(2*o*2*p),g=(c*c-o*o-4*h)/(2*c*2*p),m=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(g*g+1)-g);n=(v-m)/P,r=function(t){var e,r=t*n,s=O(m),l=o/(2*p)*(s*(e=P*r+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[i+l*u,a+l*f,o*s/O(P*r+m)]}}return r.duration=1e3*n,r},t.interpolateRgb=u,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=p,t.interpolateHsl=D,t.interpolateHslLong=R,t.interpolateLab=function(t,r){var n=c((t=e.lab(t)).l,(r=e.lab(r)).l),i=c(t.a,r.a),a=c(t.b,r.b),o=c(t.opacity,r.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=a(e),t.opacity=o(e),t+&quot;&quot;}},t.interpolateHcl=F,t.interpolateHclLong=N,t.interpolateCubehelix=V,t.interpolateCubehelixLong=U,t.piecewise=function(t,e){for(var r=0,n=e.length-1,i=e[0],a=new Array(n&lt;0?0:n);r&lt;n;)a[r]=t(i,i=e[++r]);return function(t){var e=Math.max(0,Math.min(n-1,Math.floor(t*=n)));return a[e](t-e)}},t.quantize=function(t,e){for(var r=new Array(e),n=0;n&lt;e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?i(r,t(&quot;d3-color&quot;)):i(n.d3=n.d3||{},n.d3)},{&quot;d3-color&quot;:141}],145:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,p=t._root,d={data:n},g=t._x0,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e&gt;=(a=(g+v)/2))?g=a:v=a,(u=r&gt;=(o=(m+y)/2))?m=o:y=o,i=p,!(p=p[f=u&lt;&lt;1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&amp;&amp;r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e&gt;=(a=(g+v)/2))?g=a:v=a,(u=r&gt;=(o=(m+y)/2))?m=o:y=o}while((f=u&lt;&lt;1|c)==(h=(l&gt;=o)&lt;&lt;1|s&gt;=a));return i[h]=p,i[f]=d,t}var r=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i};function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i&lt;4;++i)(e=n.source[i])&amp;&amp;(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;n&lt;o;++n)isNaN(i=+this._x.call(null,r=t[n]))||isNaN(a=+this._y.call(null,r))||(s[n]=i,l[n]=a,i&lt;c&amp;&amp;(c=i),i&gt;f&amp;&amp;(f=i),a&lt;u&amp;&amp;(u=a),a&gt;h&amp;&amp;(h=a));for(f&lt;c&amp;&amp;(c=this._x0,f=this._x1),h&lt;u&amp;&amp;(u=this._y0,h=this._y1),this.cover(c,u).cover(f,h),n=0;n&lt;o;++n)e(this,s[n],l[n],t[n]);return this},l.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{if(!(r&gt;t||t&gt;i||n&gt;e||e&gt;a))return this;var o,s,l=i-r,c=this._root;switch(s=(e&lt;(n+a)/2)&lt;&lt;1|t&lt;(r+i)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),t&gt;(i=r+l)||e&gt;a);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),(r=i-l)&gt;t||e&gt;a);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),t&gt;(i=r+l)||n&gt;e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),(r=i-l)&gt;t||n&gt;e)}this._root&amp;&amp;this._root.length&amp;&amp;(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var i,a,o,s,l,c,u,f=this._x0,h=this._y0,p=this._x1,d=this._y1,g=[],m=this._root;for(m&amp;&amp;g.push(new r(m,f,h,p,d)),null==n?n=1/0:(f=t-n,h=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(m=c.node)||(a=c.x0)&gt;p||(o=c.y0)&gt;d||(s=c.x1)&lt;f||(l=c.y1)&lt;h))if(m.length){var v=(a+s)/2,y=(o+l)/2;g.push(new r(m[3],v,y,s,l),new r(m[2],a,y,v,l),new r(m[1],v,o,s,y),new r(m[0],a,o,v,y)),(u=(e&gt;=y)&lt;&lt;1|t&gt;=v)&amp;&amp;(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_&lt;n){var w=Math.sqrt(n=_);f=t-w,h=e-w,p=t+w,d=e+w,i=m.data}}return i},l.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,c,u,f,h,p=this._root,d=this._x0,g=this._y0,m=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=a&gt;=(s=(d+m)/2))?d=s:m=s,(u=o&gt;=(l=(g+v)/2))?g=l:v=l,e=p,!(p=p[f=u&lt;&lt;1|c]))return this;if(!p.length)break;(e[f+1&amp;3]||e[f+2&amp;3]||e[f+3&amp;3])&amp;&amp;(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&amp;&amp;delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&amp;&amp;p===(e[3]||e[2]||e[1]||e[0])&amp;&amp;!p.length&amp;&amp;(r?r[h]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e&lt;r;++e)this.remove(t[e]);return this},l.root=function(){return this._root},l.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},l.visit=function(t){var e,n,i,a,o,s,l=[],c=this._root;for(c&amp;&amp;l.push(new r(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,i=e.x0,a=e.y0,o=e.x1,s=e.y1)&amp;&amp;c.length){var u=(i+o)/2,f=(a+s)/2;(n=c[3])&amp;&amp;l.push(new r(n,u,f,o,s)),(n=c[2])&amp;&amp;l.push(new r(n,i,f,u,s)),(n=c[1])&amp;&amp;l.push(new r(n,u,a,o,f)),(n=c[0])&amp;&amp;l.push(new r(n,i,a,u,f))}return this},l.visitAfter=function(t){var e,n=[],i=[];for(this._root&amp;&amp;n.push(new r(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var a=e.node;if(a.length){var o,s=e.x0,l=e.y0,c=e.x1,u=e.y1,f=(s+c)/2,h=(l+u)/2;(o=a[0])&amp;&amp;n.push(new r(o,s,l,f,h)),(o=a[1])&amp;&amp;n.push(new r(o,f,l,c,h)),(o=a[2])&amp;&amp;n.push(new r(o,s,h,f,u)),(o=a[3])&amp;&amp;n.push(new r(o,f,h,c,u))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},l.x=function(t){return arguments.length?(this._x=t,this):this._x},l.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=a,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],146:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e,r,n=0,i=0,a=0,o=1e3,s=0,l=0,c=0,u=&quot;object&quot;==typeof performance&amp;&amp;performance.now?performance:Date,f=&quot;object&quot;==typeof window&amp;&amp;window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function h(){return l||(f(p),l=u.now()+c)}function p(){l=0}function d(){this._call=this._time=this._next=null}function g(t,e,r){var n=new d;return n.restart(t,e,r),n}function m(){h(),++n;for(var t,r=e;r;)(t=l-r._time)&gt;=0&amp;&amp;r._call.call(null,t),r=r._next;--n}function v(){l=(s=u.now())+c,n=i=0;try{m()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a&gt;i._time&amp;&amp;(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,x(a)}(),l=0}}function y(){var t=u.now(),e=t-s;e&gt;o&amp;&amp;(c-=e,s=t)}function x(t){n||(i&amp;&amp;(i=clearTimeout(i)),t-l&gt;24?(t&lt;1/0&amp;&amp;(i=setTimeout(v,t-u.now()-c)),a&amp;&amp;(a=clearInterval(a))):(a||(s=u.now(),a=setInterval(y,o)),n=1,f(v)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,i){if(&quot;function&quot;!=typeof t)throw new TypeError(&quot;callback is not a function&quot;);i=(null==i?h():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,x()},stop:function(){this._call&amp;&amp;(this._call=null,this._time=1/0,x())}};t.now=h,t.timer=g,t.timerFlush=m,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?h():+r,n.restart(function a(o){o+=i,n.restart(a,i+=e,r),t(o)},e,r),n)},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],147:[function(t,e,r){!function(){var t={version:&quot;3.5.17&quot;},r=[].slice,n=function(t){return r.call(t)},i=this.document;function a(t){return t&amp;&amp;(t.ownerDocument||t.document||t).documentElement}function o(t){return t&amp;&amp;(t.ownerDocument&amp;&amp;t.ownerDocument.defaultView||t.document&amp;&amp;t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement(&quot;DIV&quot;).style.setProperty(&quot;opacity&quot;,0,&quot;&quot;)}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+&quot;&quot;)},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+&quot;&quot;)},u.setProperty=function(t,e,r){f.call(this,t,e+&quot;&quot;,r)}}function h(t,e){return t&lt;e?-1:t&gt;e?1:t&gt;=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length&lt;3&amp;&amp;(n=0),arguments.length&lt;4&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&lt;0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length&lt;3&amp;&amp;(n=0),arguments.length&lt;4&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&gt;0?i=a:n=a+1}return n}}}t.ascending=h,t.descending=function(t,e){return e&lt;t?-1:e&gt;t?1:e&gt;=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i&lt;a;)if(null!=(n=t[i])&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=t[i])&amp;&amp;r&gt;n&amp;&amp;(r=n)}else{for(;++i&lt;a;)if(null!=(n=e.call(t,t[i],i))&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=e.call(t,t[i],i))&amp;&amp;r&gt;n&amp;&amp;(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i&lt;a;)if(null!=(n=t[i])&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=t[i])&amp;&amp;n&gt;r&amp;&amp;(r=n)}else{for(;++i&lt;a;)if(null!=(n=e.call(t,t[i],i))&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=e.call(t,t[i],i))&amp;&amp;n&gt;r&amp;&amp;(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a&lt;o;)if(null!=(n=t[a])&amp;&amp;n&gt;=n){r=i=n;break}for(;++a&lt;o;)null!=(n=t[a])&amp;&amp;(r&gt;n&amp;&amp;(r=n),i&lt;n&amp;&amp;(i=n))}else{for(;++a&lt;o;)if(null!=(n=e.call(t,t[a],a))&amp;&amp;n&gt;=n){r=i=n;break}for(;++a&lt;o;)null!=(n=e.call(t,t[a],a))&amp;&amp;(r&gt;n&amp;&amp;(r=n),i&lt;n&amp;&amp;(i=n))}return[r,i]},t.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a&lt;i;)d(r=+t[a])&amp;&amp;(n+=r);else for(;++a&lt;i;)d(r=+e.call(t,t[a],a))&amp;&amp;(n+=r);return n},t.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a&lt;i;)d(r=p(t[a]))?n+=r:--o;else for(;++a&lt;i;)d(r=p(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},t.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},t.median=function(e,r){var n,i=[],a=e.length,o=-1;if(1===arguments.length)for(;++o&lt;a;)d(n=p(e[o]))&amp;&amp;i.push(n);else for(;++o&lt;a;)d(n=p(r.call(e,e[o],o)))&amp;&amp;i.push(n);if(i.length)return t.quantile(i.sort(h),.5)},t.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s&lt;i;)d(r=p(t[s]))&amp;&amp;(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s&lt;i;)d(r=p(e.call(t,t[s],s)))&amp;&amp;(o+=(n=r-a)*(r-(a+=n/++l)));if(l&gt;1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var m=g(h);function v(t){return t.length}t.bisectLeft=m.left,t.bisect=t.bisectRight=m.right,t.bisector=function(t){return g(1===t.length?function(e,r){return h(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)&lt;3&amp;&amp;(r=t.length,a&lt;2&amp;&amp;(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r&lt;0?0:r);e&lt;r;)i[e]=[n,n=t[++e]];return i},t.transpose=function(e){if(!(a=e.length))return[];for(var r=-1,n=t.min(e,v),i=new Array(n);++r&lt;n;)for(var a,o=-1,s=i[r]=new Array(a);++o&lt;a;)s[o]=e[o][r];return i},t.zip=function(){return t.transpose(arguments)},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a&lt;i;)o+=t[a].length;for(r=new Array(o);--i&gt;=0;)for(e=(n=t[i]).length;--e&gt;=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length&lt;3&amp;&amp;(r=1,arguments.length&lt;2&amp;&amp;(e=t,t=0)),(e-t)/r==1/0)throw new Error(&quot;infinite range&quot;);var n,i=[],a=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=a,e*=a,(r*=a)&lt;0)for(;(n=t+r*++o)&gt;e;)i.push(n/a);else for(;(n=t+r*++o)&lt;e;)i.push(n/a);return i},t.map=function(t,e){var r=new b;if(t instanceof b)t.forEach(function(t,e){r.set(t,e)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i&lt;a;)r.set(i,t[i]);else for(;++i&lt;a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var _=&quot;__proto__&quot;,w=&quot;\0&quot;;function k(t){return(t+=&quot;&quot;)===_||t[0]===w?w+t:t}function M(t){return(t+=&quot;&quot;)[0]===w?t.slice(1):t}function A(t){return k(t)in this._}function T(t){return(t=k(t))in this._&amp;&amp;delete this._[t]}function S(){var t=[];for(var e in this._)t.push(M(e));return t}function E(){var t=0;for(var e in this._)++t;return t}function C(){for(var t in this._)return!1;return!0}function L(){this._=Object.create(null)}function z(t){return t}function P(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function O(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=I.length;r&lt;n;++r){var i=I[r]+e;if(i in t)return i}}x(b,{has:A,get:function(t){return this._[k(t)]},set:function(t,e){return this._[k(t)]=e},remove:T,keys:S,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:M(e),value:this._[e]});return t},size:E,empty:C,forEach:function(t){for(var e in this._)t.call(this,M(e),this._[e])}}),t.nest=function(){var e,r,n={},i=[],a=[];function o(t,a,s){if(s&gt;=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,f,h=-1,p=a.length,d=i[s++],g=new b;++h&lt;p;)(f=g.get(l=d(c=a[h])))?f.push(c):g.set(l,[c]);return t?(c=t(),u=function(e,r){c.set(e,o(t,r,s))}):(c={},u=function(e,r){c[e]=o(t,r,s)}),g.forEach(u),c}return n.map=function(t,e){return o(e,t,0)},n.entries=function(e){return function t(e,r){if(r&gt;=i.length)return e;var n=[],o=a[r++];return e.forEach(function(e,i){n.push({key:e,values:t(i,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r&lt;n;++r)e.add(t[r]);return e},x(L,{has:A,add:function(t){return this._[k(t+=&quot;&quot;)]=!0,t},remove:T,values:S,size:E,empty:C,forEach:function(t){for(var e in this._)t.call(this,M(e))}}),t.behavior={},t.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n&lt;i;)t[r=arguments[n]]=P(t,e,e[r]);return t};var I=[&quot;webkit&quot;,&quot;ms&quot;,&quot;moz&quot;,&quot;Moz&quot;,&quot;o&quot;,&quot;O&quot;];function D(){}function R(){}function B(t){var e=[],r=new b;function n(){for(var r,n=e,i=-1,a=n.length;++i&lt;a;)(r=n[i].on)&amp;&amp;r.apply(this,arguments);return t}return n.on=function(n,i){var a,o=r.get(n);return arguments.length&lt;2?o&amp;&amp;o.on:(o&amp;&amp;(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&amp;&amp;e.push(r.set(n,{on:i})),t)},n}function F(){t.event.preventDefault()}function N(){for(var e,r=t.event;e=r.sourceEvent;)r=e;return r}function j(e){for(var r=new R,n=0,i=arguments.length;++n&lt;i;)r[arguments[n]]=B(r);return r.of=function(n,i){return function(a){try{var o=a.sourceEvent=t.event;a.target=e,t.event=a,r[a.type].apply(n,i)}finally{t.event=o}}},r}t.dispatch=function(){for(var t=new R,e=-1,r=arguments.length;++e&lt;r;)t[arguments[e]]=B(t);return t},R.prototype.on=function(t,e){var r=t.indexOf(&quot;.&quot;),n=&quot;&quot;;if(r&gt;=0&amp;&amp;(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length&lt;2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&amp;&amp;this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(V,&quot;\\$&amp;&quot;)};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return U(t,Y),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},W=function(t,e){var r=t.matches||t[O(t,&quot;matchesSelector&quot;)];return(W=function(t,e){return r.call(t,e)})(t,e)};&quot;function&quot;==typeof Sizzle&amp;&amp;(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,W=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var Y=t.selection.prototype=[];function X(t){return&quot;function&quot;==typeof t?t:function(){return H(t,this)}}function Z(t){return&quot;function&quot;==typeof t?t:function(){return G(t,this)}}Y.select=function(t){var e,r,n,i,a=[];t=X(t);for(var o=-1,s=this.length;++o&lt;s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,c=n.length;++l&lt;c;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&amp;&amp;&quot;__data__&quot;in i&amp;&amp;(r.__data__=i.__data__)):e.push(null)}return q(a)},Y.selectAll=function(t){var e,r,i=[];t=Z(t);for(var a=-1,o=this.length;++a&lt;o;)for(var s=this[a],l=-1,c=s.length;++l&lt;c;)(r=s[l])&amp;&amp;(i.push(e=n(t.call(r,r.__data__,l,a))),e.parentNode=r);return q(i)};var $=&quot;http://www.w3.org/1999/xhtml&quot;,J={svg:&quot;http://www.w3.org/2000/svg&quot;,xhtml:$,xlink:&quot;http://www.w3.org/1999/xlink&quot;,xml:&quot;http://www.w3.org/XML/1998/namespace&quot;,xmlns:&quot;http://www.w3.org/2000/xmlns/&quot;};function K(e,r){return e=t.ns.qualify(e),null==r?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:&quot;function&quot;==typeof r?e.local?function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}:function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}:e.local?function(){this.setAttributeNS(e.space,e.local,r)}:function(){this.setAttribute(e,r)}}function Q(t){return t.trim().replace(/\s+/g,&quot; &quot;)}function tt(e){return new RegExp(&quot;(?:^|\\s+)&quot;+t.requote(e)+&quot;(?:\\s+|$)&quot;,&quot;g&quot;)}function et(t){return(t+&quot;&quot;).trim().split(/^|\s+/)}function rt(t,e){var r=(t=et(t).map(nt)).length;return&quot;function&quot;==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n&lt;r;)t[n](this,i)}:function(){for(var n=-1;++n&lt;r;)t[n](this,e)}}function nt(t){var e=tt(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute(&quot;class&quot;)||&quot;&quot;;n?(e.lastIndex=0,e.test(i)||r.setAttribute(&quot;class&quot;,Q(i+&quot; &quot;+t))):r.setAttribute(&quot;class&quot;,Q(i.replace(e,&quot; &quot;)))}}function it(t,e,r){return null==e?function(){this.style.removeProperty(t)}:&quot;function&quot;==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function at(t,e){return null==e?function(){delete this[t]}:&quot;function&quot;==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function ot(e){return&quot;function&quot;==typeof e?e:(e=t.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$&amp;&amp;t.documentElement.namespaceURI===$?t.createElement(e):t.createElementNS(r,e)}}function st(){var t=this.parentNode;t&amp;&amp;t.removeChild(this)}function lt(t){return{__data__:t}}function ct(t){return function(){return W(this,t)}}function ut(t,e){for(var r=0,n=t.length;r&lt;n;r++)for(var i,a=t[r],o=0,s=a.length;o&lt;s;o++)(i=a[o])&amp;&amp;e(i,o,r);return t}function ft(t){return U(t,ht),t}t.ns={prefix:J,qualify:function(t){var e=t.indexOf(&quot;:&quot;),r=t;return e&gt;=0&amp;&amp;&quot;xmlns&quot;!==(r=t.slice(0,e))&amp;&amp;(t=t.slice(e+1)),J.hasOwnProperty(r)?{space:J[r],local:t}:t}},Y.attr=function(e,r){if(arguments.length&lt;2){if(&quot;string&quot;==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(K(r,e[r]));return this}return this.each(K(e,r))},Y.classed=function(t,e){if(arguments.length&lt;2){if(&quot;string&quot;==typeof t){var r=this.node(),n=(t=et(t)).length,i=-1;if(e=r.classList){for(;++i&lt;n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute(&quot;class&quot;);++i&lt;n;)if(!tt(t[i]).test(e))return!1;return!0}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},Y.style=function(t,e,r){var n=arguments.length;if(n&lt;3){if(&quot;string&quot;!=typeof t){for(r in n&lt;2&amp;&amp;(e=&quot;&quot;),t)this.each(it(r,t[r],e));return this}if(n&lt;2){var i=this.node();return o(i).getComputedStyle(i,null).getPropertyValue(t)}r=&quot;&quot;}return this.each(it(t,e,r))},Y.property=function(t,e){if(arguments.length&lt;2){if(&quot;string&quot;==typeof t)return this.node()[t];for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},Y.text=function(t){return arguments.length?this.each(&quot;function&quot;==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?&quot;&quot;:e}:null==t?function(){this.textContent=&quot;&quot;}:function(){this.textContent=t}):this.node().textContent},Y.html=function(t){return arguments.length?this.each(&quot;function&quot;==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?&quot;&quot;:e}:null==t?function(){this.innerHTML=&quot;&quot;}:function(){this.innerHTML=t}):this.node().innerHTML},Y.append=function(t){return t=ot(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Y.insert=function(t,e){return t=ot(t),e=X(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Y.remove=function(){return this.each(st)},Y.data=function(t,e){var r,n,i=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++i&lt;a;)(n=r[i])&amp;&amp;(t[i]=n.__data__);return t}function o(t,r){var n,i,a,o=t.length,u=r.length,f=Math.min(o,u),h=new Array(u),p=new Array(u),d=new Array(o);if(e){var g,m=new b,v=new Array(o);for(n=-1;++n&lt;o;)(i=t[n])&amp;&amp;(m.has(g=e.call(i,i.__data__,n))?d[n]=i:m.set(g,i),v[n]=g);for(n=-1;++n&lt;u;)(i=m.get(g=e.call(r,a=r[n],n)))?!0!==i&amp;&amp;(h[n]=i,i.__data__=a):p[n]=lt(a),m.set(g,!0);for(n=-1;++n&lt;o;)n in v&amp;&amp;!0!==m.get(v[n])&amp;&amp;(d[n]=t[n])}else{for(n=-1;++n&lt;f;)i=t[n],a=r[n],i?(i.__data__=a,h[n]=i):p[n]=lt(a);for(;n&lt;u;++n)p[n]=lt(r[n]);for(;n&lt;o;++n)d[n]=t[n]}p.update=h,p.parentNode=h.parentNode=d.parentNode=t.parentNode,s.push(p),l.push(h),c.push(d)}var s=ft([]),l=q([]),c=q([]);if(&quot;function&quot;==typeof t)for(;++i&lt;a;)o(r=this[i],t.call(r,r.parentNode.__data__,i));else for(;++i&lt;a;)o(r=this[i],t);return l.enter=function(){return s},l.exit=function(){return c},l},Y.datum=function(t){return arguments.length?this.property(&quot;__data__&quot;,t):this.property(&quot;__data__&quot;)},Y.filter=function(t){var e,r,n,i=[];&quot;function&quot;!=typeof t&amp;&amp;(t=ct(t));for(var a=0,o=this.length;a&lt;o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s&lt;l;s++)(n=r[s])&amp;&amp;t.call(n,n.__data__,s,a)&amp;&amp;e.push(n)}return q(i)},Y.order=function(){for(var t=-1,e=this.length;++t&lt;e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i&gt;=0;)(r=n[i])&amp;&amp;(a&amp;&amp;a!==r.nextSibling&amp;&amp;a.parentNode.insertBefore(r,a),a=r);return this},Y.sort=function(t){t=function(t){arguments.length||(t=h);return function(e,r){return e&amp;&amp;r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e&lt;r;)this[e].sort(t);return this.order()},Y.each=function(t){return ut(this,function(e,r,n){t.call(e,e.__data__,r,n)})},Y.call=function(t){var e=n(arguments);return t.apply(e[0]=this,e),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var t=0,e=this.length;t&lt;e;t++)for(var r=this[t],n=0,i=r.length;n&lt;i;n++){var a=r[n];if(a)return a}return null},Y.size=function(){var t=0;return ut(this,function(){++t}),t};var ht=[];function pt(e,r,i){var a=&quot;__on&quot;+e,o=e.indexOf(&quot;.&quot;),s=gt;o&gt;0&amp;&amp;(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[a];t&amp;&amp;(this.removeEventListener(e,t,t.$),delete this[a])}return l&amp;&amp;(e=l,s=mt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?D:function(){var r,n=new RegExp(&quot;^__on([^.]+)&quot;+t.requote(e)+&quot;$&quot;);for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ft,t.selection.enter.prototype=ht,ht.append=Y.append,ht.empty=Y.empty,ht.node=Y.node,ht.call=Y.call,ht.size=Y.size,ht.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s&lt;l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,u=i.length;++c&lt;u;)(a=i[c])?(e.push(n[c]=r=t.call(i.parentNode,a.__data__,c,s)),r.__data__=a.__data__):e.push(null)}return q(o)},ht.insert=function(t,e){var r,n,i;return arguments.length&lt;2&amp;&amp;(r=this,e=function(t,e,a){var o,s=r[a].update,l=s.length;for(a!=i&amp;&amp;(i=a,n=0),e&gt;=n&amp;&amp;(n=e+1);!(o=s[n])&amp;&amp;++n&lt;l;);return o}),Y.insert.call(this,t,e)},t.select=function(t){var e;return&quot;string&quot;==typeof t?(e=[H(t,i)]).parentNode=i.documentElement:(e=[t]).parentNode=a(t),q([e])},t.selectAll=function(t){var e;return&quot;string&quot;==typeof t?(e=n(G(t,i))).parentNode=i.documentElement:(e=n(t)).parentNode=null,q([e])},Y.on=function(t,e,r){var n=arguments.length;if(n&lt;3){if(&quot;string&quot;!=typeof t){for(r in n&lt;2&amp;&amp;(e=!1),t)this.each(pt(r,t[r],e));return this}if(n&lt;2)return(n=this.node()[&quot;__on&quot;+t])&amp;&amp;n._;r=!1}return this.each(pt(t,e,r))};var dt=t.map({mouseenter:&quot;mouseover&quot;,mouseleave:&quot;mouseout&quot;});function gt(e,r){return function(n){var i=t.event;t.event=n,r[0]=this.__data__;try{e.apply(this,r)}finally{t.event=i}}}function mt(t,e){var r=gt(t,e);return function(t){var e=t.relatedTarget;e&amp;&amp;(e===this||8&amp;e.compareDocumentPosition(this))||r.call(this,t)}}i&amp;&amp;dt.forEach(function(t){&quot;on&quot;+t in i&amp;&amp;dt.remove(t)});var vt,yt=0;function xt(e){var r=&quot;.dragsuppress-&quot;+ ++yt,n=&quot;click&quot;+r,i=t.select(o(e)).on(&quot;touchmove&quot;+r,F).on(&quot;dragstart&quot;+r,F).on(&quot;selectstart&quot;+r,F);if(null==vt&amp;&amp;(vt=!(&quot;onselectstart&quot;in e)&amp;&amp;O(e.style,&quot;userSelect&quot;)),vt){var s=a(e).style,l=s[vt];s[vt]=&quot;none&quot;}return function(t){if(i.on(r,null),vt&amp;&amp;(s[vt]=l),t){var e=function(){i.on(n,null)};i.on(n,function(){F(),e()},!0),setTimeout(e,0)}}}t.mouse=function(t){return _t(t,N())};var bt=this.navigator&amp;&amp;/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(e,r){r.changedTouches&amp;&amp;(r=r.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();if(bt&lt;0){var a=o(e);if(a.scrollX||a.scrollY){var s=(n=t.select(&quot;body&quot;).append(&quot;svg&quot;).style({position:&quot;absolute&quot;,top:0,left:0,margin:0,padding:0,border:&quot;none&quot;},&quot;important&quot;))[0][0].getScreenCTM();bt=!(s.f||s.e),n.remove()}}return bt?(i.x=r.pageX,i.y=r.pageY):(i.x=r.clientX,i.y=r.clientY),[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}var l=e.getBoundingClientRect();return[r.clientX-l.left-e.clientLeft,r.clientY-l.top-e.clientTop]}function wt(){return t.event.changedTouches[0].identifier}t.touch=function(t,e,r){if(arguments.length&lt;3&amp;&amp;(r=e,e=N().changedTouches),e)for(var n,i=0,a=e.length;i&lt;a;++i)if((n=e[i]).identifier===r)return _t(t,n)},t.behavior.drag=function(){var e=j(a,&quot;drag&quot;,&quot;dragstart&quot;,&quot;dragend&quot;),r=null,n=s(D,t.mouse,o,&quot;mousemove&quot;,&quot;mouseup&quot;),i=s(wt,t.touch,z,&quot;touchmove&quot;,&quot;touchend&quot;);function a(){this.on(&quot;mousedown.drag&quot;,n).on(&quot;touchstart.drag&quot;,i)}function s(n,i,a,o,s){return function(){var l,c=t.event.target.correspondingElement||t.event.target,u=this.parentNode,f=e.of(this,arguments),h=0,p=n(),d=&quot;.drag&quot;+(null==p?&quot;&quot;:&quot;-&quot;+p),g=t.select(a(c)).on(o+d,function(){var t,e,r=i(u,p);if(!r)return;t=r[0]-v[0],e=r[1]-v[1],h|=t|e,v=r,f({type:&quot;drag&quot;,x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e})}).on(s+d,function(){if(!i(u,p))return;g.on(o+d,null).on(s+d,null),m(h),f({type:&quot;dragend&quot;})}),m=xt(c),v=i(u,p);l=r?[(l=r.apply(this,arguments)).x-v[0],l.y-v[1]]:[0,0],f({type:&quot;dragstart&quot;})}}return a.origin=function(t){return arguments.length?(r=t,a):r},t.rebind(a,e,&quot;on&quot;)},t.touches=function(t,e){return arguments.length&lt;2&amp;&amp;(e=N().touches),e?n(e).map(function(e){var r=_t(t,e);return r.identifier=e.identifier,r}):[]};var kt=1e-6,Mt=kt*kt,At=Math.PI,Tt=2*At,St=Tt-kt,Et=At/2,Ct=At/180,Lt=180/At;function zt(t){return t&gt;0?1:t&lt;0?-1:0}function Pt(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function Ot(t){return t&gt;1?0:t&lt;-1?At:Math.acos(t)}function It(t){return t&gt;1?Et:t&lt;-1?-Et:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Bt=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h&lt;Mt)n=Math.log(c/o)/Bt,r=function(t){return[i+t*u,a+t*f,o*Math.exp(Bt*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+4*h)/(2*o*2*p),g=(c*c-o*o-4*h)/(2*c*2*p),m=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(g*g+1)-g);n=(v-m)/Bt,r=function(t){var e,r=t*n,s=Dt(m),l=o/(2*p)*(s*(e=Bt*r+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[i+l*u,a+l*f,o*s/Dt(Bt*r+m)]}}return r.duration=1e3*n,r},t.behavior.zoom=function(){var e,r,n,a,s,l,c,u,f,h={x:0,y:0,k:1},p=[960,500],d=jt,g=250,m=0,v=&quot;mousedown.zoom&quot;,y=&quot;mousemove.zoom&quot;,x=&quot;mouseup.zoom&quot;,b=&quot;touchstart.zoom&quot;,_=j(w,&quot;zoomstart&quot;,&quot;zoom&quot;,&quot;zoomend&quot;);function w(t){t.on(v,z).on(Nt+&quot;.zoom&quot;,O).on(&quot;dblclick.zoom&quot;,I).on(b,P)}function k(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function M(t){h.k=Math.max(d[0],Math.min(d[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function T(e,n,i,a){e.__chart__={x:h.x,y:h.y,k:h.k},M(Math.pow(2,a)),A(r=n,i),e=t.select(e),g&gt;0&amp;&amp;(e=e.transition().duration(g)),e.call(w.event)}function S(){c&amp;&amp;c.domain(l.range().map(function(t){return(t-h.x)/h.k}).map(l.invert)),f&amp;&amp;f.domain(u.range().map(function(t){return(t-h.y)/h.k}).map(u.invert))}function E(t){m++||t({type:&quot;zoomstart&quot;})}function C(t){S(),t({type:&quot;zoom&quot;,scale:h.k,translate:[h.x,h.y]})}function L(t){--m||(t({type:&quot;zoomend&quot;}),r=null)}function z(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),a),C(r)}).on(x,function(){i.on(y,null).on(x,null),s(n),L(r)}),a=k(t.mouse(e)),s=xt(e);fs.call(e),E(r)}function P(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=&quot;.zoom-&quot;+t.event.changedTouches[0].identifier,l=&quot;touchmove&quot;+o,c=&quot;touchend&quot;+o,u=[],f=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=h.k,n.forEach(function(t){t.identifier in i&amp;&amp;(i[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,m).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,f=n.length;o&lt;f;++o)i[n[o].identifier]=null;var p=d(),g=Date.now();if(1===p.length){if(g-s&lt;500){var v=p[0];T(r,v,i[v.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),F()}s=g}else if(p.length&gt;1){v=p[0];var x=p[1],b=v[0]-x[0],_=v[1]-x[1];a=b*b+_*_}}function m(){var o,l,c,u,f=t.touches(r);fs.call(r);for(var h=0,p=f.length;h&lt;p;++h,u=null)if(c=f[h],u=i[c.identifier]){if(l)break;o=c,l=u}if(u){var d=(d=c[0]-o[0])*d+(d=c[1]-o[1])*d,g=a&amp;&amp;Math.sqrt(d/a);o=[(o[0]+c[0])/2,(o[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],M(g*e)}s=null,A(o,l),C(n)}function y(){if(t.event.touches.length){for(var e=t.event.changedTouches,r=0,a=e.length;r&lt;a;++r)delete i[e[r].identifier];for(var s in i)return void d()}t.selectAll(u).on(o,null),f.on(v,z).on(b,P),p(),L(n)}g(),E(n),f.on(v,null).on(b,g)}function O(){var i=_.of(this,arguments);a?clearTimeout(a):(fs.call(this),e=k(r=n||t.mouse(this)),E(i)),a=setTimeout(function(){a=null,L(i)},50),F(),M(Math.pow(2,.002*Ft())*h.k),A(r,e),C(i)}function I(){var e=t.mouse(this),r=Math.log(h.k)/Math.LN2;T(this,e,k(e),t.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}return Nt||(Nt=&quot;onwheel&quot;in i?(Ft=function(){return-t.event.deltaY*(t.event.deltaMode?120:1)},&quot;wheel&quot;):&quot;onmousewheel&quot;in i?(Ft=function(){return t.event.wheelDelta},&quot;mousewheel&quot;):(Ft=function(){return-t.event.detail},&quot;MozMousePixelScroll&quot;)),w.event=function(e){e.each(function(){var e=_.of(this,arguments),n=h;ds?t.select(this).transition().each(&quot;start.zoom&quot;,function(){h=this.__chart__||{x:0,y:0,k:1},E(e)}).tween(&quot;zoom:zoom&quot;,function(){var i=p[0],a=p[1],o=r?r[0]:i/2,s=r?r[1]:a/2,l=t.interpolateZoom([(o-h.x)/h.k,(s-h.y)/h.k,i/h.k],[(o-n.x)/n.k,(s-n.y)/n.k,i/n.k]);return function(t){var r=l(t),n=i/r[2];this.__chart__=h={x:o-r[0]*n,y:s-r[1]*n,k:n},C(e)}}).each(&quot;interrupt.zoom&quot;,function(){L(e)}).each(&quot;end.zoom&quot;,function(){L(e)}):(this.__chart__=h,E(e),C(e),L(e))})},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},S(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},M(+t),S(),w):h.k},w.scaleExtent=function(t){return arguments.length?(d=null==t?jt:[+t[0],+t[1]],w):d},w.center=function(t){return arguments.length?(n=t&amp;&amp;[+t[0],+t[1]],w):n},w.size=function(t){return arguments.length?(p=t&amp;&amp;[+t[0],+t[1]],w):p},w.duration=function(t){return arguments.length?(g=+t,w):g},w.x=function(t){return arguments.length?(c=t,l=t.copy(),h={x:0,y:0,k:1},w):c},w.y=function(t){return arguments.length?(f=t,u=t.copy(),h={x:0,y:0,k:1},w):f},t.rebind(w,_,&quot;on&quot;)};var Ft,Nt,jt=[0,1/0];function Vt(){}function Ut(t,e,r){return this instanceof Ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length&lt;2?t instanceof Ut?new Ut(t.h,t.s,t.l):ue(&quot;&quot;+t,fe,Ut):new Ut(t,e,r)}t.color=Vt,Vt.prototype.toString=function(){return this.rgb()+&quot;&quot;},t.hsl=Ut;var qt=Ut.prototype=new Vt;function Ht(t,e,r){var n,i;function a(t){return Math.round(255*function(t){return t&gt;360?t-=360:t&lt;0&amp;&amp;(t+=360),t&lt;60?n+(i-n)*t/60:t&lt;180?i:t&lt;240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)&lt;0?t+360:t,e=isNaN(e)?0:e&lt;0?0:e&gt;1?1:e,n=2*(r=r&lt;0?0:r&gt;1?1:r)-(i=r&lt;=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length&lt;2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=he((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Wt=Gt.prototype=new Vt;function Yt(t,e,r){return isNaN(t)&amp;&amp;(t=0),isNaN(e)&amp;&amp;(e=0),new Xt(r,Math.cos(t*=Ct)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length&lt;2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Yt(t.h,t.c,t.l):he((t=ae(t)).r,t.g,t.b):new Xt(t,e,r)}Wt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Wt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Wt.rgb=function(){return Yt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,$t=.95047,Jt=1,Kt=1.08883,Qt=Xt.prototype=new Vt;function te(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*$t)-1.5371385*(n=re(n)*Jt)-.4985314*(a=re(a)*Kt)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function ee(t,e,r){return t&gt;0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t&gt;.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t&gt;.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t&lt;=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length&lt;2?t instanceof ae?new ae(t.r,t.g,t.b):ue(&quot;&quot;+t,ae,Ht):new ae(t,e,r)}function oe(t){return new ae(t&gt;&gt;16,t&gt;&gt;8&amp;255,255&amp;t)}function se(t){return oe(t)+&quot;&quot;}Qt.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Qt.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Qt.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ae;var le=ae.prototype=new Vt;function ce(t){return t&lt;16?&quot;0&quot;+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(&quot;,&quot;),n[1]){case&quot;hsl&quot;:return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case&quot;rgb&quot;:return e(de(i[0]),de(i[1]),de(i[2]))}return(a=ge.get(t))?e(a.r,a.g,a.b):(null==t||&quot;#&quot;!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&amp;a)&gt;&gt;4,o|=o&gt;&gt;4,s=240&amp;a,s|=s&gt;&gt;4,l=15&amp;a,l|=l&lt;&lt;4):7===t.length&amp;&amp;(o=(16711680&amp;a)&gt;&gt;16,s=(65280&amp;a)&gt;&gt;8,l=255&amp;a)),e(o,s,l))}function fe(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l&lt;.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e&lt;r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l&gt;0&amp;&amp;l&lt;1?0:n),new Ut(n,i,l)}function he(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/$t),i=ne((.2126729*t+.7151522*e+.072175*r)/Jt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/Kt)))}function pe(t){return(t/=255)&lt;=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return&quot;%&quot;===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&amp;&amp;e&lt;i&amp;&amp;(e=i),r&amp;&amp;r&lt;i&amp;&amp;(r=i),n&amp;&amp;n&lt;i&amp;&amp;(n=i),new ae(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ae(i,i,i)},le.darker=function(t){return new ae((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},le.hsl=function(){return fe(this.r,this.g,this.b)},le.toString=function(){return&quot;#&quot;+ce(this.r)+ce(this.g)+ce(this.b)};var ge=t.map({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});function me(t){return&quot;function&quot;==typeof t?t:function(){return t}}function ve(t){return function(e,r,n){return 2===arguments.length&amp;&amp;&quot;function&quot;==typeof r&amp;&amp;(n=r,r=null),ye(e,r,t,n)}}function ye(e,r,i,a){var o={},s=t.dispatch(&quot;beforesend&quot;,&quot;progress&quot;,&quot;load&quot;,&quot;error&quot;),l={},c=new XMLHttpRequest,u=null;function f(){var t,e=c.status;if(!e&amp;&amp;function(t){var e=t.responseType;return e&amp;&amp;&quot;text&quot;!==e?t.response:t.responseText}(c)||e&gt;=200&amp;&amp;e&lt;300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||&quot;withCredentials&quot;in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),&quot;onload&quot;in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState&gt;3&amp;&amp;f()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+&quot;&quot;).toLowerCase(),arguments.length&lt;2?l[t]:(null==e?delete l[t]:l[t]=e+&quot;&quot;,o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+&quot;&quot;,o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},[&quot;get&quot;,&quot;post&quot;].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,i){if(2===arguments.length&amp;&amp;&quot;function&quot;==typeof n&amp;&amp;(i=n,n=null),c.open(t,e,!0),null==r||&quot;accept&quot;in l||(l.accept=r+&quot;,*/*&quot;),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&amp;&amp;c.overrideMimeType&amp;&amp;c.overrideMimeType(r),null!=u&amp;&amp;(c.responseType=u),null!=i&amp;&amp;o.on(&quot;error&quot;,i).on(&quot;load&quot;,function(t){i(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,&quot;on&quot;),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=me,t.xhr=ve(z),t.dsv=function(t,e){var r=new RegExp('[&quot;'+t+&quot;\n]&quot;),n=t.charCodeAt(0);function i(t,r,n){arguments.length&lt;3&amp;&amp;(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'&quot;'+t.replace(/\&quot;/g,'&quot;&quot;')+'&quot;':t}return i.parse=function(t,e){var r;return i.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function(&quot;d&quot;,&quot;return {&quot;+t.map(function(t,e){return JSON.stringify(t)+&quot;: d[&quot;+e+&quot;]&quot;}).join(&quot;,&quot;)+&quot;}&quot;);r=e?function(t,r){return e(i(t),r)}:i})},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,c=0,u=0;function f(){if(c&gt;=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++&lt;l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return c=r+2,13===(s=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&amp;&amp;++c):10===s&amp;&amp;(i=!0),t.slice(e+1,r).replace(/&quot;&quot;/g,'&quot;')}for(;c&lt;l;){var s,u=1;if(10===(s=t.charCodeAt(c++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(c)&amp;&amp;(++c,++u);else if(s!==n)continue;return t.slice(e,c-u)}return t.slice(e)}for(;(r=f())!==o;){for(var h=[];r!==a&amp;&amp;r!==o;)h.push(r),r=f();e&amp;&amp;null==(h=e(h,u++))||s.push(h)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var r=new L,n=[];return e.forEach(function(t){for(var e in t)r.has(e)||n.push(r.add(e))}),[n.map(l).join(t)].concat(e.map(function(e){return n.map(function(t){return l(e[t])}).join(t)})).join(&quot;\n&quot;)},i.formatRows=function(t){return t.map(s).join(&quot;\n&quot;)},i},t.csv=t.dsv(&quot;,&quot;,&quot;text/csv&quot;),t.tsv=t.dsv(&quot;\t&quot;,&quot;text/tab-separated-values&quot;);var xe,be,_e,we,ke=this[O(this,&quot;requestAnimationFrame&quot;)]||function(t){setTimeout(t,17)};function Me(t,e,r){var n=arguments.length;n&lt;2&amp;&amp;(e=0),n&lt;3&amp;&amp;(r=Date.now());var i={c:t,t:r+e,n:null};return be?be.n=i:xe=i,be=i,_e||(we=clearTimeout(we),_e=1,ke(Ae)),i}function Ae(){var t=Te(),e=Se()-t;e&gt;24?(isFinite(e)&amp;&amp;(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Te(){for(var t=Date.now(),e=xe;e;)t&gt;=e.t&amp;&amp;e.c(t-e.t)&amp;&amp;(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t&lt;r&amp;&amp;(r=e.t),e=(t=e).n):e=t?t.n=e.n:xe=e.n;return be=t,r}function Ee(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}t.timer=function(){Me.apply(this,arguments)},t.timer.flush=function(){Te(),Se()},t.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Ce=[&quot;y&quot;,&quot;z&quot;,&quot;a&quot;,&quot;f&quot;,&quot;p&quot;,&quot;n&quot;,&quot;\xb5&quot;,&quot;m&quot;,&quot;&quot;,&quot;k&quot;,&quot;M&quot;,&quot;G&quot;,&quot;T&quot;,&quot;P&quot;,&quot;E&quot;,&quot;Z&quot;,&quot;Y&quot;].map(function(t,e){var r=Math.pow(10,3*y(8-e));return{scale:e&gt;8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&amp;&amp;(e&lt;0&amp;&amp;(e*=-1),r&amp;&amp;(e=t.round(e,Ee(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ce[8+n/3]};var Le=/(?:([^{])?([&lt;&gt;=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ze=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ee(e,r))).toFixed(Math.max(0,Math.min(20,Ee(e*(1+1e-15),r))))}});function Pe(t){return t+&quot;&quot;}var Oe=t.time={},Ie=Date;function De(){this._=new Date(arguments.length&gt;1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Be(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r&lt;n-e?r:n}function i(r){return e(r=t(new Ie(r-1)),1),r}function a(t,r){return e(t=new Ie(+t),r),t}function o(t,n,a){var o=i(t),s=[];if(a&gt;1)for(;o&lt;n;)r(o)%a||s.push(new Date(+o)),e(o,1);else for(;o&lt;n;)s.push(new Date(+o)),e(o,1);return s}t.floor=t,t.round=n,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Fe(t);return s.floor=s,s.round=Fe(n),s.ceil=Fe(i),s.offset=Fe(a),s.range=function(t,e,r){try{Ie=De;var n=new De;return n._=t,o(n,e,r)}finally{Ie=Date}},t}function Fe(t){return function(e,r){try{Ie=De;var n=new De;return n._=e,t(n,r)._}finally{Ie=Date}}}Oe.year=Be(function(t){return(t=Oe.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Oe.years=Oe.year.range,Oe.years.utc=Oe.year.utc.range,Oe.day=Be(function(t){var e=new Ie(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Oe.days=Oe.day.range,Oe.days.utc=Oe.day.utc.range,Oe.dayOfYear=function(t){var e=Oe.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},[&quot;sunday&quot;,&quot;monday&quot;,&quot;tuesday&quot;,&quot;wednesday&quot;,&quot;thursday&quot;,&quot;friday&quot;,&quot;saturday&quot;].forEach(function(t,e){e=7-e;var r=Oe[t]=Be(function(t){return(t=Oe.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=Oe.year(t).getDay();return Math.floor((Oe.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});Oe[t+&quot;s&quot;]=r.range,Oe[t+&quot;s&quot;].utc=r.utc.range,Oe[t+&quot;OfYear&quot;]=function(t){var r=Oe.year(t).getDay();return Math.floor((Oe.dayOfYear(t)+(r+e)%7)/7)}}),Oe.week=Oe.sunday,Oe.weeks=Oe.sunday.range,Oe.weeks.utc=Oe.sunday.utc.range,Oe.weekOfYear=Oe.sundayOfYear;var Ne={&quot;-&quot;:&quot;&quot;,_:&quot; &quot;,0:&quot;0&quot;},je=/^\s*\d+/,Ve=/^%/;function Ue(t,e,r){var n=t&lt;0?&quot;-&quot;:&quot;&quot;,i=(n?-t:t)+&quot;&quot;,a=i.length;return n+(a&lt;r?new Array(r-a+1).join(e)+i:i)}function qe(e){return new RegExp(&quot;^(?:&quot;+e.map(t.requote).join(&quot;|&quot;)+&quot;)&quot;,&quot;i&quot;)}function He(t){for(var e=new b,r=-1,n=t.length;++r&lt;n;)e.set(t[r].toLowerCase(),r);return e}function Ge(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function We(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.U=+n[0],r+n[0].length):-1}function Ye(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.W=+n[0],r+n[0].length):-1}function Xe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Ze(t,e,r){je.lastIndex=0;var n,i=je.exec(e.slice(r,r+2));return i?(t.y=(n=+i[0])+(n&gt;68?1900:2e3),r+i[0].length):-1}function $e(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Je(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ir(t){var e=t.getTimezoneOffset(),r=e&gt;0?&quot;-&quot;:&quot;+&quot;,n=y(e)/60|0,i=y(e)%60;return r+Ue(n,&quot;0&quot;,2)+Ue(i,&quot;0&quot;,2)}function ar(t,e,r){Ve.lastIndex=0;var n=Ve.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r&lt;e;)t[r][0]=this(t[r][0]);return function(e){for(var r=0,n=t[r];!n[1](e);)n=t[++r];return n[0](e)}}t.locale=function(e){return{numberFormat:function(e){var r=e.decimal,n=e.thousands,i=e.grouping,a=e.currency,o=i&amp;&amp;n?function(t,e){for(var r=t.length,a=[],o=0,s=i[0],l=0;r&gt;0&amp;&amp;s&gt;0&amp;&amp;(l+s+1&gt;e&amp;&amp;(s=Math.max(1,e-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)&gt;e));)s=i[o=(o+1)%i.length];return a.reverse().join(n)}:z;return function(e){var n=Le.exec(e),i=n[1]||&quot; &quot;,s=n[2]||&quot;&gt;&quot;,l=n[3]||&quot;-&quot;,c=n[4]||&quot;&quot;,u=n[5],f=+n[6],h=n[7],p=n[8],d=n[9],g=1,m=&quot;&quot;,v=&quot;&quot;,y=!1,x=!0;switch(p&amp;&amp;(p=+p.substring(1)),(u||&quot;0&quot;===i&amp;&amp;&quot;=&quot;===s)&amp;&amp;(u=i=&quot;0&quot;,s=&quot;=&quot;),d){case&quot;n&quot;:h=!0,d=&quot;g&quot;;break;case&quot;%&quot;:g=100,v=&quot;%&quot;,d=&quot;f&quot;;break;case&quot;p&quot;:g=100,v=&quot;%&quot;,d=&quot;r&quot;;break;case&quot;b&quot;:case&quot;o&quot;:case&quot;x&quot;:case&quot;X&quot;:&quot;#&quot;===c&amp;&amp;(m=&quot;0&quot;+d.toLowerCase());case&quot;c&quot;:x=!1;case&quot;d&quot;:y=!0,p=0;break;case&quot;s&quot;:g=-1,d=&quot;r&quot;}&quot;$&quot;===c&amp;&amp;(m=a[0],v=a[1]),&quot;r&quot;!=d||p||(d=&quot;g&quot;),null!=p&amp;&amp;(&quot;g&quot;==d?p=Math.max(1,Math.min(21,p)):&quot;e&quot;!=d&amp;&amp;&quot;f&quot;!=d||(p=Math.max(0,Math.min(20,p)))),d=ze.get(d)||Pe;var b=u&amp;&amp;h;return function(e){var n=v;if(y&amp;&amp;e%1)return&quot;&quot;;var a=e&lt;0||0===e&amp;&amp;1/e&lt;0?(e=-e,&quot;-&quot;):&quot;-&quot;===l?&quot;&quot;:l;if(g&lt;0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+v}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(&quot;.&quot;);if(k&lt;0){var M=x?e.lastIndexOf(&quot;e&quot;):-1;M&lt;0?(_=e,w=&quot;&quot;):(_=e.substring(0,M),w=e.substring(M))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&amp;&amp;h&amp;&amp;(_=o(_,1/0));var A=m.length+_.length+w.length+(b?0:a.length),T=A&lt;f?new Array(A=f-A+1).join(i):&quot;&quot;;return b&amp;&amp;(_=o(T+_,T.length?f-w.length:1/0)),a+=m,e=_+w,(&quot;&lt;&quot;===s?a+e+T:&quot;&gt;&quot;===s?T+a+e:&quot;^&quot;===s?T.substring(0,A&gt;&gt;=1)+a+e+T.substring(A):a+(b?e:T+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,i=e.time,a=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,i,a,o=[],s=-1,l=0;++s&lt;e;)37===t.charCodeAt(s)&amp;&amp;(o.push(t.slice(l,s)),null!=(i=Ne[n=t.charAt(++s)])&amp;&amp;(n=t.charAt(++s)),(a=_[n])&amp;&amp;(n=a(r,null==i?&quot;e&quot;===n?&quot; &quot;:&quot;0&quot;:i)),o.push(n),l=s+1);return o.push(t.slice(l,s)),o.join(&quot;&quot;)}return r.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(r,t,e,0)!=e.length)return null;&quot;p&quot;in r&amp;&amp;(r.H=r.H%12+12*r.p);var n=null!=r.Z&amp;&amp;Ie!==De,i=new(n?De:Ie);return&quot;j&quot;in r?i.setFullYear(r.y,0,r.j):&quot;W&quot;in r||&quot;U&quot;in r?(&quot;w&quot;in r||(r.w=&quot;W&quot;in r?1:0),i.setFullYear(r.y,0,1),i.setFullYear(r.y,0,&quot;W&quot;in r?(r.w+6)%7+7*r.W-(i.getDay()+5)%7:r.w+7*r.U-(i.getDay()+6)%7)):i.setFullYear(r.y,r.m,r.d),i.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),n?i._:i},r.toString=function(){return t},r}function f(t,e,r,n){for(var i,a,o,s=0,l=e.length,c=r.length;s&lt;l;){if(n&gt;=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=w[o in Ne?e.charAt(s++):o])||(n=a(t,r,n))&lt;0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(Ie=De);return r._=t,e(r)}finally{Ie=Date}}return r.parse=function(t){try{Ie=De;var r=e.parse(t);return r&amp;&amp;r._}finally{Ie=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var h=t.map(),p=qe(o),d=He(o),g=qe(s),m=He(s),v=qe(l),y=He(l),x=qe(c),b=He(c);a.forEach(function(t,e){h.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ue(t.getDate(),e,2)},e:function(t,e){return Ue(t.getDate(),e,2)},H:function(t,e){return Ue(t.getHours(),e,2)},I:function(t,e){return Ue(t.getHours()%12||12,e,2)},j:function(t,e){return Ue(1+Oe.dayOfYear(t),e,3)},L:function(t,e){return Ue(t.getMilliseconds(),e,3)},m:function(t,e){return Ue(t.getMonth()+1,e,2)},M:function(t,e){return Ue(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()&gt;=12)]},S:function(t,e){return Ue(t.getSeconds(),e,2)},U:function(t,e){return Ue(Oe.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ue(Oe.mondayOfYear(t),e,2)},x:u(n),X:u(i),y:function(t,e){return Ue(t.getFullYear()%100,e,2)},Y:function(t,e){return Ue(t.getFullYear()%1e4,e,4)},Z:ir,&quot;%&quot;:function(){return&quot;%&quot;}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){v.lastIndex=0;var n=v.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return f(t,_.c.toString(),e,r)},d:Ke,e:Ke,H:tr,I:tr,j:Qe,L:nr,m:Je,M:er,p:function(t,e,r){var n=h.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:We,w:Ge,W:Ye,x:function(t,e,r){return f(t,_.x.toString(),e,r)},X:function(t,e,r){return f(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:$e,&quot;%&quot;:ar};return u}(e)}};var sr=t.locale({decimal:&quot;.&quot;,thousands:&quot;,&quot;,grouping:[3],currency:[&quot;$&quot;,&quot;&quot;],dateTime:&quot;%a %b %e %X %Y&quot;,date:&quot;%m/%d/%Y&quot;,time:&quot;%H:%M:%S&quot;,periods:[&quot;AM&quot;,&quot;PM&quot;],days:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],shortDays:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],months:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],shortMonths:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function fr(t,e){t&amp;&amp;pr.hasOwnProperty(t.type)&amp;&amp;pr[t.type](t,e)}t.geo.stream=function(t,e){t&amp;&amp;hr.hasOwnProperty(t.type)?hr[t.type](t,e):fr(t,e)};var hr={Feature:function(t,e){fr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n&lt;i;)fr(r[n].geometry,e)}},pr={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n&lt;i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){dr(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n&lt;i;)dr(r[n],e,0)},Polygon:function(t,e){gr(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n&lt;i;)gr(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n&lt;i;)fr(r[n],e)}};function dr(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i&lt;a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function gr(t,e){var r=-1,n=t.length;for(e.polygonStart();++r&lt;n;)dr(t[r],e,1);e.polygonEnd()}t.geo.area=function(e){return mr=0,t.geo.stream(e,Cr),mr};var mr,vr,yr,xr,br,_r,wr,kr,Mr,Ar,Tr,Sr,Er=new lr,Cr={sphere:function(){mr+=4*At},point:D,lineStart:D,lineEnd:D,polygonStart:function(){Er.reset(),Cr.lineStart=Lr},polygonEnd:function(){var t=2*Er;mr+=t&lt;0?4*At+t:t,Cr.lineStart=Cr.lineEnd=Cr.point=D}};function Lr(){var t,e,r,n,i;function a(t,e){e=e*Ct/2+At/4;var a=(t*=Ct)-r,o=a&gt;=0?1:-1,s=o*a,l=Math.cos(e),c=Math.sin(e),u=i*c,f=n*l+u*Math.cos(s),h=u*o*Math.sin(s);Er.add(Math.atan2(h,f)),r=t,n=l,i=c}Cr.point=function(o,s){Cr.point=a,r=(t=o)*Ct,n=Math.cos(s=(e=s)*Ct/2+At/4),i=Math.sin(s)},Cr.lineEnd=function(){a(t,e)}}function zr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Pr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Or(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ir(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Br(t){return[Math.atan2(t[1],t[0]),It(t[2])]}function Fr(t,e){return y(t[0]-e[0])&lt;kt&amp;&amp;y(t[1]-e[1])&lt;kt}t.geo.bounds=function(){var e,r,n,i,a,o,s,l,c,u,f,h={point:p,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=x,h.lineEnd=b,c=0,Cr.polygonStart()},polygonEnd:function(){Cr.polygonEnd(),h.point=p,h.lineStart=g,h.lineEnd=m,Er&lt;0?(e=-(n=180),r=-(i=90)):c&gt;kt?i=90:c&lt;-kt&amp;&amp;(r=-90),f[0]=e,f[1]=n}};function p(t,a){u.push(f=[e=t,n=t]),a&lt;r&amp;&amp;(r=a),a&gt;i&amp;&amp;(i=a)}function d(t,o){var s=zr([t*Ct,o*Ct]);if(l){var c=Or(l,s),u=Or([c[1],-c[0],0],c);Rr(u),u=Br(u);var f=t-a,h=f&gt;0?1:-1,d=u[0]*Lt*h,g=y(f)&gt;180;if(g^(h*a&lt;d&amp;&amp;d&lt;h*t))(m=u[1]*Lt)&gt;i&amp;&amp;(i=m);else if(g^(h*a&lt;(d=(d+360)%360-180)&amp;&amp;d&lt;h*t)){var m;(m=-u[1]*Lt)&lt;r&amp;&amp;(r=m)}else o&lt;r&amp;&amp;(r=o),o&gt;i&amp;&amp;(i=o);g?t&lt;a?_(e,t)&gt;_(e,n)&amp;&amp;(n=t):_(t,n)&gt;_(e,n)&amp;&amp;(e=t):n&gt;=e?(t&lt;e&amp;&amp;(e=t),t&gt;n&amp;&amp;(n=t)):t&gt;a?_(e,t)&gt;_(e,n)&amp;&amp;(n=t):_(t,n)&gt;_(e,n)&amp;&amp;(e=t)}else p(t,o);l=s,a=t}function g(){h.point=d}function m(){f[0]=e,f[1]=n,h.point=p,l=null}function v(t,e){if(l){var r=t-a;c+=y(r)&gt;180?r+(r&gt;0?360:-360):r}else o=t,s=e;Cr.point(t,e),d(t,e)}function x(){Cr.lineStart()}function b(){v(o,s),Cr.lineEnd(),y(c)&gt;kt&amp;&amp;(e=-(n=180)),f[0]=e,f[1]=n,l=null}function _(t,e){return(e-=t)&lt;0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]&lt;=e[1]?e[0]&lt;=t&amp;&amp;t&lt;=e[1]:t&lt;e[0]||e[1]&lt;t}return function(a){if(i=n=-(e=r=1/0),u=[],t.geo.stream(a,h),c=u.length){u.sort(w);for(var o=1,s=[g=u[0]];o&lt;c;++o)k((p=u[o])[0],g)||k(p[1],g)?(_(g[0],p[1])&gt;_(g[0],g[1])&amp;&amp;(g[1]=p[1]),_(p[0],g[1])&gt;_(g[0],g[1])&amp;&amp;(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o&lt;=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))&gt;d&amp;&amp;(d=l,e=p[0],n=g[1])}return u=f=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,i]]}}(),t.geo.centroid=function(e){vr=yr=xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Tr,i=Sr,a=r*r+n*n+i*i;return a&lt;Mt&amp;&amp;(r=wr,n=kr,i=Mr,yr&lt;kt&amp;&amp;(r=xr,n=br,i=_r),(a=r*r+n*n+i*i)&lt;Mt)?[NaN,NaN]:[Math.atan2(n,r)*Lt,It(i/Math.sqrt(a))*Lt]};var Nr={sphere:D,point:jr,lineStart:Ur,lineEnd:qr,polygonStart:function(){Nr.lineStart=Hr},polygonEnd:function(){Nr.lineStart=Ur}};function jr(t,e){t*=Ct;var r=Math.cos(e*=Ct);Vr(r*Math.cos(t),r*Math.sin(t),Math.sin(e))}function Vr(t,e,r){xr+=(t-xr)/++vr,br+=(e-br)/vr,_r+=(r-_r)/vr}function Ur(){var t,e,r;function n(n,i){n*=Ct;var a=Math.cos(i*=Ct),o=a*Math.cos(n),s=a*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*s)*c+(c=r*o-t*l)*c+(c=t*s-e*o)*c),t*o+e*s+r*l);yr+=c,wr+=c*(t+(t=o)),kr+=c*(e+(e=s)),Mr+=c*(r+(r=l)),Vr(t,e,r)}Nr.point=function(i,a){i*=Ct;var o=Math.cos(a*=Ct);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(a),Nr.point=n,Vr(t,e,r)}}function qr(){Nr.point=jr}function Hr(){var t,e,r,n,i;function a(t,e){t*=Ct;var a=Math.cos(e*=Ct),o=a*Math.cos(t),s=a*Math.sin(t),l=Math.sin(e),c=n*l-i*s,u=i*o-r*l,f=r*s-n*o,h=Math.sqrt(c*c+u*u+f*f),p=r*o+n*s+i*l,d=h&amp;&amp;-Ot(p)/h,g=Math.atan2(h,p);Ar+=d*c,Tr+=d*u,Sr+=d*f,yr+=g,wr+=g*(r+(r=o)),kr+=g*(n+(n=s)),Mr+=g*(i+(i=l)),Vr(r,n,i)}Nr.point=function(o,s){t=o,e=s,Nr.point=a,o*=Ct;var l=Math.cos(s*=Ct);r=l*Math.cos(o),n=l*Math.sin(o),i=Math.sin(s),Vr(r,n,i)},Nr.lineEnd=function(){a(t,e),Nr.lineEnd=qr,Nr.point=jr}}function Gr(t,e){function r(r,n){return r=t(r,n),e(r[0],r[1])}return t.invert&amp;&amp;e.invert&amp;&amp;(r.invert=function(r,n){return(r=e.invert(r,n))&amp;&amp;t.invert(r[0],r[1])}),r}function Wr(){return!0}function Yr(t,e,r,n,i){var a=[],o=[];if(t.forEach(function(t){if(!((e=t.length-1)&lt;=0)){var e,r=t[0],n=t[e];if(Fr(r,n)){i.lineStart();for(var s=0;s&lt;e;++s)i.point((r=t[s])[0],r[1]);i.lineEnd()}else{var l=new Zr(r,t,null,!0),c=new Zr(r,null,l,!1);l.o=c,a.push(l),o.push(c),l=new Zr(n,t,null,!1),c=new Zr(n,null,l,!0),l.o=c,a.push(l),o.push(c)}}}),o.sort(e),Xr(a),Xr(o),a.length){for(var s=0,l=r,c=o.length;s&lt;c;++s)o[s].e=l=!l;for(var u,f,h=a[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(s=0,c=u.length;s&lt;c;++s)i.point((f=u[s])[0],f[1]);else n(p.x,p.n.x,1,i);p=p.n}else{if(d)for(s=(u=p.p.z).length-1;s&gt;=0;--s)i.point((f=u[s])[0],f[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n&lt;e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function Zr(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function $r(e,r,n,i){return function(a,o){var s,l=r(o),c=a.invert(i[0],i[1]),u={point:f,lineStart:p,lineEnd:d,polygonStart:function(){u.point=b,u.lineStart=_,u.lineEnd=w,s=[],g=[]},polygonEnd:function(){u.point=f,u.lineStart=p,u.lineEnd=d,s=t.merge(s);var e=function(t,e){var r=t[0],n=t[1],i=[Math.sin(r),-Math.cos(r),0],a=0,o=0;Er.reset();for(var s=0,l=e.length;s&lt;l;++s){var c=e[s],u=c.length;if(u)for(var f=c[0],h=f[0],p=f[1]/2+At/4,d=Math.sin(p),g=Math.cos(p),m=1;;){m===u&amp;&amp;(m=0);var v=(t=c[m])[0],y=t[1]/2+At/4,x=Math.sin(y),b=Math.cos(y),_=v-h,w=_&gt;=0?1:-1,k=w*_,M=k&gt;At,A=d*x;if(Er.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),a+=M?_+w*Tt:_,M^h&gt;=r^v&gt;=r){var T=Or(zr(f),zr(t));Rr(T);var S=Or(i,T);Rr(S);var E=(M^_&gt;=0?-1:1)*It(S[2]);(n&gt;E||n===E&amp;&amp;(T[0]||T[1]))&amp;&amp;(o+=M^_&gt;=0?1:-1)}if(!m++)break;h=v,d=x,g=b,f=t}}return(a&lt;-kt||a&lt;kt&amp;&amp;Er&lt;-kt)^1&amp;o}(c,g);s.length?(x||(o.polygonStart(),x=!0),Yr(s,Qr,e,n,o)):e&amp;&amp;(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&amp;&amp;(o.polygonEnd(),x=!1),s=g=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function f(t,r){var n=a(t,r);e(t=n[0],r=n[1])&amp;&amp;o.point(t,r)}function h(t,e){var r=a(t,e);l.point(r[0],r[1])}function p(){u.point=h,l.lineStart()}function d(){u.point=f,l.lineEnd()}var g,m,v=Kr(),y=r(v),x=!1;function b(t,e){m.push([t,e]);var r=a(t,e);y.point(r[0],r[1])}function _(){y.lineStart(),m=[]}function w(){b(m[0][0],m[0][1]),y.lineEnd();var t,e=y.clean(),r=v.buffer(),n=r.length;if(m.pop(),g.push(m),m=null,n)if(1&amp;e){var i,a=-1;if((n=(t=r[0]).length-1)&gt;0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a&lt;n;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else n&gt;1&amp;&amp;2&amp;e&amp;&amp;r.push(r.pop().concat(r.shift())),s.push(r.filter(Jr))}return u}}function Jr(t){return t.length&gt;1}function Kr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length&gt;1&amp;&amp;e.push(e.pop().concat(e.shift()))}}}function Qr(t,e){return((t=t.x)[0]&lt;0?t[1]-Et-kt:Et-t[1])-((e=e.x)[0]&lt;0?e[1]-Et-kt:Et-e[1])}var tn=$r(Wr,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a&gt;0?At:-At,l=y(a-r);y(l-At)&lt;kt?(t.point(r,n=(n+o)/2&gt;0?Et:-Et),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&amp;&amp;l&gt;=At&amp;&amp;(y(r-i)&lt;kt&amp;&amp;(r-=i*kt),y(a-s)&lt;kt&amp;&amp;(a-=s*kt),n=function(t,e,r,n){var i,a,o=Math.sin(t-r);return y(o)&gt;kt?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Et,n.point(-At,i),n.point(0,i),n.point(At,i),n.point(At,0),n.point(At,-i),n.point(0,-i),n.point(-At,-i),n.point(-At,0),n.point(-At,i);else if(y(t[0]-e[0])&gt;kt){var a=t[0]&lt;e[0]?At:-At;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])},[-At,-At/2]);function en(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,p=s.y-c;if(a=t-l,h||!(a&gt;0)){if(a/=h,h&lt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}else if(h&gt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}if(a=r-l,h||!(a&lt;0)){if(a/=h,h&lt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}else if(h&gt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}if(a=e-c,p||!(a&gt;0)){if(a/=p,p&lt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}else if(p&gt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}if(a=n-c,p||!(a&lt;0)){if(a/=p,p&lt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}else if(p&gt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}return u&gt;0&amp;&amp;(i.a={x:l+u*h,y:c+u*p}),f&lt;1&amp;&amp;(i.b={x:l+f*h,y:c+f*p}),i}}}}}}var rn=1e9;function nn(e,r,n,i){return function(l){var c,u,f,h,p,d,g,m,v,y,x,b=l,_=Kr(),w=en(e,r,n,i),k={point:T,lineStart:function(){k.point=S,u&amp;&amp;u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){c&amp;&amp;(S(h,p),d&amp;&amp;v&amp;&amp;_.rejoin(),c.push(_.buffer()));k.point=T,v&amp;&amp;l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],i=0;i&lt;r;++i)for(var a,o=1,s=u[i],l=s.length,c=s[0];o&lt;l;++o)a=s[o],c[1]&lt;=n?a[1]&gt;n&amp;&amp;Pt(c,a,t)&gt;0&amp;&amp;++e:a[1]&lt;=n&amp;&amp;Pt(c,a,t)&lt;0&amp;&amp;--e,c=a;return 0!==e}([e,i]),n=x&amp;&amp;r,a=c.length;(n||a)&amp;&amp;(l.polygonStart(),n&amp;&amp;(l.lineStart(),M(null,null,1,l),l.lineEnd()),a&amp;&amp;Yr(c,o,r,M,l),l.polygonEnd()),c=u=f=null}};function M(t,o,l,c){var u=0,f=0;if(null==t||(u=a(t,l))!==(f=a(o,l))||s(t,o)&lt;0^l&gt;0)do{c.point(0===u||3===u?e:n,u&gt;1?i:r)}while((u=(u+l+4)%4)!==f);else c.point(o[0],o[1])}function A(t,a){return e&lt;=t&amp;&amp;t&lt;=n&amp;&amp;r&lt;=a&amp;&amp;a&lt;=i}function T(t,e){A(t,e)&amp;&amp;l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&amp;&amp;f.push([t,e]),y)h=t,p=e,d=r,y=!1,r&amp;&amp;(l.lineStart(),l.point(t,e));else if(r&amp;&amp;v)l.point(t,e);else{var n={a:{x:g,y:m},b:{x:t,y:e}};w(n)?(v||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&amp;&amp;(l.lineStart(),l.point(t,e),x=!1)}g=t,m=e,v=r}return k};function a(t,i){return y(t[0]-e)&lt;kt?i&gt;0?0:3:y(t[0]-n)&lt;kt?i&gt;0?2:1:y(t[1]-r)&lt;kt?i&gt;0?1:0:i&gt;0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=Cn(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},i}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,i=1+r*(2*n-r),a=Math.sqrt(i)/n;function o(t,e){var r=Math.sqrt(i-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),a-r*Math.cos(t)]}return o.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/n,It((i-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&amp;&amp;(i.valid=!1),(i=a(t)).valid=!0,i},extent:function(s){return arguments.length?(a=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&amp;&amp;(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,i,a=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}return c.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i&gt;=.12&amp;&amp;i&lt;.234&amp;&amp;n&gt;=-.425&amp;&amp;n&lt;-.214?o:i&gt;=.166&amp;&amp;i&lt;.234&amp;&amp;n&gt;=-.214&amp;&amp;n&lt;-.115?s:a).invert(t)},c.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(a.precision(t),o.precision(t),s.precision(t),c):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),o.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),u=+t[0],f=+t[1];return r=a.translate(t).clipExtent([[u-.455*e,f-.238*e],[u+.455*e,f+.238*e]]).stream(l).point,n=o.translate([u-.307*e,f+.201*e]).clipExtent([[u-.425*e+kt,f+.12*e+kt],[u-.214*e-kt,f+.234*e-kt]]).stream(l).point,i=s.translate([u-.205*e,f+.212*e]).clipExtent([[u-.214*e+kt,f+.166*e+kt],[u-.115*e-kt,f+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,fn,hn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function i(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(a,o){pn.point=i,t=r=a,e=n=o},pn.lineEnd=function(){i(t,e)}}var gn={point:function(t,e){t&lt;cn&amp;&amp;(cn=t);t&gt;fn&amp;&amp;(fn=t);e&lt;un&amp;&amp;(un=e);e&gt;hn&amp;&amp;(hn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function mn(){var t=vn(4.5),e=[],r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=vn(e),r},result:function(){if(e.length){var t=e.join(&quot;&quot;);return e=[],t}}};function n(r,n){e.push(&quot;M&quot;,r,&quot;,&quot;,n,t)}function i(t,n){e.push(&quot;M&quot;,t,&quot;,&quot;,n),r.point=a}function a(t,r){e.push(&quot;L&quot;,t,&quot;,&quot;,r)}function o(){r.point=n}function s(){e.push(&quot;Z&quot;)}return r}function vn(t){return&quot;m0,&quot;+t+&quot;a&quot;+t+&quot;,&quot;+t+&quot; 0 1,1 0,&quot;+-2*t+&quot;a&quot;+t+&quot;,&quot;+t+&quot; 0 1,1 0,&quot;+2*t+&quot;z&quot;}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var i=r-t,a=n-e,o=Math.sqrt(i*i+a*a);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Mr+=o,bn(t=r,e=n)}xn.point=function(n,i){xn.point=r,bn(t=n,e=i)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function i(t,e){var i=t-r,a=e-n,o=Math.sqrt(i*i+a*a);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Mr+=o,Ar+=(o=n*t-r*e)*(r+t),Tr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(a,o){xn.point=i,bn(t=r=a,e=n=o)},xn.lineEnd=function(){i(t,e)}}function Mn(t){var e=4.5,r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Tt)}function i(e,n){t.moveTo(e,n),r.point=a}function a(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Ct),n=16;function i(e){return(n?function(e){var r,i,o,s,l,c,u,f,h,p,d,g,m={point:v,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),m.lineStart=_},polygonEnd:function(){e.polygonEnd(),m.lineStart=y}};function v(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){f=NaN,m.point=x,e.lineStart()}function x(r,i){var o=zr([r,i]),s=t(r,i);a(f,h,u,p,d,g,f=s[0],h=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(f,h)}function b(){m.point=v,e.lineEnd()}function _(){y(),m.point=w,m.lineEnd=k}function w(t,e){x(r=t,e),i=f,o=h,s=p,l=d,c=g,m.point=x}function k(){a(f,h,u,p,d,g,i,o,r,s,l,c,n,e),m.lineEnd=b,b()}return m}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function a(n,i,o,s,l,c,u,f,h,p,d,g,m,v){var x=u-n,b=f-i,_=x*x+b*b;if(_&gt;4*e&amp;&amp;m--){var w=s+p,k=l+d,M=c+g,A=Math.sqrt(w*w+k*k+M*M),T=Math.asin(M/=A),S=y(y(M)-1)&lt;kt||y(o-h)&lt;kt?(o+h)/2:Math.atan2(k,w),E=t(S,T),C=E[0],L=E[1],z=C-n,P=L-i,O=b*z-x*P;(O*O/_&gt;e||y((x*z+b*P)/_-.5)&gt;.3||s*p+l*d+c*g&lt;r)&amp;&amp;(a(n,i,o,s,l,c,C,L,S,w/=A,k/=A,M,m,v),v.point(C,L),a(C,L,S,w,k,M,u,f,h,p,d,g,m,v))}}return i.precision=function(t){return arguments.length?(n=(e=t*t)&gt;0&amp;&amp;16,i):Math.sqrt(e)},i}function Tn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function En(t){return Cn(function(){return t})()}function Cn(e){var r,n,i,a,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+a,o-t[1]*c]}),c=150,u=480,f=250,h=0,p=0,d=0,g=0,m=0,v=tn,x=z,b=null,_=null;function w(t){return[(t=i(t[0]*Ct,t[1]*Ct))[0]*c+a,o-t[1]*c]}function k(t){return(t=i.invert((t[0]-a)/c,(o-t[1])/c))&amp;&amp;[t[0]*Lt,t[1]*Lt]}function M(){i=Gr(n=On(d,g,m),r);var t=r(h,p);return a=u-t[0]*c,o=f+t[1]*c,A()}function A(){return s&amp;&amp;(s.valid=!1,s=null),w}return w.stream=function(t){return s&amp;&amp;(s.valid=!1),(s=Ln(v(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(v=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e&gt;0,n=y(e)&gt;kt;return $r(i,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var p,d=[f,h],g=i(f,h),m=r?g?0:o(f,h):g?o(f+(f&lt;0?At:-At),h):0;if(!e&amp;&amp;(c=l=g)&amp;&amp;t.lineStart(),g!==l&amp;&amp;(p=a(e,d),(Fr(e,p)||Fr(d,p))&amp;&amp;(d[0]+=kt,d[1]+=kt,g=i(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&amp;&amp;e&amp;&amp;r^g){var v;m&amp;s||!(v=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||e&amp;&amp;Fr(e,d)||t.point(d[0],d[1]),e=d,l=g,s=m},lineEnd:function(){l&amp;&amp;t.lineEnd(),e=null},clean:function(){return u|(c&amp;&amp;l)&lt;&lt;1}}},Bn(t,6*Ct),r?[0,-t]:[-At,t-At]);function i(t,r){return Math.cos(t)*Math.cos(r)&gt;e}function a(t,r,n){var i=[1,0,0],a=Or(zr(t),zr(r)),o=Pr(a,a),s=a[0],l=o-s*s;if(!l)return!n&amp;&amp;t;var c=e*o/l,u=-e*s/l,f=Or(i,a),h=Dr(i,c);Ir(h,Dr(a,u));var p=f,d=Pr(h,p),g=Pr(p,p),m=d*d-g*(Pr(h,h)-1);if(!(m&lt;0)){var v=Math.sqrt(m),x=Dr(p,(-d-v)/g);if(Ir(x,h),x=Br(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],M=r[1];w&lt;_&amp;&amp;(b=_,_=w,w=b);var A=w-_,T=y(A-At)&lt;kt;if(!T&amp;&amp;M&lt;k&amp;&amp;(b=k,k=M,M=b),T||A&lt;kt?T?k+M&gt;0^x[1]&lt;(y(x[0]-_)&lt;kt?k:M):k&lt;=x[1]&amp;&amp;x[1]&lt;=M:A&gt;At^(_&lt;=x[0]&amp;&amp;x[0]&lt;=w)){var S=Dr(p,(-d+v)/g);return Ir(S,h),[x,Br(S)]}}}function o(e,n){var i=r?t:At-t,a=0;return e&lt;-i?a|=1:e&gt;i&amp;&amp;(a|=2),n&lt;-i?a|=4:n&gt;i&amp;&amp;(a|=8),a}}((b=+t)*Ct),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):z,A()):_},w.scale=function(t){return arguments.length?(c=+t,M()):c},w.translate=function(t){return arguments.length?(u=+t[0],f=+t[1],M()):[u,f]},w.center=function(t){return arguments.length?(h=t[0]%360*Ct,p=t[1]%360*Ct,M()):[h*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Ct,g=t[1]%360*Ct,m=t.length&gt;2?t[2]%360*Ct:0,M()):[d*Lt,g*Lt,m*Lt]},t.rebind(w,l,&quot;precision&quot;),function(){return r=e.apply(this,arguments),w.invert=r.invert&amp;&amp;k,M()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Ct,r*Ct)})}function zn(t,e){return[t,e]}function Pn(t,e){return[t&gt;At?t-Tt:t&lt;-At?t+Tt:t,e]}function On(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):Pn}function In(t){return function(e,r){return[(e+=t)&gt;At?e-Tt:e&lt;-At?e+Tt:e,r]}}function Dn(t){var e=In(t);return e.invert=In(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),i=Math.cos(e),a=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*i-u*a,s*r-c*n),It(u*i+l*a)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*a;return[Math.atan2(l*i+c*a,s*r+u*n),It(u*r-s*n)]},o}function Bn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Fn(r,i),a=Fn(r,a),(o&gt;0?i&lt;a:i&gt;a)&amp;&amp;(i+=o*Tt)):(i=t+o*Tt,a=t-.5*l);for(var c,u=i;o&gt;0?u&gt;a:u&lt;a;u-=l)s.point((c=Br([r,-n*Math.cos(u),-n*Math.sin(u)]))[0],c[1])}}function Fn(t,e){var r=zr(e);r[0]-=t,Rr(r);var n=Ot(-r[1]);return((-r[2]&lt;0?-n:n)+2*Math.PI-kt)%(2*Math.PI)}function Nn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[t,e]})}}function jn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[e,t]})}}function Vn(t){return t.source}function Un(t){return t.target}t.geo.path=function(){var e,r,n,i,a,o=4.5;function s(e){return e&amp;&amp;(&quot;function&quot;==typeof o&amp;&amp;i.pointRadius(+o.apply(this,arguments)),a&amp;&amp;a.valid||(a=n(i)),t.geo.stream(e,a)),i.result()}function l(){return a=null,s}return s.area=function(e){return sn=0,t.geo.stream(e,n(pn)),sn},s.centroid=function(e){return xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,n(xn)),Sr?[Ar/Sr,Tr/Sr]:Mr?[wr/Mr,kr/Mr]:_r?[xr/_r,br/_r]:[NaN,NaN]},s.bounds=function(e){return fn=hn=-(cn=un=1/0),t.geo.stream(e,n(gn)),[[cn,un],[fn,hn]]},s.projection=function(t){return arguments.length?(n=(e=t)?t.stream||(r=t,i=An(function(t,e){return r([t*Lt,e*Lt])}),function(t){return Ln(i(t))}):z,l()):e;var r,i},s.context=function(t){return arguments.length?(i=null==(r=t)?new mn:new Mn(t),&quot;function&quot;!=typeof o&amp;&amp;i.pointRadius(o),l()):r},s.pointRadius=function(t){return arguments.length?(o=&quot;function&quot;==typeof t?t:(i.pointRadius(+t),+t),s):o},s.projection(t.geo.albersUsa()).context(null)},t.geo.transform=function(t){return{stream:function(e){var r=new Tn(e);for(var n in t)r[n]=t[n];return r}}},Tn.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},t.geo.projection=En,t.geo.projectionMutator=Cn,(t.geo.equirectangular=function(){return En(zn)}).raw=zn.invert=zn,t.geo.rotation=function(t){function e(e){return(e=t(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e}return t=On(t[0]%360*Ct,t[1]*Ct,t.length&gt;2?t[2]*Ct:0),e.invert=function(e){return(e=t.invert(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e},e},Pn.invert=zn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function i(){var t=&quot;function&quot;==typeof r?r.apply(this,arguments):r,n=On(-t[0]*Ct,-t[1]*Ct,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:&quot;Polygon&quot;,coordinates:[i]}}return i.origin=function(t){return arguments.length?(r=t,i):r},i.angle=function(r){return arguments.length?(e=Bn((t=+r)*Ct,n*Ct),i):t},i.precision=function(r){return arguments.length?(e=Bn(t*Ct,(n=+r)*Ct),i):n},i.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ct,i=t[1]*Ct,a=e[1]*Ct,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((r=f*o)*r+(r=c*u-l*f*s)*r),l*u+c*f*s)},t.geo.graticule=function(){var e,r,n,i,a,o,s,l,c,u,f,h,p=10,d=p,g=90,m=360,v=2.5;function x(){return{type:&quot;MultiLineString&quot;,coordinates:b()}}function b(){return t.range(Math.ceil(i/g)*g,n,g).map(f).concat(t.range(Math.ceil(l/m)*m,s,m).map(h)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)&gt;kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,a,d).filter(function(t){return y(t%m)&gt;kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:&quot;LineString&quot;,coordinates:t}})},x.outline=function(){return{type:&quot;Polygon&quot;,coordinates:[f(i).concat(h(s).slice(1),f(n).reverse().slice(1),h(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i&gt;n&amp;&amp;(t=i,i=n,n=t),l&gt;s&amp;&amp;(t=l,l=s,s=t),x.precision(v)):[[i,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r&gt;e&amp;&amp;(t=r,r=e,e=t),o&gt;a&amp;&amp;(t=o,o=a,a=t),x.precision(v)):[[r,o],[e,a]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],m=+t[1],x):[g,m]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(v=+t,c=Nn(o,a,90),u=jn(r,e,v),f=Nn(l,s,90),h=jn(i,n,v),x):v},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Vn,i=Un;function a(){return{type:&quot;LineString&quot;,coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}return a.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(t){return arguments.length?(n=t,e=&quot;function&quot;==typeof t?null:t,a):n},a.target=function(t){return arguments.length?(i=t,r=&quot;function&quot;==typeof t?null:t,a):i},a.precision=function(){return arguments.length?a:0},a},t.geo.interpolate=function(t,e){return r=t[0]*Ct,n=t[1]*Ct,i=e[0]*Ct,a=e[1]*Ct,o=Math.cos(n),s=Math.sin(n),l=Math.cos(a),c=Math.sin(a),u=o*Math.cos(r),f=o*Math.sin(r),h=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Rt(a-n)+o*l*Rt(i-r))),g=1/Math.sin(d),(m=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*h,i=r*f+e*p,a=r*s+e*c;return[Math.atan2(i,n)*Lt,Math.atan2(a,Math.sqrt(n*n+i*i))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,m;var r,n,i,a,o,s,l,c,u,f,h,p,d,g,m},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,i){var a=Math.sin(i*=Ct),o=Math.cos(i),s=y((n*=Ct)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*a-e*o*l)*s),e*a+r*o*l),t=n,e=a,r=o}qn.point=function(i,a){t=i*Ct,e=Math.sin(a*=Ct),r=Math.cos(a),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&amp;&amp;r*a/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return En(Gn)}).raw=Gn;var Wn=Hn(function(t){var e=Math.acos(t);return e&amp;&amp;e/Math.sin(e)},z);function Yn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},i=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),a=r*Math.pow(n(t),i)/i;if(!i)return $n;function o(t,e){a&gt;0?e&lt;-Et+kt&amp;&amp;(e=-Et+kt):e&gt;Et-kt&amp;&amp;(e=Et-kt);var r=a/Math.pow(n(e),i);return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}return o.invert=function(t,e){var r=a-e,n=zt(i)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/i,2*Math.atan(Math.pow(a/n,1/i))-Et]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),i=r/n+t;if(y(n)&lt;kt)return zn;function a(t,e){var r=i-e;return[r*Math.sin(n*t),i-r*Math.cos(n*t)]}return a.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/n,i-zt(n)*Math.sqrt(t*t+r*r)]},a}(t.geo.azimuthalEquidistant=function(){return En(Wn)}).raw=Wn,(t.geo.conicConformal=function(){return an(Yn)}).raw=Yn,(t.geo.conicEquidistant=function(){return an(Xn)}).raw=Xn;var Zn=Hn(function(t){return 1/t},Math.atan);function $n(t,e){return[t,Math.log(Math.tan(At/4+e/2))]}function Jn(t){var e,r=En(t),n=r.scale,i=r.translate,a=r.clipExtent;return r.scale=function(){var t=n.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.translate=function(){var t=i.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.clipExtent=function(t){var o=a.apply(r,arguments);if(o===r){if(e=null==t){var s=At*n(),l=i();a([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&amp;&amp;(o=null);return o},r.clipExtent(null)}(t.geo.gnomonic=function(){return En(Zn)}).raw=Zn,$n.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Et]},(t.geo.mercator=function(){return Jn($n)}).raw=$n;var Kn=Hn(function(){return 1},Math.asin);(t.geo.orthographic=function(){return En(Kn)}).raw=Kn;var Qn=Hn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});function ti(t,e){return[Math.log(Math.tan(At/4+e/2)),-t]}function ei(t){return t[0]}function ri(t){return t[1]}function ni(t){for(var e=t.length,r=[0,1],n=2,i=2;i&lt;e;i++){for(;n&gt;1&amp;&amp;Pt(t[r[n-2]],t[r[n-1]],t[i])&lt;=0;)--n;r[n++]=i}return r.slice(0,n)}function ii(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return En(Qn)}).raw=Qn,ti.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Et]},(t.geo.transverseMercator=function(){var t=Jn(ti),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length&gt;2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ti,t.geom={},t.geom.hull=function(t){var e=ei,r=ri;if(arguments.length)return n(t);function n(t){if(t.length&lt;3)return[];var n,i=me(e),a=me(r),o=t.length,s=[],l=[];for(n=0;n&lt;o;n++)s.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(s.sort(ii),n=0;n&lt;o;n++)l.push([s[n][0],-s[n][1]]);var c=ni(s),u=ni(l),f=u[0]===c[0],h=u[u.length-1]===c[c.length-1],p=[];for(n=c.length-1;n&gt;=0;--n)p.push(t[s[c[n]][2]]);for(n=+f;n&lt;u.length-h;++n)p.push(t[s[u[n]][2]]);return p}return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n},t.geom.polygon=function(t){return U(t,ai),t};var ai=t.geom.polygon.prototype=[];function oi(t,e,r){return(r[0]-e[0])*(t[1]-e[1])&lt;(r[1]-e[1])*(t[0]-e[0])}function si(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],c=r[1],u=e[1]-l,f=n[1]-c,h=(s*(l-c)-f*(i-a))/(f*o-s*u);return[i+h*o,l+h*u]}function li(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}ai.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e&lt;r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},ai.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n&lt;i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},ai.clip=function(t){for(var e,r,n,i,a,o,s=li(t),l=-1,c=this.length-li(this),u=this[c-1];++l&lt;c;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r&lt;n;)oi(o=e[r],u,i)?(oi(a,u,i)||t.push(si(a,o,u,i)),t.push(o)):oi(a,u,i)&amp;&amp;t.push(si(a,o,u,i)),a=o;s&amp;&amp;t.push(t[0]),u=i}return t};var ci,ui,fi,hi,pi,di=[],gi=[];function mi(){Ii(this),this.edge=this.site=this.circle=null}function vi(t){var e=di.pop()||new mi;return e.site=t,e}function yi(t){Si(t),fi.remove(t),di.push(t),Ii(t)}function xi(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];yi(t);for(var l=a;l.circle&amp;&amp;y(r-l.circle.x)&lt;kt&amp;&amp;y(n-l.circle.cy)&lt;kt;)a=l.P,s.unshift(l),yi(l),l=a;s.unshift(l),Si(l);for(var c=o;c.circle&amp;&amp;y(r-c.circle.x)&lt;kt&amp;&amp;y(n-c.circle.cy)&lt;kt;)o=c.N,s.push(c),yi(c),c=o;s.push(c),Si(c);var u,f=s.length;for(u=1;u&lt;f;++u)c=s[u],l=s[u-1],zi(c.edge,l.site,c.site,i);l=s[0],(c=s[f-1]).edge=Li(l.site,c.site,null,i),Ti(l),Ti(c)}function bi(t){for(var e,r,n,i,a=t.x,o=t.y,s=fi._;s;)if((n=_i(s,o)-a)&gt;kt)s=s.L;else{if(!((i=a-wi(s,o))&gt;kt)){n&gt;-kt?(e=s.P,r=s):i&gt;-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=vi(t);if(fi.insert(e,l),e||r){if(e===r)return Si(e),r=vi(e.site),fi.insert(l,r),l.edge=r.edge=Li(e.site,l.site),Ti(e),void Ti(r);if(r){Si(e),Si(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,p=t.y-f,d=r.site,g=d.x-u,m=d.y-f,v=2*(h*m-p*g),y=h*h+p*p,x=g*g+m*m,b={x:(m*y-p*x)/v+u,y:(h*x-g*y)/v+f};zi(r.edge,c,d,b),l.edge=Li(c,t,null,b),r.edge=Li(t,d,null,b),Ti(e),Ti(r)}else l.edge=Li(e.site,l.site)}}function _i(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function wi(t,e){var r=t.N;if(r)return _i(r,e);var n=t.site;return n.y===e?n.x:1/0}function ki(t){this.site=t,this.edges=[]}function Mi(t,e){return e.angle-t.angle}function Ai(){Ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ti(t){var e=t.P,r=t.N;if(e&amp;&amp;r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(m=a.y-s)-c*u);if(!(f&gt;=-Mt)){var h=l*l+c*c,p=u*u+m*m,d=(m*h-c*p)/f,g=(l*p-u*h)/f,m=g+s,v=gi.pop()||new Ai;v.arc=t,v.site=i,v.x=d+o,v.y=m+Math.sqrt(d*d+g*g),v.cy=m,t.circle=v;for(var y=null,x=pi._;x;)if(v.y&lt;x.y||v.y===x.y&amp;&amp;v.x&lt;=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}pi.insert(y,v),y||(hi=v)}}}}function Si(t){var e=t.circle;e&amp;&amp;(e.P||(hi=e.N),pi.remove(e),gi.push(e),Ii(e),t.circle=null)}function Ei(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],c=e[1][1],u=t.l,f=t.r,h=u.x,p=u.y,d=f.x,g=f.y,m=(h+d)/2,v=(p+g)/2;if(g===p){if(m&lt;o||m&gt;=s)return;if(h&gt;d){if(a){if(a.y&gt;=c)return}else a={x:m,y:l};r={x:m,y:c}}else{if(a){if(a.y&lt;l)return}else a={x:m,y:c};r={x:m,y:l}}}else if(i=v-(n=(h-d)/(g-p))*m,n&lt;-1||n&gt;1)if(h&gt;d){if(a){if(a.y&gt;=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y&lt;l)return}else a={x:(c-i)/n,y:c};r={x:(l-i)/n,y:l}}else if(p&lt;g){if(a){if(a.x&gt;=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x&lt;o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}function Ci(t,e){this.l=t,this.r=e,this.a=this.b=null}function Li(t,e,r,n){var i=new Ci(t,e);return ci.push(i),r&amp;&amp;zi(i,t,e,r),n&amp;&amp;zi(i,e,t,n),ui[t.i].edges.push(new Pi(i,t,e)),ui[e.i].edges.push(new Pi(i,e,t)),i}function zi(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function Pi(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function Oi(){this._=null}function Ii(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Di(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&amp;&amp;(r.R.U=r),n.L=r}function Ri(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&amp;&amp;(r.L.U=r),n.R=r}function Bi(t){for(;t.L;)t=t.L;return t}function Fi(t,e){var r,n,i,a=t.sort(Ni).pop();for(ci=[],ui=new Array(t.length),fi=new Oi,pi=new Oi;;)if(i=hi,a&amp;&amp;(!i||a.y&lt;i.y||a.y===i.y&amp;&amp;a.x&lt;i.x))a.x===r&amp;&amp;a.y===n||(ui[a.i]=new ki(a),bi(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;xi(i.arc)}e&amp;&amp;(function(t){for(var e,r=ci,n=en(t[0][0],t[0][1],t[1][0],t[1][1]),i=r.length;i--;)(!Ei(e=r[i],t)||!n(e)||y(e.a.x-e.b.x)&lt;kt&amp;&amp;y(e.a.y-e.b.y)&lt;kt)&amp;&amp;(e.a=e.b=null,r.splice(i,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,c,u,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],g=ui,m=g.length;m--;)if((a=g[m])&amp;&amp;a.prepare())for(l=(s=a.edges).length,o=0;o&lt;l;)n=(u=s[o].end()).x,i=u.y,e=(c=s[++o%l].start()).x,r=c.y,(y(n-e)&gt;kt||y(i-r)&gt;kt)&amp;&amp;(s.splice(o,0,new Pi((v=a.site,x=u,b=y(n-f)&lt;kt&amp;&amp;d-i&gt;kt?{x:f,y:y(e-f)&lt;kt?r:d}:y(i-d)&lt;kt&amp;&amp;h-n&gt;kt?{x:y(r-d)&lt;kt?e:h,y:d}:y(n-h)&lt;kt&amp;&amp;i-p&gt;kt?{x:h,y:y(e-h)&lt;kt?r:p}:y(i-p)&lt;kt&amp;&amp;n-f&gt;kt?{x:y(r-p)&lt;kt?e:f,y:p}:null,_=void 0,_=new Ci(v,null),_.a=x,_.b=b,ci.push(_),_),a.site,null)),++l);var v,x,b,_}(e));var o={cells:ui,edges:ci};return fi=pi=ci=ui=null,o}function Ni(t,e){return e.y-t.y||e.x-t.x}ki.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&amp;&amp;t.a||e.splice(r,1);return e.sort(Mi),e.length},Pi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Oi.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&amp;&amp;(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Bi(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&amp;&amp;r.C;)r===(n=r.U).L?(i=n.R)&amp;&amp;i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&amp;&amp;(Di(this,r),r=(t=r).U),r.C=!1,n.C=!0,Ri(this,n)):(i=n.L)&amp;&amp;i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&amp;&amp;(Ri(this,r),r=(t=r).U),r.C=!1,n.C=!0,Di(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&amp;&amp;(t.N.P=t.P),t.P&amp;&amp;(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?Bi(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&amp;&amp;o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&amp;&amp;(t.U=i),!n)if(t&amp;&amp;t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&amp;&amp;(e.C=!1,i.C=!0,Di(this,i),e=i.R),e.L&amp;&amp;e.L.C||e.R&amp;&amp;e.R.C){e.R&amp;&amp;e.R.C||(e.L.C=!1,e.C=!0,Ri(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Di(this,i),t=this._;break}}else if((e=i.L).C&amp;&amp;(e.C=!1,i.C=!0,Ri(this,i),e=i.L),e.L&amp;&amp;e.L.C||e.R&amp;&amp;e.R.C){e.L&amp;&amp;e.L.C||(e.R.C=!1,e.C=!0,Di(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ri(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&amp;&amp;(t.C=!1)}}},t.geom.voronoi=function(t){var e=ei,r=ri,n=e,i=r,a=ji;if(t)return o(t);function o(t){var e=new Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return Fi(s(t),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):c.x&gt;=r&amp;&amp;c.x&lt;=i&amp;&amp;c.y&gt;=n&amp;&amp;c.y&lt;=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Fi(s(t)).edges.filter(function(t){return t.l&amp;&amp;t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Fi(s(t)).cells.forEach(function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(Mi),u=-1,f=c.length,h=c[f-1].edge,p=h.l===l?h.r:h.l;++u&lt;f;)h,i=p,p=(h=c[u].edge).l===l?h.r:h.l,n&lt;i.i&amp;&amp;n&lt;p.i&amp;&amp;(o=i,s=p,((a=l).x-s.x)*(o.y-a.y)-(a.x-o.x)*(s.y-a.y)&lt;0)&amp;&amp;e.push([t[n],t[i.i],t[p.i]])}),e},o.x=function(t){return arguments.length?(n=me(e=t),o):e},o.y=function(t){return arguments.length?(i=me(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?ji:t,o):a===ji?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&amp;&amp;[[0,0],t]):a===ji?null:a&amp;&amp;a[1]},o};var ji=[[-1e6,-1e6],[1e6,1e6]];function Vi(t){return t.x}function Ui(t){return t.y}function qi(e,r){e=t.rgb(e),r=t.rgb(r);var n=e.r,i=e.g,a=e.b,o=r.r-n,s=r.g-i,l=r.b-a;return function(t){return&quot;#&quot;+ce(Math.round(n+o*t))+ce(Math.round(i+s*t))+ce(Math.round(a+l*t))}}function Hi(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Zi(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function Gi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Wi(t,e){var r,n,i,a=Yi.lastIndex=Xi.lastIndex=0,o=-1,s=[],l=[];for(t+=&quot;&quot;,e+=&quot;&quot;;(r=Yi.exec(t))&amp;&amp;(n=Xi.exec(e));)(i=n.index)&gt;a&amp;&amp;(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Gi(r,n)})),a=Xi.lastIndex;return a&lt;e.length&amp;&amp;(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length&lt;2?l[0]?(e=l[0].x,function(t){return e(t)+&quot;&quot;}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n&lt;e;++n)s[(r=l[n]).i]=r.x(t);return s.join(&quot;&quot;)})}t.geom.delaunay=function(e){return t.geom.voronoi().triangles(e)},t.geom.quadtree=function(t,e,r,n,i){var a,o=ei,s=ri;if(a=arguments.length)return o=Vi,s=Ui,3===a&amp;&amp;(i=r,n=e,r=e=0),l(t);function l(t){var l,c,u,f,h,p,d,g,m,v=me(o),x=me(s);if(null!=e)p=e,d=r,g=n,m=i;else if(g=m=-(p=d=1/0),c=[],u=[],h=t.length,a)for(f=0;f&lt;h;++f)(l=t[f]).x&lt;p&amp;&amp;(p=l.x),l.y&lt;d&amp;&amp;(d=l.y),l.x&gt;g&amp;&amp;(g=l.x),l.y&gt;m&amp;&amp;(m=l.y),c.push(l.x),u.push(l.y);else for(f=0;f&lt;h;++f){var b=+v(l=t[f],f),_=+x(l,f);b&lt;p&amp;&amp;(p=b),_&lt;d&amp;&amp;(d=_),b&gt;g&amp;&amp;(g=b),_&gt;m&amp;&amp;(m=_),c.push(b),u.push(_)}var w=g-p,k=m-d;function M(t,e,r,n,i,a,o,s){if(!isNaN(r)&amp;&amp;!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)&lt;.01)A(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r&gt;=l,f=n&gt;=c,h=f&lt;&lt;1|u;t.leaf=!1,u?i=l:o=l,f?a=c:s=c,M(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+v(t,++f),+x(t,f),p,d,g,m)}}),e,r,n,i,a,o,s)}w&gt;k?m=d+w:g=p+k;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+v(t,++f),+x(t,f),p,d,g,m)}};if(T.visit=function(t){!function t(e,r,n,i,a,o){if(!e(r,n,i,a,o)){var s=.5*(n+a),l=.5*(i+o),c=r.nodes;c[0]&amp;&amp;t(e,c[0],n,i,s,l),c[1]&amp;&amp;t(e,c[1],s,i,a,l),c[2]&amp;&amp;t(e,c[2],n,l,s,o),c[3]&amp;&amp;t(e,c[3],s,l,a,o)}}(t,T,p,d,g,m)},T.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,f,h,p){if(!(u&gt;a||f&gt;o||h&lt;n||p&lt;i)){if(d=c.point){var d,g=e-c.x,m=r-c.y,v=g*g+m*m;if(v&lt;l){var y=Math.sqrt(l=v);n=e-y,i=r-y,a=e+y,o=r+y,s=d}}for(var x=c.nodes,b=.5*(u+h),_=.5*(f+p),w=(r&gt;=_)&lt;&lt;1|e&gt;=b,k=w+4;w&lt;k;++w)if(c=x[3&amp;w])switch(3&amp;w){case 0:t(c,u,f,b,_);break;case 1:t(c,b,f,h,_);break;case 2:t(c,u,_,b,p);break;case 3:t(c,b,_,h,p)}}}(t,n,i,a,o),s}(T,t[0],t[1],p,d,g,m)},f=-1,null==e){for(;++f&lt;h;)M(T,t[f],c[f],u[f],p,d,g,m);--f}else t.forEach(T.add);return c=u=t=l=null,T}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,r],[n,i]]},l.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),l):null==e?null:[n-e,i-r]},l},t.interpolateRgb=qi,t.interpolateObject=Hi,t.interpolateNumber=Gi,t.interpolateString=Wi;var Yi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xi=new RegExp(Yi.source,&quot;g&quot;);function Zi(e,r){for(var n,i=t.interpolators.length;--i&gt;=0&amp;&amp;!(n=t.interpolators[i](e,r)););return n}function $i(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r&lt;s;++r)n.push(Zi(t[r],e[r]));for(;r&lt;a;++r)i[r]=t[r];for(;r&lt;o;++r)i[r]=e[r];return function(t){for(r=0;r&lt;s;++r)i[r]=n[r](t);return i}}t.interpolate=Zi,t.interpolators=[function(t,e){var r=typeof e;return(&quot;string&quot;===r?ge.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?qi:Wi:e instanceof Vt?qi:Array.isArray(e)?$i:&quot;object&quot;===r&amp;&amp;isNaN(e)?Hi:Gi)(t,e)}],t.interpolateArray=$i;var Ji=function(){return z},Ki=t.map({linear:Ji,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return ra},cubic:function(){return na},sin:function(){return aa},exp:function(){return oa},circle:function(){return sa},elastic:function(t,e){var r;arguments.length&lt;2&amp;&amp;(e=.45);arguments.length?r=e/Tt*Math.asin(1/t):(t=1,r=e/4);return function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Tt/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return la}}),Qi=t.map({in:z,out:ta,&quot;in-out&quot;:ea,&quot;out-in&quot;:function(t){return ea(ta(t))}});function ta(t){return function(e){return 1-t(1-e)}}function ea(t){return function(e){return.5*(e&lt;.5?t(2*e):2-t(2-2*e))}}function ra(t){return t*t}function na(t){return t*t*t}function ia(t){if(t&lt;=0)return 0;if(t&gt;=1)return 1;var e=t*t,r=e*t;return 4*(t&lt;.5?r:3*(t-e)+r-.75)}function aa(t){return 1-Math.cos(t*Et)}function oa(t){return Math.pow(2,10*(t-1))}function sa(t){return 1-Math.sqrt(1-t*t)}function la(t){return t&lt;1/2.75?7.5625*t*t:t&lt;2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t&lt;2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ca(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ua(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=ha(i),s=fa(i,a),l=ha(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]&lt;a[0]*i[1]&amp;&amp;(i[0]*=-1,i[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-a[0],a[1]))*Lt,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Lt:0}function fa(t,e){return t[0]*e[0]+t[1]*e[1]}function ha(t){var e=Math.sqrt(fa(t,t));return e&amp;&amp;(t[0]/=e,t[1]/=e),e}t.ease=function(t){var e,n=t.indexOf(&quot;-&quot;),i=n&gt;=0?t.slice(0,n):t,a=n&gt;=0?t.slice(n+1):&quot;in&quot;;return i=Ki.get(i)||Ji,a=Qi.get(a)||z,e=a(i.apply(null,r.call(arguments,1))),function(t){return t&lt;=0?0:t&gt;=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&amp;&amp;(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o&gt;180?o-=360:o&lt;-180&amp;&amp;(o+=360);return function(t){return Yt(n+o*t,i+s*t,a+l*t)+&quot;&quot;}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&amp;&amp;(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o&gt;180?o-=360:o&lt;-180&amp;&amp;(o+=360);return function(t){return Ht(n+o*t,i+s*t,a+l*t)+&quot;&quot;}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return te(n+o*t,i+s*t,a+l*t)+&quot;&quot;}},t.interpolateRound=ca,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,&quot;g&quot;);return(t.transform=function(t){if(null!=t){r.setAttribute(&quot;transform&quot;,t);var e=r.transform.baseVal.consolidate()}return new ua(e?e.matrix:pa)})(e)},ua.prototype.toString=function(){return&quot;translate(&quot;+this.translate+&quot;)rotate(&quot;+this.rotate+&quot;)skewX(&quot;+this.skew+&quot;)scale(&quot;+this.scale+&quot;)&quot;};var pa={a:1,b:0,c:0,d:1,e:0,f:0};function da(t){return t.length?t.pop()+&quot;,&quot;:&quot;&quot;}function ga(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(&quot;translate(&quot;,null,&quot;,&quot;,null,&quot;)&quot;);n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else(e[0]||e[1])&amp;&amp;r.push(&quot;translate(&quot;+e+&quot;)&quot;)}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e&gt;180?e+=360:e-t&gt;180&amp;&amp;(t+=360),n.push({i:r.push(da(r)+&quot;rotate(&quot;,null,&quot;)&quot;)-2,x:Gi(t,e)})):e&amp;&amp;r.push(da(r)+&quot;rotate(&quot;+e+&quot;)&quot;)}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(da(r)+&quot;skewX(&quot;,null,&quot;)&quot;)-2,x:Gi(t,e)}):e&amp;&amp;r.push(da(r)+&quot;skewX(&quot;+e+&quot;)&quot;)}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(da(r)+&quot;scale(&quot;,null,&quot;,&quot;,null,&quot;)&quot;);n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else 1===e[0]&amp;&amp;1===e[1]||r.push(da(r)+&quot;scale(&quot;+e+&quot;)&quot;)}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r&lt;a;)n[(e=i[r]).i]=e.x(t);return n.join(&quot;&quot;)}}function ma(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function va(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}function ya(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;var r=xa(t),n=xa(e),i=r.pop(),a=n.pop(),o=null;for(;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function xa(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function ba(t){t.fixed|=2}function _a(t){t.fixed&amp;=-7}function wa(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ka(t){t.fixed&amp;=-5}t.interpolateTransform=ga,t.layout={},t.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r&lt;n;)e.push(ya(t[r]));return e}},t.layout.chord=function(){var e,r,n,i,a,o,s,l={},c=0;function u(){var l,u,h,p,d,g={},m=[],v=t.range(i),y=[];for(e=[],r=[],l=0,p=-1;++p&lt;i;){for(u=0,d=-1;++d&lt;i;)u+=n[p][d];m.push(u),y.push(t.range(i)),l+=u}for(a&amp;&amp;v.sort(function(t,e){return a(m[t],m[e])}),o&amp;&amp;y.forEach(function(t,e){t.sort(function(t,r){return o(n[e][t],n[e][r])})}),l=(Tt-c*i)/l,u=0,p=-1;++p&lt;i;){for(h=u,d=-1;++d&lt;i;){var x=v[p],b=y[x][d],_=n[x][b],w=u,k=u+=_*l;g[x+&quot;-&quot;+b]={index:x,subindex:b,startAngle:w,endAngle:k,value:_}}r[x]={index:x,startAngle:h,endAngle:u,value:m[x]},u+=c}for(p=-1;++p&lt;i;)for(d=p-1;++d&lt;i;){var M=g[p+&quot;-&quot;+d],A=g[d+&quot;-&quot;+p];(M.value||A.value)&amp;&amp;e.push(M.value&lt;A.value?{source:A,target:M}:{source:M,target:A})}s&amp;&amp;f()}function f(){e.sort(function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}return l.matrix=function(t){return arguments.length?(i=(n=t)&amp;&amp;n.length,e=r=null,l):n},l.padding=function(t){return arguments.length?(c=t,e=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(o=t,e=null,l):o},l.sortChords=function(t){return arguments.length?(s=t,e&amp;&amp;f(),l):s},l.chords=function(){return e||u(),e},l.groups=function(){return r||u(),r},l},t.layout.force=function(){var e,r,n,i,a,o,s={},l=t.dispatch(&quot;start&quot;,&quot;tick&quot;,&quot;end&quot;),c=[1,1],u=.9,f=Ma,h=Aa,p=-30,d=Ta,g=.1,m=.64,v=[],y=[];function x(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/m&lt;l){if(l&lt;d){var c=e.charge/l;t.px-=a*c,t.py-=o*c}return!0}if(e.point&amp;&amp;l&amp;&amp;l&lt;d){c=e.pointCharge/l;t.px-=a*c,t.py-=o*c}}return!e.charge}}function b(e){e.px=t.event.x,e.py=t.event.y,s.resume()}return s.tick=function(){if((n*=.99)&lt;.005)return e=null,l.end({type:&quot;end&quot;,alpha:n=0}),!0;var r,s,f,h,d,m,b,_,w,k=v.length,M=y.length;for(s=0;s&lt;M;++s)h=(f=y[s]).source,(m=(_=(d=f.target).x-h.x)*_+(w=d.y-h.y)*w)&amp;&amp;(_*=m=n*a[s]*((m=Math.sqrt(m))-i[s])/m,w*=m,d.x-=_*(b=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=w*b,h.x+=_*(b=1-b),h.y+=w*b);if((b=n*g)&amp;&amp;(_=c[0]/2,w=c[1]/2,s=-1,b))for(;++s&lt;k;)(f=v[s]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(p)for(!function t(e,r,n){var i=0,a=0;e.charge=0;if(!e.leaf)for(var o,s=e.nodes,l=s.length,c=-1;++c&lt;l;)null!=(o=s[c])&amp;&amp;(t(o,r,n),e.charge+=o.charge,i+=o.charge*o.cx,a+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=r*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,a+=u*e.point.y}e.cx=i/e.charge;e.cy=a/e.charge}(r=t.geom.quadtree(v),n,o),s=-1;++s&lt;k;)(f=v[s]).fixed||r.visit(x(f));for(s=-1;++s&lt;k;)(f=v[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*u,f.y-=(f.py-(f.py=f.y))*u);l.tick({type:&quot;tick&quot;,alpha:n})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(c=t,s):c},s.linkDistance=function(t){return arguments.length?(f=&quot;function&quot;==typeof t?t:+t,s):f},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h=&quot;function&quot;==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(u=+t,s):u},s.charge=function(t){return arguments.length?(p=&quot;function&quot;==typeof t?t:+t,s):p},s.chargeDistance=function(t){return arguments.length?(d=t*t,s):Math.sqrt(d)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(m=t*t,s):Math.sqrt(m)},s.alpha=function(t){return arguments.length?(t=+t,n?t&gt;0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:&quot;end&quot;,alpha:n=0})):t&gt;0&amp;&amp;(l.start({type:&quot;start&quot;,alpha:n=t}),e=Me(s.tick)),s):n},s.start=function(){var t,e,r,n=v.length,l=y.length,u=c[0],d=c[1];for(t=0;t&lt;n;++t)(r=v[t]).index=t,r.weight=0;for(t=0;t&lt;l;++t)&quot;number&quot;==typeof(r=y[t]).source&amp;&amp;(r.source=v[r.source]),&quot;number&quot;==typeof r.target&amp;&amp;(r.target=v[r.target]),++r.source.weight,++r.target.weight;for(t=0;t&lt;n;++t)r=v[t],isNaN(r.x)&amp;&amp;(r.x=g(&quot;x&quot;,u)),isNaN(r.y)&amp;&amp;(r.y=g(&quot;y&quot;,d)),isNaN(r.px)&amp;&amp;(r.px=r.x),isNaN(r.py)&amp;&amp;(r.py=r.y);if(i=[],&quot;function&quot;==typeof f)for(t=0;t&lt;l;++t)i[t]=+f.call(this,y[t],t);else for(t=0;t&lt;l;++t)i[t]=f;if(a=[],&quot;function&quot;==typeof h)for(t=0;t&lt;l;++t)a[t]=+h.call(this,y[t],t);else for(t=0;t&lt;l;++t)a[t]=h;if(o=[],&quot;function&quot;==typeof p)for(t=0;t&lt;n;++t)o[t]=+p.call(this,v[t],t);else for(t=0;t&lt;n;++t)o[t]=p;function g(r,i){if(!e){for(e=new Array(n),c=0;c&lt;n;++c)e[c]=[];for(c=0;c&lt;l;++c){var a=y[c];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}for(var o,s=e[t],c=-1,u=s.length;++c&lt;u;)if(!isNaN(o=s[c][r]))return o;return Math.random()*i}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(r||(r=t.behavior.drag().origin(z).on(&quot;dragstart.force&quot;,ba).on(&quot;drag.force&quot;,b).on(&quot;dragend.force&quot;,_a)),!arguments.length)return r;this.on(&quot;mouseover.force&quot;,wa).on(&quot;mouseout.force&quot;,ka).call(r)},t.rebind(s,l,&quot;on&quot;)};var Ma=20,Aa=1,Ta=1/0;function Sa(e,r){return t.rebind(e,r,&quot;sort&quot;,&quot;children&quot;,&quot;value&quot;),e.nodes=e,e.links=Oa,e}function Ea(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&amp;&amp;(n=i.length))for(var n,i;--n&gt;=0;)r.push(i[n])}function Ca(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&amp;&amp;(i=a.length))for(var i,a,o=-1;++o&lt;i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function La(t){return t.children}function za(t){return t.value}function Pa(t,e){return e.value-t.value}function Oa(e){return t.merge(e.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}t.layout.hierarchy=function(){var t=Pa,e=La,r=za;function n(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(c=e.call(n,a,a.depth))&amp;&amp;(l=c.length)){for(var l,c,u;--l&gt;=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&amp;&amp;(a.value=0),a.children=c}else r&amp;&amp;(a.value=+r.call(n,a,a.depth)||0),delete a.children;return Ca(i,function(e){var n,i;t&amp;&amp;(n=e.children)&amp;&amp;n.sort(t),r&amp;&amp;(i=e.parent)&amp;&amp;(i.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&amp;&amp;(Ea(t,function(t){t.children&amp;&amp;(t.value=0)}),Ca(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&amp;&amp;(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&amp;&amp;(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++c&lt;o;)t(s=a[c],r,l=s.value*n,i),r+=l}}(i[0],0,r[0],r[1]/function t(e){var r=e.children,n=0;if(r&amp;&amp;(i=r.length))for(var i,a=-1;++a&lt;i;)n=Math.max(n,t(r[a]));return 1+n}(i[0])),i}return n.size=function(t){return arguments.length?(r=t,n):r},Sa(n,e)},t.layout.pie=function(){var e=Number,r=Ia,n=0,i=Tt,a=0;function o(s){var l,c=s.length,u=s.map(function(t,r){return+e.call(o,t,r)}),f=+(&quot;function&quot;==typeof n?n.apply(this,arguments):n),h=(&quot;function&quot;==typeof i?i.apply(this,arguments):i)-f,p=Math.min(Math.abs(h)/c,+(&quot;function&quot;==typeof a?a.apply(this,arguments):a)),d=p*(h&lt;0?-1:1),g=t.sum(u),m=g?(h-c*d)/g:0,v=t.range(c),y=[];return null!=r&amp;&amp;v.sort(r===Ia?function(t,e){return u[e]-u[t]}:function(t,e){return r(s[t],s[e])}),v.forEach(function(t){y[t]={data:s[t],value:l=u[t],startAngle:f,endAngle:f+=l*m+d,padAngle:p}}),y}return o.value=function(t){return arguments.length?(e=t,o):e},o.sort=function(t){return arguments.length?(r=t,o):r},o.startAngle=function(t){return arguments.length?(n=t,o):n},o.endAngle=function(t){return arguments.length?(i=t,o):i},o.padAngle=function(t){return arguments.length?(a=t,o):a},o};var Ia={};function Da(t){return t.x}function Ra(t){return t.y}function Ba(t,e,r){t.y0=e,t.y=r}t.layout.stack=function(){var e=z,r=ja,n=Va,i=Ba,a=Da,o=Ra;function s(l,c){if(!(p=l.length))return l;var u=l.map(function(t,r){return e.call(s,t,r)}),f=u.map(function(t){return t.map(function(t,e){return[a.call(s,t,e),o.call(s,t,e)]})}),h=r.call(s,f,c);u=t.permute(u,h),f=t.permute(f,h);var p,d,g,m,v=n.call(s,f,c),y=u[0].length;for(g=0;g&lt;y;++g)for(i.call(s,u[0][g],m=v[g],f[0][g][1]),d=1;d&lt;p;++d)i.call(s,u[d][g],m+=f[d-1][g][1],f[d][g][1]);return l}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(t){return arguments.length?(r=&quot;function&quot;==typeof t?t:Fa.get(t)||ja,s):r},s.offset=function(t){return arguments.length?(n=&quot;function&quot;==typeof t?t:Na.get(t)||Va,s):n},s.x=function(t){return arguments.length?(a=t,s):a},s.y=function(t){return arguments.length?(o=t,s):o},s.out=function(t){return arguments.length?(i=t,s):i},s};var Fa=t.map({&quot;inside-out&quot;:function(e){var r,n,i=e.length,a=e.map(Ua),o=e.map(qa),s=t.range(i).sort(function(t,e){return a[t]-a[e]}),l=0,c=0,u=[],f=[];for(r=0;r&lt;i;++r)n=s[r],l&lt;c?(l+=o[n],u.push(n)):(c+=o[n],f.push(n));return f.reverse().concat(u)},reverse:function(e){return t.range(e.length).reverse()},default:ja}),Na=t.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r&lt;a;++r){for(e=0,n=0;e&lt;i;e++)n+=t[e][r][1];n&gt;s&amp;&amp;(s=n),o.push(n)}for(r=0;r&lt;a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,c,u=t.length,f=t[0],h=f.length,p=[];for(p[0]=l=c=0,r=1;r&lt;h;++r){for(e=0,i=0;e&lt;u;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e&lt;u;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n&lt;e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}p[r]=l-=i?a/i*s:0,l&lt;c&amp;&amp;(c=l)}for(r=0;r&lt;h;++r)p[r]-=c;return p},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r&lt;a;++r){for(e=0,n=0;e&lt;i;e++)n+=t[e][r][1];if(n)for(e=0;e&lt;i;e++)t[e][r][1]/=n;else for(e=0;e&lt;i;e++)t[e][r][1]=o}for(r=0;r&lt;a;++r)s[r]=0;return s},zero:Va});function ja(e){return t.range(e.length)}function Va(t){for(var e=-1,r=t[0].length,n=[];++e&lt;r;)n[e]=0;return n}function Ua(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r&lt;a;++r)(e=t[r][1])&gt;i&amp;&amp;(n=r,i=e);return n}function qa(t){return t.reduce(Ha,0)}function Ha(t,e){return t+e[1]}function Ga(t,e){return Wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Wa(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r&lt;=e;)a[r]=i*r+n;return a}function Ya(e){return[t.min(e),t.max(e)]}function Xa(t,e){return t.value-e.value}function Za(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function $a(t,e){t._pack_next=e,e._pack_prev=t}function Ja(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i&gt;r*r+n*n}function Ka(t){if((e=t.children)&amp;&amp;(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,f=1/0,h=-1/0;if(e.forEach(Qa),(r=e[0]).x=-r.r,r.y=0,x(r),l&gt;1&amp;&amp;((n=e[1]).x=n.r,n.y=0,x(n),l&gt;2))for(eo(r,n,i=e[2]),x(i),Za(r,i),r._pack_prev=i,Za(i,n),n=r._pack_next,a=3;a&lt;l;a++){eo(r,n,i=e[a]);var p=0,d=1,g=1;for(o=n._pack_next;o!==n;o=o._pack_next,d++)if(Ja(o,i)){p=1;break}if(1==p)for(s=r._pack_prev;s!==o._pack_prev&amp;&amp;!Ja(s,i);s=s._pack_prev,g++);p?(d&lt;g||d==g&amp;&amp;n.r&lt;r.r?$a(r,n=o):$a(r=s,n),a--):(Za(r,i),n=i,x(i))}var m=(c+u)/2,v=(f+h)/2,y=0;for(a=0;a&lt;l;a++)(i=e[a]).x-=m,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(to)}function x(t){c=Math.min(t.x-t.r,c),u=Math.max(t.x+t.r,u),f=Math.min(t.y-t.r,f),h=Math.max(t.y+t.r,h)}}function Qa(t){t._pack_next=t._pack_prev=t}function to(t){delete t._pack_next,delete t._pack_prev}function eo(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&amp;&amp;(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+c*a,r.y=t.y+l*a-c*i}else r.x=t.x+n,r.y=t.y}function ro(t,e){return t.parent==e.parent?1:2}function no(t){var e=t.children;return e.length?e[0]:t.t}function io(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function ao(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function oo(t,e,r){return t.a.parent===e.parent?t.a:r}function so(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function lo(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i&lt;0&amp;&amp;(r+=i/2,i=0),a&lt;0&amp;&amp;(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function co(t){var e=t[0],r=t[t.length-1];return e&lt;r?[e,r]:[r,e]}function uo(t){return t.rangeExtent?t.rangeExtent():co(t.range())}function fo(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}}function ho(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o&lt;a&amp;&amp;(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function po(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:go}t.layout.histogram=function(){var e=!0,r=Number,n=Ya,i=Ga;function a(a,o){for(var s,l,c=[],u=a.map(r,this),f=n.call(this,u,o),h=i.call(this,f,u,o),p=(o=-1,u.length),d=h.length-1,g=e?1:1/p;++o&lt;d;)(s=c[o]=[]).dx=h[o+1]-(s.x=h[o]),s.y=0;if(d&gt;0)for(o=-1;++o&lt;p;)(l=u[o])&gt;=f[0]&amp;&amp;l&lt;=f[1]&amp;&amp;((s=c[t.bisect(h,l,1,d)-1]).y+=g,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=me(t),a):n},a.bins=function(t){return arguments.length?(i=&quot;number&quot;==typeof t?function(e){return Wa(e,t)}:me(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xa),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:&quot;function&quot;==typeof e?e:function(){return e};if(s.x=s.y=0,Ca(s,function(t){t.r=+u(t.value)}),Ca(s,Ka),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ca(s,function(t){t.r+=f}),Ca(s,Ka),Ca(s,function(t){t.r-=f})}return function t(e,r,n,i){var a=e.children;e.x=r+=i*e.x;e.y=n+=i*e.y;e.r*=i;if(a)for(var o=-1,s=a.length;++o&lt;s;)t(a[o],r,n,i)}(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return a.size=function(t){return arguments.length?(i=t,a):i},a.radius=function(t){return arguments.length?(e=null==t||&quot;function&quot;==typeof t?t:+t,a):e},a.padding=function(t){return arguments.length?(n=+t,a):n},Sa(a,r)},t.layout.tree=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=null;function a(t,a){var c=e.call(this,t,a),u=c[0],f=function(t){var e,r={A:null,children:[t]},n=[r];for(;null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o&lt;s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&amp;&amp;i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(u);if(Ca(f,o),f.parent.m=-f.z,Ea(f,s),i)Ea(u,l);else{var h=u,p=u,d=u;Ea(u,function(t){t.x&lt;h.x&amp;&amp;(h=t),t.x&gt;p.x&amp;&amp;(p=t),t.depth&gt;d.depth&amp;&amp;(d=t)});var g=r(h,p)/2-h.x,m=n[0]/(p.x+r(p,h)/2+g),v=n[1]/(d.depth||1);Ea(u,function(t){t.x=(t.x+g)*m,t.y=t.depth*v})}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a&gt;=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&amp;&amp;(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=io(s),a=no(a),s&amp;&amp;a;)l=no(l),(o=io(o)).a=t,(i=s.z+f-a.z-c+r(s._,a._))&gt;0&amp;&amp;(ao(oo(s,t,n),t,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&amp;&amp;!io(o)&amp;&amp;(o.t=s,o.m+=f-u),a&amp;&amp;!no(l)&amp;&amp;(l.t=a,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Sa(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;Ca(c,function(e){var n=e.children;n&amp;&amp;n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var f=function t(e){var r=e.children;return r&amp;&amp;r.length?t(r[0]):e}(c),h=function t(e){var r,n=e.children;return n&amp;&amp;(r=n.length)?t(n[r-1]):e}(c),p=f.x-r(f,h)/2,d=h.x+r(h,f)/2;return Ca(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Sa(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=so,s=!1,l=&quot;squarify&quot;,c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i&lt;a;)n=(r=t[i]).value*(e&lt;0?0:e),r.area=isNaN(n)||n&lt;=0?0:n}function f(t){var e=t.children;if(e&amp;&amp;e.length){var r,n,i,a=o(t),s=[],c=e.slice(),h=1/0,g=&quot;slice&quot;===l?a.dx:&quot;dice&quot;===l?a.dy:&quot;slice-dice&quot;===l?1&amp;t.depth?a.dy:a.dx:Math.min(a.dx,a.dy);for(u(c,a.dx*a.dy/t.value),s.area=0;(i=c.length)&gt;0;)s.push(r=c[i-1]),s.area+=r.area,&quot;squarify&quot;!==l||(n=p(s,g))&lt;=h?(c.pop(),h=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&amp;&amp;(d(s,g,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&amp;&amp;e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&amp;&amp;(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++o&lt;s;)(r=t[o].area)&amp;&amp;(r&lt;a&amp;&amp;(a=r),r&gt;i&amp;&amp;(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u&gt;r.dy)&amp;&amp;(u=r.dy);++o&lt;s;)(a=t[o]).x=l,a.y=c,a.dy=u,l+=a.dx=Math.min(r.x+r.dx-l,u?n(a.area/u):0);a.z=!0,a.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((i||u&gt;r.dx)&amp;&amp;(u=r.dx);++o&lt;s;)(a=t[o]).x=l,a.y=c,a.dx=u,c+=a.dy=Math.min(r.y+r.dy-c,u?n(a.area/u):0);a.z=!1,a.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function g(t){var n=e||r(t),a=n[0];return a.x=a.y=0,a.value?(a.dx=i[0],a.dy=i[1]):a.dx=a.dy=0,e&amp;&amp;r.revalue(a),u([a],a.dx*a.dy/a.value),(e?h:f)(a),s&amp;&amp;(e=n),n}return g.size=function(t){return arguments.length?(i=t,g):i},g.padding=function(t){if(!arguments.length)return a;function e(e){return lo(e,t)}var r;return o=null==(a=t)?so:&quot;function&quot;==(r=typeof t)?function(e){var r=t.call(g,e,e.depth);return null==r?so(e):lo(e,&quot;number&quot;==typeof r?[r,r,r,r]:r)}:&quot;number&quot;===r?(t=[t,t,t,t],e):e,g},g.round=function(t){return arguments.length?(n=t?Math.round:Number,g):n!=Number},g.sticky=function(t){return arguments.length?(s=t,e=null,g):s},g.ratio=function(t){return arguments.length?(c=t,g):c},g.mode=function(t){return arguments.length?(l=t+&quot;&quot;,g):l},Sa(g,r)},t.random={normal:function(t,e){var r=arguments.length;return r&lt;2&amp;&amp;(e=1),r&lt;1&amp;&amp;(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i&gt;1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r&lt;t;r++)e+=Math.random();return e}}},t.scale={};var go={floor:z,ceil:z};function mo(e,r,n,i){var a=[],o=[],s=0,l=Math.min(e.length,r.length)-1;for(e[l]&lt;e[0]&amp;&amp;(e=e.slice().reverse(),r=r.slice().reverse());++s&lt;=l;)a.push(n(e[s-1],e[s])),o.push(i(r[s-1],r[s]));return function(r){var n=t.bisect(e,r,1,l)-1;return o[n](a[n](r))}}function vo(e,r){return t.rebind(e,r,&quot;range&quot;,&quot;rangeRound&quot;,&quot;interpolate&quot;,&quot;clamp&quot;)}function yo(t,e){return ho(t,po(xo(t,e)[2])),ho(t,po(xo(t,e)[2])),t}function xo(t,e){null==e&amp;&amp;(e=10);var r=co(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a&lt;=.15?i*=10:a&lt;=.35?i*=5:a&lt;=.75&amp;&amp;(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function bo(e,r){return t.range.apply(t,xo(e,r))}function _o(e,r,n){var i=xo(e,r);if(n){var a=Le.exec(n);if(a.shift(),&quot;s&quot;===a[8]){var o=t.formatPrefix(Math.max(y(i[0]),y(i[1])));return a[7]||(a[7]=&quot;.&quot;+ko(o.scale(i[2]))),a[8]=&quot;f&quot;,n=t.format(a.join(&quot;&quot;)),function(t){return n(o.scale(t))+o.symbol}}a[7]||(a[7]=&quot;.&quot;+function(t,e){var r=ko(e[2]);return t in wo?Math.abs(r-ko(Math.max(y(e[0]),y(e[1]))))+ +(&quot;e&quot;!==t):r-2*(&quot;%&quot;===t)}(a[8],i)),n=a.join(&quot;&quot;)}else n=&quot;,.&quot;+ko(i[2])+&quot;f&quot;;return t.format(n)}t.scale.linear=function(){return function t(e,r,n,i){var a,o;function s(){var t=Math.min(e.length,r.length)&gt;2?mo:fo,s=i?va:ma;return a=t(e,r,s,n),o=t(r,e,s,Zi),l}function l(t){return a(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ca)};l.clamp=function(t){return arguments.length?(i=t,s()):i};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,i)};return s()}([0,1],[0,1],Zi,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,i,a){function o(t){return(i?Math.log(t&lt;0?0:t):-Math.log(t&gt;0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(i=t[0]&gt;=0,r.domain((a=t.map(Number)).map(o)),l):a};l.base=function(t){return arguments.length?(n=+t,r.domain(a.map(o)),l):n};l.nice=function(){var t=ho(a.map(o),i?Math:Ao);return r.domain(t),a=t.map(s),l};l.ticks=function(){var t=co(a),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),f=n%1?2:n;if(isFinite(u-c)){if(i){for(;c&lt;u;c++)for(var h=1;h&lt;f;h++)e.push(s(c)*h);e.push(s(c))}else for(e.push(s(c));c++&lt;u;)for(var h=f-1;h&gt;0;h--)e.push(s(c)*h);for(c=0;e[c]&lt;r;c++);for(u=e.length;e[u-1]&gt;l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return Mo;arguments.length&lt;2?r=Mo:&quot;function&quot;!=typeof r&amp;&amp;(r=t.format(r));var i=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n&lt;n-.5&amp;&amp;(e*=n),e&lt;=i?r(t):&quot;&quot;}};l.copy=function(){return e(r.copy(),n,i,a)};return vo(l,r)}(t.scale.linear().domain([0,1]),10,!0,[1,10])};var Mo=t.format(&quot;.0e&quot;),Ao={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function To(t){return function(e){return e&lt;0?-Math.pow(-e,t):Math.pow(e,t)}}t.scale.pow=function(){return function t(e,r,n){var i=To(r),a=To(1/r);function o(t){return e(i(t))}o.invert=function(t){return a(e.invert(t))};o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),o):n};o.ticks=function(t){return bo(n,t)};o.tickFormat=function(t,e){return _o(n,t,e)};o.nice=function(t){return o.domain(yo(n,t))};o.exponent=function(t){return arguments.length?(i=To(r=t),a=To(1/r),e.domain(n.map(i)),o):r};o.copy=function(){return t(e.copy(),r,n)};return vo(o,e)}(t.scale.linear(),1,[0,1])},t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return function e(r,n){var i,a,o;function s(t){return a[((i.get(t)||(&quot;range&quot;===n.t?i.set(t,r.push(t)):NaN))-1)%a.length]}function l(e,n){return t.range(r.length).map(function(t){return e+n*t})}s.domain=function(t){if(!arguments.length)return r;r=[],i=new b;for(var e,a=-1,o=t.length;++a&lt;o;)i.has(e=t[a])||i.set(e,r.push(e));return s[n.t].apply(s,n.a)};s.range=function(t){return arguments.length?(a=t,o=0,n={t:&quot;range&quot;,a:arguments},s):a};s.rangePoints=function(t,e){arguments.length&lt;2&amp;&amp;(e=0);var i=t[0],c=t[1],u=r.length&lt;2?(i=(i+c)/2,0):(c-i)/(r.length-1+e);return a=l(i+u*e/2,u),o=0,n={t:&quot;rangePoints&quot;,a:arguments},s};s.rangeRoundPoints=function(t,e){arguments.length&lt;2&amp;&amp;(e=0);var i=t[0],c=t[1],u=r.length&lt;2?(i=c=Math.round((i+c)/2),0):(c-i)/(r.length-1+e)|0;return a=l(i+Math.round(u*e/2+(c-i-(r.length-1+e)*u)/2),u),o=0,n={t:&quot;rangeRoundPoints&quot;,a:arguments},s};s.rangeBands=function(t,e,i){arguments.length&lt;2&amp;&amp;(e=0),arguments.length&lt;3&amp;&amp;(i=e);var c=t[1]&lt;t[0],u=t[c-0],f=t[1-c],h=(f-u)/(r.length-e+2*i);return a=l(u+h*i,h),c&amp;&amp;a.reverse(),o=h*(1-e),n={t:&quot;rangeBands&quot;,a:arguments},s};s.rangeRoundBands=function(t,e,i){arguments.length&lt;2&amp;&amp;(e=0),arguments.length&lt;3&amp;&amp;(i=e);var c=t[1]&lt;t[0],u=t[c-0],f=t[1-c],h=Math.floor((f-u)/(r.length-e+2*i));return a=l(u+Math.round((f-u-(r.length-e)*h)/2),h),c&amp;&amp;a.reverse(),o=Math.round(h*(1-e)),n={t:&quot;rangeRoundBands&quot;,a:arguments},s};s.rangeBand=function(){return o};s.rangeExtent=function(){return co(n.a[0])};s.copy=function(){return e(r,n)};return s.domain(r)}([],{t:&quot;range&quot;,a:[[]]})},t.scale.category10=function(){return t.scale.ordinal().range(So)},t.scale.category20=function(){return t.scale.ordinal().range(Eo)},t.scale.category20b=function(){return t.scale.ordinal().range(Co)},t.scale.category20c=function(){return t.scale.ordinal().range(Lo)};var So=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(se),Eo=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(se),Co=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(se),Lo=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(se);function zo(){return 0}t.scale.quantile=function(){return function e(r,n){var i;function a(){var e=0,a=n.length;for(i=[];++e&lt;a;)i[e-1]=t.quantile(r,e/a);return o}function o(e){if(!isNaN(e=+e))return n[t.bisect(i,e)]}o.domain=function(t){return arguments.length?(r=t.map(p).filter(d).sort(h),a()):r};o.range=function(t){return arguments.length?(n=t,a()):n};o.quantiles=function(){return i};o.invertExtent=function(t){return(t=n.indexOf(t))&lt;0?[NaN,NaN]:[t&gt;0?i[t-1]:r[0],t&lt;i.length?i[t]:r[r.length-1]]};o.copy=function(){return e(r,n)};return a()}([],[])},t.scale.quantize=function(){return function t(e,r,n){var i,a;function o(t){return n[Math.max(0,Math.min(a,Math.floor(i*(t-e))))]}function s(){return i=n.length/(r-e),a=n.length-1,o}o.domain=function(t){return arguments.length?(e=+t[0],r=+t[t.length-1],s()):[e,r]};o.range=function(t){return arguments.length?(n=t,s()):n};o.invertExtent=function(t){return[t=(t=n.indexOf(t))&lt;0?NaN:t/i+e,t+1/i]};o.copy=function(){return t(e,r,n)};return s()}(0,1,[0,1])},t.scale.threshold=function(){return function e(r,n){function i(e){if(e&lt;=e)return n[t.bisect(r,e)]}i.domain=function(t){return arguments.length?(r=t,i):r};i.range=function(t){return arguments.length?(n=t,i):n};i.invertExtent=function(t){return t=n.indexOf(t),[r[t-1],r[t]]};i.copy=function(){return e(r,n)};return i}([.5],[0,1])},t.scale.identity=function(){return function t(e){function r(t){return+t}r.invert=r;r.domain=r.range=function(t){return arguments.length?(e=t.map(r),r):e};r.ticks=function(t){return bo(e,t)};r.tickFormat=function(t,r){return _o(e,t,r)};r.copy=function(){return t(e)};return r}([0,1])},t.svg={},t.svg.arc=function(){var t=Oo,e=Io,r=zo,n=Po,i=Do,a=Ro,o=Bo;function s(){var s=Math.max(0,+t.apply(this,arguments)),c=Math.max(0,+e.apply(this,arguments)),u=i.apply(this,arguments)-Et,f=a.apply(this,arguments)-Et,h=Math.abs(f-u),p=u&gt;f?0:1;if(c&lt;s&amp;&amp;(d=c,c=s,s=d),h&gt;=St)return l(c,p)+(s?l(s,1-p):&quot;&quot;)+&quot;Z&quot;;var d,g,m,v,y,x,b,_,w,k,M,A,T=0,S=0,E=[];if((v=(+o.apply(this,arguments)||0)/2)&amp;&amp;(m=n===Po?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&amp;&amp;(S=It(m/c*Math.sin(v))),s&amp;&amp;(T=It(m/s*Math.sin(v)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var C=Math.abs(f-u-2*S)&lt;=At?0:1;if(S&amp;&amp;Fo(y,x,b,_)===p^C){var L=(u+f)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-T),k=s*Math.sin(f-T),M=s*Math.cos(u+T),A=s*Math.sin(u+T);var z=Math.abs(u-f+2*T)&lt;=At?0:1;if(T&amp;&amp;Fo(w,k,M,A)===1-p^z){var P=(u+f)/2;w=s*Math.cos(P),k=s*Math.sin(P),M=A=null}}else w=k=0;if(h&gt;kt&amp;&amp;(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))&gt;.001){g=s&lt;c^p?0:1;var O=d,I=d;if(h&lt;At){var D=null==M?[w,k]:null==b?[y,x]:si([y,x],[M,A],[b,_],[w,k]),R=y-D[0],B=x-D[1],F=b-D[0],N=_-D[1],j=1/Math.sin(Math.acos((R*F+B*N)/(Math.sqrt(R*R+B*B)*Math.sqrt(F*F+N*N)))/2),V=Math.sqrt(D[0]*D[0]+D[1]*D[1]);I=Math.min(d,(s-V)/(j-1)),O=Math.min(d,(c-V)/(j+1))}if(null!=b){var U=No(null==M?[w,k]:[M,A],[y,x],c,O,p),q=No([b,_],[w,k],c,O,p);d===O?E.push(&quot;M&quot;,U[0],&quot;A&quot;,O,&quot;,&quot;,O,&quot; 0 0,&quot;,g,&quot; &quot;,U[1],&quot;A&quot;,c,&quot;,&quot;,c,&quot; 0 &quot;,1-p^Fo(U[1][0],U[1][1],q[1][0],q[1][1]),&quot;,&quot;,p,&quot; &quot;,q[1],&quot;A&quot;,O,&quot;,&quot;,O,&quot; 0 0,&quot;,g,&quot; &quot;,q[0]):E.push(&quot;M&quot;,U[0],&quot;A&quot;,O,&quot;,&quot;,O,&quot; 0 1,&quot;,g,&quot; &quot;,q[0])}else E.push(&quot;M&quot;,y,&quot;,&quot;,x);if(null!=M){var H=No([y,x],[M,A],s,-I,p),G=No([w,k],null==b?[y,x]:[b,_],s,-I,p);d===I?E.push(&quot;L&quot;,G[0],&quot;A&quot;,I,&quot;,&quot;,I,&quot; 0 0,&quot;,g,&quot; &quot;,G[1],&quot;A&quot;,s,&quot;,&quot;,s,&quot; 0 &quot;,p^Fo(G[1][0],G[1][1],H[1][0],H[1][1]),&quot;,&quot;,1-p,&quot; &quot;,H[1],&quot;A&quot;,I,&quot;,&quot;,I,&quot; 0 0,&quot;,g,&quot; &quot;,H[0]):E.push(&quot;L&quot;,G[0],&quot;A&quot;,I,&quot;,&quot;,I,&quot; 0 0,&quot;,g,&quot; &quot;,H[0])}else E.push(&quot;L&quot;,w,&quot;,&quot;,k)}else E.push(&quot;M&quot;,y,&quot;,&quot;,x),null!=b&amp;&amp;E.push(&quot;A&quot;,c,&quot;,&quot;,c,&quot; 0 &quot;,C,&quot;,&quot;,p,&quot; &quot;,b,&quot;,&quot;,_),E.push(&quot;L&quot;,w,&quot;,&quot;,k),null!=M&amp;&amp;E.push(&quot;A&quot;,s,&quot;,&quot;,s,&quot; 0 &quot;,z,&quot;,&quot;,1-p,&quot; &quot;,M,&quot;,&quot;,A);return E.push(&quot;Z&quot;),E.join(&quot;&quot;)}function l(t,e){return&quot;M0,&quot;+t+&quot;A&quot;+t+&quot;,&quot;+t+&quot; 0 1,&quot;+e+&quot; 0,&quot;+-t+&quot;A&quot;+t+&quot;,&quot;+t+&quot; 0 1,&quot;+e+&quot; 0,&quot;+t}return s.innerRadius=function(e){return arguments.length?(t=me(e),s):t},s.outerRadius=function(t){return arguments.length?(e=me(t),s):e},s.cornerRadius=function(t){return arguments.length?(r=me(t),s):r},s.padRadius=function(t){return arguments.length?(n=t==Po?Po:me(t),s):n},s.startAngle=function(t){return arguments.length?(i=me(t),s):i},s.endAngle=function(t){return arguments.length?(a=me(t),s):a},s.padAngle=function(t){return arguments.length?(o=me(t),s):o},s.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Et;return[Math.cos(n)*r,Math.sin(n)*r]},s};var Po=&quot;auto&quot;;function Oo(t){return t.innerRadius}function Io(t){return t.outerRadius}function Do(t){return t.startAngle}function Ro(t){return t.endAngle}function Bo(t){return t&amp;&amp;t.padAngle}function Fo(t,e,r,n){return(t-r)*e-(e-n)*t&gt;0?0:1}function No(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,p=e[1]+c,d=(u+h)/2,g=(f+p)/2,m=h-u,v=p-f,y=m*m+v*v,x=r-n,b=u*p-h*f,_=(v&lt;0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-m*_)/y,k=(-b*m-v*_)/y,M=(b*v+m*_)/y,A=(-b*m+v*_)/y,T=w-d,S=k-g,E=M-d,C=A-g;return T*T+S*S&gt;E*E+C*C&amp;&amp;(w=M,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ei,r=ri,n=Wr,i=Uo,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,f=a.length,h=me(e),p=me(r);function d(){l.push(&quot;M&quot;,i(t(c),o))}for(;++u&lt;f;)n.call(this,s=a[u],u)?c.push([+h.call(this,s,u),+p.call(this,s,u)]):c.length&amp;&amp;(d(),c=[]);return c.length&amp;&amp;d(),l.length?l.join(&quot;&quot;):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(r=t,s):r},s.defined=function(t){return arguments.length?(n=t,s):n},s.interpolate=function(t){return arguments.length?(a=&quot;function&quot;==typeof t?i=t:(i=Vo.get(t)||Uo).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}t.svg.line=function(){return jo(z)};var Vo=t.map({linear:Uo,&quot;linear-closed&quot;:qo,step:function(t){var e=0,r=t.length,n=t[0],i=[n[0],&quot;,&quot;,n[1]];for(;++e&lt;r;)i.push(&quot;H&quot;,(n[0]+(n=t[e])[0])/2,&quot;V&quot;,n[1]);r&gt;1&amp;&amp;i.push(&quot;H&quot;,n[0]);return i.join(&quot;&quot;)},&quot;step-before&quot;:Ho,&quot;step-after&quot;:Go,basis:Xo,&quot;basis-open&quot;:function(t){if(t.length&lt;4)return Uo(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n&lt;3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(Zo(Ko,a)+&quot;,&quot;+Zo(Ko,o)),--n;for(;++n&lt;i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Qo(r,a,o);return r.join(&quot;&quot;)},&quot;basis-closed&quot;:function(t){var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];for(;++n&lt;4;)r=t[n%i],o.push(r[0]),s.push(r[1]);e=[Zo(Ko,o),&quot;,&quot;,Zo(Ko,s)],--n;for(;++n&lt;a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Qo(e,o,s);return e.join(&quot;&quot;)},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,c=-1;++c&lt;=r;)n=t[c],i=c/r,n[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return Xo(t)},cardinal:function(t,e){return t.length&lt;3?Uo(t):t[0]+Wo(t,Yo(t,e))},&quot;cardinal-open&quot;:function(t,e){return t.length&lt;4?Uo(t):t[1]+Wo(t.slice(1,-1),Yo(t,e))},&quot;cardinal-closed&quot;:function(t,e){return t.length&lt;3?qo(t):t[0]+Wo((t.push(t[0]),t),Yo([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length&lt;3?Uo(t):t[0]+Wo(t,function(t){var e,r,n,i,a=[],o=function(t){var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=ts(i,a);for(;++e&lt;r;)n[e]=(o+(o=ts(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;for(;++s&lt;l;)e=ts(t[s],t[s+1]),y(e)&lt;kt?o[s]=o[s+1]=0:(r=o[s]/e,n=o[s+1]/e,(i=r*r+n*n)&gt;9&amp;&amp;(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s&lt;=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Uo(t){return t.length&gt;1?t.join(&quot;L&quot;):t+&quot;Z&quot;}function qo(t){return t.join(&quot;L&quot;)+&quot;Z&quot;}function Ho(t){for(var e=0,r=t.length,n=t[0],i=[n[0],&quot;,&quot;,n[1]];++e&lt;r;)i.push(&quot;V&quot;,(n=t[e])[1],&quot;H&quot;,n[0]);return i.join(&quot;&quot;)}function Go(t){for(var e=0,r=t.length,n=t[0],i=[n[0],&quot;,&quot;,n[1]];++e&lt;r;)i.push(&quot;H&quot;,(n=t[e])[0],&quot;V&quot;,n[1]);return i.join(&quot;&quot;)}function Wo(t,e){if(e.length&lt;1||t.length!=e.length&amp;&amp;t.length!=e.length+2)return Uo(t);var r=t.length!=e.length,n=&quot;&quot;,i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&amp;&amp;(n+=&quot;Q&quot;+(a[0]-2*o[0]/3)+&quot;,&quot;+(a[1]-2*o[1]/3)+&quot;,&quot;+a[0]+&quot;,&quot;+a[1],i=t[1],l=2),e.length&gt;1){s=e[1],a=t[l],l++,n+=&quot;C&quot;+(i[0]+o[0])+&quot;,&quot;+(i[1]+o[1])+&quot;,&quot;+(a[0]-s[0])+&quot;,&quot;+(a[1]-s[1])+&quot;,&quot;+a[0]+&quot;,&quot;+a[1];for(var c=2;c&lt;e.length;c++,l++)a=t[l],s=e[c],n+=&quot;S&quot;+(a[0]-s[0])+&quot;,&quot;+(a[1]-s[1])+&quot;,&quot;+a[0]+&quot;,&quot;+a[1]}if(r){var u=t[l];n+=&quot;Q&quot;+(a[0]+2*s[0]/3)+&quot;,&quot;+(a[1]+2*s[1]/3)+&quot;,&quot;+u[0]+&quot;,&quot;+u[1]}return n}function Yo(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s&lt;l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Xo(t){if(t.length&lt;3)return Uo(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,&quot;,&quot;,a,&quot;L&quot;,Zo(Ko,o),&quot;,&quot;,Zo(Ko,s)];for(t.push(t[r-1]);++e&lt;=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Qo(l,o,s);return t.pop(),l.push(&quot;L&quot;,n),l.join(&quot;&quot;)}function Zo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}Vo.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var $o=[0,2/3,1/3,0],Jo=[0,1/3,2/3,0],Ko=[0,1/6,2/3,1/6];function Qo(t,e,r){t.push(&quot;C&quot;,Zo($o,e),&quot;,&quot;,Zo($o,r),&quot;,&quot;,Zo(Jo,e),&quot;,&quot;,Zo(Jo,r),&quot;,&quot;,Zo(Ko,e),&quot;,&quot;,Zo(Ko,r))}function ts(t,e){return(e[1]-t[1])/(e[0]-t[0])}function es(t){for(var e,r,n,i=-1,a=t.length;++i&lt;a;)r=(e=t[i])[0],n=e[1]-Et,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function rs(t){var e=ei,r=ei,n=0,i=ri,a=Wr,o=Uo,s=o.key,l=o,c=&quot;L&quot;,u=.7;function f(s){var f,h,p,d=[],g=[],m=[],v=-1,y=s.length,x=me(e),b=me(n),_=e===r?function(){return h}:me(r),w=n===i?function(){return p}:me(i);function k(){d.push(&quot;M&quot;,o(t(m),u),c,l(t(g.reverse()),u),&quot;Z&quot;)}for(;++v&lt;y;)a.call(this,f=s[v],v)?(g.push([h=+x.call(this,f,v),p=+b.call(this,f,v)]),m.push([+_.call(this,f,v),+w.call(this,f,v)])):g.length&amp;&amp;(k(),g=[],m=[]);return g.length&amp;&amp;k(),d.length?d.join(&quot;&quot;):null}return f.x=function(t){return arguments.length?(e=r=t,f):r},f.x0=function(t){return arguments.length?(e=t,f):e},f.x1=function(t){return arguments.length?(r=t,f):r},f.y=function(t){return arguments.length?(n=i=t,f):i},f.y0=function(t){return arguments.length?(n=t,f):n},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(a=t,f):a},f.interpolate=function(t){return arguments.length?(s=&quot;function&quot;==typeof t?o=t:(o=Vo.get(t)||Uo).key,l=o.reverse||o,c=o.closed?&quot;M&quot;:&quot;L&quot;,f):s},f.tension=function(t){return arguments.length?(u=t,f):u},f}function ns(t){return t.radius}function is(t){return[t.x,t.y]}function as(){return 64}function os(){return&quot;circle&quot;}function ss(t){var e=Math.sqrt(t/At);return&quot;M0,&quot;+e+&quot;A&quot;+e+&quot;,&quot;+e+&quot; 0 1,1 0,&quot;+-e+&quot;A&quot;+e+&quot;,&quot;+e+&quot; 0 1,1 0,&quot;+e+&quot;Z&quot;}t.svg.line.radial=function(){var t=jo(es);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Ho.reverse=Go,Go.reverse=Ho,t.svg.area=function(){return rs(z)},t.svg.area.radial=function(){var t=rs(es);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},t.svg.chord=function(){var t=Vn,e=Un,r=ns,n=Do,i=Ro;function a(r,n){var i,a,c=o(this,t,r,n),u=o(this,e,r,n);return&quot;M&quot;+c.p0+s(c.r,c.p1,c.a1-c.a0)+(a=u,(i=c).a0==a.a0&amp;&amp;i.a1==a.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+s(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+&quot;Z&quot;}function o(t,e,a,o){var s=e.call(t,a,o),l=r.call(t,s,o),c=n.call(t,s,o)-Et,u=i.call(t,s,o)-Et;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function s(t,e,r){return&quot;A&quot;+t+&quot;,&quot;+t+&quot; 0 &quot;+ +(r&gt;At)+&quot;,1 &quot;+e}function l(t,e,r,n){return&quot;Q 0,0 &quot;+n}return a.radius=function(t){return arguments.length?(r=me(t),a):r},a.source=function(e){return arguments.length?(t=me(e),a):t},a.target=function(t){return arguments.length?(e=me(t),a):e},a.startAngle=function(t){return arguments.length?(n=me(t),a):n},a.endAngle=function(t){return arguments.length?(i=me(t),a):i},a},t.svg.diagonal=function(){var t=Vn,e=Un,r=is;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return&quot;M&quot;+(l=l.map(r))[0]+&quot;C&quot;+l[1]+&quot; &quot;+l[2]+&quot; &quot;+l[3]}return n.source=function(e){return arguments.length?(t=me(e),n):t},n.target=function(t){return arguments.length?(e=me(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=is,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Et;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=as;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=me(e),r):t},r.size=function(t){return arguments.length?(e=me(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return&quot;M&quot;+-3*e+&quot;,&quot;+-e+&quot;H&quot;+-e+&quot;V&quot;+-3*e+&quot;H&quot;+e+&quot;V&quot;+-e+&quot;H&quot;+3*e+&quot;V&quot;+e+&quot;H&quot;+e+&quot;V&quot;+3*e+&quot;H&quot;+-e+&quot;V&quot;+e+&quot;H&quot;+-3*e+&quot;Z&quot;},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return&quot;M0,&quot;+-e+&quot;L&quot;+r+&quot;,0 0,&quot;+e+&quot; &quot;+-r+&quot;,0Z&quot;},square:function(t){var e=Math.sqrt(t)/2;return&quot;M&quot;+-e+&quot;,&quot;+-e+&quot;L&quot;+e+&quot;,&quot;+-e+&quot; &quot;+e+&quot;,&quot;+e+&quot; &quot;+-e+&quot;,&quot;+e+&quot;Z&quot;},&quot;triangle-down&quot;:function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return&quot;M0,&quot;+r+&quot;L&quot;+e+&quot;,&quot;+-r+&quot; &quot;+-e+&quot;,&quot;+-r+&quot;Z&quot;},&quot;triangle-up&quot;:function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return&quot;M0,&quot;+-r+&quot;L&quot;+e+&quot;,&quot;+r+&quot; &quot;+-e+&quot;,&quot;+r+&quot;Z&quot;}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Ct);Y.transition=function(t){for(var e,r,n=ds||++vs,i=bs(t),a=[],o=gs||{time:Date.now(),ease:ia,delay:0,duration:250},s=-1,l=this.length;++s&lt;l;){a.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u&lt;f;)(r=c[u])&amp;&amp;_s(r,u,i,n,o),e.push(r)}return ps(a,i,n)},Y.interrupt=function(t){return this.each(null==t?fs:hs(bs(t)))};var fs=hs(bs());function hs(t){return function(){var e,r,n;(e=this[t])&amp;&amp;(n=e[r=e.active])&amp;&amp;(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&amp;&amp;n.event.interrupt.call(this,this.__data__,n.index))}}function ps(t,e,r){return U(t,ms),t.namespace=e,t.id=r,t}var ds,gs,ms=[],vs=0;function ys(t,e,r,n){var i=t.id,a=t.namespace;return ut(t,&quot;function&quot;==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function xs(t){return null==t&amp;&amp;(t=&quot;&quot;),function(){this.textContent=t}}function bs(t){return null==t?&quot;__transition__&quot;:&quot;__transition_&quot;+t+&quot;__&quot;}function _s(t,e,r,n,i){var a,o,s,l,c,u=t[r]||(t[r]={active:0,count:0}),f=u[n];function h(r){var i=u.active,h=u[i];for(var d in h&amp;&amp;(h.timer.c=null,h.timer.t=NaN,--u.count,delete u[i],h.event&amp;&amp;h.event.interrupt.call(t,t.__data__,h.index)),u)if(+d&lt;n){var g=u[d];g.timer.c=null,g.timer.t=NaN,--u.count,delete u[d]}o.c=p,Me(function(){return o.c&amp;&amp;p(r||1)&amp;&amp;(o.c=null,o.t=NaN),1},0,a),u.active=n,f.event&amp;&amp;f.event.start.call(t,t.__data__,e),c=[],f.tween.forEach(function(r,n){(n=n.call(t,t.__data__,e))&amp;&amp;c.push(n)}),l=f.ease,s=f.duration}function p(i){for(var a=i/s,o=l(a),h=c.length;h&gt;0;)c[--h].call(t,o);if(a&gt;=1)return f.event&amp;&amp;f.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}f||(a=i.time,o=Me(function(t){var e=f.delay;if(o.t=e+a,e&lt;=t)return h(t-e);o.c=h},0,a),f=u[n]={tween:new b,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}ms.call=Y.call,ms.empty=Y.empty,ms.node=Y.node,ms.size=Y.size,t.transition=function(e,r){return e&amp;&amp;e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=ms,ms.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++s&lt;l;){o.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u&lt;f;)(n=c[u])&amp;&amp;(r=t.call(n,n.__data__,u,s))?(&quot;__data__&quot;in n&amp;&amp;(r.__data__=n.__data__),_s(r,u,a,i,n[a][i]),e.push(r)):e.push(null)}return ps(o,a,i)},ms.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=Z(t);for(var c=-1,u=this.length;++c&lt;u;)for(var f=this[c],h=-1,p=f.length;++h&lt;p;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,c),l.push(e=[]);for(var d=-1,g=r.length;++d&lt;g;)(i=r[d])&amp;&amp;_s(i,d,s,o,a),e.push(i)}return ps(l,s,o)},ms.filter=function(t){var e,r,n=[];&quot;function&quot;!=typeof t&amp;&amp;(t=ct(t));for(var i=0,a=this.length;i&lt;a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s&lt;l;s++)(r=o[s])&amp;&amp;t.call(r,r.__data__,s,i)&amp;&amp;e.push(r)}return ps(n,this.namespace,this.id)},ms.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length&lt;2?this.node()[n][r].tween.get(t):ut(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},ms.attr=function(e,r){if(arguments.length&lt;2){for(r in e)this.attr(r,e[r]);return this}var n=&quot;transform&quot;==e?ga:Zi,i=t.ns.qualify(e);function a(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}return ys(this,&quot;attr.&quot;+e,r,i.local?function(t){return null==t?o:(t+=&quot;&quot;,function(){var e,r=this.getAttributeNS(i.space,i.local);return r!==t&amp;&amp;(e=n(r,t),function(t){this.setAttributeNS(i.space,i.local,e(t))})})}:function(t){return null==t?a:(t+=&quot;&quot;,function(){var e,r=this.getAttribute(i);return r!==t&amp;&amp;(e=n(r,t),function(t){this.setAttribute(i,e(t))})})})},ms.attrTween=function(e,r){var n=t.ns.qualify(e);return this.tween(&quot;attr.&quot;+e,n.local?function(t,e){var i=r.call(this,t,e,this.getAttributeNS(n.space,n.local));return i&amp;&amp;function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,e){var i=r.call(this,t,e,this.getAttribute(n));return i&amp;&amp;function(t){this.setAttribute(n,i(t))}})},ms.style=function(t,e,r){var n=arguments.length;if(n&lt;3){if(&quot;string&quot;!=typeof t){for(r in n&lt;2&amp;&amp;(e=&quot;&quot;),t)this.style(r,t[r],e);return this}r=&quot;&quot;}function i(){this.style.removeProperty(t)}return ys(this,&quot;style.&quot;+t,e,function(e){return null==e?i:(e+=&quot;&quot;,function(){var n,i=o(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&amp;&amp;(n=Zi(i,e),function(e){this.style.setProperty(t,n(e),r)})})})},ms.styleTween=function(t,e,r){return arguments.length&lt;3&amp;&amp;(r=&quot;&quot;),this.tween(&quot;style.&quot;+t,function(n,i){var a=e.call(this,n,i,o(this).getComputedStyle(this,null).getPropertyValue(t));return a&amp;&amp;function(e){this.style.setProperty(t,a(e),r)}})},ms.text=function(t){return ys(this,&quot;text&quot;,t,xs)},ms.remove=function(){var t=this.namespace;return this.each(&quot;end.transition&quot;,function(){var e;this[t].count&lt;2&amp;&amp;(e=this.parentNode)&amp;&amp;e.removeChild(this)})},ms.ease=function(e){var r=this.id,n=this.namespace;return arguments.length&lt;1?this.node()[n][r].ease:(&quot;function&quot;!=typeof e&amp;&amp;(e=t.ease.apply(t,arguments)),ut(this,function(t){t[n][r].ease=e}))},ms.delay=function(t){var e=this.id,r=this.namespace;return arguments.length&lt;1?this.node()[r][e].delay:ut(this,&quot;function&quot;==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},ms.duration=function(t){var e=this.id,r=this.namespace;return arguments.length&lt;1?this.node()[r][e].duration:ut(this,&quot;function&quot;==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},ms.each=function(e,r){var n=this.id,i=this.namespace;if(arguments.length&lt;2){var a=gs,o=ds;try{ds=n,ut(this,function(t,r,a){gs=t[i][n],e.call(t,t.__data__,r,a)})}finally{gs=a,ds=o}}else ut(this,function(a){var o=a[i][n];(o.event||(o.event=t.dispatch(&quot;start&quot;,&quot;end&quot;,&quot;interrupt&quot;))).on(e,r)});return this},ms.transition=function(){for(var t,e,r,n=this.id,i=++vs,a=this.namespace,o=[],s=0,l=this.length;s&lt;l;s++){o.push(t=[]);for(var c,u=0,f=(c=this[s]).length;u&lt;f;u++)(e=c[u])&amp;&amp;_s(e,u,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return ps(o,a,i)},t.svg.axis=function(){var e,r=t.scale.linear(),i=ws,a=6,o=6,s=3,l=[10],c=null;function u(n){n.each(function(){var n,u=t.select(this),f=this.__chart__||r,h=this.__chart__=r.copy(),p=null==c?h.ticks?h.ticks.apply(h,l):h.domain():c,d=null==e?h.tickFormat?h.tickFormat.apply(h,l):z:e,g=u.selectAll(&quot;.tick&quot;).data(p,h),m=g.enter().insert(&quot;g&quot;,&quot;.domain&quot;).attr(&quot;class&quot;,&quot;tick&quot;).style(&quot;opacity&quot;,kt),v=t.transition(g.exit()).style(&quot;opacity&quot;,kt).remove(),y=t.transition(g.order()).style(&quot;opacity&quot;,1),x=Math.max(a,0)+s,b=uo(h),_=u.selectAll(&quot;.domain&quot;).data([0]),w=(_.enter().append(&quot;path&quot;).attr(&quot;class&quot;,&quot;domain&quot;),t.transition(_));m.append(&quot;line&quot;),m.append(&quot;text&quot;);var k,M,A,T,S=m.select(&quot;line&quot;),E=y.select(&quot;line&quot;),C=g.select(&quot;text&quot;).text(d),L=m.select(&quot;text&quot;),P=y.select(&quot;text&quot;),O=&quot;top&quot;===i||&quot;left&quot;===i?-1:1;if(&quot;bottom&quot;===i||&quot;top&quot;===i?(n=Ms,k=&quot;x&quot;,A=&quot;y&quot;,M=&quot;x2&quot;,T=&quot;y2&quot;,C.attr(&quot;dy&quot;,O&lt;0?&quot;0em&quot;:&quot;.71em&quot;).style(&quot;text-anchor&quot;,&quot;middle&quot;),w.attr(&quot;d&quot;,&quot;M&quot;+b[0]+&quot;,&quot;+O*o+&quot;V0H&quot;+b[1]+&quot;V&quot;+O*o)):(n=As,k=&quot;y&quot;,A=&quot;x&quot;,M=&quot;y2&quot;,T=&quot;x2&quot;,C.attr(&quot;dy&quot;,&quot;.32em&quot;).style(&quot;text-anchor&quot;,O&lt;0?&quot;end&quot;:&quot;start&quot;),w.attr(&quot;d&quot;,&quot;M&quot;+O*o+&quot;,&quot;+b[0]+&quot;H0V&quot;+b[1]+&quot;H&quot;+O*o)),S.attr(T,O*a),L.attr(A,O*x),E.attr(M,0).attr(T,O*a),P.attr(k,0).attr(A,O*x),h.rangeBand){var I=h,D=I.rangeBand()/2;f=h=function(t){return I(t)+D}}else f.rangeBand?f=h:v.call(n,h,f);m.call(n,f,h),y.call(n,h,h)})}return u.scale=function(t){return arguments.length?(r=t,u):r},u.orient=function(t){return arguments.length?(i=t in ks?t+&quot;&quot;:ws,u):i},u.ticks=function(){return arguments.length?(l=n(arguments),u):l},u.tickValues=function(t){return arguments.length?(c=t,u):c},u.tickFormat=function(t){return arguments.length?(e=t,u):e},u.tickSize=function(t){var e=arguments.length;return e?(a=+t,o=+arguments[e-1],u):a},u.innerTickSize=function(t){return arguments.length?(a=+t,u):a},u.outerTickSize=function(t){return arguments.length?(o=+t,u):o},u.tickPadding=function(t){return arguments.length?(s=+t,u):s},u.tickSubdivide=function(){return arguments.length&amp;&amp;u},u};var ws=&quot;bottom&quot;,ks={top:1,right:1,bottom:1,left:1};function Ms(t,e,r){t.attr(&quot;transform&quot;,function(t){var n=e(t);return&quot;translate(&quot;+(isFinite(n)?n:r(t))+&quot;,0)&quot;})}function As(t,e,r){t.attr(&quot;transform&quot;,function(t){var n=e(t);return&quot;translate(0,&quot;+(isFinite(n)?n:r(t))+&quot;)&quot;})}t.svg.brush=function(){var e,r,n=j(h,&quot;brushstart&quot;,&quot;brush&quot;,&quot;brushend&quot;),i=null,a=null,s=[0,0],l=[0,0],c=!0,u=!0,f=Ss[0];function h(e){e.each(function(){var e=t.select(this).style(&quot;pointer-events&quot;,&quot;all&quot;).style(&quot;-webkit-tap-highlight-color&quot;,&quot;rgba(0,0,0,0)&quot;).on(&quot;mousedown.brush&quot;,m).on(&quot;touchstart.brush&quot;,m),r=e.selectAll(&quot;.background&quot;).data([0]);r.enter().append(&quot;rect&quot;).attr(&quot;class&quot;,&quot;background&quot;).style(&quot;visibility&quot;,&quot;hidden&quot;).style(&quot;cursor&quot;,&quot;crosshair&quot;),e.selectAll(&quot;.extent&quot;).data([0]).enter().append(&quot;rect&quot;).attr(&quot;class&quot;,&quot;extent&quot;).style(&quot;cursor&quot;,&quot;move&quot;);var n=e.selectAll(&quot;.resize&quot;).data(f,z);n.exit().remove(),n.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return&quot;resize &quot;+t}).style(&quot;cursor&quot;,function(t){return Ts[t]}).append(&quot;rect&quot;).attr(&quot;x&quot;,function(t){return/[ew]$/.test(t)?-3:null}).attr(&quot;y&quot;,function(t){return/^[ns]/.test(t)?-3:null}).attr(&quot;width&quot;,6).attr(&quot;height&quot;,6).style(&quot;visibility&quot;,&quot;hidden&quot;),n.style(&quot;display&quot;,h.empty()?&quot;none&quot;:null);var o,s=t.transition(e),l=t.transition(r);i&amp;&amp;(o=uo(i),l.attr(&quot;x&quot;,o[0]).attr(&quot;width&quot;,o[1]-o[0]),d(s)),a&amp;&amp;(o=uo(a),l.attr(&quot;y&quot;,o[0]).attr(&quot;height&quot;,o[1]-o[0]),g(s)),p(s)})}function p(t){t.selectAll(&quot;.resize&quot;).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+s[+/e$/.test(t)]+&quot;,&quot;+l[+/^s/.test(t)]+&quot;)&quot;})}function d(t){t.select(&quot;.extent&quot;).attr(&quot;x&quot;,s[0]),t.selectAll(&quot;.extent,.n&gt;rect,.s&gt;rect&quot;).attr(&quot;width&quot;,s[1]-s[0])}function g(t){t.select(&quot;.extent&quot;).attr(&quot;y&quot;,l[0]),t.selectAll(&quot;.extent,.e&gt;rect,.w&gt;rect&quot;).attr(&quot;height&quot;,l[1]-l[0])}function m(){var f,m,v=this,y=t.select(t.event.target),x=n.of(v,arguments),b=t.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&amp;&amp;i,k=!/^(e|w)$/.test(_)&amp;&amp;a,M=y.classed(&quot;extent&quot;),A=xt(v),T=t.mouse(v),S=t.select(o(v)).on(&quot;keydown.brush&quot;,function(){32==t.event.keyCode&amp;&amp;(M||(f=null,T[0]-=s[1],T[1]-=l[1],M=2),F())}).on(&quot;keyup.brush&quot;,function(){32==t.event.keyCode&amp;&amp;2==M&amp;&amp;(T[0]+=s[1],T[1]+=l[1],M=0,F())});if(t.event.changedTouches?S.on(&quot;touchmove.brush&quot;,L).on(&quot;touchend.brush&quot;,P):S.on(&quot;mousemove.brush&quot;,L).on(&quot;mouseup.brush&quot;,P),b.interrupt().selectAll(&quot;*&quot;).interrupt(),M)T[0]=s[0]-T[0],T[1]=l[0]-T[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);m=[s[1-E]-T[0],l[1-C]-T[1]],T[0]=s[E],T[1]=l[C]}else t.event.altKey&amp;&amp;(f=T.slice());function L(){var e=t.mouse(v),r=!1;m&amp;&amp;(e[0]+=m[0],e[1]+=m[1]),M||(t.event.altKey?(f||(f=[(s[0]+s[1])/2,(l[0]+l[1])/2]),T[0]=s[+(e[0]&lt;f[0])],T[1]=l[+(e[1]&lt;f[1])]):f=null),w&amp;&amp;z(e,i,0)&amp;&amp;(d(b),r=!0),k&amp;&amp;z(e,a,1)&amp;&amp;(g(b),r=!0),r&amp;&amp;(p(b),x({type:&quot;brush&quot;,mode:M?&quot;move&quot;:&quot;resize&quot;}))}function z(t,n,i){var a,o,h=uo(n),p=h[0],d=h[1],g=T[i],m=i?l:s,v=m[1]-m[0];if(M&amp;&amp;(p-=g,d-=v+g),a=(i?u:c)?Math.max(p,Math.min(d,t[i])):t[i],M?o=(a+=g)+v:(f&amp;&amp;(g=Math.max(p,Math.min(d,2*f[i]-a))),g&lt;a?(o=a,a=g):o=g),m[0]!=a||m[1]!=o)return i?r=null:e=null,m[0]=a,m[1]=o,!0}function P(){L(),b.style(&quot;pointer-events&quot;,&quot;all&quot;).selectAll(&quot;.resize&quot;).style(&quot;display&quot;,h.empty()?&quot;none&quot;:null),t.select(&quot;body&quot;).style(&quot;cursor&quot;,null),S.on(&quot;mousemove.brush&quot;,null).on(&quot;mouseup.brush&quot;,null).on(&quot;touchmove.brush&quot;,null).on(&quot;touchend.brush&quot;,null).on(&quot;keydown.brush&quot;,null).on(&quot;keyup.brush&quot;,null),A(),x({type:&quot;brushend&quot;})}b.style(&quot;pointer-events&quot;,&quot;none&quot;).selectAll(&quot;.resize&quot;).style(&quot;display&quot;,null),t.select(&quot;body&quot;).style(&quot;cursor&quot;,y.style(&quot;cursor&quot;)),x({type:&quot;brushstart&quot;}),L()}return h.event=function(i){i.each(function(){var i=n.of(this,arguments),a={x:s,y:l,i:e,j:r},o=this.__chart__||a;this.__chart__=a,ds?t.select(this).transition().each(&quot;start.brush&quot;,function(){e=o.i,r=o.j,s=o.x,l=o.y,i({type:&quot;brushstart&quot;})}).tween(&quot;brush:brush&quot;,function(){var t=$i(s,a.x),n=$i(l,a.y);return e=r=null,function(e){s=a.x=t(e),l=a.y=n(e),i({type:&quot;brush&quot;,mode:&quot;resize&quot;})}}).each(&quot;end.brush&quot;,function(){e=a.i,r=a.j,i({type:&quot;brush&quot;,mode:&quot;resize&quot;}),i({type:&quot;brushend&quot;})}):(i({type:&quot;brushstart&quot;}),i({type:&quot;brush&quot;,mode:&quot;resize&quot;}),i({type:&quot;brushend&quot;}))})},h.x=function(t){return arguments.length?(f=Ss[!(i=t)&lt;&lt;1|!a],h):i},h.y=function(t){return arguments.length?(f=Ss[!i&lt;&lt;1|!(a=t)],h):a},h.clamp=function(t){return arguments.length?(i&amp;&amp;a?(c=!!t[0],u=!!t[1]):i?c=!!t:a&amp;&amp;(u=!!t),h):i&amp;&amp;a?[c,u]:i?c:a?u:null},h.extent=function(t){var n,o,c,u,f;return arguments.length?(i&amp;&amp;(n=t[0],o=t[1],a&amp;&amp;(n=n[0],o=o[0]),e=[n,o],i.invert&amp;&amp;(n=i(n),o=i(o)),o&lt;n&amp;&amp;(f=n,n=o,o=f),n==s[0]&amp;&amp;o==s[1]||(s=[n,o])),a&amp;&amp;(c=t[0],u=t[1],i&amp;&amp;(c=c[1],u=u[1]),r=[c,u],a.invert&amp;&amp;(c=a(c),u=a(u)),u&lt;c&amp;&amp;(f=c,c=u,u=f),c==l[0]&amp;&amp;u==l[1]||(l=[c,u])),h):(i&amp;&amp;(e?(n=e[0],o=e[1]):(n=s[0],o=s[1],i.invert&amp;&amp;(n=i.invert(n),o=i.invert(o)),o&lt;n&amp;&amp;(f=n,n=o,o=f))),a&amp;&amp;(r?(c=r[0],u=r[1]):(c=l[0],u=l[1],a.invert&amp;&amp;(c=a.invert(c),u=a.invert(u)),u&lt;c&amp;&amp;(f=c,c=u,u=f))),i&amp;&amp;a?[[n,c],[o,u]]:i?[n,o]:a&amp;&amp;[c,u])},h.clear=function(){return h.empty()||(s=[0,0],l=[0,0],e=r=null),h},h.empty=function(){return!!i&amp;&amp;s[0]==s[1]||!!a&amp;&amp;l[0]==l[1]},t.rebind(h,n,&quot;on&quot;)};var Ts={n:&quot;ns-resize&quot;,e:&quot;ew-resize&quot;,s:&quot;ns-resize&quot;,w:&quot;ew-resize&quot;,nw:&quot;nwse-resize&quot;,ne:&quot;nesw-resize&quot;,se:&quot;nwse-resize&quot;,sw:&quot;nesw-resize&quot;},Ss=[[&quot;n&quot;,&quot;e&quot;,&quot;s&quot;,&quot;w&quot;,&quot;nw&quot;,&quot;ne&quot;,&quot;se&quot;,&quot;sw&quot;],[&quot;e&quot;,&quot;w&quot;],[&quot;n&quot;,&quot;s&quot;],[]],Es=Oe.format=sr.timeFormat,Cs=Es.utc,Ls=Cs(&quot;%Y-%m-%dT%H:%M:%S.%LZ&quot;);function zs(t){return t.toISOString()}function Ps(e,r,n){function i(t){return e(t)}function a(e,n){var i=(e[1]-e[0])/n,a=t.bisect(Is,i);return a==Is.length?[r.year,xo(e.map(function(t){return t/31536e6}),n)[2]]:a?r[i/Is[a-1]&lt;Is[a]/i?a-1:a]:[Bs,xo(e,n)[2]]}return i.invert=function(t){return Os(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain().map(Os)},i.nice=function(t,e){var r=i.domain(),n=co(r),o=null==t?a(n,10):&quot;number&quot;==typeof t&amp;&amp;a(n,t);function s(r){return!isNaN(r)&amp;&amp;!t.range(r,Os(+r+1),e).length}return o&amp;&amp;(t=o[0],e=o[1]),i.domain(ho(r,e&gt;1?{floor:function(e){for(;s(e=t.floor(e));)e=Os(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Os(+e+1);return e}}:t))},i.ticks=function(t,e){var r=co(i.domain()),n=null==t?a(r,10):&quot;number&quot;==typeof t?a(r,t):!t.range&amp;&amp;[{range:t},e];return n&amp;&amp;(t=n[0],e=n[1]),t.range(r[0],Os(+r[1]+1),e&lt;1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Ps(e.copy(),r,n)},vo(i,e)}function Os(t){return new Date(t)}Es.iso=Date.prototype.toISOString&amp;&amp;+new Date(&quot;2000-01-01T00:00:00.000Z&quot;)?zs:Ls,zs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},zs.toString=Ls.toString,Oe.second=Be(function(t){return new Ie(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Oe.seconds=Oe.second.range,Oe.seconds.utc=Oe.second.utc.range,Oe.minute=Be(function(t){return new Ie(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Oe.minutes=Oe.minute.range,Oe.minutes.utc=Oe.minute.utc.range,Oe.hour=Be(function(t){var e=t.getTimezoneOffset()/60;return new Ie(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Oe.hours=Oe.hour.range,Oe.hours.utc=Oe.hour.utc.range,Oe.month=Be(function(t){return(t=Oe.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Oe.months=Oe.month.range,Oe.months.utc=Oe.month.utc.range;var Is=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[Oe.second,1],[Oe.second,5],[Oe.second,15],[Oe.second,30],[Oe.minute,1],[Oe.minute,5],[Oe.minute,15],[Oe.minute,30],[Oe.hour,1],[Oe.hour,3],[Oe.hour,6],[Oe.hour,12],[Oe.day,1],[Oe.day,2],[Oe.week,1],[Oe.month,1],[Oe.month,3],[Oe.year,1]],Rs=Es.multi([[&quot;.%L&quot;,function(t){return t.getMilliseconds()}],[&quot;:%S&quot;,function(t){return t.getSeconds()}],[&quot;%I:%M&quot;,function(t){return t.getMinutes()}],[&quot;%I %p&quot;,function(t){return t.getHours()}],[&quot;%a %d&quot;,function(t){return t.getDay()&amp;&amp;1!=t.getDate()}],[&quot;%b %d&quot;,function(t){return 1!=t.getDate()}],[&quot;%B&quot;,function(t){return t.getMonth()}],[&quot;%Y&quot;,Wr]]),Bs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(Os)},floor:z,ceil:z};Ds.year=Oe.year,Oe.scale=function(){return Ps(t.scale.linear(),Ds,Rs)};var Fs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Cs.multi([[&quot;.%L&quot;,function(t){return t.getUTCMilliseconds()}],[&quot;:%S&quot;,function(t){return t.getUTCSeconds()}],[&quot;%I:%M&quot;,function(t){return t.getUTCMinutes()}],[&quot;%I %p&quot;,function(t){return t.getUTCHours()}],[&quot;%a %d&quot;,function(t){return t.getUTCDay()&amp;&amp;1!=t.getUTCDate()}],[&quot;%b %d&quot;,function(t){return 1!=t.getUTCDate()}],[&quot;%B&quot;,function(t){return t.getUTCMonth()}],[&quot;%Y&quot;,Wr]]);function js(t){return JSON.parse(t.responseText)}function Vs(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}Fs.year=Oe.year.utc,Oe.scale.utc=function(){return Ps(t.scale.linear(),Fs,Ns)},t.text=ve(function(t){return t.responseText}),t.json=function(t,e){return ye(t,&quot;application/json&quot;,js,e)},t.html=function(t,e){return ye(t,&quot;text/html&quot;,Vs,e)},t.xml=ve(function(t){return t.responseXML}),&quot;object&quot;==typeof e&amp;&amp;e.exports?e.exports=t:this.d3=t}()},{}],148:[function(t,e,r){e.exports=function(){for(var t=0;t&lt;arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],149:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;incremental-convex-hull&quot;),i=t(&quot;uniq&quot;);function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a&lt;i;++a){var o=n[a]-r[a];if(o)return o}return 0}e.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s&lt;1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map(function(t,e){return[t[0],e]});n.sort(function(t,e){return t[0]-e[0]});for(var i=new Array(t-1),a=1;a&lt;t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}r&amp;&amp;i.push([-1,i[0][1]],[i[t-1][1],-1]);return i}(r,t,e);for(var l=new Array(r),c=1,u=0;u&lt;r;++u){for(var f=t[u],h=new Array(s+1),p=0,d=0;d&lt;s;++d){var g=f[d];h[d]=g,p+=g*g}h[s]=p,l[u]=new a(h,u),c=Math.max(p,c)}i(l,o),r=l.length;for(var m=new Array(r+s+1),v=new Array(r+s+1),y=(s+1)*(s+1)*c,x=new Array(s+1),u=0;u&lt;=s;++u)x[u]=0;x[s]=y,m[0]=x.slice(),v[0]=-1;for(var u=0;u&lt;=s;++u){var h=x.slice();h[u]=1,m[u+1]=h,v[u+1]=-1}for(var u=0;u&lt;r;++u){var b=l[u];m[u+s+1]=b.point,v[u+s+1]=b.index}var _=n(m,!1);_=e?_.filter(function(t){for(var e=0,r=0;r&lt;=s;++r){var n=v[t[r]];if(n&lt;0&amp;&amp;++e&gt;=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e&lt;=s;++e){var r=v[t[e]];if(r&lt;0)return!1;t[e]=r}return!0});if(1&amp;s)for(var u=0;u&lt;_.length;++u){var b=_[u],h=b[0];b[0]=b[1],b[1]=h}return _}},{&quot;incremental-convex-hull&quot;:394,uniq:521}],150:[function(t,e,r){&quot;use strict&quot;;e.exports=a;var n=(a.canvas=document.createElement(&quot;canvas&quot;)).getContext(&quot;2d&quot;),i=o([32,126]);function a(t,e){Array.isArray(t)&amp;&amp;(t=t.join(&quot;, &quot;));var r,a={},s=16,l=.05;e&amp;&amp;(2===e.length&amp;&amp;&quot;number&quot;==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&amp;&amp;(r=e.pairs),e.fontSize&amp;&amp;(s=e.fontSize),null!=e.threshold&amp;&amp;(l=e.threshold))),r||(r=i),n.font=s+&quot;px &quot;+t;for(var c=0;c&lt;r.length;c++){var u=r[c],f=n.measureText(u[0]).width+n.measureText(u[1]).width,h=n.measureText(u).width;if(Math.abs(f-h)&gt;s*l){var p=(h-f)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r&lt;=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i&lt;t[1];i++){var a=n+String.fromCharCode(i);e.push(a)}return e}a.createPairs=o,a.ascii=i},{}],151:[function(t,e,r){(function(t){var r=!1;if(&quot;undefined&quot;!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);if(n[0]=1,r=!0,1072693248===i[1]){e.exports=function(t){return n[0]=t,[i[0],i[1]]},e.exports.pack=function(t,e){return i[0]=t,i[1]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[0]},e.exports.hi=function(t){return n[0]=t,i[1]}}else if(1072693248===i[0]){e.exports=function(t){return n[0]=t,[i[1],i[0]]},e.exports.pack=function(t,e){return i[1]=t,i[0]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[1]},e.exports.hi=function(t){return n[0]=t,i[0]}}else r=!1}if(!r){var a=new t(8);e.exports=function(t){return a.writeDoubleLE(t,0,!0),[a.readUInt32LE(0,!0),a.readUInt32LE(4,!0)]},e.exports.pack=function(t,e){return a.writeUInt32LE(t,0,!0),a.writeUInt32LE(e,4,!0),a.readDoubleLE(0,!0)},e.exports.lo=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(0,!0)},e.exports.hi=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)&gt;&gt;&gt;31},e.exports.exponent=function(t){return(e.exports.hi(t)&lt;&lt;1&gt;&gt;&gt;21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&amp;n;return 2146435072&amp;n&amp;&amp;(i+=1&lt;&lt;20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&amp;e.exports.hi(t))}}).call(this,t(&quot;buffer&quot;).Buffer)},{buffer:92}],152:[function(t,e,r){var n=t(&quot;abs-svg-path&quot;),i=t(&quot;normalize-svg-path&quot;),a={M:&quot;moveTo&quot;,C:&quot;bezierCurveTo&quot;};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{&quot;abs-svg-path&quot;:47,&quot;normalize-svg-path&quot;:432}],153:[function(t,e,r){e.exports=function(t){switch(t){case&quot;int8&quot;:return Int8Array;case&quot;int16&quot;:return Int16Array;case&quot;int32&quot;:return Int32Array;case&quot;uint8&quot;:return Uint8Array;case&quot;uint16&quot;:return Uint16Array;case&quot;uint32&quot;:return Uint32Array;case&quot;float32&quot;:return Float32Array;case&quot;float64&quot;:return Float64Array;case&quot;array&quot;:return Array;case&quot;uint8_clamped&quot;:return Uint8ClampedArray}}},{}],154:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){switch(&quot;undefined&quot;==typeof e&amp;&amp;(e=0),typeof t){case&quot;number&quot;:if(t&gt;0)return function(t,e){var r,n;for(r=new Array(t),n=0;n&lt;t;++n)r[n]=e;return r}(0|t,e);break;case&quot;object&quot;:if(&quot;number&quot;==typeof t.length)return function t(e,r,n){var i=0|e[n];if(i&lt;=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a&lt;i;++a)o[a]=r;else for(a=0;a&lt;i;++a)o[a]=t(e,r,n+1);return o}(t,e,0)}return[]}},{}],155:[function(t,e,r){&quot;use strict&quot;;function n(t,e,r){r=r||2;var n,s,l,c,u,p,g,m=e&amp;&amp;e.length,v=m?e[0]*r:t.length,y=i(t,0,v,r,!0),x=[];if(!y)return x;if(m&amp;&amp;(y=function(t,e,r,n){var o,s,l,c,u,p=[];for(o=0,s=e.length;o&lt;s;o++)l=e[o]*n,c=o&lt;s-1?e[o+1]*n:t.length,(u=i(t,l,c,n,!1))===u.next&amp;&amp;(u.steiner=!0),p.push(d(u));for(p.sort(f),o=0;o&lt;p.length;o++)h(p[o],r),r=a(r,r.next);return r}(t,e,y,r)),t.length&gt;80*r){n=l=t[0],s=c=t[1];for(var b=r;b&lt;v;b+=r)(u=t[b])&lt;n&amp;&amp;(n=u),(p=t[b+1])&lt;s&amp;&amp;(s=p),u&gt;l&amp;&amp;(l=u),p&gt;c&amp;&amp;(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function i(t,e,r,n,i){var a,o;if(i===A(t,e,r,n)&gt;0)for(a=e;a&lt;r;a+=n)o=w(a,t[a],t[a+1],o);else for(a=r-n;a&gt;=e;a-=n)o=w(a,t[a],t[a+1],o);return o&amp;&amp;y(o,o.next)&amp;&amp;(k(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&amp;&amp;0!==v(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,f,h){if(t){!h&amp;&amp;f&amp;&amp;function(t,e,r,n){var i=t;do{null===i.z&amp;&amp;(i.z=p(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e&lt;c&amp;&amp;(s++,n=n.nextZ);e++);for(l=c;s&gt;0||l&gt;0&amp;&amp;n;)0!==s&amp;&amp;(0===l||!n||r.z&lt;=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o&gt;1)}(i)}(t,n,i,f);for(var d,g,m=t;t.prev!==t.next;)if(d=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(t,e,r),e,r,n,i,f,2):2===h&amp;&amp;u(t,e,r,n,i,f):o(a(t),e,r,n,i,f,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(v(e,r,n)&gt;=0)return!1;for(var i=t.next.next;i!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&amp;&amp;v(i.prev,i,i.next)&gt;=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(v(i,a,o)&gt;=0)return!1;for(var s=i.x&lt;a.x?i.x&lt;o.x?i.x:o.x:a.x&lt;o.x?a.x:o.x,l=i.y&lt;a.y?i.y&lt;o.y?i.y:o.y:a.y&lt;o.y?a.y:o.y,c=i.x&gt;a.x?i.x&gt;o.x?i.x:o.x:a.x&gt;o.x?a.x:o.x,u=i.y&gt;a.y?i.y&gt;o.y?i.y:o.y:a.y&gt;o.y?a.y:o.y,f=p(s,l,e,r,n),h=p(c,u,e,r,n),d=t.prevZ,m=t.nextZ;d&amp;&amp;d.z&gt;=f&amp;&amp;m&amp;&amp;m.z&lt;=h;){if(d!==t.prev&amp;&amp;d!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;v(d.prev,d,d.next)&gt;=0)return!1;if(d=d.prevZ,m!==t.prev&amp;&amp;m!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&amp;&amp;v(m.prev,m,m.next)&gt;=0)return!1;m=m.nextZ}for(;d&amp;&amp;d.z&gt;=f;){if(d!==t.prev&amp;&amp;d!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;v(d.prev,d,d.next)&gt;=0)return!1;d=d.prevZ}for(;m&amp;&amp;m.z&lt;=h;){if(m!==t.prev&amp;&amp;m!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&amp;&amp;v(m.prev,m,m.next)&gt;=0)return!1;m=m.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!y(i,a)&amp;&amp;x(i,n,n.next,a)&amp;&amp;b(i,a)&amp;&amp;b(a,i)&amp;&amp;(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),k(n),k(n.next),n=t=a),n=n.next}while(n!==t);return n}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&amp;&amp;m(l,c)){var u=_(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a&lt;=n.y&amp;&amp;a&gt;=n.next.y&amp;&amp;n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s&lt;=i&amp;&amp;s&gt;o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x&lt;n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;n=r.next;for(;n!==c;)i&gt;=n.x&amp;&amp;n.x&gt;=u&amp;&amp;i!==n.x&amp;&amp;g(a&lt;f?i:o,a,u,f,a&lt;f?o:i,a,n.x,n.y)&amp;&amp;((l=Math.abs(a-n.y)/(i-n.x))&lt;h||l===h&amp;&amp;n.x&gt;r.x)&amp;&amp;b(n,t)&amp;&amp;(r=n,h=l),n=n.next;return r}(t,e)){var r=_(e,t);a(r,r.next)}}function p(t,e,r,n,i){return(t=1431655765&amp;((t=858993459&amp;((t=252645135&amp;((t=16711935&amp;((t=32767*(t-r)*i)|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2))|t&lt;&lt;1))|(e=1431655765&amp;((e=858993459&amp;((e=252645135&amp;((e=16711935&amp;((e=32767*(e-n)*i)|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))|e&lt;&lt;1))&lt;&lt;1}function d(t){var e=t,r=t;do{e.x&lt;r.x&amp;&amp;(r=e),e=e.next}while(e!==t);return r}function g(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)&gt;=0&amp;&amp;(t-o)*(n-s)-(r-o)*(e-s)&gt;=0&amp;&amp;(r-o)*(a-s)-(i-o)*(n-s)&gt;=0}function m(t,e){return t.next.i!==e.i&amp;&amp;t.prev.i!==e.i&amp;&amp;!function(t,e){var r=t;do{if(r.i!==t.i&amp;&amp;r.next.i!==t.i&amp;&amp;r.i!==e.i&amp;&amp;r.next.i!==e.i&amp;&amp;x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&amp;&amp;b(t,e)&amp;&amp;b(e,t)&amp;&amp;function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y&gt;a!=r.next.y&gt;a&amp;&amp;r.next.y!==r.y&amp;&amp;i&lt;(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&amp;&amp;(n=!n),r=r.next}while(r!==t);return n}(t,e)}function v(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&amp;&amp;t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&amp;&amp;y(r,n)||y(t,n)&amp;&amp;y(r,e))||v(t,e,r)&gt;0!=v(t,e,n)&gt;0&amp;&amp;v(r,n,t)&gt;0!=v(r,n,e)&gt;0}function b(t,e){return v(t.prev,t,t.next)&lt;0?v(t,e,t.next)&gt;=0&amp;&amp;v(t,t.prev,e)&gt;=0:v(t,e,t.prev)&lt;0||v(t,t.next,e)&lt;0}function _(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&amp;&amp;(t.prevZ.nextZ=t.nextZ),t.nextZ&amp;&amp;(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var i=0,a=e,o=r-n;a&lt;r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}e.exports=n,e.exports.default=n,n.deviation=function(t,e,r,n){var i=e&amp;&amp;e.length,a=i?e[0]*r:t.length,o=Math.abs(A(t,0,a,r));if(i)for(var s=0,l=e.length;s&lt;l;s++){var c=e[s]*r,u=s&lt;l-1?e[s+1]*r:t.length;o-=Math.abs(A(t,c,u,r))}var f=0;for(s=0;s&lt;n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&amp;&amp;0===f?0:Math.abs((f-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i&lt;t.length;i++){for(var a=0;a&lt;t[i].length;a++)for(var o=0;o&lt;e;o++)r.vertices.push(t[i][a][o]);i&gt;0&amp;&amp;(n+=t[i-1].length,r.holes.push(n))}return r}},{}],156:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=t.length;if(&quot;number&quot;!=typeof e){e=0;for(var i=0;i&lt;r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;for(var o=new Array(e),i=0;i&lt;e;++i)o[i]=[];for(var i=0;i&lt;r;++i){var a=t[i];o[a[0]].push(a[1]),o[a[1]].push(a[0])}for(var s=0;s&lt;e;++s)n(o[s],function(t,e){return t-e});return o};var n=t(&quot;uniq&quot;)},{uniq:521}],157:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../object/valid-value&quot;);e.exports=function(){return n(this).length=0,this}},{&quot;../../object/valid-value&quot;:189}],158:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Array.from:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:159,&quot;./shim&quot;:160}],159:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t,e,r=Array.from;return&quot;function&quot;==typeof r&amp;&amp;(e=r(t=[&quot;raz&quot;,&quot;dwa&quot;]),Boolean(e&amp;&amp;e!==t&amp;&amp;&quot;dwa&quot;===e[1]))}},{}],160:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es6-symbol&quot;).iterator,i=t(&quot;../../function/is-arguments&quot;),a=t(&quot;../../function/is-function&quot;),o=t(&quot;../../number/to-pos-integer&quot;),s=t(&quot;../../object/valid-callable&quot;),l=t(&quot;../../object/valid-value&quot;),c=t(&quot;../../object/is-value&quot;),u=t(&quot;../../string/is-string&quot;),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(t){var e,r,g,m,v,y,x,b,_,w,k=arguments[1],M=arguments[2];if(t=Object(l(t)),c(k)&amp;&amp;s(k),this&amp;&amp;this!==Array&amp;&amp;a(this))e=this;else{if(!k){if(i(t))return 1!==(v=t.length)?Array.apply(null,t):((m=new Array(1))[0]=t[0],m);if(f(t)){for(m=new Array(v=t.length),r=0;r&lt;v;++r)m[r]=t[r];return m}}m=[]}if(!f(t))if(void 0!==(_=t[n])){for(x=s(_).call(t),e&amp;&amp;(m=new e),b=x.next(),r=0;!b.done;)w=k?h.call(k,M,b.value,r):b.value,e?(p.value=w,d(m,r,p)):m[r]=w,b=x.next(),++r;v=r}else if(u(t)){for(v=t.length,e&amp;&amp;(m=new e),r=0,g=0;r&lt;v;++r)w=t[r],r+1&lt;v&amp;&amp;(y=w.charCodeAt(0))&gt;=55296&amp;&amp;y&lt;=56319&amp;&amp;(w+=t[++r]),w=k?h.call(k,M,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&amp;&amp;(m=new e(v)),r=0;r&lt;v;++r)w=k?h.call(k,M,t[r],r):t[r],e?(p.value=w,d(m,r,p)):m[r]=w;return e&amp;&amp;(p.value=null,m.length=v),m}},{&quot;../../function/is-arguments&quot;:161,&quot;../../function/is-function&quot;:162,&quot;../../number/to-pos-integer&quot;:168,&quot;../../object/is-value&quot;:178,&quot;../../object/valid-callable&quot;:187,&quot;../../object/valid-value&quot;:189,&quot;../../string/is-string&quot;:193,&quot;es6-symbol&quot;:203}],161:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(t){return n.call(t)===i}},{}],162:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString,i=n.call(t(&quot;./noop&quot;));e.exports=function(t){return&quot;function&quot;==typeof t&amp;&amp;n.call(t)===i}},{&quot;./noop&quot;:163}],163:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){}},{}],164:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Math.sign:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:165,&quot;./shim&quot;:166}],165:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t=Math.sign;return&quot;function&quot;==typeof t&amp;&amp;(1===t(10)&amp;&amp;-1===t(-20))}},{}],166:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t&gt;0?1:-1}},{}],167:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../math/sign&quot;),i=Math.abs,a=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&amp;&amp;isFinite(t)?n(t)*a(i(t)):t}},{&quot;../math/sign&quot;:164}],168:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./to-integer&quot;),i=Math.max;e.exports=function(t){return i(0,n(t))}},{&quot;./to-integer&quot;:167}],169:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./valid-callable&quot;),i=t(&quot;./valid-value&quot;),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,c){var u,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),u=s(r),h&amp;&amp;u.sort(&quot;function&quot;==typeof h?a.call(h,r):void 0),&quot;function&quot;!=typeof t&amp;&amp;(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,f,r[t],t,r,n):e})}}},{&quot;./valid-callable&quot;:187,&quot;./valid-value&quot;:189}],170:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Object.assign:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:171,&quot;./shim&quot;:172}],171:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t,e=Object.assign;return&quot;function&quot;==typeof e&amp;&amp;(e(t={foo:&quot;raz&quot;},{bar:&quot;dwa&quot;},{trzy:&quot;trzy&quot;}),t.foo+t.bar+t.trzy===&quot;razdwatrzy&quot;)}},{}],172:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../keys&quot;),i=t(&quot;../valid-value&quot;),a=Math.max;e.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o&lt;l;++o)e=arguments[o],n(e).forEach(s);if(void 0!==r)throw r;return t}},{&quot;../keys&quot;:179,&quot;../valid-value&quot;:189}],173:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../array/from&quot;),i=t(&quot;./assign&quot;),a=t(&quot;./valid-value&quot;);e.exports=function(t){var e=Object(a(t)),r=arguments[1],o=Object(arguments[2]);if(e!==t&amp;&amp;!r)return e;var s={};return r?n(r,function(e){(o.ensure||e in t)&amp;&amp;(s[e]=t[e])}):i(s,t),s}},{&quot;../array/from&quot;:158,&quot;./assign&quot;:170,&quot;./valid-value&quot;:189}],174:[function(t,e,r){&quot;use strict&quot;;var n,i,a,o,s=Object.create;t(&quot;./set-prototype-of/is-implemented&quot;)()||(n=t(&quot;./set-prototype-of/shim&quot;)),e.exports=n?1!==n.level?s:(i={},a={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){a[t]=&quot;__proto__&quot;!==t?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(i,a),Object.defineProperty(n,&quot;nullPolyfill&quot;,{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},{&quot;./set-prototype-of/is-implemented&quot;:185,&quot;./set-prototype-of/shim&quot;:186}],175:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./_iterate&quot;)(&quot;forEach&quot;)},{&quot;./_iterate&quot;:169}],176:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return&quot;function&quot;==typeof t}},{}],177:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-value&quot;),i={function:!0,object:!0};e.exports=function(t){return n(t)&amp;&amp;i[typeof t]||!1}},{&quot;./is-value&quot;:178}],178:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../function/noop&quot;)();e.exports=function(t){return t!==n&amp;&amp;null!==t}},{&quot;../function/noop&quot;:163}],179:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Object.keys:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:180,&quot;./shim&quot;:181}],180:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){try{return Object.keys(&quot;primitive&quot;),!0}catch(t){return!1}}},{}],181:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../is-value&quot;),i=Object.keys;e.exports=function(t){return i(n(t)?Object(t):t)}},{&quot;../is-value&quot;:178}],182:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./valid-callable&quot;),i=t(&quot;./for-each&quot;),a=Function.prototype.call;e.exports=function(t,e){var r={},o=arguments[2];return n(e),i(t,function(t,n,i,s){r[n]=a.call(e,o,t,n,i,s)}),r}},{&quot;./for-each&quot;:175,&quot;./valid-callable&quot;:187}],183:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-value&quot;),i=Array.prototype.forEach,a=Object.create;e.exports=function(t){var e=a(null);return i.call(arguments,function(t){n(t)&amp;&amp;function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)}),e}},{&quot;./is-value&quot;:178}],184:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Object.setPrototypeOf:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:185,&quot;./shim&quot;:186}],185:[function(t,e,r){&quot;use strict&quot;;var n=Object.create,i=Object.getPrototypeOf,a={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return&quot;function&quot;==typeof t&amp;&amp;i(t(e(null),a))===a}},{}],186:[function(t,e,r){&quot;use strict&quot;;var n,i,a,o,s=t(&quot;../is-object&quot;),l=t(&quot;../valid-value&quot;),c=Object.prototype.isPrototypeOf,u=Object.defineProperty,f={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError(&quot;Prototype must be null or an object&quot;)},e.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,&quot;__proto__&quot;);if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&amp;&amp;{level:1})}())?(2===i.level?i.set?(o=i.set,a=function(t,e){return o.call(n(t,e),e),t}):a=function(t,e){return n(t,e).__proto__=e,t}:a=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&amp;&amp;delete t.nullPolyfill.__proto__,null===r&amp;&amp;(r=t.nullPolyfill),e.__proto__=r,i&amp;&amp;u(t.nullPolyfill,&quot;__proto__&quot;,f),e},Object.defineProperty(a,&quot;level&quot;,{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null,t(&quot;../create&quot;)},{&quot;../create&quot;:174,&quot;../is-object&quot;:177,&quot;../valid-value&quot;:189}],187:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){if(&quot;function&quot;!=typeof t)throw new TypeError(t+&quot; is not a function&quot;);return t}},{}],188:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-object&quot;);e.exports=function(t){if(!n(t))throw new TypeError(t+&quot; is not an Object&quot;);return t}},{&quot;./is-object&quot;:177}],189:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-value&quot;);e.exports=function(t){if(!n(t))throw new TypeError(&quot;Cannot use null or undefined&quot;);return t}},{&quot;./is-value&quot;:178}],190:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?String.prototype.contains:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:191,&quot;./shim&quot;:192}],191:[function(t,e,r){&quot;use strict&quot;;var n=&quot;razdwatrzy&quot;;e.exports=function(){return&quot;function&quot;==typeof n.contains&amp;&amp;(!0===n.contains(&quot;dwa&quot;)&amp;&amp;!1===n.contains(&quot;foo&quot;))}},{}],192:[function(t,e,r){&quot;use strict&quot;;var n=String.prototype.indexOf;e.exports=function(t){return n.call(this,t,arguments[1])&gt;-1}},{}],193:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString,i=n.call(&quot;&quot;);e.exports=function(t){return&quot;string&quot;==typeof t||t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;(t instanceof String||n.call(t)===i)||!1}},{}],194:[function(t,e,r){&quot;use strict&quot;;var n=Object.create(null),i=Math.random;e.exports=function(){var t;do{t=i().toString(36).slice(2)}while(n[t]);return t}},{}],195:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/set-prototype-of&quot;),a=t(&quot;es5-ext/string/#/contains&quot;),o=t(&quot;d&quot;),s=t(&quot;es6-symbol&quot;),l=t(&quot;./&quot;),c=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);l.call(this,t),e=e?a.call(e,&quot;key+value&quot;)?&quot;key+value&quot;:a.call(e,&quot;key&quot;)?&quot;key&quot;:&quot;value&quot;:&quot;value&quot;,c(this,&quot;__kind__&quot;,o(&quot;&quot;,e))},i&amp;&amp;i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o(function(t){return&quot;value&quot;===this.__kind__?this.__list__[t]:&quot;key+value&quot;===this.__kind__?[t,this.__list__[t]]:t})}),c(n.prototype,s.toStringTag,o(&quot;c&quot;,&quot;Array Iterator&quot;))},{&quot;./&quot;:198,d:138,&quot;es5-ext/object/set-prototype-of&quot;:184,&quot;es5-ext/string/#/contains&quot;:190,&quot;es6-symbol&quot;:203}],196:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/function/is-arguments&quot;),i=t(&quot;es5-ext/object/valid-callable&quot;),a=t(&quot;es5-ext/string/is-string&quot;),o=t(&quot;./get&quot;),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(t,e){var r,u,f,h,p,d,g,m,v=arguments[2];if(s(t)||n(t)?r=&quot;array&quot;:a(t)?r=&quot;string&quot;:t=o(t),i(e),f=function(){h=!0},&quot;array&quot;!==r)if(&quot;string&quot;!==r)for(u=t.next();!u.done;){if(l.call(e,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p&lt;d&amp;&amp;(g=t[p],p+1&lt;d&amp;&amp;(m=g.charCodeAt(0))&gt;=55296&amp;&amp;m&lt;=56319&amp;&amp;(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,function(t){return l.call(e,v,t,f),h})}},{&quot;./get&quot;:197,&quot;es5-ext/function/is-arguments&quot;:161,&quot;es5-ext/object/valid-callable&quot;:187,&quot;es5-ext/string/is-string&quot;:193}],197:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/function/is-arguments&quot;),i=t(&quot;es5-ext/string/is-string&quot;),a=t(&quot;./array&quot;),o=t(&quot;./string&quot;),s=t(&quot;./valid-iterable&quot;),l=t(&quot;es6-symbol&quot;).iterator;e.exports=function(t){return&quot;function&quot;==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},{&quot;./array&quot;:195,&quot;./string&quot;:200,&quot;./valid-iterable&quot;:201,&quot;es5-ext/function/is-arguments&quot;:161,&quot;es5-ext/string/is-string&quot;:193,&quot;es6-symbol&quot;:203}],198:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/array/#/clear&quot;),a=t(&quot;es5-ext/object/assign&quot;),o=t(&quot;es5-ext/object/valid-callable&quot;),s=t(&quot;es5-ext/object/valid-value&quot;),l=t(&quot;d&quot;),c=t(&quot;d/auto-bind&quot;),u=t(&quot;es6-symbol&quot;),f=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);h(this,{__list__:l(&quot;w&quot;,s(t)),__context__:l(&quot;w&quot;,e),__nextIndex__:l(&quot;w&quot;,0)}),e&amp;&amp;(o(e.on),e.on(&quot;_add&quot;,this._onAdd),e.on(&quot;_delete&quot;,this._onDelete),e.on(&quot;_clear&quot;,this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l(function(){var t;if(this.__list__)return this.__redo__&amp;&amp;void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__&lt;this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:l(function(t){return this.__list__[t]}),_unBind:l(function(){this.__list__=null,delete this.__redo__,this.__context__&amp;&amp;(this.__context__.off(&quot;_add&quot;,this._onAdd),this.__context__.off(&quot;_delete&quot;,this._onDelete),this.__context__.off(&quot;_clear&quot;,this._onClear),this.__context__=null)}),toString:l(function(){return&quot;[object &quot;+(this[u.toStringTag]||&quot;Object&quot;)+&quot;]&quot;})},c({_onAdd:l(function(t){t&gt;=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(e,r){e&gt;=t&amp;&amp;(this.__redo__[r]=++e)},this),this.__redo__.push(t)):f(this,&quot;__redo__&quot;,l(&quot;c&quot;,[t])))}),_onDelete:l(function(t){var e;t&gt;=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&amp;&amp;(-1!==(e=this.__redo__.indexOf(t))&amp;&amp;this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e&gt;t&amp;&amp;(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&amp;&amp;i.call(this.__redo__),this.__nextIndex__=0})}))),f(n.prototype,u.iterator,l(function(){return this}))},{d:138,&quot;d/auto-bind&quot;:137,&quot;es5-ext/array/#/clear&quot;:157,&quot;es5-ext/object/assign&quot;:170,&quot;es5-ext/object/valid-callable&quot;:187,&quot;es5-ext/object/valid-value&quot;:189,&quot;es6-symbol&quot;:203}],199:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/function/is-arguments&quot;),i=t(&quot;es5-ext/object/is-value&quot;),a=t(&quot;es5-ext/string/is-string&quot;),o=t(&quot;es6-symbol&quot;).iterator,s=Array.isArray;e.exports=function(t){return!!i(t)&amp;&amp;(!!s(t)||(!!a(t)||(!!n(t)||&quot;function&quot;==typeof t[o])))}},{&quot;es5-ext/function/is-arguments&quot;:161,&quot;es5-ext/object/is-value&quot;:178,&quot;es5-ext/string/is-string&quot;:193,&quot;es6-symbol&quot;:203}],200:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/set-prototype-of&quot;),a=t(&quot;d&quot;),o=t(&quot;es6-symbol&quot;),s=t(&quot;./&quot;),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);t=String(t),s.call(this,t),l(this,&quot;__length__&quot;,a(&quot;&quot;,t.length))},i&amp;&amp;i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a(function(){if(this.__list__)return this.__nextIndex__&lt;this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:a(function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0))&gt;=55296&amp;&amp;e&lt;=56319?r+this.__list__[this.__nextIndex__++]:r})}),l(n.prototype,o.toStringTag,a(&quot;c&quot;,&quot;String Iterator&quot;))},{&quot;./&quot;:198,d:138,&quot;es5-ext/object/set-prototype-of&quot;:184,&quot;es6-symbol&quot;:203}],201:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-iterable&quot;);e.exports=function(t){if(!n(t))throw new TypeError(t+&quot; is not iterable&quot;);return t}},{&quot;./is-iterable&quot;:199}],202:[function(t,e,r){(function(n,i){!function(t,n){&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){&quot;use strict&quot;;function e(t){return&quot;function&quot;==typeof t}var r=Array.isArray?Array.isArray:function(t){return&quot;[object Array]&quot;===Object.prototype.toString.call(t)},a=0,o=void 0,s=void 0,l=function(t,e){g[a]=t,g[a+1]=e,2===(a+=2)&amp;&amp;(s?s(m):_())};var c=&quot;undefined&quot;!=typeof window?window:void 0,u=c||{},f=u.MutationObserver||u.WebKitMutationObserver,h=&quot;undefined&quot;==typeof self&amp;&amp;&quot;undefined&quot;!=typeof n&amp;&amp;&quot;[object process]&quot;==={}.toString.call(n),p=&quot;undefined&quot;!=typeof Uint8ClampedArray&amp;&amp;&quot;undefined&quot;!=typeof importScripts&amp;&amp;&quot;undefined&quot;!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(m,1)}}var g=new Array(1e3);function m(){for(var t=0;t&lt;a;t+=2){(0,g[t])(g[t+1]),g[t]=void 0,g[t+1]=void 0}a=0}var v,y,x,b,_=void 0;function w(t,e){var r=arguments,n=this,i=new this.constructor(A);void 0===i[M]&amp;&amp;U(i);var a,o=n._state;return o?(a=r[o-1],l(function(){return j(o,i,a,n._result)})):R(n,i,t,e),i}function k(t){if(t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;t.constructor===this)return t;var e=new this(A);return P(e,t),e}h?_=function(){return n.nextTick(m)}:f?(y=0,x=new f(m),b=document.createTextNode(&quot;&quot;),x.observe(b,{characterData:!0}),_=function(){b.data=y=++y%2}):p?((v=new MessageChannel).port1.onmessage=m,_=function(){return v.port2.postMessage(0)}):_=void 0===c&amp;&amp;&quot;function&quot;==typeof t?function(){try{var e=t(&quot;vertx&quot;);return o=e.runOnLoop||e.runOnContext,function(){o(m)}}catch(t){return d()}}():d();var M=Math.random().toString(36).substring(16);function A(){}var T=void 0,S=1,E=2,C=new F;function L(t){try{return t.then}catch(t){return C.error=t,C}}function z(t,r,n){r.constructor===t.constructor&amp;&amp;n===w&amp;&amp;r.constructor.resolve===k?function(t,e){e._state===S?I(t,e._result):e._state===E?D(t,e._result):R(e,void 0,function(e){return P(t,e)},function(e){return D(t,e)})}(t,r):n===C?D(t,C.error):void 0===n?I(t,r):e(n)?function(t,e,r){l(function(t){var n=!1,i=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?P(t,r):I(t,r))},function(e){n||(n=!0,D(t,e))},t._label);!n&amp;&amp;i&amp;&amp;(n=!0,D(t,i))},t)}(t,r,n):I(t,r)}function P(t,e){var r;t===e?D(t,new TypeError(&quot;You cannot resolve a promise with itself&quot;)):&quot;function&quot;==typeof(r=e)||&quot;object&quot;==typeof r&amp;&amp;null!==r?z(t,e,L(e)):I(t,e)}function O(t){t._onerror&amp;&amp;t._onerror(t._result),B(t)}function I(t,e){t._state===T&amp;&amp;(t._result=e,t._state=S,0!==t._subscribers.length&amp;&amp;l(B,t))}function D(t,e){t._state===T&amp;&amp;(t._state=E,t._result=e,l(O,t))}function R(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+S]=r,i[a+E]=n,0===a&amp;&amp;t._state&amp;&amp;l(B,t)}function B(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,i=void 0,a=t._result,o=0;o&lt;e.length;o+=3)n=e[o],i=e[o+r],n?j(r,n,i,a):i(a);t._subscribers.length=0}}function F(){this.error=null}var N=new F;function j(t,r,n,i){var a=e(n),o=void 0,s=void 0,l=void 0,c=void 0;if(a){if((o=function(t,e){try{return t(e)}catch(t){return N.error=t,N}}(n,i))===N?(c=!0,s=o.error,o=null):l=!0,r===o)return void D(r,new TypeError(&quot;A promises callback cannot return that same promise.&quot;))}else o=i,l=!0;r._state!==T||(a&amp;&amp;l?P(r,o):c?D(r,s):t===S?I(r,o):t===E&amp;&amp;D(r,o))}var V=0;function U(t){t[M]=V++,t._state=void 0,t._result=void 0,t._subscribers=[]}function q(t,e){this._instanceConstructor=t,this.promise=new t(A),this.promise[M]||U(this.promise),r(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?I(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&amp;&amp;I(this.promise,this._result))):D(this.promise,new Error(&quot;Array Methods must be provided an Array&quot;))}function H(t){this[M]=V++,this._result=this._state=void 0,this._subscribers=[],A!==t&amp;&amp;(&quot;function&quot;!=typeof t&amp;&amp;function(){throw new TypeError(&quot;You must pass a resolver function as the first argument to the promise constructor&quot;)}(),this instanceof H?function(t,e){try{e(function(e){P(t,e)},function(e){D(t,e)})}catch(e){D(t,e)}}(this,t):function(){throw new TypeError(&quot;Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.&quot;)}())}function G(){var t=void 0;if(&quot;undefined&quot;!=typeof i)t=i;else if(&quot;undefined&quot;!=typeof self)t=self;else try{t=Function(&quot;return this&quot;)()}catch(t){throw new Error(&quot;polyfill failed because global object is unavailable in this environment&quot;)}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if(&quot;[object Promise]&quot;===r&amp;&amp;!e.cast)return}t.Promise=H}return q.prototype._enumerate=function(){for(var t=this.length,e=this._input,r=0;this._state===T&amp;&amp;r&lt;t;r++)this._eachEntry(e[r],r)},q.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===k){var i=L(t);if(i===w&amp;&amp;t._state!==T)this._settledAt(t._state,e,t._result);else if(&quot;function&quot;!=typeof i)this._remaining--,this._result[e]=t;else if(r===H){var a=new r(A);z(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},q.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===T&amp;&amp;(this._remaining--,t===E?D(n,r):this._result[e]=r),0===this._remaining&amp;&amp;I(n,this._result)},q.prototype._willSettleAt=function(t,e){var r=this;R(t,void 0,function(t){return r._settledAt(S,e,t)},function(t){return r._settledAt(E,e,t)})},H.all=function(t){return new q(this,t).promise},H.race=function(t){var e=this;return r(t)?new e(function(r,n){for(var i=t.length,a=0;a&lt;i;a++)e.resolve(t[a]).then(r,n)}):new e(function(t,e){return e(new TypeError(&quot;You must pass an array to race.&quot;))})},H.resolve=k,H.reject=function(t){var e=new this(A);return D(e,t),e},H._setScheduler=function(t){s=t},H._setAsap=function(t){l=t},H._asap=l,H.prototype={constructor:H,then:w,catch:function(t){return this.then(null,t)}},G(),H.polyfill=G,H.Promise=H,H})}).call(this,t(&quot;_process&quot;),&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{_process:462}],203:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Symbol:t(&quot;./polyfill&quot;)},{&quot;./is-implemented&quot;:204,&quot;./polyfill&quot;:206}],204:[function(t,e,r){&quot;use strict&quot;;var n={object:!0,symbol:!0};e.exports=function(){var t;if(&quot;function&quot;!=typeof Symbol)return!1;t=Symbol(&quot;test symbol&quot;);try{String(t)}catch(t){return!1}return!!n[typeof Symbol.iterator]&amp;&amp;(!!n[typeof Symbol.toPrimitive]&amp;&amp;!!n[typeof Symbol.toStringTag])}},{}],205:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return!!t&amp;&amp;(&quot;symbol&quot;==typeof t||!!t.constructor&amp;&amp;(&quot;Symbol&quot;===t.constructor.name&amp;&amp;&quot;Symbol&quot;===t[t.constructor.toStringTag]))}},{}],206:[function(t,e,r){&quot;use strict&quot;;var n,i,a,o,s=t(&quot;d&quot;),l=t(&quot;./validate-symbol&quot;),c=Object.create,u=Object.defineProperties,f=Object.defineProperty,h=Object.prototype,p=c(null);if(&quot;function&quot;==typeof Symbol){n=Symbol;try{String(n()),o=!0}catch(t){}}var d,g=(d=c(null),function(t){for(var e,r,n=0;d[t+(n||&quot;&quot;)];)++n;return d[t+=n||&quot;&quot;]=!0,f(h,e=&quot;@@&quot;+t,s.gs(null,function(t){r||(r=!0,f(this,e,s(t)),r=!1)})),e});a=function(t){if(this instanceof a)throw new TypeError(&quot;Symbol is not a constructor&quot;);return i(t)},e.exports=i=function t(e){var r;if(this instanceof t)throw new TypeError(&quot;Symbol is not a constructor&quot;);return o?n(e):(r=c(a.prototype),e=void 0===e?&quot;&quot;:String(e),u(r,{__description__:s(&quot;&quot;,e),__name__:s(&quot;&quot;,g(e))}))},u(i,{for:s(function(t){return p[t]?p[t]:p[t]=i(String(t))}),keyFor:s(function(t){var e;for(e in l(t),p)if(p[e]===t)return e}),hasInstance:s(&quot;&quot;,n&amp;&amp;n.hasInstance||i(&quot;hasInstance&quot;)),isConcatSpreadable:s(&quot;&quot;,n&amp;&amp;n.isConcatSpreadable||i(&quot;isConcatSpreadable&quot;)),iterator:s(&quot;&quot;,n&amp;&amp;n.iterator||i(&quot;iterator&quot;)),match:s(&quot;&quot;,n&amp;&amp;n.match||i(&quot;match&quot;)),replace:s(&quot;&quot;,n&amp;&amp;n.replace||i(&quot;replace&quot;)),search:s(&quot;&quot;,n&amp;&amp;n.search||i(&quot;search&quot;)),species:s(&quot;&quot;,n&amp;&amp;n.species||i(&quot;species&quot;)),split:s(&quot;&quot;,n&amp;&amp;n.split||i(&quot;split&quot;)),toPrimitive:s(&quot;&quot;,n&amp;&amp;n.toPrimitive||i(&quot;toPrimitive&quot;)),toStringTag:s(&quot;&quot;,n&amp;&amp;n.toStringTag||i(&quot;toStringTag&quot;)),unscopables:s(&quot;&quot;,n&amp;&amp;n.unscopables||i(&quot;unscopables&quot;))}),u(a.prototype,{constructor:s(i),toString:s(&quot;&quot;,function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return&quot;Symbol (&quot;+l(this).__description__+&quot;)&quot;}),valueOf:s(function(){return l(this)})}),f(i.prototype,i.toPrimitive,s(&quot;&quot;,function(){var t=l(this);return&quot;symbol&quot;==typeof t?t:t.toString()})),f(i.prototype,i.toStringTag,s(&quot;c&quot;,&quot;Symbol&quot;)),f(a.prototype,i.toStringTag,s(&quot;c&quot;,i.prototype[i.toStringTag])),f(a.prototype,i.toPrimitive,s(&quot;c&quot;,i.prototype[i.toPrimitive]))},{&quot;./validate-symbol&quot;:207,d:138}],207:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-symbol&quot;);e.exports=function(t){if(!n(t))throw new TypeError(t+&quot; is not a symbol&quot;);return t}},{&quot;./is-symbol&quot;:205}],208:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?WeakMap:t(&quot;./polyfill&quot;)},{&quot;./is-implemented&quot;:209,&quot;./polyfill&quot;:211}],209:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t,e;if(&quot;function&quot;!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},&quot;one&quot;],[{},&quot;two&quot;],[{},&quot;three&quot;]])}catch(t){return!1}return&quot;[object WeakMap]&quot;===String(t)&amp;&amp;(&quot;function&quot;==typeof t.set&amp;&amp;(t.set({},1)===t&amp;&amp;(&quot;function&quot;==typeof t.delete&amp;&amp;(&quot;function&quot;==typeof t.has&amp;&amp;&quot;one&quot;===t.get(e)))))}},{}],210:[function(t,e,r){&quot;use strict&quot;;e.exports=&quot;function&quot;==typeof WeakMap&amp;&amp;&quot;[object WeakMap]&quot;===Object.prototype.toString.call(new WeakMap)},{}],211:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/set-prototype-of&quot;),a=t(&quot;es5-ext/object/valid-object&quot;),o=t(&quot;es5-ext/object/valid-value&quot;),s=t(&quot;es5-ext/string/random-uniq&quot;),l=t(&quot;d&quot;),c=t(&quot;es6-iterator/get&quot;),u=t(&quot;es6-iterator/for-of&quot;),f=t(&quot;es6-symbol&quot;).toStringTag,h=t(&quot;./is-native-implemented&quot;),p=Array.isArray,d=Object.defineProperty,g=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);return t=h&amp;&amp;i&amp;&amp;WeakMap!==n?i(new WeakMap,m(this)):this,null!=e&amp;&amp;(p(e)||(e=c(e))),d(t,&quot;__weakMapData__&quot;,l(&quot;c&quot;,&quot;$weakMap$&quot;+s())),e?(u(e,function(e){o(e),t.set(e[0],e[1])}),t):t},h&amp;&amp;(i&amp;&amp;i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:l(n)})),Object.defineProperties(n.prototype,{delete:l(function(t){return!!g.call(a(t),this.__weakMapData__)&amp;&amp;(delete t[this.__weakMapData__],!0)}),get:l(function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:l(function(t){return g.call(a(t),this.__weakMapData__)}),set:l(function(t,e){return d(a(t),this.__weakMapData__,l(&quot;c&quot;,e)),this}),toString:l(function(){return&quot;[object WeakMap]&quot;})}),d(n.prototype,f,l(&quot;c&quot;,&quot;WeakMap&quot;))},{&quot;./is-native-implemented&quot;:210,d:138,&quot;es5-ext/object/set-prototype-of&quot;:184,&quot;es5-ext/object/valid-object&quot;:188,&quot;es5-ext/object/valid-value&quot;:189,&quot;es5-ext/string/random-uniq&quot;:194,&quot;es6-iterator/for-of&quot;:196,&quot;es6-iterator/get&quot;:197,&quot;es6-symbol&quot;:203}],212:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}},{}],213:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=typeof t;if(&quot;string&quot;===e){var r=t;if(0===(t=+t)&amp;&amp;function(t){for(var e,r=t.length,n=0;n&lt;r;n++)if(((e=t.charCodeAt(n))&lt;9||e&gt;13)&amp;&amp;32!==e&amp;&amp;133!==e&amp;&amp;160!==e&amp;&amp;5760!==e&amp;&amp;6158!==e&amp;&amp;(e&lt;8192||e&gt;8205)&amp;&amp;8232!==e&amp;&amp;8233!==e&amp;&amp;8239!==e&amp;&amp;8287!==e&amp;&amp;8288!==e&amp;&amp;12288!==e&amp;&amp;65279!==e)return!1;return!0}(r))return!1}else if(&quot;number&quot;!==e)return!1;return t-t&lt;1}},{}],214:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:if(&quot;number&quot;==typeof t){var n=l(t);return new o(n,n,0)}return new o(t,l(t.length),0);case 2:if(&quot;number&quot;==typeof e){var n=l(t.length);return new o(t,n,+e)}r=0;case 3:if(t.length!==e.length)throw new Error(&quot;state and velocity lengths must match&quot;);return new o(t,e,r)}};var n=t(&quot;cubic-hermite&quot;),i=t(&quot;binary-search-bounds&quot;);function a(t,e,r){return Math.min(e,Math.max(t,r))}function o(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n&lt;this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}var s=o.prototype;function l(t){for(var e=new Array(t),r=0;r&lt;t;++r)e[r]=0;return e}s.flush=function(t){var e=i.gt(this._time,t)-1;e&lt;=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},s.curve=function(t){var e=this._time,r=e.length,o=i.le(e,t),s=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,f=this.bounds;if(o&lt;0)for(var h=u-1,p=0;p&lt;u;++p,--h)s[p]=l[h];else if(o&gt;=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p&lt;u;++p,--h)s[p]=l[h]+d*c[h]}else{h=u*(o+1)-1;var g=e[o],m=e[o+1]-g||1,v=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(p=0;p&lt;u;++p,--h)v[p]=l[h],x[p]=c[h]*m,y[p]=l[h+u],b[p]=c[h+u]*m,_=_&amp;&amp;v[p]===y[p]&amp;&amp;x[p]===b[p]&amp;&amp;0===x[p];if(_)for(p=0;p&lt;u;++p)s[p]=v[p];else n(v,x,y,b,(t-g)/m,s)}var w=f[0],k=f[1];for(p=0;p&lt;u;++p)s[p]=a(w[p],k[p],s[p]);return s},s.dcurve=function(t){var e=this._time,r=e.length,a=i.le(e,t),o=this._scratch[0],s=this._state,l=this._velocity,c=this.dimension;if(a&gt;=r-1)for(var u=s.length-1,f=(e[r-1],0);f&lt;c;++f,--u)o[f]=l[u];else{u=c*(a+1)-1;var h=e[a],p=e[a+1]-h||1,d=this._scratch[1],g=this._scratch[2],m=this._scratch[3],v=this._scratch[4],y=!0;for(f=0;f&lt;c;++f,--u)d[f]=s[u],m[f]=l[u]*p,g[f]=s[u+c],v[f]=l[u+c]*p,y=y&amp;&amp;d[f]===g[f]&amp;&amp;m[f]===v[f]&amp;&amp;0===m[f];if(y)for(f=0;f&lt;c;++f)o[f]=0;else{n.derivative(d,m,g,v,(t-h)/p,o);for(f=0;f&lt;c;++f)o[f]/=p}}return o},s.lastT=function(){var t=this._time;return t[t.length-1]},s.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r&gt;=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t&lt;e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1];this._time.push(e,t);for(var u=0;u&lt;2;++u)for(var f=0;f&lt;r;++f)n.push(n[o++]),i.push(0);this._time.push(t);for(f=r;f&gt;0;--f)n.push(a(l[f-1],c[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t&lt;e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=t-e,l=this.bounds,c=l[0],u=l[1],f=s&gt;1e-6?1/s:0;this._time.push(t);for(var h=r;h&gt;0;--h){var p=a(c[h-1],u[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t&lt;this.lastT()||arguments.length!==e+1)){var r=this._state,n=this._velocity,i=this.bounds,o=i[0],s=i[1];this._time.push(t);for(var l=e;l&gt;0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t&lt;=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,f=u&gt;1e-6?1/u:0;this._time.push(t);for(var h=r;h&gt;0;--h){var p=arguments[h];n.push(a(l[h-1],c[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t&lt;e)){var r=this.dimension,n=this._state,i=this._velocity,o=n.length-r,s=this.bounds,l=s[0],c=s[1],u=t-e;this._time.push(t);for(var f=r-1;f&gt;=0;--f)n.push(a(l[f],c[f],n[o]+u*i[o])),i.push(0),o+=1}}},{&quot;binary-search-bounds&quot;:78,&quot;cubic-hermite&quot;:132}],215:[function(t,e,r){var n=t(&quot;dtype&quot;);e.exports=function(t,e,r){if(!t)throw new TypeError(&quot;must specify data as first parameter&quot;);if(r=0|+(r||0),Array.isArray(t)&amp;&amp;t[0]&amp;&amp;&quot;number&quot;==typeof t[0][0]){var i,a,o,s,l=t[0].length,c=t.length*l;e&amp;&amp;&quot;string&quot;!=typeof e||(e=new(n(e||&quot;float32&quot;))(c+r));var u=e.length-r;if(c!==u)throw new Error(&quot;source length &quot;+c+&quot; (&quot;+l+&quot;x&quot;+t.length+&quot;) does not match destination length &quot;+u);for(i=0,o=r;i&lt;t.length;i++)for(a=0;a&lt;l;a++)e[o++]=null===t[i][a]?NaN:t[i][a]}else if(e&amp;&amp;&quot;string&quot;!=typeof e)e.set(t,r);else{var f=n(e||&quot;float32&quot;);if(Array.isArray(t)||&quot;array&quot;===e)for(e=new f(t.length+r),i=0,o=r,s=e.length;o&lt;s;o++,i++)e[o]=null===t[i]?NaN:t[i];else 0===r?e=new f(t):(e=new f(t.length+r)).set(t,r)}return e}},{dtype:153}],216:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;css-font/stringify&quot;),i=[32,126];e.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement(&quot;canvas&quot;),a=t.font,o=&quot;number&quot;==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;a&amp;&amp;&quot;string&quot;!=typeof a&amp;&amp;(a=n(a));if(Array.isArray(s)){if(2===s.length&amp;&amp;&quot;number&quot;==typeof s[0]&amp;&amp;&quot;number&quot;==typeof s[1]){for(var l=[],c=s[0],u=0;c&lt;=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split(&quot;&quot;);e=e.slice(),r.width=e[0],r.height=e[1];var f=r.getContext(&quot;2d&quot;);f.fillStyle=&quot;#000&quot;,f.fillRect(0,0,r.width,r.height),f.font=a,f.textAlign=&quot;center&quot;,f.textBaseline=&quot;middle&quot;,f.fillStyle=&quot;#fff&quot;;for(var h=o[0]/2,p=o[1]/2,c=0;c&lt;s.length;c++)f.fillText(s[c],h,p),(h+=o[0])&gt;e[0]-o[0]/2&amp;&amp;(h=o[0]/2,p+=o[1]);return r}},{&quot;css-font/stringify&quot;:129}],217:[function(t,e,r){&quot;use strict&quot;;function n(t,e){e||(e={}),(&quot;string&quot;==typeof t||Array.isArray(t))&amp;&amp;(e.family=t);var r=Array.isArray(e.family)?e.family.join(&quot;, &quot;):e.family;if(!r)throw Error(&quot;`family` must be defined&quot;);var s=e.size||e.fontSize||e.em||48,l=e.weight||e.fontWeight||&quot;&quot;,c=(t=[e.style||e.fontStyle||&quot;&quot;,l,s].join(&quot; &quot;)+&quot;px &quot;+r,e.origin||&quot;top&quot;);if(n.cache[r]&amp;&amp;s&lt;=n.cache[r].em)return i(n.cache[r],c);var u=e.canvas||n.canvas,f=u.getContext(&quot;2d&quot;),h={upper:void 0!==e.upper?e.upper:&quot;H&quot;,lower:void 0!==e.lower?e.lower:&quot;x&quot;,descent:void 0!==e.descent?e.descent:&quot;p&quot;,ascent:void 0!==e.ascent?e.ascent:&quot;h&quot;,tittle:void 0!==e.tittle?e.tittle:&quot;i&quot;,overshoot:void 0!==e.overshoot?e.overshoot:&quot;O&quot;},p=Math.ceil(1.5*s);u.height=p,u.width=.5*p,f.font=t;var d={top:0};f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillStyle=&quot;black&quot;,f.fillText(&quot;H&quot;,0,0);var g=a(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline=&quot;bottom&quot;,f.fillText(&quot;H&quot;,0,p);var m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=&quot;alphabetic&quot;,f.fillText(&quot;H&quot;,0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,f.clearRect(0,0,p,p),f.textBaseline=&quot;middle&quot;,f.fillText(&quot;H&quot;,0,.5*p);var y=a(f.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=&quot;hanging&quot;,f.fillText(&quot;H&quot;,0,.5*p);var x=a(f.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=&quot;ideographic&quot;,f.fillText(&quot;H&quot;,0,p);var b=a(f.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,h.upper&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.upper,0,0),d.upper=a(f.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),h.lower&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.lower,0,0),d.lower=a(f.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),h.tittle&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.tittle,0,0),d.tittle=a(f.getImageData(0,0,p,p))),h.ascent&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.ascent,0,0),d.ascent=a(f.getImageData(0,0,p,p))),h.descent&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.descent,0,0),d.descent=o(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.overshoot,0,0);var _=o(f.getImageData(0,0,p,p));d.overshoot=_-v}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in&quot;string&quot;==typeof e&amp;&amp;(e=t[e]),t)&quot;em&quot;!==n&amp;&amp;(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n&lt;r.length;n+=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}function o(t){for(var e=t.height,r=t.data,n=r.length-1;n&gt;0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(&quot;canvas&quot;),n.cache={}},{}],218:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return new c(t||d,null)};var n=0,i=1;function a(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function o(t){return new a(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new a(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function f(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,&quot;keys&quot;,{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,&quot;values&quot;,{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,&quot;length&quot;,{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],f=[];o;){var h=r(t,o.key);u.push(o),f.push(h),o=h&lt;=0?o.left:o.right}u.push(new a(n,t,e,null,null,1));for(var p=u.length-2;p&gt;=0;--p){o=u[p];f[p]&lt;=0?u[p]=new a(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new a(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p&gt;1;--p){var d=u[p-1];o=u[p];if(d._color===i||o._color===i)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(m=g.right)||m._color!==n){if(g._color=n,g.left=d.right,d._color=i,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p&gt;=3)(v=u[p-3]).left===g?v.left=d:v.right=d;break}d._color=i,g.right=s(i,m),g._color=n,p-=1}else{if(!(m=g.right)||m._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=i,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p&gt;=3)(v=u[p-3]).left===g?v.left=o:v.right=o;break}d._color=i,g.right=s(i,m),g._color=n,p-=1}else if(d.right===o){if(!(m=g.left)||m._color!==n){if(g._color=n,g.right=d.left,d._color=i,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p&gt;=3)(v=u[p-3]).right===g?v.right=d:v.left=d;break}d._color=i,g.left=s(i,m),g._color=n,p-=1}else{var m;if(!(m=g.left)||m._color!==n){var v;if(d.left=o.right,g._color=n,g.right=o.left,o._color=i,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p&gt;=3)(v=u[p-3]).right===g?v.right=o:v.left=o;break}d._color=i,g.left=s(i,m),g._color=n,p-=1}}return u[0]._color=i,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&amp;&amp;(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,i){if(r(e,i.key)&lt;=0){var a;if(i.left&amp;&amp;(a=t(e,r,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return t(e,r,n,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)&gt;=0)return;return function t(e,r,n,i,a){var o,s=n(e,a.key),l=n(r,a.key);if(s&lt;=0){if(a.left&amp;&amp;(o=t(e,r,n,i,a.left)))return o;if(l&gt;0&amp;&amp;(o=i(a.key,a.value)))return o}if(l&gt;0&amp;&amp;a.right)return t(e,r,n,i,a.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,&quot;begin&quot;,{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new f(this,t)}}),Object.defineProperty(u,&quot;end&quot;,{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new f(this,t)}}),u.at=function(t){if(t&lt;0)return new f(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t&lt;e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new f(this,r);if(t-=1,!e.right)break;if(t&gt;=e.right._count)break;e=e.right}return new f(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&lt;=0&amp;&amp;(i=n.length),r=a&lt;=0?r.left:r.right}return n.length=i,new f(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&lt;0&amp;&amp;(i=n.length),r=a&lt;0?r.left:r.right}return n.length=i,new f(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&gt;0&amp;&amp;(i=n.length),r=a&lt;=0?r.left:r.right}return n.length=i,new f(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&gt;=0&amp;&amp;(i=n.length),r=a&lt;0?r.left:r.right}return n.length=i,new f(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new f(this,n);r=i&lt;=0?r.left:r.right}return new f(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n&lt;=0?r.left:r.right}};var h=f.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return t&lt;e?-1:t&gt;e?1:0}Object.defineProperty(h,&quot;valid&quot;,{get:function(){return this._stack.length&gt;0}}),Object.defineProperty(h,&quot;node&quot;,{get:function(){return this._stack.length&gt;0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new f(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new a(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u&gt;=0;--u){(r=t[u]).left===t[u+1]?e[u]=new a(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&amp;&amp;r.right){var f=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var h=e[f-1];e.push(new a(r._color,h.key,h.value,r.left,r.right,r._count)),e[f-1].key=r.key,e[f-1].value=r.value;for(u=e.length-2;u&gt;=f;--u)r=e[u],e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count);e[f-1].left=e[f]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&amp;&amp;(d.right=null),e.pop();for(u=0;u&lt;e.length;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(r.left||r.right){r.left?p(r,r.left):r.right&amp;&amp;p(r,r.right),r._color=i;for(u=0;u&lt;e.length-1;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(1===e.length)return new c(this.tree._compare,null);for(u=0;u&lt;e.length;++u)e[u]._count--;var g=e[e.length-2];return function(t){for(var e,r,a,c,u=t.length-1;u&gt;=0;--u){if(e=t[u],0===u)return void(e._color=i);if((r=t[u-1]).left===e){if((a=r.right).right&amp;&amp;a.right._color===n)return c=(a=r.right=o(a)).right=o(a.right),r.right=a.left,a.left=r,a.right=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).left===r?f.left=a:f.right=a),void(t[u-1]=a);if(a.left&amp;&amp;a.left._color===n)return c=(a=r.right=o(a)).left=o(a.left),r.right=c.left,a.left=c.right,c.left=r,c.right=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u&gt;1&amp;&amp;((f=t[u-2]).left===r?f.left=c:f.right=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.right=s(n,a));r.right=s(n,a);continue}a=o(a),r.right=a.left,a.left=r,a._color=r._color,r._color=n,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).left===r?f.left=a:f.right=a),t[u-1]=a,t[u]=r,u+1&lt;t.length?t[u+1]=e:t.push(e),u+=2}else{if((a=r.left).left&amp;&amp;a.left._color===n)return c=(a=r.left=o(a)).left=o(a.left),r.left=a.right,a.right=r,a.left=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).right===r?f.right=a:f.left=a),void(t[u-1]=a);if(a.right&amp;&amp;a.right._color===n)return c=(a=r.left=o(a)).right=o(a.right),r.left=c.right,a.right=c.left,c.right=r,c.left=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u&gt;1&amp;&amp;((f=t[u-2]).right===r?f.right=c:f.left=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.left=s(n,a));r.left=s(n,a);continue}var f;a=o(a),r.left=a.right,a.right=r,a._color=r._color,r._color=n,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).right===r?f.right=a:f.left=a),t[u-1]=a,t[u]=r,u+1&lt;t.length?t[u+1]=e:t.push(e),u+=2}}}(e),g.left===r?g.left=null:g.right=null,new c(this.tree._compare,e[0])},Object.defineProperty(h,&quot;key&quot;,{get:function(){if(this._stack.length&gt;0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,&quot;value&quot;,{get:function(){if(this._stack.length&gt;0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,&quot;index&quot;,{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&amp;&amp;(t=e[e.length-1].left._count);for(var n=e.length-2;n&gt;=0;--n)e[n+1]===e[n].right&amp;&amp;(++t,e[n].left&amp;&amp;(t+=e[n].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length&gt;0&amp;&amp;t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,&quot;hasNext&quot;,{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e&gt;0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var e=this._stack;if(0===e.length)throw new Error(&quot;Can't update empty node!&quot;);var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new a(n._color,n.key,t,n.left,n.right,n._count);for(var i=e.length-2;i&gt;=0;--i)(n=e[i]).left===e[i+1]?r[i]=new a(n._color,n.key,n.value,r[i+1],n.right,n._count):r[i]=new a(n._color,n.key,n.value,n.left,r[i+1],n._count);return new c(this.tree._compare,r[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length&gt;0&amp;&amp;t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,&quot;hasPrev&quot;,{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e&gt;0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],219:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],i=607/128,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t&lt;0)return Number(&quot;0/0&quot;);for(var e=a[0],r=a.length-1;r&gt;0;--r)e+=a[r]/(t+r);var n=t+i+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e&lt;.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e&gt;100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i&lt;9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},e.exports.log=o},{}],220:[function(t,e,r){e.exports=function(t,e){if(&quot;string&quot;!=typeof t)throw new TypeError(&quot;must specify type string&quot;);if(e=e||{},&quot;undefined&quot;==typeof document&amp;&amp;!e.canvas)return null;var r=e.canvas||document.createElement(&quot;canvas&quot;);&quot;number&quot;==typeof e.width&amp;&amp;(r.width=e.width);&quot;number&quot;==typeof e.height&amp;&amp;(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf(&quot;webgl&quot;)&amp;&amp;a.push(&quot;experimental-&quot;+t);for(var o=0;o&lt;a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},{}],221:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=new u(t);return r.update(e),r};var n=t(&quot;./lib/text.js&quot;),i=t(&quot;./lib/lines.js&quot;),a=t(&quot;./lib/background.js&quot;),o=t(&quot;./lib/cube.js&quot;),s=t(&quot;./lib/ticks.js&quot;),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[&quot;sans-serif&quot;,&quot;sans-serif&quot;,&quot;sans-serif&quot;],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],this.labelEnable=[!0,!0,!0],this.labelFont=&quot;sans-serif&quot;,this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=u.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&amp;&amp;Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s&lt;3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),u=!1,f=!1;if(&quot;bounds&quot;in t)for(var h=t.bounds,p=0;p&lt;2;++p)for(var d=0;d&lt;3;++d)h[p][d]!==this.bounds[p][d]&amp;&amp;(f=!0),this.bounds[p][d]=h[p][d];if(&quot;ticks&quot;in t){r=t.ticks,u=!0,this.autoTicks=!1;for(p=0;p&lt;3;++p)this.tickSpacing[p]=0}else a(&quot;tickSpacing&quot;)&amp;&amp;(this.autoTicks=!0,f=!0);if(this._firstInit&amp;&amp;(&quot;ticks&quot;in t||&quot;tickSpacing&quot;in t||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&amp;&amp;this.autoTicks&amp;&amp;(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(p=0;p&lt;3;++p)r[p].sort(function(t,e){return t.x-e.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o(&quot;tickEnable&quot;),l(&quot;tickFont&quot;)&amp;&amp;(u=!0),a(&quot;tickSize&quot;),a(&quot;tickAngle&quot;),a(&quot;tickPad&quot;),c(&quot;tickColor&quot;);var g=l(&quot;labels&quot;);l(&quot;labelFont&quot;)&amp;&amp;(g=!0),o(&quot;labelEnable&quot;),a(&quot;labelSize&quot;),a(&quot;labelPad&quot;),c(&quot;labelColor&quot;),o(&quot;lineEnable&quot;),o(&quot;lineMirror&quot;),a(&quot;lineWidth&quot;),c(&quot;lineColor&quot;),o(&quot;lineTickEnable&quot;),o(&quot;lineTickMirror&quot;),a(&quot;lineTickLength&quot;),a(&quot;lineTickWidth&quot;),c(&quot;lineTickColor&quot;),o(&quot;gridEnable&quot;),a(&quot;gridWidth&quot;),c(&quot;gridColor&quot;),o(&quot;zeroEnable&quot;),c(&quot;zeroLineColor&quot;),a(&quot;zeroLineWidth&quot;),o(&quot;backgroundEnable&quot;),c(&quot;backgroundColor&quot;),this._text?this._text&amp;&amp;(g||u)&amp;&amp;this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&amp;&amp;u&amp;&amp;(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h];function d(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u&lt;3;++u)if(e!==u){var f=a,h=s,p=o,d=l;c&amp;1&lt;&lt;u&amp;&amp;(f=s,h=a,p=l,d=o),f[u]=r[0][u],h[u]=r[1][u],i[u]&gt;0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],m={model:l,view:l,projection:l};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||m;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=o(r,n,i,a),u=s.cubeEdges,f=s.axis,h=n[12],b=n[13],_=n[14],w=n[15],k=this.pixelRatio*(i[3]*h+i[7]*b+i[11]*_+i[15]*w)/e.drawingBufferHeight,M=0;M&lt;3;++M)this.lastCubeProps.cubeEdges[M]=u[M],this.lastCubeProps.axis[M]=f[M];var A=p;for(M=0;M&lt;3;++M)d(p[M],M,this.bounds,u,f);e=this.gl;var T=g;for(M=0;M&lt;3;++M)this.backgroundEnable[M]?T[M]=f[M]:T[M]=0;this._background.draw(r,n,i,a,T,this.backgroundColor),this._lines.bind(r,n,i,this);for(M=0;M&lt;3;++M){var S=[0,0,0];f[M]&gt;0?S[M]=a[1][M]:S[M]=a[0][M];for(var E=0;E&lt;2;++E){var C=(M+1+E)%3,L=(M+1+(1^E))%3;this.gridEnable[C]&amp;&amp;this._lines.drawGrid(C,L,this.bounds,S,this.gridColor[C],this.gridWidth[C]*this.pixelRatio)}for(E=0;E&lt;2;++E){C=(M+1+E)%3,L=(M+1+(1^E))%3;this.zeroEnable[L]&amp;&amp;a[0][L]&lt;=0&amp;&amp;a[1][L]&gt;=0&amp;&amp;this._lines.drawZero(C,L,this.bounds,S,this.zeroLineColor[L],this.zeroLineWidth[L]*this.pixelRatio)}}for(M=0;M&lt;3;++M){this.lineEnable[M]&amp;&amp;this._lines.drawAxisLine(M,this.bounds,A[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&amp;&amp;this._lines.drawAxisLine(M,this.bounds,A[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var z=c(v,A[M].primalMinor),P=c(y,A[M].mirrorMinor),O=this.lineTickLength;for(E=0;E&lt;3;++E){var I=k/r[5*E];z[E]*=O[E]*I,P[E]*=O[E]*I}this.lineTickEnable[M]&amp;&amp;this._lines.drawAxisTicks(M,A[M].primalOffset,z,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&amp;&amp;this._lines.drawAxisTicks(M,A[M].mirrorOffset,P,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);for(M=0;M&lt;3;++M){var D=A[M].primalMinor,R=c(x,A[M].primalOffset);for(E=0;E&lt;3;++E)this.lineTickEnable[M]&amp;&amp;(R[E]+=k*D[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[M]){for(E=0;E&lt;3;++E)R[E]+=k*D[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],R,this.tickColor[M])}if(this.labelEnable[M]){for(E=0;E&lt;3;++E)R[E]+=k*D[E]*this.labelPad[E]/r[5*E];R[M]+=.5*(a[0][M]+a[1][M]),this._text.drawLabel(M,this.labelSize[M],this.labelAngle[M],R,this.labelColor[M])}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{&quot;./lib/background.js&quot;:222,&quot;./lib/cube.js&quot;:223,&quot;./lib/lines.js&quot;:224,&quot;./lib/text.js&quot;:226,&quot;./lib/ticks.js&quot;:227}],222:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=[],r=[],s=0,l=0;l&lt;3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p&lt;=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d&lt;=1;d+=2){f[c]=d;for(var g=-1;g&lt;=1;g+=2)f[u]=g,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var m=c;c=u,u=m}var v=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,v,x,b)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders&quot;).bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s&lt;3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:225,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],223:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,a){i(s,e,t),i(s,r,s);for(var p=0,y=0;y&lt;2;++y){u[2]=a[y][2];for(var x=0;x&lt;2;++x){u[1]=a[x][1];for(var b=0;b&lt;2;++b)u[0]=a[b][0],h(l[p],u,s),p+=1}}for(var _=-1,y=0;y&lt;8;++y){for(var w=l[y][3],k=0;k&lt;3;++k)c[y][k]=l[y][k]/w;w&lt;0&amp;&amp;(_&lt;0?_=y:c[y][2]&lt;c[_][2]&amp;&amp;(_=y))}if(_&lt;0){_=0;for(var M=0;M&lt;3;++M){for(var A=(M+2)%3,T=(M+1)%3,S=-1,E=-1,C=0;C&lt;2;++C){var L=C&lt;&lt;M,z=L+(C&lt;&lt;A)+(1-C&lt;&lt;T),P=L+(1-C&lt;&lt;A)+(C&lt;&lt;T);o(c[L],c[z],c[P],f)&lt;0||(C?S=1:E=1)}if(S&lt;0||E&lt;0)E&gt;S&amp;&amp;(_|=1&lt;&lt;M);else{for(var C=0;C&lt;2;++C){var L=C&lt;&lt;M,z=L+(C&lt;&lt;A)+(1-C&lt;&lt;T),P=L+(1-C&lt;&lt;A)+(C&lt;&lt;T),O=d([l[L],l[z],l[P],l[L+(1&lt;&lt;A)+(1&lt;&lt;T)]]);C?S=O:E=O}E&gt;S&amp;&amp;(_|=1&lt;&lt;M)}}}for(var I=7^_,D=-1,y=0;y&lt;8;++y)y!==_&amp;&amp;y!==I&amp;&amp;(D&lt;0?D=y:c[D][1]&gt;c[y][1]&amp;&amp;(D=y));for(var R=-1,y=0;y&lt;3;++y){var B=D^1&lt;&lt;y;if(B!==_&amp;&amp;B!==I){R&lt;0&amp;&amp;(R=B);var T=c[B];T[0]&lt;c[R][0]&amp;&amp;(R=B)}}for(var F=-1,y=0;y&lt;3;++y){var B=D^1&lt;&lt;y;if(B!==_&amp;&amp;B!==I&amp;&amp;B!==R){F&lt;0&amp;&amp;(F=B);var T=c[B];T[0]&gt;c[F][0]&amp;&amp;(F=B)}}var N=g;N[0]=N[1]=N[2]=0,N[n.log2(R^D)]=D&amp;R,N[n.log2(D^F)]=D&amp;F;var j=7^F;j===_||j===I?(j=7^R,N[n.log2(F^j)]=j&amp;F):N[n.log2(R^j)]=j&amp;R;for(var V=m,U=_,M=0;M&lt;3;++M)V[M]=U&amp;1&lt;&lt;M?-1:1;return v};var n=t(&quot;bit-twiddle&quot;),i=t(&quot;gl-mat4/multiply&quot;),a=(t(&quot;gl-mat4/invert&quot;),t(&quot;split-polygon&quot;)),o=t(&quot;robust-orientation&quot;),s=new Array(16),l=(new Array(16),new Array(8)),c=new Array(8),u=new Array(3),f=[0,0,0];function h(t,e,r){for(var n=0;n&lt;4;++n){t[n]=r[12+n];for(var i=0;i&lt;3;++i)t[n]+=e[i]*r[4*i+n]}}!function(){for(var t=0;t&lt;8;++t)l[t]=[1,1,1,1],c[t]=[1,1,1]}();var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(t){for(var e=0;e&lt;p.length;++e)if((t=a.positive(t,p[e])).length&lt;3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],o=0;for(e=1;e+1&lt;t.length;++e){var s=t[e],l=t[e+1],c=s[0]/s[3]-n,u=s[1]/s[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;o+=Math.abs(c*h-u*f)}return o}var g=[1,1,1],m=[0,0,0],v={cubeEdges:g,axis:m}},{&quot;bit-twiddle&quot;:79,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;robust-orientation&quot;:483,&quot;split-polygon&quot;:500}],224:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var o=[],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var f=0;f&lt;3;++f){for(var h=o.length/3|0,d=0;d&lt;r[f].length;++d){var g=+r[f][d].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var m=o.length/3|0;s[f]=h,l[f]=m-h;for(var h=o.length/3|0,v=0;v&lt;r[f].length;++v){var g=+r[f][v].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var m=o.length/3|0;c[f]=h,u[f]=m-h}var y=n(t,new Float32Array(o)),x=i(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=a(t);return b.attributes.position.location=0,new p(t,y,x,b,l,s,u,c)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders&quot;).line,o=[0,0,0],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[1,1];function f(t){return t[0]=t[1]=t[2]=0,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function p(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}var d=p.prototype;d.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=u,this.vao.bind()},d.unbind=function(){this.vao.unbind()},d.drawAxisLine=function(t,e,r,n,i){var a=f(s);this.shader.uniforms.majorAxis=s,a[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=a;var o,u=h(c,r);u[t]+=e[0][t],this.shader.uniforms.offset=u,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=n,(o=f(l))[(t+2)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6),(o=f(l))[(t+1)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6)},d.drawAxisTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=f(o);a[t]=1,this.shader.uniforms.majorAxis=a,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=n,this.shader.uniforms.lineWidth=i;var s=f(l);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},d.drawGrid=function(t,e,r,n,i,a){if(this.gridCount[t]){var u=f(s);u[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=u;var p=h(c,n);p[e]+=r[0][e],this.shader.uniforms.offset=p;var d=f(o);d[t]=1,this.shader.uniforms.majorAxis=d;var g=f(l);g[t]=1,this.shader.uniforms.screenAxis=g,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},d.drawZero=function(t,e,r,n,i,a){var o=f(s);this.shader.uniforms.majorAxis=o,o[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=o;var u=h(c,n);u[t]+=r[0][t],this.shader.uniforms.offset=u;var p=f(l);p[e]=1,this.shader.uniforms.screenAxis=p,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,6)},d.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:225,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],225:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\nuniform float lineWidth;\nuniform vec2 screenShape;\n\nvec3 project(vec3 p) {\n  vec4 pp = projection * view * model * vec4(p, 1.0);\n  return pp.xyz / max(pp.w, 0.0001);\n}\n\nvoid main() {\n  vec3 major = position.x * majorAxis;\n  vec3 minor = position.y * minorAxis;\n\n  vec3 vPosition = major + minor + offset;\n  vec3 pPosition = project(vPosition);\n  vec3 offset = project(vPosition + screenAxis * position.z);\n\n  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\n\n  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}&quot;]);r.line=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;}])};var s=n([&quot;#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, axis;\nuniform float scale, angle, pixelScale;\nuniform vec2 resolution;\n\nvoid main() {  \n  //Compute plane offset\n  vec2 planeCoord = position.xy * pixelScale;\n  mat2 planeXform = scale * mat2(cos(angle), sin(angle),\n                                -sin(angle), cos(angle));\n  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n  //Compute world offset\n  float axisDistance = position.z;\n  vec3 dataPosition = axisDistance * axis + offset;\n  vec4 worldPosition = model * vec4(dataPosition, 1);\n  \n  //Compute clip position\n  vec4 viewPosition = view * worldPosition;\n  vec4 clipPosition = projection * viewPosition;\n  clipPosition /= clipPosition.w;\n\n  //Apply text offset in clip coordinates\n  clipPosition += vec4(viewOffset, 0, 0);\n\n  //Done\n  gl_Position = clipPosition;\n}&quot;]),l=n([&quot;precision mediump float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}&quot;]);r.text=function(t){return i(t,s,l,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;}])};var c=n([&quot;#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n  if(dot(normal, enable) &gt; 0.0) {\n    vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n    gl_Position = projection * view * model * vec4(nPosition, 1.0);\n  } else {\n    gl_Position = vec4(0,0,0,0);\n  }\n  colorChannel = abs(normal);\n}&quot;]),u=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n  gl_FragColor = colorChannel.x * colors[0] + \n                 colorChannel.y * colors[1] +\n                 colorChannel.z * colors[2];\n}&quot;]);r.bg=function(t){return i(t,c,u,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],226:[function(t,e,r){(function(r){&quot;use strict&quot;;e.exports=function(t,e,r,a,s,l){var u=n(t),f=i(t,[{buffer:u,size:3}]),h=o(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,a,s,l),p};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;vectorize-text&quot;),o=t(&quot;./shaders&quot;).text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,f=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){this.gl;var o=[];function s(t,e,r,n){var i=l[r];i||(i=l[r]={});var s=i[e];s||(s=i[e]=function(t,e){try{return a(t,e)}catch(t){return console.warn(&quot;error vectorizing text:&quot;,t),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:&quot;center&quot;,textBaseline:&quot;middle&quot;}));for(var c=(n||12)/12,u=s.positions,f=s.cells,h=0,p=f.length;h&lt;p;++h)for(var d=f[h],g=2;g&gt;=0;--g){var m=u[d[g]];o.push(c*m[0],-c*m[1],t)}}for(var c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],p=0;p&lt;3;++p){f[p]=o.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r),h[p]=(o.length/3|0)-f[p],c[p]=o.length/3|0;for(var d=0;d&lt;n[p].length;++d)n[p][d].text&amp;&amp;s(n[p][d].x,n[p][d].text,n[p][d].font||i,n[p][d].fontSize||12);u[p]=(o.length/3|0)-c[p]}this.buffer.update(o),this.tickOffset=c,this.tickCount=u,this.labelOffset=f,this.labelCount=h};var h=[0,0,0];u.drawTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=h;a[0]=a[1]=a[2]=0,a[t]=1,this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}};var p=[0,0,0];u.drawLabel=function(t,e,r,n,i){this.labelCount[t]&amp;&amp;(this.shader.uniforms.axis=p,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this,t(&quot;_process&quot;))},{&quot;./shaders&quot;:225,_process:462,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308,&quot;vectorize-text&quot;:524}],227:[function(t,e,r){&quot;use strict&quot;;function n(t,e){var r=t+&quot;&quot;,n=r.indexOf(&quot;.&quot;),i=0;n&gt;=0&amp;&amp;(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+&quot;&quot;;if(s.indexOf(&quot;e&quot;)&gt;=0)return s;var l=o/a,c=o%a;o&lt;0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=&quot;&quot;+l;if(o&lt;0&amp;&amp;(u=&quot;-&quot;+u),i){for(var f=&quot;&quot;+c;f.length&lt;i;)f=&quot;0&quot;+f;return u+&quot;.&quot;+f}return u}r.create=function(t,e){for(var r=[],i=0;i&lt;3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]&lt;=t[1][i];++o)a.push({x:o*e[i],text:n(e[i],o)});for(var o=-1;o*e[i]&gt;=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r&lt;3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n&lt;t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},{}],228:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,l,f){var h=e.model||c,p=e.view||c,v=e.projection||c,y=t.bounds,x=(f=f||a(h,p,v,y)).axis;f.edges;o(u,p,h),o(u,v,u);for(var b=g,_=0;_&lt;3;++_)b[_].lo=1/0,b[_].hi=-1/0,b[_].pixelsPerDataUnit=1/0;var w=n(s(u,u));s(u,u);for(var k=0;k&lt;3;++k){var M=(k+1)%3,A=(k+2)%3,T=m;t:for(var _=0;_&lt;2;++_){var S=[];if(x[k]&lt;0!=!!_){T[k]=y[_][k];for(var E=0;E&lt;2;++E){T[M]=y[E^_][M];for(var C=0;C&lt;2;++C)T[A]=y[C^E^_][A],S.push(T.slice())}for(var E=0;E&lt;w.length;++E){if(0===S.length)continue t;S=i.positive(S,w[E])}for(var E=0;E&lt;S.length;++E)for(var A=S[E],L=d(m,u,A,r,l),C=0;C&lt;3;++C)b[C].lo=Math.min(b[C].lo,A[C]),b[C].hi=Math.max(b[C].hi,A[C]),C!==k&amp;&amp;(b[C].pixelsPerDataUnit=Math.min(b[C].pixelsPerDataUnit,Math.abs(L[C])))}}}return b};var n=t(&quot;extract-frustum-planes&quot;),i=t(&quot;split-polygon&quot;),a=t(&quot;./lib/cube.js&quot;),o=t(&quot;gl-mat4/multiply&quot;),s=t(&quot;gl-mat4/transpose&quot;),l=t(&quot;gl-vec4/transformMat4&quot;),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),u=new Float32Array(16);function f(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}var h=[0,0,0,1],p=[0,0,0,1];function d(t,e,r,n,i){for(var a=0;a&lt;3;++a){for(var o=h,s=p,c=0;c&lt;3;++c)s[c]=o[c]=r[c];s[3]=o[3]=1,s[a]+=1,l(s,s,e),s[3]&lt;0&amp;&amp;(t[a]=1/0),o[a]-=1,l(o,o,e),o[3]&lt;0&amp;&amp;(t[a]=1/0);var u=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(u*u+f*f)}return t}var g=[new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0)],m=[0,0,0]},{&quot;./lib/cube.js&quot;:223,&quot;extract-frustum-planes&quot;:212,&quot;gl-mat4/multiply&quot;:255,&quot;gl-mat4/transpose&quot;:263,&quot;gl-vec4/transformMat4&quot;:379,&quot;split-polygon&quot;:500}],229:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;),i=t(&quot;ndarray-ops&quot;),a=t(&quot;ndarray&quot;),o=[&quot;uint8&quot;,&quot;uint8_clamped&quot;,&quot;uint16&quot;,&quot;uint32&quot;,&quot;int8&quot;,&quot;int16&quot;,&quot;int32&quot;,&quot;float32&quot;];function s(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}var l=s.prototype;function c(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a&lt;0)return t.bufferData(e,i,n),o;if(o+a&gt;r)throw new Error(&quot;gl-buffer: If resizing buffer, must not specify offset&quot;);return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a&lt;i;++a)r[a]=t[a];return r}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(t,e){if(&quot;number&quot;!=typeof e&amp;&amp;(e=-1),this.bind(),&quot;object&quot;==typeof t&amp;&amp;&quot;undefined&quot;!=typeof t.shape){var r=t.dtype;if(o.indexOf(r)&lt;0&amp;&amp;(r=&quot;float32&quot;),this.type===this.gl.ELEMENT_ARRAY_BUFFER)r=gl.getExtension(&quot;OES_element_index_uint&quot;)&amp;&amp;&quot;uint16&quot;!==r?&quot;uint32&quot;:&quot;uint16&quot;;if(r===t.dtype&amp;&amp;function(t,e){for(var r=1,n=e.length-1;n&gt;=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&amp;&amp;t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e&lt;0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,&quot;uint16&quot;):u(t,&quot;float32&quot;),this.length=c(this.gl,this.type,this.length,this.usage,e&lt;0?f:f.subarray(0,t.length),e),n.free(f)}else if(&quot;object&quot;==typeof t&amp;&amp;&quot;number&quot;==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if(&quot;number&quot;!=typeof t&amp;&amp;void 0!==t)throw new Error(&quot;gl-buffer: Invalid data type&quot;);if(e&gt;=0)throw new Error(&quot;gl-buffer: Cannot specify offset when resizing buffer&quot;);(t|=0)&lt;=0&amp;&amp;(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&amp;&amp;r!==t.ELEMENT_ARRAY_BUFFER)throw new Error(&quot;gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER&quot;);if(n!==t.DYNAMIC_DRAW&amp;&amp;n!==t.STATIC_DRAW&amp;&amp;n!==t.STREAM_DRAW)throw new Error(&quot;gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW&quot;);var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:430,&quot;ndarray-ops&quot;:424,&quot;typedarray-pool&quot;:519}],230:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-vec3&quot;),i=(t(&quot;gl-vec4&quot;),function(t,e){for(var r=0;r&lt;t.length;r++)if(t[r]&gt;=e)return r-1;return r}),a=n.create(),o=n.create(),s=function(t,e,r){return t&lt;e?e:t&gt;r?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],f=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=i(r[0],c),m=i(r[1],u),v=i(r[2],f),y=g+1,x=m+1,b=v+1;if(l&amp;&amp;(g=s(g,0,h-1),y=s(y,0,h-1),m=s(m,0,p-1),x=s(x,0,p-1),v=s(v,0,d-1),b=s(b,0,d-1)),g&lt;0||m&lt;0||v&lt;0||y&gt;=h||x&gt;=p||b&gt;=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][m])/(r[1][x]-r[1][m]),k=(f-r[2][v])/(r[2][b]-r[2][v]);(_&lt;0||_&gt;1||isNaN(_))&amp;&amp;(_=0),(w&lt;0||w&gt;1||isNaN(w))&amp;&amp;(w=0),(k&lt;0||k&gt;1||isNaN(k))&amp;&amp;(k=0);var M=v*h*p,A=b*h*p,T=m*h,S=x*h,E=g,C=y,L=e[T+M+E],z=e[T+M+C],P=e[S+M+E],O=e[S+M+C],I=e[T+A+E],D=e[T+A+C],R=e[S+A+E],B=e[S+A+C],F=n.create();return n.lerp(F,L,z,_),n.lerp(a,P,O,_),n.lerp(F,F,a,w),n.lerp(a,I,D,_),n.lerp(o,R,B,_),n.lerp(a,a,o,w),n.lerp(F,F,a,k),F};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],i=[],a=0;a&lt;n.length;a++)for(var o=0;o&lt;r.length;o++)for(var s=0;s&lt;e.length;s++)i.push([n[a],r[o],e[s]]);return i}(t.meshgrid);var i=t.meshgrid,a=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vertexNormals:[],vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&amp;&amp;(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var s=0,c=1/0,u=-1/0,f=1/0,h=-1/0,p=1/0,d=-1/0,g=null,m=null,v=[],y=1/0,x=0;x&lt;r.length;x++){var b,_=r[x];c=Math.min(_[0],c),u=Math.max(_[0],u),f=Math.min(_[1],f),h=Math.max(_[1],h),p=Math.min(_[2],p),d=Math.max(_[2],d),b=i?l(_,a,i,!0):a[x],n.length(b)&gt;s&amp;&amp;(s=n.length(b)),x&amp;&amp;(y=Math.min(y,2*n.distance(g,_)/(n.length(m)+n.length(b)))),g=_,m=b,v.push(b)}var w=[c,f,p],k=[u,h,d];e&amp;&amp;(e[0]=w,e[1]=k),0===s&amp;&amp;(s=1);var M=1/s;isFinite(y)&amp;&amp;!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var i=n.create();return void 0!==t&amp;&amp;n.set(i,t,e,r),i}(0,1,0),T=t.coneSize||.5;t.absoluteConeSize&amp;&amp;(T=t.absoluteConeSize*M),o.coneScale=T;x=0;for(var S=0;x&lt;r.length;x++)for(var E=(_=r[x])[0],C=_[1],L=_[2],z=v[x],P=n.length(z)*M,O=0;O&lt;8;O++){o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vertexIntensity.push(P,P,P),o.vertexIntensity.push(P,P,P),o.vertexNormals.push(A,A,A),o.vertexNormals.push(A,A,A);var I=o.positions.length;o.cells.push([I-6,I-5,I-4],[I-3,I-2,I-1])}return o},e.exports.createConeMesh=t(&quot;./lib/conemesh&quot;)},{&quot;./lib/conemesh&quot;:232,&quot;gl-vec3&quot;:327,&quot;gl-vec4&quot;:363}],231:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;barycentric&quot;),i=t(&quot;polytope-closest-point/lib/closest_point_2d.js&quot;);function a(t,e){for(var r=[0,0,0,0],n=0;n&lt;4;++n)for(var i=0;i&lt;4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s&lt;3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}e.exports=function(t,e,r,a,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u&lt;t.length;++u)c[u]=o(t[u],r,a,s,l);for(var f=0,h=1/0,u=0;u&lt;c.length;++u){for(var p=0,d=0;d&lt;2;++d)p+=Math.pow(c[u][d]-e[d],2);p&lt;h&amp;&amp;(h=p,f=u)}for(var g=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o&lt;2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return r=Math.sqrt(r),a=Math.sqrt(a),r+a&lt;1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),m=0,u=0;u&lt;3;++u){if(g[u]&lt;-.001||g[u]&gt;1.0001)return null;m+=g[u]}if(Math.abs(m-1)&gt;.001)return null;return[f,function(t,e){for(var r=[0,0,0],n=0;n&lt;t.length;++n)for(var i=t[n],a=e[n],o=0;o&lt;3;++o)r[o]+=a*i[o];return r}(t,g),g]}},{barycentric:60,&quot;polytope-closest-point/lib/closest_point_2d.js&quot;:461}],232:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;normals&quot;),l=t(&quot;gl-mat4/multiply&quot;),c=t(&quot;gl-mat4/invert&quot;),u=t(&quot;ndarray&quot;),f=t(&quot;colormap&quot;),h=t(&quot;simplicial-complex-contour&quot;),p=t(&quot;typedarray-pool&quot;),d=t(&quot;./shaders&quot;),g=(t(&quot;./closest-point&quot;),d.meshShader),m=d.pickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,y,x,b,_,w,k,M,A,T,S,E){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=E,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=v,this._view=v,this._projection=v,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,m.vertex,m.fragment,null,m.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity&gt;=1},x.isTransparent=function(){return this.opacity&lt;1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&amp;&amp;this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l&lt;a;++l)for(var c=r[l],u=0;u&lt;2;++u){var f=c[0];2===c.length&amp;&amp;(f=c[u]);for(var d=n[f][0],g=n[f][1],m=i[f],v=1-m,y=this.positions[d],x=this.positions[g],b=0;b&lt;3;++b)o[s++]=m*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,&quot;contourEnable&quot;in t&amp;&amp;(this.contourEnable=t.contourEnable),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=t.contourColor),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;lightPosition&quot;in t&amp;&amp;(this.lightPosition=t.lightPosition),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;ambient&quot;in t&amp;&amp;(this.ambientLight=t.ambient),&quot;diffuse&quot;in t&amp;&amp;(this.diffuseLight=t.diffuse),&quot;specular&quot;in t&amp;&amp;(this.specularLight=t.specular),&quot;roughness&quot;in t&amp;&amp;(this.roughness=t.roughness),&quot;fresnel&quot;in t&amp;&amp;(this.fresnel=t.fresnel),void 0!==t.vectorScale&amp;&amp;(this.vectorScale=t.vectorScale),void 0!==t.coneScale&amp;&amp;(this.coneScale=t.coneScale),void 0!==t.coneOffset&amp;&amp;(this.coneOffset=t.coneOffset),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&amp;&amp;(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:&quot;rgba&quot;}),r=new Uint8Array(1024),n=0;n&lt;256;++n){for(var i=e[n],a=0;a&lt;3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&amp;&amp;r&amp;&amp;i){var a=[],l=[],c=[],h=[],p=[],d=[],g=[],m=[],v=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&amp;&amp;!A&amp;&amp;(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var E=t.vertexColors,C=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,P=t.vertexIntensity,O=t.cellUVs,I=t.cellIntensity,D=1/0,R=-1/0;if(!z&amp;&amp;!O)if(P)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B&lt;P.length;++B){var F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else if(I)for(B=0;B&lt;I.length;++B){F=I[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B&lt;n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=P||(I?function(t,e,r){for(var n=new Array(e),i=0;i&lt;e;++i)n[i]=0;var a=t.length;for(i=0;i&lt;a;++i)for(var o=t[i],s=0;s&lt;o.length;++s)n[o[s]]=r[i];return n}(r,n.length,I):function(t){for(var e=t.length,r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B&lt;n.length;++B)for(var V=n[B],U=0;U&lt;3;++U)!isNaN(V[U])&amp;&amp;isFinite(V[U])&amp;&amp;(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B&lt;r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U&lt;3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=E?E[X]:C?C[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U&lt;2;++U){V=n[X=W[U]];for(var Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U&lt;2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=E?E[X]:C?C[B]:L).length?m.push(Z[0],Z[1],Z[2],1):m.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],v.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U&lt;3;++U)for(V=n[X=W[U]],Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U&lt;3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2]),3===(Z=E?E[X]:C?C[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(m),this.edgeUVs.update(v),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o&lt;3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o&lt;3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o&lt;3;++o){for(var p=u[12+o],d=0;d&lt;3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount&gt;0&amp;&amp;((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount&gt;0&amp;&amp;this.lineWidth&gt;0&amp;&amp;((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount&gt;0&amp;&amp;((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&amp;&amp;this.contourCount&gt;0&amp;&amp;this.contourLineWidth&gt;0&amp;&amp;((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount&gt;0&amp;&amp;(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount&gt;0&amp;&amp;(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount&gt;0)&amp;&amp;((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&amp;&amp;(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),m=i(t),v=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:m,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:3}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),z=i(t),P=new y(t,l,r,null,null,s,null,null,c,f,m,h,p,d,v,x,k,_,w,M,A,C,T,S,E,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return P.update(e),P}},{&quot;./closest-point&quot;:231,&quot;./shaders&quot;:233,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-shader&quot;:286,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,normals:433,&quot;simplicial-complex-contour&quot;:491,&quot;typedarray-pool&quot;:519}],233:[function(t,e,r){var n=t(&quot;glslify&quot;),i=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n//   segment + 0 top vertex\n//   segment + 1 perimeter vertex a+1\n//   segment + 2 perimeter vertex a\n//   segment + 3 center base vertex\n//   segment + 4 perimeter vertex a\n//   segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\n\n  const float segmentCount = 8.0;\n\n  index = mod(index, segmentCount * 6.0);\n\n  float segment = floor(index/6.0);\n  float segmentIndex = index - (segment*6.0);\n\n  normal = -normalize(d);\n\n  if (segmentIndex == 3.0) {\n    return mix(vec3(0.0), -d, coneOffset);\n  }\n\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n  vec3 v2 = v1 - d;\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d)*0.25;\n  vec3 y = v * sin(angle) * length(d)*0.25;\n  vec3 v3 = v2 + x + y;\n  if (segmentIndex &lt;= 2.0) {\n    vec3 tx = u * sin(angle);\n    vec3 ty = v * -cos(angle);\n    vec3 tangent = tx + ty;\n    normal = normalize(cross(v3 - v1, tangent));\n  }\n\n  if (segmentIndex == 0.0) {\n    return mix(d, vec3(0.0), coneOffset);\n  }\n  return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float coneScale;\n\nuniform float coneOffset;\n\nuniform mat4 model\n           , view\n           , projection;\nuniform vec3 eyePosition\n           , lightPosition;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  // Scale the vector magnitude to stay constant with\n  // model &amp; view changes.\n  vec3 normal;\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal), 0.0);\n  normal = normalize(normal * inverse(mat3(model)));\n\n  // vec4 m_position  = model * vec4(conePosition, 1.0);\n  vec4 t_position  = view * conePosition;\n  gl_Position      = projection * t_position;\n  f_color          = color; //vec4(position.w, color.r, 0, 0);\n  f_normal         = normal;\n  f_data           = conePosition.xyz;\n  f_eyeDirection   = eyePosition   - conePosition.xyz;\n  f_lightDirection = lightPosition - conePosition.xyz;\n  f_uv             = uv;\n}\n&quot;]),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n            , fresnel\n            , kambient\n            , kdiffuse\n            , kspecular\n            , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  //if(any(lessThan(f_data, clipBounds[0])) || \n  //   any(greaterThan(f_data, clipBounds[1]))) {\n  //  discard;\n  //}\n\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n  \n  if(!gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor =  texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n//   segment + 0 top vertex\n//   segment + 1 perimeter vertex a+1\n//   segment + 2 perimeter vertex a\n//   segment + 3 center base vertex\n//   segment + 4 perimeter vertex a\n//   segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\n\n  const float segmentCount = 8.0;\n\n  index = mod(index, segmentCount * 6.0);\n\n  float segment = floor(index/6.0);\n  float segmentIndex = index - (segment*6.0);\n\n  normal = -normalize(d);\n\n  if (segmentIndex == 3.0) {\n    return mix(vec3(0.0), -d, coneOffset);\n  }\n\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n  vec3 v2 = v1 - d;\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d)*0.25;\n  vec3 y = v * sin(angle) * length(d)*0.25;\n  vec3 v3 = v2 + x + y;\n  if (segmentIndex &lt;= 2.0) {\n    vec3 tx = u * sin(angle);\n    vec3 ty = v * -cos(angle);\n    vec3 tangent = tx + ty;\n    normal = normalize(cross(v3 - v1, tangent));\n  }\n\n  if (segmentIndex == 0.0) {\n    return mix(d, vec3(0.0), coneOffset);\n  }\n  return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nuniform float vectorScale;\nuniform float coneScale;\nuniform float coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  vec3 normal;\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal), 0.0);\n  gl_Position = projection * view * conePosition;\n  f_id        = id;\n  f_position  = position.xyz;\n}\n&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if(any(lessThan(f_position, clipBounds[0])) || \n     any(greaterThan(f_position, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}&quot;]);r.meshShader={vertex:i,fragment:a,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;},{name:&quot;vector&quot;,type:&quot;vec3&quot;}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;},{name:&quot;vector&quot;,type:&quot;vec3&quot;}]}},{glslify:390}],234:[function(t,e,r){e.exports={0:&quot;NONE&quot;,1:&quot;ONE&quot;,2:&quot;LINE_LOOP&quot;,3:&quot;LINE_STRIP&quot;,4:&quot;TRIANGLES&quot;,5:&quot;TRIANGLE_STRIP&quot;,6:&quot;TRIANGLE_FAN&quot;,256:&quot;DEPTH_BUFFER_BIT&quot;,512:&quot;NEVER&quot;,513:&quot;LESS&quot;,514:&quot;EQUAL&quot;,515:&quot;LEQUAL&quot;,516:&quot;GREATER&quot;,517:&quot;NOTEQUAL&quot;,518:&quot;GEQUAL&quot;,519:&quot;ALWAYS&quot;,768:&quot;SRC_COLOR&quot;,769:&quot;ONE_MINUS_SRC_COLOR&quot;,770:&quot;SRC_ALPHA&quot;,771:&quot;ONE_MINUS_SRC_ALPHA&quot;,772:&quot;DST_ALPHA&quot;,773:&quot;ONE_MINUS_DST_ALPHA&quot;,774:&quot;DST_COLOR&quot;,775:&quot;ONE_MINUS_DST_COLOR&quot;,776:&quot;SRC_ALPHA_SATURATE&quot;,1024:&quot;STENCIL_BUFFER_BIT&quot;,1028:&quot;FRONT&quot;,1029:&quot;BACK&quot;,1032:&quot;FRONT_AND_BACK&quot;,1280:&quot;INVALID_ENUM&quot;,1281:&quot;INVALID_VALUE&quot;,1282:&quot;INVALID_OPERATION&quot;,1285:&quot;OUT_OF_MEMORY&quot;,1286:&quot;INVALID_FRAMEBUFFER_OPERATION&quot;,2304:&quot;CW&quot;,2305:&quot;CCW&quot;,2849:&quot;LINE_WIDTH&quot;,2884:&quot;CULL_FACE&quot;,2885:&quot;CULL_FACE_MODE&quot;,2886:&quot;FRONT_FACE&quot;,2928:&quot;DEPTH_RANGE&quot;,2929:&quot;DEPTH_TEST&quot;,2930:&quot;DEPTH_WRITEMASK&quot;,2931:&quot;DEPTH_CLEAR_VALUE&quot;,2932:&quot;DEPTH_FUNC&quot;,2960:&quot;STENCIL_TEST&quot;,2961:&quot;STENCIL_CLEAR_VALUE&quot;,2962:&quot;STENCIL_FUNC&quot;,2963:&quot;STENCIL_VALUE_MASK&quot;,2964:&quot;STENCIL_FAIL&quot;,2965:&quot;STENCIL_PASS_DEPTH_FAIL&quot;,2966:&quot;STENCIL_PASS_DEPTH_PASS&quot;,2967:&quot;STENCIL_REF&quot;,2968:&quot;STENCIL_WRITEMASK&quot;,2978:&quot;VIEWPORT&quot;,3024:&quot;DITHER&quot;,3042:&quot;BLEND&quot;,3088:&quot;SCISSOR_BOX&quot;,3089:&quot;SCISSOR_TEST&quot;,3106:&quot;COLOR_CLEAR_VALUE&quot;,3107:&quot;COLOR_WRITEMASK&quot;,3317:&quot;UNPACK_ALIGNMENT&quot;,3333:&quot;PACK_ALIGNMENT&quot;,3379:&quot;MAX_TEXTURE_SIZE&quot;,3386:&quot;MAX_VIEWPORT_DIMS&quot;,3408:&quot;SUBPIXEL_BITS&quot;,3410:&quot;RED_BITS&quot;,3411:&quot;GREEN_BITS&quot;,3412:&quot;BLUE_BITS&quot;,3413:&quot;ALPHA_BITS&quot;,3414:&quot;DEPTH_BITS&quot;,3415:&quot;STENCIL_BITS&quot;,3553:&quot;TEXTURE_2D&quot;,4352:&quot;DONT_CARE&quot;,4353:&quot;FASTEST&quot;,4354:&quot;NICEST&quot;,5120:&quot;BYTE&quot;,5121:&quot;UNSIGNED_BYTE&quot;,5122:&quot;SHORT&quot;,5123:&quot;UNSIGNED_SHORT&quot;,5124:&quot;INT&quot;,5125:&quot;UNSIGNED_INT&quot;,5126:&quot;FLOAT&quot;,5386:&quot;INVERT&quot;,5890:&quot;TEXTURE&quot;,6401:&quot;STENCIL_INDEX&quot;,6402:&quot;DEPTH_COMPONENT&quot;,6406:&quot;ALPHA&quot;,6407:&quot;RGB&quot;,6408:&quot;RGBA&quot;,6409:&quot;LUMINANCE&quot;,6410:&quot;LUMINANCE_ALPHA&quot;,7680:&quot;KEEP&quot;,7681:&quot;REPLACE&quot;,7682:&quot;INCR&quot;,7683:&quot;DECR&quot;,7936:&quot;VENDOR&quot;,7937:&quot;RENDERER&quot;,7938:&quot;VERSION&quot;,9728:&quot;NEAREST&quot;,9729:&quot;LINEAR&quot;,9984:&quot;NEAREST_MIPMAP_NEAREST&quot;,9985:&quot;LINEAR_MIPMAP_NEAREST&quot;,9986:&quot;NEAREST_MIPMAP_LINEAR&quot;,9987:&quot;LINEAR_MIPMAP_LINEAR&quot;,10240:&quot;TEXTURE_MAG_FILTER&quot;,10241:&quot;TEXTURE_MIN_FILTER&quot;,10242:&quot;TEXTURE_WRAP_S&quot;,10243:&quot;TEXTURE_WRAP_T&quot;,10497:&quot;REPEAT&quot;,10752:&quot;POLYGON_OFFSET_UNITS&quot;,16384:&quot;COLOR_BUFFER_BIT&quot;,32769:&quot;CONSTANT_COLOR&quot;,32770:&quot;ONE_MINUS_CONSTANT_COLOR&quot;,32771:&quot;CONSTANT_ALPHA&quot;,32772:&quot;ONE_MINUS_CONSTANT_ALPHA&quot;,32773:&quot;BLEND_COLOR&quot;,32774:&quot;FUNC_ADD&quot;,32777:&quot;BLEND_EQUATION_RGB&quot;,32778:&quot;FUNC_SUBTRACT&quot;,32779:&quot;FUNC_REVERSE_SUBTRACT&quot;,32819:&quot;UNSIGNED_SHORT_4_4_4_4&quot;,32820:&quot;UNSIGNED_SHORT_5_5_5_1&quot;,32823:&quot;POLYGON_OFFSET_FILL&quot;,32824:&quot;POLYGON_OFFSET_FACTOR&quot;,32854:&quot;RGBA4&quot;,32855:&quot;RGB5_A1&quot;,32873:&quot;TEXTURE_BINDING_2D&quot;,32926:&quot;SAMPLE_ALPHA_TO_COVERAGE&quot;,32928:&quot;SAMPLE_COVERAGE&quot;,32936:&quot;SAMPLE_BUFFERS&quot;,32937:&quot;SAMPLES&quot;,32938:&quot;SAMPLE_COVERAGE_VALUE&quot;,32939:&quot;SAMPLE_COVERAGE_INVERT&quot;,32968:&quot;BLEND_DST_RGB&quot;,32969:&quot;BLEND_SRC_RGB&quot;,32970:&quot;BLEND_DST_ALPHA&quot;,32971:&quot;BLEND_SRC_ALPHA&quot;,33071:&quot;CLAMP_TO_EDGE&quot;,33170:&quot;GENERATE_MIPMAP_HINT&quot;,33189:&quot;DEPTH_COMPONENT16&quot;,33306:&quot;DEPTH_STENCIL_ATTACHMENT&quot;,33635:&quot;UNSIGNED_SHORT_5_6_5&quot;,33648:&quot;MIRRORED_REPEAT&quot;,33901:&quot;ALIASED_POINT_SIZE_RANGE&quot;,33902:&quot;ALIASED_LINE_WIDTH_RANGE&quot;,33984:&quot;TEXTURE0&quot;,33985:&quot;TEXTURE1&quot;,33986:&quot;TEXTURE2&quot;,33987:&quot;TEXTURE3&quot;,33988:&quot;TEXTURE4&quot;,33989:&quot;TEXTURE5&quot;,33990:&quot;TEXTURE6&quot;,33991:&quot;TEXTURE7&quot;,33992:&quot;TEXTURE8&quot;,33993:&quot;TEXTURE9&quot;,33994:&quot;TEXTURE10&quot;,33995:&quot;TEXTURE11&quot;,33996:&quot;TEXTURE12&quot;,33997:&quot;TEXTURE13&quot;,33998:&quot;TEXTURE14&quot;,33999:&quot;TEXTURE15&quot;,34000:&quot;TEXTURE16&quot;,34001:&quot;TEXTURE17&quot;,34002:&quot;TEXTURE18&quot;,34003:&quot;TEXTURE19&quot;,34004:&quot;TEXTURE20&quot;,34005:&quot;TEXTURE21&quot;,34006:&quot;TEXTURE22&quot;,34007:&quot;TEXTURE23&quot;,34008:&quot;TEXTURE24&quot;,34009:&quot;TEXTURE25&quot;,34010:&quot;TEXTURE26&quot;,34011:&quot;TEXTURE27&quot;,34012:&quot;TEXTURE28&quot;,34013:&quot;TEXTURE29&quot;,34014:&quot;TEXTURE30&quot;,34015:&quot;TEXTURE31&quot;,34016:&quot;ACTIVE_TEXTURE&quot;,34024:&quot;MAX_RENDERBUFFER_SIZE&quot;,34041:&quot;DEPTH_STENCIL&quot;,34055:&quot;INCR_WRAP&quot;,34056:&quot;DECR_WRAP&quot;,34067:&quot;TEXTURE_CUBE_MAP&quot;,34068:&quot;TEXTURE_BINDING_CUBE_MAP&quot;,34069:&quot;TEXTURE_CUBE_MAP_POSITIVE_X&quot;,34070:&quot;TEXTURE_CUBE_MAP_NEGATIVE_X&quot;,34071:&quot;TEXTURE_CUBE_MAP_POSITIVE_Y&quot;,34072:&quot;TEXTURE_CUBE_MAP_NEGATIVE_Y&quot;,34073:&quot;TEXTURE_CUBE_MAP_POSITIVE_Z&quot;,34074:&quot;TEXTURE_CUBE_MAP_NEGATIVE_Z&quot;,34076:&quot;MAX_CUBE_MAP_TEXTURE_SIZE&quot;,34338:&quot;VERTEX_ATTRIB_ARRAY_ENABLED&quot;,34339:&quot;VERTEX_ATTRIB_ARRAY_SIZE&quot;,34340:&quot;VERTEX_ATTRIB_ARRAY_STRIDE&quot;,34341:&quot;VERTEX_ATTRIB_ARRAY_TYPE&quot;,34342:&quot;CURRENT_VERTEX_ATTRIB&quot;,34373:&quot;VERTEX_ATTRIB_ARRAY_POINTER&quot;,34466:&quot;NUM_COMPRESSED_TEXTURE_FORMATS&quot;,34467:&quot;COMPRESSED_TEXTURE_FORMATS&quot;,34660:&quot;BUFFER_SIZE&quot;,34661:&quot;BUFFER_USAGE&quot;,34816:&quot;STENCIL_BACK_FUNC&quot;,34817:&quot;STENCIL_BACK_FAIL&quot;,34818:&quot;STENCIL_BACK_PASS_DEPTH_FAIL&quot;,34819:&quot;STENCIL_BACK_PASS_DEPTH_PASS&quot;,34877:&quot;BLEND_EQUATION_ALPHA&quot;,34921:&quot;MAX_VERTEX_ATTRIBS&quot;,34922:&quot;VERTEX_ATTRIB_ARRAY_NORMALIZED&quot;,34930:&quot;MAX_TEXTURE_IMAGE_UNITS&quot;,34962:&quot;ARRAY_BUFFER&quot;,34963:&quot;ELEMENT_ARRAY_BUFFER&quot;,34964:&quot;ARRAY_BUFFER_BINDING&quot;,34965:&quot;ELEMENT_ARRAY_BUFFER_BINDING&quot;,34975:&quot;VERTEX_ATTRIB_ARRAY_BUFFER_BINDING&quot;,35040:&quot;STREAM_DRAW&quot;,35044:&quot;STATIC_DRAW&quot;,35048:&quot;DYNAMIC_DRAW&quot;,35632:&quot;FRAGMENT_SHADER&quot;,35633:&quot;VERTEX_SHADER&quot;,35660:&quot;MAX_VERTEX_TEXTURE_IMAGE_UNITS&quot;,35661:&quot;MAX_COMBINED_TEXTURE_IMAGE_UNITS&quot;,35663:&quot;SHADER_TYPE&quot;,35664:&quot;FLOAT_VEC2&quot;,35665:&quot;FLOAT_VEC3&quot;,35666:&quot;FLOAT_VEC4&quot;,35667:&quot;INT_VEC2&quot;,35668:&quot;INT_VEC3&quot;,35669:&quot;INT_VEC4&quot;,35670:&quot;BOOL&quot;,35671:&quot;BOOL_VEC2&quot;,35672:&quot;BOOL_VEC3&quot;,35673:&quot;BOOL_VEC4&quot;,35674:&quot;FLOAT_MAT2&quot;,35675:&quot;FLOAT_MAT3&quot;,35676:&quot;FLOAT_MAT4&quot;,35678:&quot;SAMPLER_2D&quot;,35680:&quot;SAMPLER_CUBE&quot;,35712:&quot;DELETE_STATUS&quot;,35713:&quot;COMPILE_STATUS&quot;,35714:&quot;LINK_STATUS&quot;,35715:&quot;VALIDATE_STATUS&quot;,35716:&quot;INFO_LOG_LENGTH&quot;,35717:&quot;ATTACHED_SHADERS&quot;,35718:&quot;ACTIVE_UNIFORMS&quot;,35719:&quot;ACTIVE_UNIFORM_MAX_LENGTH&quot;,35720:&quot;SHADER_SOURCE_LENGTH&quot;,35721:&quot;ACTIVE_ATTRIBUTES&quot;,35722:&quot;ACTIVE_ATTRIBUTE_MAX_LENGTH&quot;,35724:&quot;SHADING_LANGUAGE_VERSION&quot;,35725:&quot;CURRENT_PROGRAM&quot;,36003:&quot;STENCIL_BACK_REF&quot;,36004:&quot;STENCIL_BACK_VALUE_MASK&quot;,36005:&quot;STENCIL_BACK_WRITEMASK&quot;,36006:&quot;FRAMEBUFFER_BINDING&quot;,36007:&quot;RENDERBUFFER_BINDING&quot;,36048:&quot;FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE&quot;,36049:&quot;FRAMEBUFFER_ATTACHMENT_OBJECT_NAME&quot;,36050:&quot;FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL&quot;,36051:&quot;FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE&quot;,36053:&quot;FRAMEBUFFER_COMPLETE&quot;,36054:&quot;FRAMEBUFFER_INCOMPLETE_ATTACHMENT&quot;,36055:&quot;FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT&quot;,36057:&quot;FRAMEBUFFER_INCOMPLETE_DIMENSIONS&quot;,36061:&quot;FRAMEBUFFER_UNSUPPORTED&quot;,36064:&quot;COLOR_ATTACHMENT0&quot;,36096:&quot;DEPTH_ATTACHMENT&quot;,36128:&quot;STENCIL_ATTACHMENT&quot;,36160:&quot;FRAMEBUFFER&quot;,36161:&quot;RENDERBUFFER&quot;,36162:&quot;RENDERBUFFER_WIDTH&quot;,36163:&quot;RENDERBUFFER_HEIGHT&quot;,36164:&quot;RENDERBUFFER_INTERNAL_FORMAT&quot;,36168:&quot;STENCIL_INDEX8&quot;,36176:&quot;RENDERBUFFER_RED_SIZE&quot;,36177:&quot;RENDERBUFFER_GREEN_SIZE&quot;,36178:&quot;RENDERBUFFER_BLUE_SIZE&quot;,36179:&quot;RENDERBUFFER_ALPHA_SIZE&quot;,36180:&quot;RENDERBUFFER_DEPTH_SIZE&quot;,36181:&quot;RENDERBUFFER_STENCIL_SIZE&quot;,36194:&quot;RGB565&quot;,36336:&quot;LOW_FLOAT&quot;,36337:&quot;MEDIUM_FLOAT&quot;,36338:&quot;HIGH_FLOAT&quot;,36339:&quot;LOW_INT&quot;,36340:&quot;MEDIUM_INT&quot;,36341:&quot;HIGH_INT&quot;,36346:&quot;SHADER_COMPILER&quot;,36347:&quot;MAX_VERTEX_UNIFORM_VECTORS&quot;,36348:&quot;MAX_VARYING_VECTORS&quot;,36349:&quot;MAX_FRAGMENT_UNIFORM_VECTORS&quot;,37440:&quot;UNPACK_FLIP_Y_WEBGL&quot;,37441:&quot;UNPACK_PREMULTIPLY_ALPHA_WEBGL&quot;,37442:&quot;CONTEXT_LOST_WEBGL&quot;,37443:&quot;UNPACK_COLORSPACE_CONVERSION_WEBGL&quot;,37444:&quot;BROWSER_DEFAULT_WEBGL&quot;}},{}],235:[function(t,e,r){var n=t(&quot;./1.0/numbers&quot;);e.exports=function(t){return n[t]}},{&quot;./1.0/numbers&quot;:234}],236:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders/index&quot;),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1}var l=s.prototype;function c(t,e){for(var r=0;r&lt;3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return this.opacity&gt;=1},l.isTransparent=function(){return this.opacity&lt;1},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f&lt;3;++f)e.lineWidth(this.lineWidth[f]),r.capSize=this.capSize[f]*u,this.lineCount[f]&amp;&amp;e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e&lt;3;++e){for(var r=[],n=1;n&lt;=2;++n)for(var i=-1;i&lt;=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=u[n],a=0;a&lt;i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}l.update=function(t){&quot;lineWidth&quot;in(t=t||{})&amp;&amp;(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),&quot;capSize&quot;in t&amp;&amp;(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&amp;&amp;n){var i=[],a=r.length,o=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s&lt;3;++s){this.lineOffset[s]=o;t:for(var l=0;l&lt;a;++l){for(var u=r[l],h=0;h&lt;3;++h)if(isNaN(u[h])||!isFinite(u[h]))continue t;var p=n[l],d=e[s];if(Array.isArray(d[0])&amp;&amp;(d=e[l]),3===d.length&amp;&amp;(d=[d[0],d[1],d[2],1]),!isNaN(p[0][s])&amp;&amp;!isNaN(p[1][s])){var g;if(p[0][s]&lt;0)(g=u.slice())[s]+=p[0][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s);if(p[1][s]&gt;0)(g=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{&quot;./shaders/index&quot;:237,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],237:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n  vec4 worldPosition  = model * vec4(position, 1.0);\n  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n  gl_Position         = projection * view * worldPosition;\n  fragColor           = color;\n  fragPosition        = position;\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n  if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = opacity * fragColor;\n}&quot;]);e.exports=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;offset&quot;,type:&quot;vec3&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],238:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-texture2d&quot;);e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension(&quot;WEBGL_draw_buffers&quot;);!l&amp;&amp;c&amp;&amp;function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n&lt;=r;++n){for(var i=new Array(r),a=0;a&lt;n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(var a=n;a&lt;r;++a)i[a]=t.NONE;l[n]=i}}(t,c);Array.isArray(e)&amp;&amp;(n=r,r=0|e[1],e=0|e[0]);if(&quot;number&quot;!=typeof e)throw new Error(&quot;gl-fbo: Missing shape parameter&quot;);var u=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e&lt;0||e&gt;u||r&lt;0||r&gt;u)throw new Error(&quot;gl-fbo: Parameters are too large for FBO&quot;);var f=1;if(&quot;color&quot;in(n=n||{})){if((f=Math.max(0|n.color,0))&lt;0)throw new Error(&quot;gl-fbo: Must specify a nonnegative number of colors&quot;);if(f&gt;1){if(!c)throw new Error(&quot;gl-fbo: Multiple draw buffer extension not supported&quot;);if(f&gt;t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(&quot;gl-fbo: Context does not support &quot;+f+&quot; draw buffers&quot;)}}var h=t.UNSIGNED_BYTE,p=t.getExtension(&quot;OES_texture_float&quot;);if(n.float&amp;&amp;f&gt;0){if(!p)throw new Error(&quot;gl-fbo: Context does not support floating point textures&quot;);h=t.FLOAT}else n.preferFloat&amp;&amp;f&gt;0&amp;&amp;p&amp;&amp;(h=t.FLOAT);var g=!0;&quot;depth&quot;in n&amp;&amp;(g=!!n.depth);var m=!1;&quot;stencil&quot;in n&amp;&amp;(m=!!n.stencil);return new d(t,e,r,h,f,g,m,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error(&quot;gl-fbo: Framebuffer unsupported&quot;);case a:throw new Error(&quot;gl-fbo: Framebuffer incomplete attachment&quot;);case o:throw new Error(&quot;gl-fbo: Framebuffer incomplete dimensions&quot;);case s:throw new Error(&quot;gl-fbo: Framebuffer incomplete missing attachment&quot;);default:throw new Error(&quot;gl-fbo: Framebuffer failed for unspecified reason&quot;)}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d&lt;i;++d)this.color[d]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=n,this._useDepth=a,this._useStencil=o;var g=this,m=[0|e,0|r];Object.defineProperties(m,{0:{get:function(){return g._shape[0]},set:function(t){return g.width=t}},1:{get:function(){return g._shape[1]},set:function(t){return g.height=t}}}),this._shapeVector=m,function(t){var e=c(t.gl),r=t.gl,n=t.handle=r.createFramebuffer(),i=t._shape[0],a=t._shape[1],o=t.color.length,s=t._ext,d=t._useStencil,g=t._useDepth,m=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,n);for(var v=0;v&lt;o;++v)t.color[v]=h(r,i,a,m,r.RGBA,r.COLOR_ATTACHMENT0+v);0===o?(t._color_rb=p(r,i,a,r.RGBA4,r.COLOR_ATTACHMENT0),s&amp;&amp;s.drawBuffersWEBGL(l[0])):o&gt;1&amp;&amp;s.drawBuffersWEBGL(l[o]);var y=r.getExtension(&quot;WEBGL_depth_texture&quot;);y?d?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&amp;&amp;(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&amp;&amp;d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&amp;&amp;(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&amp;&amp;(t.depth.dispose(),t.depth=null),t._depth_rb&amp;&amp;(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),v=0;v&lt;t.color.length;++v)t.color[v].dispose(),t.color[v]=null;t._color_rb&amp;&amp;(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),u(r,e),f(x)}u(r,e)}(this)}var g=d.prototype;function m(t,e,r){if(t._destroyed)throw new Error(&quot;gl-fbo: Can't resize destroyed FBO&quot;);if(t._shape[0]!==e||t._shape[1]!==r){var n=t.gl,i=n.getParameter(n.MAX_RENDERBUFFER_SIZE);if(e&lt;0||e&gt;i||r&lt;0||r&gt;i)throw new Error(&quot;gl-fbo: Can't resize FBO, invalid dimensions&quot;);t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o&lt;t.color.length;++o)t.color[o].shape=t._shape;t._color_rb&amp;&amp;(n.bindRenderbuffer(n.RENDERBUFFER,t._color_rb),n.renderbufferStorage(n.RENDERBUFFER,n.RGBA4,t._shape[0],t._shape[1])),t.depth&amp;&amp;(t.depth.shape=t._shape),t._depth_rb&amp;&amp;(n.bindRenderbuffer(n.RENDERBUFFER,t._depth_rb),t._useDepth&amp;&amp;t._useStencil?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&amp;&amp;n.renderbufferStorage(n.RENDERBUFFER,n.STENCIL_INDEX,t._shape[0],t._shape[1])),n.bindFramebuffer(n.FRAMEBUFFER,t.handle);var s=n.checkFramebufferStatus(n.FRAMEBUFFER);s!==n.FRAMEBUFFER_COMPLETE&amp;&amp;(t.dispose(),u(n,a),f(s)),u(n,a)}}Object.defineProperties(g,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error(&quot;gl-fbo: Shape vector must be length 2&quot;);var e=0|t[0],r=0|t[1];return m(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return m(this,t|=0,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,m(this,this._shape[0],t),t},enumerable:!1}}),g.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},g.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&amp;&amp;(this.depth.dispose(),this.depth=null),this._depth_rb&amp;&amp;(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e&lt;this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&amp;&amp;(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{&quot;gl-texture2d&quot;:303}],239:[function(t,e,r){var n=t(&quot;sprintf-js&quot;).sprintf,i=t(&quot;gl-constants/lookup&quot;),a=t(&quot;glsl-shader-name&quot;),o=t(&quot;add-line-numbers&quot;);e.exports=function(t,e,r){&quot;use strict&quot;;var s=a(e)||&quot;of unknown name (see npm glsl-shader-name)&quot;,l=&quot;unknown type&quot;;void 0!==r&amp;&amp;(l=r===i.FRAGMENT_SHADER?&quot;fragment&quot;:&quot;vertex&quot;);for(var c=n(&quot;Error compiling %s shader %s:\n&quot;,l,s),u=n(&quot;%s%s&quot;,c,t),f=t.split(&quot;\n&quot;),h={},p=0;p&lt;f.length;p++){var d=f[p];if(&quot;&quot;!==d&amp;&amp;&quot;\0&quot;!==d){var g=parseInt(d.split(&quot;:&quot;)[2]);if(isNaN(g))throw new Error(n(&quot;Could not parse error: %s&quot;,d));h[g]=d}}for(var m=o(e).split(&quot;\n&quot;),p=0;p&lt;m.length;p++)if(h[p+3]||h[p+2]||h[p+1]){var v=m[p];if(c+=v+&quot;\n&quot;,h[p+1]){var y=h[p+1];y=y.substr(y.split(&quot;:&quot;,3).join(&quot;:&quot;).length+1).trim(),c+=n(&quot;^^^ %s\n\n&quot;,y)}}return{long:c.trim(),short:u.trim()}}},{&quot;add-line-numbers&quot;:48,&quot;gl-constants/lookup&quot;:235,&quot;glsl-shader-name&quot;:382,&quot;sprintf-js&quot;:501}],240:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=t.gl,n=o(r,l.vertex,l.fragment),i=o(r,l.pickVertex,l.pickFragment),a=s(r),u=s(r),f=s(r),h=s(r),p=new c(t,n,i,a,u,f,h);return p.update(e),t.addObject(p),p};var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;iota-array&quot;),a=t(&quot;typedarray-pool&quot;),o=t(&quot;gl-shader&quot;),s=t(&quot;gl-buffer&quot;),l=t(&quot;./lib/shaders&quot;);function c(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var u,f=c.prototype,h=[0,0,1,0,0,1,1,0,1,1,0,1];f.draw=(u=[1,0,0,0,1,0,0,0,1],function(){var t=this.plot,e=this.shader,r=this.bounds,n=this.numVertices;if(!(n&lt;=0)){var i=t.gl,a=t.dataBox,o=r[2]-r[0],s=r[3]-r[1],l=a[2]-a[0],c=a[3]-a[1];u[0]=2*o/l,u[4]=2*s/c,u[6]=2*(r[0]-a[0])/l-1,u[7]=2*(r[1]-a[1])/c-1,e.bind();var f=e.uniforms;f.viewTransform=u,f.shape=this.shape;var h=e.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(i.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(i.UNSIGNED_BYTE,!0),i.drawArrays(i.TRIANGLES,0,n)}}),f.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o&lt;=0)){var s=n.gl,l=n.dataBox,c=a[2]-a[0],u=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*c/f,t[4]=2*u/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var p=0;p&lt;4;++p)e[p]=r&gt;&gt;8*p&amp;255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r&lt;n||r&gt;=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,f=this.bounds,p=f[0]=r[0],d=f[1]=o[0],g=1/((f[2]=r[r.length-1])-p),m=1/((f[3]=o[o.length-1])-d),v=e[0],y=e[1];this.shape=[v,y];var x=(v-1)*(y-1)*(h.length&gt;&gt;&gt;1);this.numVertices=x;for(var b=a.mallocUint8(4*x),_=a.mallocFloat32(2*x),w=a.mallocUint8(2*x),k=a.mallocUint32(x),M=0,A=0;A&lt;y-1;++A)for(var T=m*(o[A]-d),S=m*(o[A+1]-d),E=0;E&lt;v-1;++E)for(var C=g*(r[E]-p),L=g*(r[E+1]-p),z=0;z&lt;h.length;z+=2){var P,O,I,D,R=h[z],B=h[z+1],F=s[(A+B)*v+(E+R)],N=n.le(l,F);if(N&lt;0)P=c[0],O=c[1],I=c[2],D=c[3];else if(N===u-1)P=c[4*u-4],O=c[4*u-3],I=c[4*u-2],D=c[4*u-1];else{var j=(F-l[N])/(l[N+1]-l[N]),V=1-j,U=4*N,q=4*(N+1);P=V*c[U]+j*c[q],O=V*c[U+1]+j*c[q+1],I=V*c[U+2]+j*c[q+2],D=V*c[U+3]+j*c[q+3]}b[4*M]=255*P,b[4*M+1]=255*O,b[4*M+2]=255*I,b[4*M+3]=255*D,_[2*M]=.5*C+.5*L,_[2*M+1]=.5*T+.5*S,w[2*M]=R,w[2*M+1]=B,k[M]=A*v+E,M+=1}this.positionBuffer.update(_),this.weightBuffer.update(w),this.colorBuffer.update(b),this.idBuffer.update(k),a.free(_),a.free(b),a.free(w),a.free(k)},f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{&quot;./lib/shaders&quot;:241,&quot;binary-search-bounds&quot;:242,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286,&quot;iota-array&quot;:397,&quot;typedarray-pool&quot;:519}],241:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;);e.exports={fragment:n([&quot;precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\n}\n&quot;]),vertex:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 color;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragColor;\n\nvoid main() {\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n  fragColor = color;\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n&quot;]),pickFragment:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nuniform vec2 shape;\nuniform vec4 pickOffset;\n\nvoid main() {\n  vec2 d = step(.5, vWeight);\n  vec4 id = fragId + pickOffset;\n  id.x += d.x + d.y*shape.x;\n\n  id.y += floor(id.x / 256.0);\n  id.x -= floor(id.x / 256.0) * 256.0;\n\n  id.z += floor(id.y / 256.0);\n  id.y -= floor(id.y / 256.0) * 256.0;\n\n  id.w += floor(id.z / 256.0);\n  id.z -= floor(id.z / 256.0) * 256.0;\n\n  gl_FragColor = id/255.;\n}\n&quot;]),pickVertex:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n  vWeight = weight;\n\n  fragId = pickId;\n\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n&quot;])}},{glslify:390}],242:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{dup:98}],243:[function(t,e,r){var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, nextPosition;\nattribute float arcLength, lineWidth;\nattribute vec4 color;\n\nuniform vec2 screenShape;\nuniform float pixelRatio;\nuniform mat4 model, view, projection;\n\nvarying vec4 fragColor;\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\n\nvoid main() {\n  vec4 projected = projection * view * model * vec4(position, 1.0);\n  vec4 tangentClip = projection * view * model * vec4(nextPosition - position, 0.0);\n  vec2 tangent = normalize(screenShape * tangentClip.xy);\n  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(tangent.y, -tangent.x) / screenShape;\n\n  gl_Position = vec4(projected.xy + projected.w * offset, projected.zw);\n\n  worldPosition = position;\n  pixelArcLength = arcLength;\n  fragColor = color;\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3      clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float     dashScale;\nuniform float     opacity;\n\nvarying vec3    worldPosition;\nvarying float   pixelArcLength;\nvarying vec4    fragColor;\n\nvoid main() {\n  if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n    discard;\n  }\n  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n  if(dashWeight &lt; 0.5) {\n    discard;\n  }\n  gl_FragColor = fragColor * opacity;\n}\n&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX  1.70141184e38\n#define FLOAT_MIN  1.17549435e-38\n\nlowp vec4 encode_float_1540259130(highp float v) {\n  highp float av = abs(v);\n\n  //Handle special cases\n  if(av &lt; FLOAT_MIN) {\n    return vec4(0.0, 0.0, 0.0, 0.0);\n  } else if(v &gt; FLOAT_MAX) {\n    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n  } else if(v &lt; -FLOAT_MAX) {\n    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n  }\n\n  highp vec4 c = vec4(0,0,0,0);\n\n  //Compute exponent and mantissa\n  highp float e = floor(log2(av));\n  highp float m = av * pow(2.0, -e) - 1.0;\n  \n  //Unpack mantissa\n  c[1] = floor(128.0 * m);\n  m -= c[1] / 128.0;\n  c[2] = floor(32768.0 * m);\n  m -= c[2] / 32768.0;\n  c[3] = floor(8388608.0 * m);\n  \n  //Unpack exponent\n  highp float ebias = e + 127.0;\n  c[0] = floor(ebias / 2.0);\n  ebias -= c[0] * 2.0;\n  c[1] += floor(ebias) * 128.0; \n\n  //Unpack sign bit\n  c[0] += 128.0 * step(0.0, -v);\n\n  //Scale back to range\n  return c / 255.0;\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n  if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\n}&quot;]),l=[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;nextPosition&quot;,type:&quot;vec3&quot;},{name:&quot;arcLength&quot;,type:&quot;float&quot;},{name:&quot;lineWidth&quot;,type:&quot;float&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{&quot;gl-shader&quot;:286,glslify:390}],244:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl||t.scene&amp;&amp;t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=f(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),h=l(new Array(1024),[256,1,4]),p=0;p&lt;1024;++p)h.data[p]=255;var d=a(e,h);d.wrap=e.REPEAT;var g=new m(e,r,o,s,c,d);return g.update(t),g};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;gl-texture2d&quot;),o=t(&quot;glsl-read-float&quot;),s=t(&quot;binary-search-bounds&quot;),l=t(&quot;ndarray&quot;),c=t(&quot;./lib/shaders&quot;),u=c.createShader,f=c.createPickShader,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n&lt;3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r&lt;3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function m(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}var v=m.prototype;v.isTransparent=function(){return this.opacity&lt;1},v.isOpaque=function(){return this.opacity&gt;=1},v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.drawTransparent=v.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()},v.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()},v.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;&quot;dashScale&quot;in t&amp;&amp;(this.dashScale=t.dashScale),&quot;opacity&quot;in t&amp;&amp;(this.opacity=+t.opacity);var i=t.position||t.positions;if(i){var a=t.color||t.colors||[0,0,0,1],o=t.lineWidth||1,c=[],u=[],f=[],h=0,d=0,g=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],m=!1;t:for(e=1;e&lt;i.length;++e){var v,y,x,b=i[e-1],_=i[e];for(u.push(h),f.push(b.slice()),r=0;r&lt;3;++r){if(isNaN(b[r])||isNaN(_[r])||!isFinite(b[r])||!isFinite(_[r])){if(!n&amp;&amp;c.length&gt;0){for(var w=0;w&lt;24;++w)c.push(c[c.length-12]);d+=2,m=!0}continue t}g[0][r]=Math.min(g[0][r],b[r],_[r]),g[1][r]=Math.max(g[1][r],b[r],_[r])}Array.isArray(a[0])?(v=a[e-1],y=a[e]):v=y=a,3===v.length&amp;&amp;(v=[v[0],v[1],v[2],1]),3===y.length&amp;&amp;(y=[y[0],y[1],y[2],1]),x=Array.isArray(o)?o[e-1]:o;var k=h;if(h+=p(b,_),m){for(r=0;r&lt;2;++r)c.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,v[0],v[1],v[2],v[3]);d+=2,m=!1}c.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,v[0],v[1],v[2],v[3],_[0],_[1],_[2],b[0],b[1],b[2],h,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],h,x,y[0],y[1],y[2],y[3]),d+=4}if(this.buffer.update(c),u.push(h),f.push(i[i.length-1].slice()),this.bounds=g,this.vertexCount=d,this.points=f,this.arcLength=u,&quot;dashes&quot;in t){var M=t.dashes.slice();for(M.unshift(0),e=1;e&lt;M.length;++e)M[e]=M[e-1]+M[e];var A=l(new Array(1024),[256,1,4]);for(e=0;e&lt;256;++e){for(r=0;r&lt;4;++r)A.set(e,0,r,0);1&amp;s.le(M,M[M.length-1]*e/255)?A.set(e,0,0,0):A.set(e,0,0,255)}this.texture.setPixels(A)}}},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},v.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=o(t.value[0],t.value[1],t.value[2],0),r=s.le(this.arcLength,e);if(r&lt;0)return null;if(r===this.arcLength.length-1)return new g(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],a=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),l=1-a,c=[0,0,0],u=0;u&lt;3;++u)c[u]=l*n[u]+a*i[u];var f=Math.min(a&lt;.5?r:r+1,this.points.length-1);return new g(e,c,f,this.points[f])}},{&quot;./lib/shaders&quot;:243,&quot;binary-search-bounds&quot;:78,&quot;gl-buffer&quot;:229,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,&quot;glsl-read-float&quot;:381,ndarray:430}],245:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null}},{}],246:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,p=c*a-o*l,d=r*f+n*h+i*p;return d?(d=1/d,t[0]=f*d,t[1]=(-u*n+i*c)*d,t[2]=(s*n-i*o)*d,t[3]=h*d,t[4]=(u*r-i*l)*d,t[5]=(-s*r+i*a)*d,t[6]=p*d,t[7]=(-c*r+n*l)*d,t[8]=(o*r-n*a)*d,t):null}},{}],247:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],248:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],249:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],p=t[12],d=t[13],g=t[14],m=t[15];return(e*o-r*a)*(f*m-h*g)-(e*s-n*a)*(u*m-h*d)+(e*l-i*a)*(u*g-f*d)+(r*s-n*o)*(c*m-h*p)-(r*l-i*o)*(c*g-f*p)+(n*l-i*s)*(c*d-u*p)}},{}],250:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,c=r*o,u=n*o,f=n*s,h=i*o,p=i*s,d=i*l,g=a*o,m=a*s,v=a*l;return t[0]=1-f-d,t[1]=u+v,t[2]=h-m,t[3]=0,t[4]=u-v,t[5]=1-c-d,t[6]=p+g,t[7]=0,t[8]=h+m,t[9]=p-g,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],251:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,p=i*l,d=i*c,g=a*c,m=o*s,v=o*l,y=o*c;return t[0]=1-(p+g),t[1]=f+y,t[2]=h-v,t[3]=0,t[4]=f-y,t[5]=1-(u+g),t[6]=d+m,t[7]=0,t[8]=h+v,t[9]=d-m,t[10]=1-(u+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],252:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],253:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],m=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*m-h*d,T=u*v-p*d,S=f*m-h*g,E=f*v-p*g,C=h*v-p*m,L=y*C-x*E+b*S+_*T-w*A+k*M;if(!L)return null;return L=1/L,t[0]=(s*C-l*E+c*S)*L,t[1]=(i*E-n*C-a*S)*L,t[2]=(g*k-m*w+v*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*C-c*A)*L,t[5]=(r*C-i*T+a*A)*L,t[6]=(m*b-d*k-v*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*E-s*T+c*M)*L,t[9]=(n*T-r*E-a*M)*L,t[10]=(d*w-g*b+v*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-m*y)*L,t[15]=(u*_-f*x+h*y)*L,t}},{}],254:[function(t,e,r){var n=t(&quot;./identity&quot;);e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,p,d,g=e[0],m=e[1],v=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];if(Math.abs(g-_)&lt;1e-6&amp;&amp;Math.abs(m-w)&lt;1e-6&amp;&amp;Math.abs(v-k)&lt;1e-6)return n(t);f=g-_,h=m-w,p=v-k,d=1/Math.sqrt(f*f+h*h+p*p),a=x*(p*=d)-b*(h*=d),o=b*(f*=d)-y*p,s=y*h-x*f,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0);l=h*s-p*o,c=p*a-f*s,u=f*o-h*a,(d=Math.sqrt(l*l+c*c+u*u))?(l*=d=1/d,c*=d,u*=d):(l=0,c=0,u=0);return t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=u,t[10]=p,t[11]=0,t[12]=-(a*g+o*m+s*v),t[13]=-(l*g+c*m+u*v),t[14]=-(f*g+h*m+p*v),t[15]=1,t}},{&quot;./identity&quot;:252}],255:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],m=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*m,t[2]=x*a+b*c+_*p+w*v,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*m,t[6]=x*a+b*c+_*p+w*v,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*m,t[10]=x*a+b*c+_*p+w*v,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}},{}],256:[function(t,e,r){e.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},{}],257:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,k,M,A,T,S,E=n[0],C=n[1],L=n[2],z=Math.sqrt(E*E+C*C+L*L);if(Math.abs(z)&lt;1e-6)return null;E*=z=1/z,C*=z,L*=z,i=Math.sin(r),a=Math.cos(r),o=1-a,s=e[0],l=e[1],c=e[2],u=e[3],f=e[4],h=e[5],p=e[6],d=e[7],g=e[8],m=e[9],v=e[10],y=e[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,M=L*C*o+E*i,A=E*L*o+C*i,T=C*L*o-E*i,S=L*L*o+a,t[0]=s*x+f*b+g*_,t[1]=l*x+h*b+m*_,t[2]=c*x+p*b+v*_,t[3]=u*x+d*b+y*_,t[4]=s*w+f*k+g*M,t[5]=l*w+h*k+m*M,t[6]=c*w+p*k+v*M,t[7]=u*w+d*k+y*M,t[8]=s*A+f*T+g*S,t[9]=l*A+h*T+m*S,t[10]=c*A+p*T+v*S,t[11]=u*A+d*T+y*S,e!==t&amp;&amp;(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},{}],258:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&amp;&amp;(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],259:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&amp;&amp;(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],260:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];e!==t&amp;&amp;(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],261:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],262:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],m=r[1],v=r[2];e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*m+f*v+e[12],t[13]=i*g+l*m+h*v+e[13],t[14]=a*g+c*m+p*v+e[14],t[15]=o*g+u*m+d*v+e[15]);return t}},{}],263:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],264:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){switch(e.length){case 0:break;case 1:t[0]=1/e[0];break;case 4:n(t,e);break;case 9:i(t,e);break;case 16:a(t,e);break;default:throw new Error(&quot;currently supports matrices up to 4x4&quot;)}return t};var n=t(&quot;gl-mat2/invert&quot;),i=t(&quot;gl-mat3/invert&quot;),a=t(&quot;gl-mat4/invert&quot;)},{&quot;gl-mat2/invert&quot;:245,&quot;gl-mat3/invert&quot;:246,&quot;gl-mat4/invert&quot;:253}],265:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;barycentric&quot;),i=t(&quot;polytope-closest-point/lib/closest_point_2d.js&quot;);function a(t,e){for(var r=[0,0,0,0],n=0;n&lt;4;++n)for(var i=0;i&lt;4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s&lt;3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}e.exports=function(t,e,r,a,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u&lt;t.length;++u)c[u]=o(t[u],r,a,s,l);for(var f=0,h=1/0,u=0;u&lt;c.length;++u){for(var p=0,d=0;d&lt;2;++d)p+=Math.pow(c[u][d]-e[d],2);p&lt;h&amp;&amp;(h=p,f=u)}for(var g=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o&lt;2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return r=Math.sqrt(r),a=Math.sqrt(a),r+a&lt;1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),m=0,u=0;u&lt;3;++u){if(g[u]&lt;-.001||g[u]&gt;1.0001)return null;m+=g[u]}if(Math.abs(m-1)&gt;.001)return null;return[f,function(t,e){for(var r=[0,0,0],n=0;n&lt;t.length;++n)for(var i=t[n],a=e[n],o=0;o&lt;3;++o)r[o]+=a*i[o];return r}(t,g),g]}},{barycentric:60,&quot;polytope-closest-point/lib/closest_point_2d.js&quot;:461}],266:[function(t,e,r){var n=t(&quot;glslify&quot;),i=n([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n           , view\n           , projection;\nuniform vec3 eyePosition\n           , lightPosition;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  vec4 m_position  = model * vec4(position, 1.0);\n  vec4 t_position  = view * m_position;\n  gl_Position      = projection * t_position;\n  f_color          = color;\n  f_normal         = normal;\n  f_data           = position;\n  f_eyeDirection   = eyePosition   - position;\n  f_lightDirection = lightPosition - position;\n  f_uv             = uv;\n}\n&quot;]),a=n([&quot;#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nvec3 normals(vec3 pos) {\n  vec3 fdx = dFdx(pos);\n  vec3 fdy = dFdy(pos);\n  return normalize(cross(fdx, fdy));\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n            , fresnel\n            , kambient\n            , kdiffuse\n            , kspecular\n            , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if(any(lessThan(f_data, clipBounds[0])) ||\n     any(greaterThan(f_data, clipBounds[1]))) {\n    discard;\n  }\n\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n\n  vec3 normal = normals(f_data);\n\n  if (\n    dot(N, normal) &lt; 0.0\n    ) {\n      N = -N;\n  }\n\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n  f_color = color;\n  f_data  = position;\n  f_uv    = uv;\n}&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n  if(any(lessThan(f_data, clipBounds[0])) || \n     any(greaterThan(f_data, clipBounds[1]))) {\n    discard;\n  }\n\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}&quot;]),l=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0])) || \n     any(greaterThan(position, clipBounds[1]))) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    gl_Position = projection * view * model * vec4(position, 1.0);\n  }\n  gl_PointSize = pointSize;\n  f_color = color;\n  f_uv = uv;\n}&quot;]),c=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n  if(dot(pointR, pointR) &gt; 0.25) {\n    discard;\n  }\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}&quot;]),u=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n  f_id        = id;\n  f_position  = position;\n}&quot;]),f=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if(any(lessThan(f_position, clipBounds[0])) || \n     any(greaterThan(f_position, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}&quot;]),h=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3  position;\nattribute float pointSize;\nattribute vec4  id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0])) || \n     any(greaterThan(position, clipBounds[1]))) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    gl_Position  = projection * view * model * vec4(position, 1.0);\n    gl_PointSize = pointSize;\n  }\n  f_id         = id;\n  f_position   = position;\n}&quot;]),p=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n}&quot;]),d=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n  gl_FragColor = vec4(contourColor,1);\n}\n&quot;]);r.meshShader={vertex:i,fragment:a,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;},{name:&quot;pointSize&quot;,type:&quot;float&quot;}]},r.pickShader={vertex:u,fragment:f,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;}]},r.pointPickShader={vertex:h,fragment:f,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;pointSize&quot;,type:&quot;float&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;}]}},{glslify:390}],267:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;normals&quot;),l=t(&quot;gl-mat4/multiply&quot;),c=t(&quot;gl-mat4/invert&quot;),u=t(&quot;ndarray&quot;),f=t(&quot;colormap&quot;),h=t(&quot;simplicial-complex-contour&quot;),p=t(&quot;typedarray-pool&quot;),d=t(&quot;./lib/shaders&quot;),g=t(&quot;./lib/closest-point&quot;),m=d.meshShader,v=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,k,M,A,T,S){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=m,this.edgeUVs=v,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=M,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var M=k.prototype;function A(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function T(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function S(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function E(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}M.isOpaque=function(){return this.opacity&gt;=1},M.isTransparent=function(){return this.opacity&lt;1},M.pickSlots=1,M.setPickBase=function(t){this.pickId=t},M.highlight=function(t){if(t&amp;&amp;this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l&lt;a;++l)for(var c=r[l],u=0;u&lt;2;++u){var f=c[0];2===c.length&amp;&amp;(f=c[u]);for(var d=n[f][0],g=n[f][1],m=i[f],v=1-m,y=this.positions[d],x=this.positions[g],b=0;b&lt;3;++b)o[s++]=m*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},M.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,&quot;contourEnable&quot;in t&amp;&amp;(this.contourEnable=t.contourEnable),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=t.contourColor),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;lightPosition&quot;in t&amp;&amp;(this.lightPosition=t.lightPosition),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;ambient&quot;in t&amp;&amp;(this.ambientLight=t.ambient),&quot;diffuse&quot;in t&amp;&amp;(this.diffuseLight=t.diffuse),&quot;specular&quot;in t&amp;&amp;(this.specularLight=t.specular),&quot;roughness&quot;in t&amp;&amp;(this.roughness=t.roughness),&quot;fresnel&quot;in t&amp;&amp;(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&amp;&amp;(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:&quot;rgba&quot;}),r=new Uint8Array(1024),n=0;n&lt;256;++n){for(var i=e[n],a=0;a&lt;3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&amp;&amp;r){var i=[],a=[],l=[],c=[],h=[],p=[],d=[],g=[],m=[],v=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,k=t.cellNormals,M=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,A=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&amp;&amp;!k&amp;&amp;(k=s.faceNormals(r,n,A)),k||w||(w=s.vertexNormals(r,n,M));var T=t.vertexColors,S=t.cellColors,E=t.meshColor||[1,1,1,1],C=t.vertexUVs,L=t.vertexIntensity,z=t.cellUVs,P=t.cellIntensity,O=1/0,I=-1/0;if(!C&amp;&amp;!z)if(L)if(t.vertexIntensityBounds)O=+t.vertexIntensityBounds[0],I=+t.vertexIntensityBounds[1];else for(var D=0;D&lt;L.length;++D){var R=L[D];O=Math.min(O,R),I=Math.max(I,R)}else if(P)for(D=0;D&lt;P.length;++D){R=P[D];O=Math.min(O,R),I=Math.max(I,R)}else for(D=0;D&lt;n.length;++D){R=n[D][2];O=Math.min(O,R),I=Math.max(I,R)}this.intensity=L||(P?function(t,e,r){for(var n=new Array(e),i=0;i&lt;e;++i)n[i]=0;var a=t.length;for(i=0;i&lt;a;++i)for(var o=t[i],s=0;s&lt;o.length;++s)n[o[s]]=r[i];return n}(r,n.length,P):function(t){for(var e=t.length,r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n][2];return r}(n));var B=t.pointSizes,F=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(D=0;D&lt;n.length;++D)for(var N=n[D],j=0;j&lt;3;++j)!isNaN(N[j])&amp;&amp;isFinite(N[j])&amp;&amp;(this.bounds[0][j]=Math.min(this.bounds[0][j],N[j]),this.bounds[1][j]=Math.max(this.bounds[1][j],N[j]));var V=0,U=0,q=0;t:for(D=0;D&lt;r.length;++D){var H=r[D];switch(H.length){case 1:for(N=n[W=H[0]],j=0;j&lt;3;++j)if(isNaN(N[j])||!isFinite(N[j]))continue t;v.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:E).length?y.push(Y[0],Y[1],Y[2],1):y.push(Y[0],Y[1],Y[2],Y[3]),X=C?C[W]:L?[(L[W]-O)/(I-O),0]:z?z[D]:P?[(P[D]-O)/(I-O),0]:[(N[2]-O)/(I-O),0],x.push(X[0],X[1]),B?b.push(B[W]):b.push(F),_.push(D),q+=1;break;case 2:for(j=0;j&lt;2;++j){N=n[W=H[j]];for(var G=0;G&lt;3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t}for(j=0;j&lt;2;++j){N=n[W=H[j]];p.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:E).length?d.push(Y[0],Y[1],Y[2],1):d.push(Y[0],Y[1],Y[2],Y[3]),X=C?C[W]:L?[(L[W]-O)/(I-O),0]:z?z[D]:P?[(P[D]-O)/(I-O),0]:[(N[2]-O)/(I-O),0],g.push(X[0],X[1]),m.push(D)}U+=1;break;case 3:for(j=0;j&lt;3;++j)for(N=n[W=H[j]],G=0;G&lt;3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t;for(j=0;j&lt;3;++j){var W,Y,X,Z;N=n[W=H[j]];i.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:E).length?a.push(Y[0],Y[1],Y[2],1):a.push(Y[0],Y[1],Y[2],Y[3]),X=C?C[W]:L?[(L[W]-O)/(I-O),0]:z?z[D]:P?[(P[D]-O)/(I-O),0]:[(N[2]-O)/(I-O),0],c.push(X[0],X[1]),Z=w?w[W]:k[D],l.push(Z[0],Z[1],Z[2]),h.push(D)}V+=1}}this.pointCount=q,this.edgeCount=U,this.triangleCount=V,this.pointPositions.update(v),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(p),this.edgeColors.update(d),this.edgeUVs.update(g),this.edgeIds.update(new Uint32Array(m)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(c),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(h))}},M.drawTransparent=M.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o&lt;3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o&lt;3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o&lt;3;++o){for(var p=u[12+o],d=0;d&lt;3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount&gt;0&amp;&amp;((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount&gt;0&amp;&amp;this.lineWidth&gt;0&amp;&amp;((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount&gt;0&amp;&amp;((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&amp;&amp;this.contourCount&gt;0&amp;&amp;this.contourLineWidth&gt;0&amp;&amp;((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},M.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount&gt;0&amp;&amp;(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount&gt;0&amp;&amp;(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount&gt;0)&amp;&amp;((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},M.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;a&lt;r.length;++a)i[a]=n[r[a]];var o=g(i,[t.coord[0],this._resolution[1]-t.coord[1]],this._model,this._view,this._projection,this._resolution);if(!o)return null;var s=o[2],l=0;for(a=0;a&lt;r.length;++a)l+=s[a]*this.intensity[r[a]];return{position:o[1],index:r[o[0]],cell:r,cellId:e,intensity:l,dataCoordinate:this.positions[r[o[0]]]}},M.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},e.exports=function(t,e){if(1===arguments.length&amp;&amp;(t=(e=t).gl),!(t.getExtension(&quot;OES_standard_derivatives&quot;)||t.getExtension(&quot;MOZ_OES_standard_derivatives&quot;)||t.getExtension(&quot;WEBKIT_OES_standard_derivatives&quot;)))throw new Error(&quot;derivatives not supported&quot;);var r=function(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}(t),s=function(t){var e=n(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),l=A(t),c=T(t),f=S(t),h=E(t),p=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=t.LINEAR_MIPMAP_LINEAR,p.magFilter=t.LINEAR;var d=i(t),g=i(t),y=i(t),x=i(t),b=i(t),_=a(t,[{buffer:d,type:t.FLOAT,size:3},{buffer:b,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:y,type:t.FLOAT,size:2},{buffer:x,type:t.FLOAT,size:3}]),w=i(t),M=i(t),C=i(t),L=i(t),z=a(t,[{buffer:w,type:t.FLOAT,size:3},{buffer:L,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:C,type:t.FLOAT,size:2}]),P=i(t),O=i(t),I=i(t),D=i(t),R=i(t),B=a(t,[{buffer:P,type:t.FLOAT,size:3},{buffer:R,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:O,type:t.FLOAT,size:4},{buffer:I,type:t.FLOAT,size:2},{buffer:D,type:t.FLOAT,size:1}]),F=i(t),N=new k(t,p,r,s,l,c,f,h,d,b,g,y,x,_,w,L,M,C,z,P,R,O,I,D,B,F,a(t,[{buffer:F,type:t.FLOAT,size:3}]));return N.update(e),N}},{&quot;./lib/closest-point&quot;:265,&quot;./lib/shaders&quot;:266,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-shader&quot;:286,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,normals:433,&quot;simplicial-complex-contour&quot;:491,&quot;typedarray-pool&quot;:519}],268:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e,[0,0,0,1,1,0,1,1]),s=i(e,a.boxVert,a.lineFrag);return new o(t,r,s)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;./shaders&quot;);function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawBox=(s=[0,0],l=[0,0],function(t,e,r,n,i){var a=this.plot,o=this.shader,c=a.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,o.uniforms.lo=s,o.uniforms.hi=l,o.uniforms.color=i,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:271,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],269:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e),a=i(e,o.gridVert,o.gridFrag),l=i(e,o.tickVert,o.gridFrag);return new s(t,r,a,l)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;binary-search-bounds&quot;),o=t(&quot;./shaders&quot;);function s(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function l(t,e){return t-e}var c,u,f,h,p,d=s.prototype;d.draw=(c=[0,0],u=[0,0],f=[0,0],function(){for(var t=this.plot,e=this.vbo,r=this.shader,n=this.ticks,i=t.gl,a=t._tickBounds,o=t.dataBox,s=t.viewBox,l=t.gridLineWidth,h=t.gridLineColor,p=t.gridLineEnable,d=t.pixelRatio,g=0;g&lt;2;++g){var m=a[g],v=a[g+2]-m,y=.5*(o[g+2]+o[g]),x=o[g+2]-o[g];u[g]=2*v/x,c[g]=2*(m-y)/x}r.bind(),e.bind(),r.attributes.dataCoord.pointer(),r.uniforms.dataShift=c,r.uniforms.dataScale=u;var b=0;for(g=0;g&lt;2;++g){f[0]=f[1]=0,f[g]=1,r.uniforms.dataAxis=f,r.uniforms.lineWidth=l[g]/(s[g+2]-s[g])*d,r.uniforms.color=h[g];var _=6*n[g].length;p[g]&amp;&amp;_&amp;&amp;i.drawArrays(i.TRIANGLES,b,_),b+=_}}),d.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],i=[0,0],o=[0,0];return function(){for(var s=this.plot,c=this.vbo,u=this.tickShader,f=this.ticks,h=s.gl,p=s._tickBounds,d=s.dataBox,g=s.viewBox,m=s.pixelRatio,v=s.screenBox,y=v[2]-v[0],x=v[3]-v[1],b=g[2]-g[0],_=g[3]-g[1],w=0;w&lt;2;++w){var k=p[w],M=p[w+2]-k,A=.5*(d[w+2]+d[w]),T=d[w+2]-d[w];e[w]=2*M/T,t[w]=2*(k-A)/T}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var S=u.uniforms;S.dataShift=t,S.dataScale=e;var E=s.tickMarkLength,C=s.tickMarkWidth,L=s.tickMarkColor,z=6*f[0].length,P=Math.min(a.ge(f[0],(d[0]-p[0])/(p[2]-p[0]),l),f[0].length),O=Math.min(a.gt(f[0],(d[2]-p[0])/(p[2]-p[0]),l),f[0].length),I=0+6*P,D=6*Math.max(0,O-P),R=Math.min(a.ge(f[1],(d[1]-p[1])/(p[3]-p[1]),l),f[1].length),B=Math.min(a.gt(f[1],(d[3]-p[1])/(p[3]-p[1]),l),f[1].length),F=z+6*R,N=6*Math.max(0,B-R);i[0]=2*(g[0]-E[1])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=E[1]*m/y,o[1]=C[1]*m/x,N&amp;&amp;(S.color=L[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[1]-E[0])/x-1,o[0]=C[0]*m/y,o[1]=E[0]*m/x,D&amp;&amp;(S.color=L[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,I,D)),i[0]=2*(g[2]+E[3])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=E[3]*m/y,o[1]=C[3]*m/x,N&amp;&amp;(S.color=L[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[3]+E[2])/x-1,o[0]=C[2]*m/y,o[1]=E[2]*m/x,D&amp;&amp;(S.color=L[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,I,D))}}(),d.update=(h=[1,1,-1,-1,1,-1],p=[1,-1,1,1,-1,-1],function(t){for(var e=t.ticks,r=t.bounds,n=new Float32Array(18*(e[0].length+e[1].length)),i=(this.plot.zeroLineEnable,0),a=[[],[]],o=0;o&lt;2;++o)for(var s=a[o],l=e[o],c=r[o],u=r[o+2],f=0;f&lt;l.length;++f){var d=(l[f].x-c)/(u-c);s.push(d);for(var g=0;g&lt;6;++g)n[i++]=d,n[i++]=h[g],n[i++]=p[g]}this.ticks=a,this.vbo.update(n)}),d.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{&quot;./shaders&quot;:271,&quot;binary-search-bounds&quot;:273,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],270:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e,[-1,-1,-1,1,1,-1,1,1]),s=i(e,a.lineVert,a.lineFrag);return new o(t,r,s)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;./shaders&quot;);function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawLine=(s=[0,0],l=[0,0],function(t,e,r,n,i,a){var o=this.plot,c=this.shader,u=o.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,c.uniforms.start=s,c.uniforms.end=l,c.uniforms.width=i*o.pixelRatio,c.uniforms.color=a,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:271,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],271:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=n([&quot;precision lowp float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\n}\n&quot;]);e.exports={lineVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 start, end;\nuniform float width;\n\nvec2 perp(vec2 v) {\n  return vec2(v.y, -v.x);\n}\n\nvec2 screen(vec2 v) {\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n  vec2 delta = normalize(perp(start - end));\n  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\n  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\n}\n&quot;]),lineFrag:i,textVert:n([&quot;#define GLSLIFY 1\nattribute vec3 textCoordinate;\n\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\nuniform float angle;\n\nvoid main() {\n  float dataOffset  = textCoordinate.z;\n  vec2 glyphOffset  = textCoordinate.xy;\n  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\n    glyphMatrix * glyphOffset * textScale + screenOffset;\n  gl_Position = vec4(screenCoordinate, 0, 1);\n}\n&quot;]),textFrag:i,gridVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale;\nuniform float lineWidth;\n\nvoid main() {\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\n  gl_Position = vec4(pos, 0, 1);\n}\n&quot;]),gridFrag:i,boxVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 lo, hi;\n\nvec2 screen(vec2 v) {\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\n}\n&quot;]),tickVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n&quot;])}},{glslify:390}],272:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e),a=i(e,s.textVert,s.textFrag);return new l(t,r,a)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;text-cache&quot;),o=t(&quot;binary-search-bounds&quot;),s=t(&quot;./shaders&quot;);function l(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var c,u,f,h,p,d,g=l.prototype;g.drawTicks=(c=[0,0],u=[0,0],f=[0,0],function(t){var e=this.plot,r=this.shader,n=this.tickX[t],i=this.tickOffset[t],a=e.gl,s=e.viewBox,l=e.dataBox,h=e.screenBox,p=e.pixelRatio,d=e.tickEnable,g=e.tickPad,m=e.tickColor,v=e.tickAngle,y=e.labelEnable,x=e.labelPad,b=e.labelColor,_=e.labelAngle,w=this.labelOffset[t],k=this.labelCount[t],M=o.lt(n,l[t]),A=o.le(n,l[t+2]);c[0]=c[1]=0,c[t]=1,u[t]=(s[2+t]+s[t])/(h[2+t]-h[t])-1;var T=2/h[2+(1^t)]-h[1^t];u[1^t]=T*s[1^t]-1,d[t]&amp;&amp;(u[1^t]-=T*p*g[t],M&lt;A&amp;&amp;i[A]&gt;i[M]&amp;&amp;(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=m[t],r.uniforms.angle=v[t],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t]&amp;&amp;k&amp;&amp;(u[1^t]-=T*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,k)),u[1^t]=T*s[2+(1^t)]-1,d[t+2]&amp;&amp;(u[1^t]+=T*p*g[t+2],M&lt;A&amp;&amp;i[A]&gt;i[M]&amp;&amp;(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=m[t+2],r.uniforms.angle=v[t+2],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t+2]&amp;&amp;k&amp;&amp;(u[1^t]+=T*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u&lt;2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o&lt;2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],f=a[o],g=a[o+2]-f,m=i[o],v=i[o+2]-m;p[o]=2*l/u*g/v,h[o]=2*(s-c)/u*g/v}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o&lt;2;++o){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e&lt;h.length;++e){var p=h[e],d=p.x,g=p.text,m=p.font||&quot;sans-serif&quot;;i=p.fontSize||12;for(var v=1/(c[o+2]-c[o]),y=c[o],x=g.split(&quot;\n&quot;),b=0;b&lt;x.length;b++)for(n=a(m,x[b]).data,r=0;r&lt;n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(d-y)*v);u.push(Math.floor(s.length/3)),f.push(d)}this.tickOffset[o]=u,this.tickX[o]=f}for(o=0;o&lt;2;++o){for(this.labelOffset[o]=Math.floor(s.length/3),n=a(t.labelFont[o],t.labels[o],{textAlign:&quot;center&quot;}).data,i=t.labelSize[o],e=0;e&lt;n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[o]=Math.floor(s.length/3)-this.labelOffset[o]}for(this.titleOffset=Math.floor(s.length/3),n=a(t.titleFont,t.title).data,i=t.titleSize,e=0;e&lt;n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},g.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:271,&quot;binary-search-bounds&quot;:273,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286,&quot;text-cache&quot;:510}],273:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{dup:98}],274:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e,[e.drawingBufferWidth,e.drawingBufferHeight]),c=new l(e,r);return c.grid=i(c),c.text=a(c),c.line=o(c),c.box=s(c),c.update(t),c};var n=t(&quot;gl-select-static&quot;),i=t(&quot;./lib/grid&quot;),a=t(&quot;./lib/text&quot;),o=t(&quot;./lib/line&quot;),s=t(&quot;./lib/box&quot;);function l(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var c=l.prototype;function u(t){for(var e=t.slice(),r=0;r&lt;e.length;++r)e[r]=e[r].slice();return e}function f(t,e){return t.x-e.x}c.setDirty=function(){this.dirty=this.pickDirty=!0},c.setOverlayDirty=function(){this.dirty=!0},c.nextDepthValue=function(){return this._depthCounter++/65536},c.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&amp;&amp;(this._pickTimeout&amp;&amp;clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var c=this.borderColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var u=this.backgroundColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,p=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var d=0;d&lt;2;++d)if(f[d]&amp;&amp;n[d]&lt;=0&amp;&amp;n[d+2]&gt;=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],h[d]):o.drawLine(e[0],g,e[2],g,p[d],h[d])}}for(d=0;d&lt;l.length;++d)l[d].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var m=this.borderLineEnable,v=this.borderLineWidth,y=this.borderLineColor;for(m[1]&amp;&amp;o.drawLine(r[0],r[1]-.5*v[1]*i,r[0],r[3]+.5*v[3]*i,v[1],y[1]),m[0]&amp;&amp;o.drawLine(r[0]-.5*v[0]*i,r[1],r[2]+.5*v[2]*i,r[1],v[0],y[0]),m[3]&amp;&amp;o.drawLine(r[2],r[1]-.5*v[1]*i,r[2],r[3]+.5*v[3]*i,v[3],y[3]),m[2]&amp;&amp;o.drawLine(r[0]-.5*v[0]*i,r[3],r[2]+.5*v[2]*i,r[3],v[2],y[2]),s.bind(),d=0;d&lt;2;++d)s.drawTicks(d);this.titleEnable&amp;&amp;s.drawTitle();var x=this.overlays;for(d=0;d&lt;x.length;++d)x[d].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},c.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl;this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n&lt;r.length;++n)e=r[n].drawPick(e);t.end()}},c.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]&lt;&lt;8)+(s.value[1]&lt;&lt;16)+(s.value[2]&lt;&lt;24),c=this.objects,u=0;u&lt;c.length;++u){var f=c[u].pick(a,o,l);if(f)return f}return null}},c.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},c.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&amp;&amp;(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},c.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},c.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]);this.screenBox;this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,i=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/i,10,10/i]),this.borderColor=!1!==t.borderColor&amp;&amp;(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=u(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=u(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=u(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!(&quot;titleEnable&quot;in t&amp;&amp;!t.titleEnable),this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=u(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=u(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=u(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var a=t.ticks||[[],[]],o=this._tickBounds;o[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(var s=0;s&lt;2;++s){var l=a[s].slice(0);0!==l.length&amp;&amp;(l.sort(f),o[s]=Math.min(o[s],l[0].x),o[s+2]=Math.max(o[s+2],l[l.length-1].x))}this.grid.update({bounds:o,ticks:a}),this.text.update({bounds:o,ticks:a,labels:t.labels||[&quot;x&quot;,&quot;y&quot;],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||[&quot;sans-serif&quot;,&quot;sans-serif&quot;],title:t.title||&quot;&quot;,titleSize:t.titleSize||18,titleFont:t.titleFont||&quot;sans-serif&quot;}),this.static=!!t.static,this.setDirty()},c.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t&gt;=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t&gt;=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)&lt;0&amp;&amp;(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;r&lt;e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},c.addOverlay=function(t){this.overlays.indexOf(t)&lt;0&amp;&amp;(this.overlays.push(t),this.setOverlayDirty())},c.removeOverlay=function(t){for(var e=this.overlays,r=0;r&lt;e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},{&quot;./lib/box&quot;:268,&quot;./lib/grid&quot;:269,&quot;./lib/line&quot;:270,&quot;./lib/text&quot;:272,&quot;gl-select-static&quot;:285}],275:[function(t,e,r){var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n  uv = position;\n  gl_Position = vec4(position, 0, 1);\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n  gl_FragColor = min(vec4(1,1,1,1), accum);\n}&quot;]);e.exports=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec2&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],276:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=!1,r=((t=t||{}).pixelRatio||parseFloat(window.devicePixelRatio),t.canvas);if(!r)if(r=document.createElement(&quot;canvas&quot;),t.container){var v=t.container;v.appendChild(r)}else document.body.appendChild(r);var y=t.gl;y||(y=function(t,e){var r=null;try{(r=t.getContext(&quot;webgl&quot;,e))||(r=t.getContext(&quot;experimental-webgl&quot;,e))}catch(t){return null}return r}(r,t.glOptions||{premultipliedAlpha:!0,antialias:!0}));if(!y)throw new Error(&quot;webgl not supported&quot;);var x=t.bounds||[[-10,-10,-10],[10,10,10]],b=new d,_=l(y,[y.drawingBufferWidth,y.drawingBufferHeight],{preferFloat:!p}),w=h(y),k=t.camera||{eye:[2,0,0],center:[0,0,0],up:[0,1,0],zoomMin:.1,zoomMax:100,mode:&quot;turntable&quot;},M=t.axes||{},A=i(y,M);A.enable=!M.disable;var T=t.spikes||{},S=o(y,T),E=[],C=[],L=[],z=[],P=!0,O=!0,I=new Array(16),D=new Array(16),R={view:null,projection:I,model:D},O=!0,B=[y.drawingBufferWidth,y.drawingBufferHeight],F={gl:y,contextLost:!1,pixelRatio:t.pixelRatio||parseFloat(window.devicePixelRatio),canvas:r,selection:b,camera:n(r,k),axes:A,axesPixels:null,spikes:S,bounds:x,objects:E,shape:B,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:m(t.autoResize),autoBounds:m(t.autoBounds),autoScale:!!t.autoScale,autoCenter:m(t.autoCenter),clipToBounds:m(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null},N=[y.drawingBufferWidth/F.pixelRatio|0,y.drawingBufferHeight/F.pixelRatio|0];function j(){if(!e&amp;&amp;F.autoResize){var t=r.parentNode,n=1,i=1;t&amp;&amp;t!==document.body?(n=t.clientWidth,i=t.clientHeight):(n=window.innerWidth,i=window.innerHeight);var a=0|Math.ceil(n*F.pixelRatio),o=0|Math.ceil(i*F.pixelRatio);if(a!==r.width||o!==r.height){r.width=a,r.height=o;var s=r.style;s.position=s.position||&quot;absolute&quot;,s.left=&quot;0px&quot;,s.top=&quot;0px&quot;,s.width=n+&quot;px&quot;,s.height=i+&quot;px&quot;,P=!0}}}F.autoResize&amp;&amp;j();function V(){for(var t=E.length,e=z.length,r=0;r&lt;e;++r)L[r]=0;t:for(var r=0;r&lt;t;++r){var n=E[r],i=n.pickSlots;if(i){for(var a=0;a&lt;e;++a)if(L[a]+i&lt;255){C[r]=a,n.setPickBase(L[a]+1),L[a]+=i;continue t}var o=s(y,B);C[r]=e,z.push(o),L.push(i),n.setPickBase(1),e+=1}else C[r]=-1}for(;e&gt;0&amp;&amp;0===L[e-1];)L.pop(),z.pop().dispose()}window.addEventListener(&quot;resize&quot;,j),F.update=function(t){e||(t=t||{},P=!0,O=!0)},F.add=function(t){e||(t.axes=A,E.push(t),C.push(-1),P=!0,O=!0,V())},F.remove=function(t){if(!e){var r=E.indexOf(t);r&lt;0||(E.splice(r,1),C.pop(),P=!0,O=!0,V())}},F.dispose=function(){if(!e&amp;&amp;(e=!0,window.removeEventListener(&quot;resize&quot;,j),r.removeEventListener(&quot;webglcontextlost&quot;,H),F.mouseListener.enabled=!1,!F.contextLost)){A.dispose(),S.dispose();for(var t=0;t&lt;E.length;++t)E[t].dispose();_.dispose();for(var t=0;t&lt;z.length;++t)z[t].dispose();w.dispose(),y=null,A=null,S=null,E=[]}};var U=!1,q=0;function H(){if(F.contextLost)return!0;y.isContextLost()&amp;&amp;(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&amp;&amp;F.oncontextloss())}F.mouseListener=u(r,function(t,r,n){if(!e){var i=z.length,a=E.length,o=b.object;b.distance=1/0,b.mouse[0]=r,b.mouse[1]=n,b.object=null,b.screen=null,b.dataCoordinate=b.dataPosition=null;var s=!1;if(t&amp;&amp;q)U=!0;else{U&amp;&amp;(O=!0),U=!1;for(var l=0;l&lt;i;++l){var c=z[l].query(r,N[1]-n-1,F.pickRadius);if(c){if(c.distance&gt;b.distance)continue;for(var u=0;u&lt;a;++u){var f=E[u];if(C[u]===l){var h=f.pick(c);h&amp;&amp;(b.buttons=t,b.screen=c.coord,b.distance=c.distance,b.object=f,b.index=h.distance,b.dataPosition=h.position,b.dataCoordinate=h.dataCoordinate,b.data=h,s=!0)}}}}}o&amp;&amp;o!==b.object&amp;&amp;(o.highlight&amp;&amp;o.highlight(null),P=!0),b.object&amp;&amp;(b.object.highlight&amp;&amp;b.object.highlight(b.data),P=!0),(s=s||b.object!==o)&amp;&amp;F.onselect&amp;&amp;F.onselect(b),1&amp;t&amp;&amp;!(1&amp;q)&amp;&amp;F.onclick&amp;&amp;F.onclick(b),q=t}}),r.addEventListener(&quot;webglcontextlost&quot;,H);var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=[G[0].slice(),G[1].slice()];function Y(){if(!H()){j();var t=F.camera.tick();R.view=F.camera.matrix,P=P||t,O=O||t,A.pixelRatio=F.pixelRatio,S.pixelRatio=F.pixelRatio;var e=E.length,r=G[0],n=G[1];r[0]=r[1]=r[2]=1/0,n[0]=n[1]=n[2]=-1/0;for(var i=0;i&lt;e;++i){var o=E[i];o.pixelRatio=F.pixelRatio,o.axes=F.axes,P=P||!!o.dirty,O=O||!!o.dirty;var s=o.bounds;if(s)for(var l=s[0],u=s[1],h=0;h&lt;3;++h)r[h]=Math.min(r[h],l[h]),n[h]=Math.max(n[h],u[h])}var p=F.bounds;if(F.autoBounds)for(var h=0;h&lt;3;++h){if(n[h]&lt;r[h])r[h]=-1,n[h]=1;else{r[h]===n[h]&amp;&amp;(r[h]-=1,n[h]+=1);var d=.05*(n[h]-r[h]);r[h]=r[h]-d,n[h]=n[h]+d}p[0][h]=r[h],p[1][h]=n[h]}for(var m=!1,h=0;h&lt;3;++h)m=m||W[0][h]!==p[0][h]||W[1][h]!==p[1][h],W[0][h]=p[0][h],W[1][h]=p[1][h];if(O=O||m,P=P||m){if(m){for(var v=[0,0,0],i=0;i&lt;3;++i)v[i]=g((p[1][i]-p[0][i])/10);A.autoTicks?A.update({bounds:p,tickSpacing:v}):A.update({bounds:p})}var x=y.drawingBufferWidth,k=y.drawingBufferHeight;B[0]=x,B[1]=k,N[0]=0|Math.max(x/F.pixelRatio,1),N[1]=0|Math.max(k/F.pixelRatio,1),f(I,F.fovy,x/k,F.zNear,F.zFar);for(var i=0;i&lt;16;++i)D[i]=0;D[15]=1;for(var M=0,i=0;i&lt;3;++i)M=Math.max(M,p[1][i]-p[0][i]);for(var i=0;i&lt;3;++i)F.autoScale?D[5*i]=F.aspect[i]/(p[1][i]-p[0][i]):D[5*i]=1/M,F.autoCenter&amp;&amp;(D[12+i]=.5*-D[5*i]*(p[0][i]+p[1][i]));for(var i=0;i&lt;e;++i){var o=E[i];o.axesBounds=p,F.clipToBounds&amp;&amp;(o.clipBounds=p)}b.object&amp;&amp;(F.snapToData?S.position=b.dataCoordinate:S.position=b.dataPosition,S.bounds=p),O&amp;&amp;(O=!1,function(){if(H())return;y.colorMask(!0,!0,!0,!0),y.depthMask(!0),y.disable(y.BLEND),y.enable(y.DEPTH_TEST);for(var t=E.length,e=z.length,r=0;r&lt;e;++r){var n=z[r];n.shape=N,n.begin();for(var i=0;i&lt;t;++i)if(C[i]===r){var a=E[i];a.drawPick&amp;&amp;(a.pixelRatio=1,a.drawPick(R))}n.end()}}()),F.axesPixels=a(F.axes,R,x,k),F.onrender&amp;&amp;F.onrender(),y.bindFramebuffer(y.FRAMEBUFFER,null),y.viewport(0,0,x,k);var T=F.clearColor;y.clearColor(T[0],T[1],T[2],T[3]),y.clear(y.COLOR_BUFFER_BIT|y.DEPTH_BUFFER_BIT),y.depthMask(!0),y.colorMask(!0,!0,!0,!0),y.enable(y.DEPTH_TEST),y.depthFunc(y.LEQUAL),y.disable(y.BLEND),y.disable(y.CULL_FACE);var L=!1;A.enable&amp;&amp;(L=L||A.isTransparent(),A.draw(R)),S.axes=A,b.object&amp;&amp;S.draw(R),y.disable(y.CULL_FACE);for(var i=0;i&lt;e;++i){var o=E[i];o.axes=A,o.pixelRatio=F.pixelRatio,o.isOpaque&amp;&amp;o.isOpaque()&amp;&amp;o.draw(R),o.isTransparent&amp;&amp;o.isTransparent()&amp;&amp;(L=!0)}if(L){_.shape=B,_.bind(),y.clear(y.DEPTH_BUFFER_BIT),y.colorMask(!1,!1,!1,!1),y.depthMask(!0),y.depthFunc(y.LESS),A.enable&amp;&amp;A.isTransparent()&amp;&amp;A.drawTransparent(R);for(var i=0;i&lt;e;++i){var o=E[i];o.isOpaque&amp;&amp;o.isOpaque()&amp;&amp;o.draw(R)}y.enable(y.BLEND),y.blendEquation(y.FUNC_ADD),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.colorMask(!0,!0,!0,!0),y.depthMask(!1),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),A.isTransparent()&amp;&amp;A.drawTransparent(R);for(var i=0;i&lt;e;++i){var o=E[i];o.isTransparent&amp;&amp;o.isTransparent()&amp;&amp;o.drawTransparent(R)}y.bindFramebuffer(y.FRAMEBUFFER,null),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.disable(y.DEPTH_TEST),w.bind(),_.color[0].bind(0),w.uniforms.accumBuffer=0,c(y),y.disable(y.BLEND)}P=!1;for(var i=0;i&lt;e;++i)E[i].dirty=!1}}}return function t(){e||F.contextLost||(requestAnimationFrame(t),Y())}(),F.redraw=function(){e||(P=!0,Y())},F};var n=t(&quot;3d-view-controls&quot;),i=t(&quot;gl-axes3d&quot;),a=t(&quot;gl-axes3d/properties&quot;),o=t(&quot;gl-spikes3d&quot;),s=t(&quot;gl-select-static&quot;),l=t(&quot;gl-fbo&quot;),c=t(&quot;a-big-triangle&quot;),u=t(&quot;mouse-change&quot;),f=t(&quot;gl-mat4/perspective&quot;),h=t(&quot;./lib/shader&quot;),p=t(&quot;is-mobile&quot;)();function d(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e&lt;0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e&gt;0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function m(t){return&quot;boolean&quot;!=typeof t||t}},{&quot;./lib/shader&quot;:275,&quot;3d-view-controls&quot;:43,&quot;a-big-triangle&quot;:46,&quot;gl-axes3d&quot;:221,&quot;gl-axes3d/properties&quot;:228,&quot;gl-fbo&quot;:238,&quot;gl-mat4/perspective&quot;:256,&quot;gl-select-static&quot;:285,&quot;gl-spikes3d&quot;:295,&quot;is-mobile&quot;:401,&quot;mouse-change&quot;:415}],277:[function(t,e,r){var n=t(&quot;glslify&quot;);r.pointVertex=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform float pointCloud;\n\nhighp float rand(vec2 co) {\n  highp float a = 12.9898;\n  highp float b = 78.233;\n  highp float c = 43758.5453;\n  highp float d = dot(co.xy, vec2(a, b));\n  highp float e = mod(d, 3.14);\n  return fract(sin(e) * c);\n}\n\nvoid main() {\n  vec3 hgPosition = matrix * vec3(position, 1);\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\n    // if we don't jitter the point size a bit, overall point cloud\n    // saturation 'jumps' on zooming, which is disturbing and confusing\n  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\n  if(pointCloud != 0.0) { // pointCloud is truthy\n    // get the same square surface as circle would be\n    gl_PointSize *= 0.886;\n  }\n}&quot;]),r.pointFragment=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color, borderColor;\nuniform float centerFraction;\nuniform float pointCloud;\n\nvoid main() {\n  float radius;\n  vec4 baseColor;\n  if(pointCloud != 0.0) { // pointCloud is truthy\n    if(centerFraction == 1.0) {\n      gl_FragColor = color;\n    } else {\n      gl_FragColor = mix(borderColor, color, centerFraction);\n    }\n  } else {\n    radius = length(2.0 * gl_PointCoord.xy - 1.0);\n    if(radius &gt; 1.0) {\n      discard;\n    }\n    baseColor = mix(borderColor, color, step(radius, centerFraction));\n    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n  }\n}\n&quot;]),r.pickVertex=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n  vec3 hgPosition = matrix * vec3(position, 1);\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\n  gl_PointSize = pointSize;\n\n  vec4 id = pickId + pickOffset;\n  id.y += floor(id.x / 256.0);\n  id.x -= floor(id.x / 256.0) * 256.0;\n\n  id.z += floor(id.y / 256.0);\n  id.y -= floor(id.y / 256.0) * 256.0;\n\n  id.w += floor(id.z / 256.0);\n  id.z -= floor(id.z / 256.0) * 256.0;\n\n  fragId = id;\n}\n&quot;]),r.pickFragment=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n  float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n  if(radius &gt; 1.0) {\n    discard;\n  }\n  gl_FragColor = fragId / 255.0;\n}\n&quot;])},{glslify:390}],278:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;typedarray-pool&quot;),o=t(&quot;./lib/shader&quot;);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),f=new s(t,a,l,c,u);return f.update(e),t.addObject(f),f};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r(&quot;sizeMin&quot;,.5),this.sizeMax=r(&quot;sizeMax&quot;,20),this.color=r(&quot;color&quot;,[1,0,0,1]).slice(),this.areaRatio=r(&quot;areaRatio&quot;,1),this.borderColor=r(&quot;borderColor&quot;,[0,0,0,1]).slice(),this.blend=r(&quot;blend&quot;,!1);var n=t.positions.length&gt;&gt;&gt;1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&amp;&amp;t.idToIndex.length&gt;=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e&lt;n;e++)c[e]=e;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),i||a.free(l),o||a.free(c),this.pointCount=n,this.pickOffset=0},u.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0],function(t){var e=void 0!==t,r=e?this.pickShader:this.shader,n=this.plot.gl,i=this.plot.dataBox;if(0===this.pointCount)return t;var a=i[2]-i[0],o=i[3]-i[1],s=function(t,e){var r,n=0,i=t.length&gt;&gt;&gt;1;for(r=0;r&lt;i;r++){var a=t[2*r],o=t[2*r+1];a&gt;=e[0]&amp;&amp;a&lt;=e[2]&amp;&amp;o&gt;=e[1]&amp;&amp;o&lt;=e[3]&amp;&amp;n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u&lt;5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&amp;&amp;(c[0]=255&amp;t,c[1]=t&gt;&gt;8&amp;255,c[2]=t&gt;&gt;16&amp;255,c[3]=t&gt;&gt;24&amp;255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&amp;&amp;!this.blend&amp;&amp;n.disable(n.BLEND),h&amp;&amp;n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&amp;&amp;!this.blend&amp;&amp;n.enable(n.BLEND),h&amp;&amp;n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r&lt;n||r&gt;=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{&quot;./lib/shader&quot;:277,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286,&quot;typedarray-pool&quot;:519}],279:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],p=r[0],d=r[1],g=r[2],m=r[3];(a=c*p+u*d+f*g+h*m)&lt;0&amp;&amp;(a=-a,p=-p,d=-d,g=-g,m=-m);1-a&gt;1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*f+l*g,t[3]=s*h+l*m,t}},{}],280:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;vectorize-text&quot;);e.exports=function(t,e){var r=i[e];r||(r=i[e]={});if(t in r)return r[t];for(var a=n(t,{textAlign:&quot;center&quot;,textBaseline:&quot;middle&quot;,lineHeight:1,font:e}),o=n(t,{triangles:!0,textAlign:&quot;center&quot;,textBaseline:&quot;middle&quot;,lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;l&lt;a.positions.length;++l)for(var c=a.positions[l],u=0;u&lt;2;++u)s[0][u]=Math.min(s[0][u],c[u]),s[1][u]=Math.max(s[1][u],c[u]);return r[t]=[o,a,s]};var i={}},{&quot;vectorize-text&quot;:524}],281:[function(t,e,r){var n=t(&quot;gl-shader&quot;),i=t(&quot;glslify&quot;),a=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0]))   || \n     any(greaterThan(position, clipBounds[1])) ) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float scale = 1.0;\n    if(distance(highlightId, id) &lt; 0.0001) {\n      scale = highlightScale;\n    }\n\n    vec4 worldPosition = model * vec4(position, 1);\n    vec4 viewPosition = view * worldPosition;\n    viewPosition = viewPosition / viewPosition.w;\n    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n    \n    gl_Position = clipPosition;\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = position;\n  }\n}&quot;]),o=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0])) || any(greaterThan(position, clipBounds[1]))) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float scale = pixelRatio;\n    if(distance(highlightId.bgr, id.bgr) &lt; 0.001) {\n      scale *= highlightScale;\n    }\n\n    vec4 worldPosition = model * vec4(position, 1.0);\n    vec4 viewPosition = view * worldPosition;\n    vec4 clipPosition = projection * viewPosition;\n    clipPosition /= clipPosition.w;\n    \n    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = position;\n  }\n}&quot;]),s=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0]))   ||\n     any(greaterThan(position, clipBounds[1])) ) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float lscale = pixelRatio * scale;\n    if(distance(highlightId, id) &lt; 0.0001) {\n      lscale *= highlightScale;\n    }\n\n    vec4 clipCenter   = projection * view * model * vec4(position, 1);\n    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n    gl_Position = clipPosition;\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = dataPosition;\n  }\n}\n&quot;]),l=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(dataCoordinate, fragClipBounds[0]))   ||\n     any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\n    discard;\n  } else {\n    gl_FragColor = interpColor * opacity;\n  }\n}\n&quot;]),c=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(dataCoordinate, fragClipBounds[0]))   || \n     any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\n    discard;\n  } else {\n    gl_FragColor = vec4(pickGroup, pickId.bgr);\n  }\n}&quot;]),u=[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;glyph&quot;,type:&quot;vec2&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},m={vertex:s,fragment:c,attributes:u};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return v(t,f)},r.createOrtho=function(t){return v(t,h)},r.createProject=function(t){return v(t,p)},r.createPickPerspective=function(t){return v(t,d)},r.createPickOrtho=function(t){return v(t,g)},r.createPickProject=function(t){return v(t,m)}},{&quot;gl-shader&quot;:286,glslify:390}],282:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;typedarray-pool&quot;),o=t(&quot;gl-mat4/multiply&quot;),s=t(&quot;./lib/shaders&quot;),l=t(&quot;./lib/glyphs&quot;),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function f(t,e,r,n){return u(n,n),u(n,n),u(n,n)}function h(t,e){this.index=t,this.dataCoordinate=this.position=e}function p(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new h(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=s.createPerspective(e),a=s.createOrtho(e),o=s.createProject(e),l=s.createPickPerspective(e),c=s.createPickOrtho(e),u=s.createPickProject(e),f=n(e),h=n(e),d=n(e),g=n(e),m=i(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:d,size:2,type:e.FLOAT},{buffer:g,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),v=new p(e,r,a,o,f,h,d,g,m,l,c,u);return v.update(t),v};var d=p.prototype;d.pickSlots=1,d.setPickBase=function(t){this.pickId=t},d.isTransparent=function(){if(this.opacity&lt;1)return!0;for(var t=0;t&lt;3;++t)if(this.axesProject[t]&amp;&amp;this.projectOpacity[t]&lt;1)return!0;return!1},d.isOpaque=function(){if(this.opacity&gt;=1)return!0;for(var t=0;t&lt;3;++t)if(this.axesProject[t]&amp;&amp;this.projectOpacity[t]&gt;=1)return!0;return!1};var g=[0,0],m=[0,0,0],v=[0,0,0],y=[0,0,0,1],x=[0,0,0,1],b=c.slice(),_=[0,0,0],w=[[0,0,0],[0,0,0]];function k(t){return t[0]=t[1]=t[2]=0,t}function M(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function A(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function T(t,e,r,n,i){var a,s=e.axesProject,l=e.gl,u=t.uniforms,h=r.model||c,p=r.view||c,d=r.projection||c,T=e.axesBounds,S=function(t){for(var e=w,r=0;r&lt;2;++r)for(var n=0;n&lt;3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);a=e.axes&amp;&amp;e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],g[0]=2/l.drawingBufferWidth,g[1]=2/l.drawingBufferHeight,t.bind(),u.view=p,u.projection=d,u.screenSize=g,u.highlightId=e.highlightId,u.highlightScale=e.highlightScale,u.clipBounds=S,u.pickGroup=e.pickId/255,u.pixelRatio=e.pixelRatio;for(var E=0;E&lt;3;++E)if(s[E]&amp;&amp;e.projectOpacity[E]&lt;1===n){u.scale=e.projectScale[E],u.opacity=e.projectOpacity[E];for(var C=b,L=0;L&lt;16;++L)C[L]=0;for(L=0;L&lt;4;++L)C[5*L]=1;C[5*E]=0,a[E]&lt;0?C[12+E]=T[0][E]:C[12+E]=T[1][E],o(C,h,C),u.model=C;var z=(E+1)%3,P=(E+2)%3,O=k(m),I=k(v);O[z]=1,I[P]=1;var D=f(0,0,0,M(y,O)),R=f(0,0,0,M(x,I));if(Math.abs(D[1])&gt;Math.abs(R[1])){var B=D;D=R,R=B,B=O,O=I,I=B;var F=z;z=P,P=F}D[0]&lt;0&amp;&amp;(O[z]=-1),R[1]&gt;0&amp;&amp;(I[P]=-1);var N=0,j=0;for(L=0;L&lt;4;++L)N+=Math.pow(h[4*z+L],2),j+=Math.pow(h[4*P+L],2);O[z]/=Math.sqrt(N),I[P]/=Math.sqrt(j),u.axes[0]=O,u.axes[1]=I,u.fragClipBounds[0]=A(_,S[0],E,-1e8),u.fragClipBounds[1]=A(_,S[1],E,1e8),e.vao.draw(l.TRIANGLES,e.vertexCount),e.lineWidth&gt;0&amp;&amp;(l.lineWidth(e.lineWidth),e.vao.draw(l.LINES,e.lineVertexCount,e.vertexCount))}}var S=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function E(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity&lt;1||a){t.bind();var s=t.uniforms;s.model=n.model||c,s.view=n.view||c,s.projection=n.projection||c,g[0]=2/o.drawingBufferWidth,g[1]=2/o.drawingBufferHeight,s.screenSize=g,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=S,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth&gt;0&amp;&amp;(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}T(e,r,n,i),r.vao.unbind()}d.draw=function(t){E(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},d.drawTransparent=function(t){E(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},d.drawPick=function(t){E(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},d.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]&lt;&lt;8)+(t.value[0]&lt;&lt;16);if(e&gt;=this.pointCount||e&lt;0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i&lt;3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},d.highlight=function(t){if(t){var e=t.index,r=255&amp;e,n=e&gt;&gt;8&amp;255,i=e&gt;&gt;16&amp;255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},d.update=function(t){if(&quot;perspective&quot;in(t=t||{})&amp;&amp;(this.useOrtho=!t.perspective),&quot;orthographic&quot;in t&amp;&amp;(this.useOrtho=!!t.orthographic),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;project&quot;in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if(&quot;projectScale&quot;in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(&quot;projectOpacity&quot;in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||&quot;normal&quot;,o=t.alignment||[0,0],s=[1/0,1/0,1/0],c=[-1/0,-1/0,-1/0],u=t.glyph,f=t.color,h=t.size,p=t.angle,d=t.lineColor,g=0,m=0,v=0,y=n.length;t:for(var x=0;x&lt;y;++x){for(var b=n[x],_=0;_&lt;3;++_)if(isNaN(b[_])||!isFinite(b[_]))continue t;var w=(B=Array.isArray(u)?l(u[x],i):l(u||&quot;\u25cf&quot;,i))[0],k=B[1],M=B[2];m+=3*w.cells.length,v+=2*k.edges.length}var A=m+v,T=a.mallocFloat(3*A),S=a.mallocFloat(4*A),E=a.mallocFloat(2*A),C=a.mallocUint32(A),L=[0,o[1]],z=0,P=m,O=[0,0,0,1],I=[0,0,0,1],D=Array.isArray(f)&amp;&amp;Array.isArray(f[0]),R=Array.isArray(d)&amp;&amp;Array.isArray(d[0]);t:for(x=0;x&lt;y;++x){var B;for(b=n[x],_=0;_&lt;3;++_){if(isNaN(b[_])||!isFinite(b[_])){g+=1;continue t}c[_]=Math.max(c[_],b[_]),s[_]=Math.min(s[_],b[_])}var F;w=(B=Array.isArray(u)?l(u[x],i):l(u||&quot;\u25cf&quot;,i))[0],k=B[1],M=B[2];if(Array.isArray(f)){if(3===(F=D?f[x]:f).length){for(_=0;_&lt;3;++_)O[_]=F[_];O[3]=1}else if(4===F.length)for(_=0;_&lt;4;++_)O[_]=F[_]}else O[0]=O[1]=O[2]=0,O[3]=1;if(Array.isArray(d)){if(3===(F=R?d[x]:d).length){for(_=0;_&lt;3;++_)I[_]=F[_];I[_]=1}else if(4===F.length)for(_=0;_&lt;4;++_)I[_]=F[_]}else I[0]=I[1]=I[2]=0,I[3]=1;var N=.5;Array.isArray(h)?N=+h[x]:h?N=+h:this.useOrtho&amp;&amp;(N=12);var j=0;Array.isArray(p)?j=+p[x]:p&amp;&amp;(j=+p);var V=Math.cos(j),U=Math.sin(j);for(b=n[x],_=0;_&lt;3;++_)c[_]=Math.max(c[_],b[_]),s[_]=Math.min(s[_],b[_]);o[0]&lt;0?L[0]=o[0]*(1+M[1][0]):o[0]&gt;0&amp;&amp;(L[0]=-o[0]*(1+M[0][0]));var q=w.cells,H=w.positions;for(_=0;_&lt;q.length;++_)for(var G=q[_],W=0;W&lt;3;++W){for(var Y=0;Y&lt;3;++Y)T[3*z+Y]=b[Y];for(Y=0;Y&lt;4;++Y)S[4*z+Y]=O[Y];C[z]=g;var X=H[G[W]];E[2*z]=N*(V*X[0]-U*X[1]+L[0]),E[2*z+1]=N*(U*X[0]+V*X[1]+L[1]),z+=1}for(q=k.edges,H=k.positions,_=0;_&lt;q.length;++_)for(G=q[_],W=0;W&lt;2;++W){for(Y=0;Y&lt;3;++Y)T[3*P+Y]=b[Y];for(Y=0;Y&lt;4;++Y)S[4*P+Y]=I[Y];C[P]=g;X=H[G[W]];E[2*P]=N*(V*X[0]-U*X[1]+L[0]),E[2*P+1]=N*(U*X[0]+V*X[1]+L[1]),P+=1}g+=1}this.vertexCount=m,this.lineVertexCount=v,this.pointBuffer.update(T),this.colorBuffer.update(S),this.glyphBuffer.update(E),this.idBuffer.update(new Uint32Array(C)),a.free(T),a.free(S),a.free(E),a.free(C),this.bounds=[s,c],this.points=n,this.pointCount=n.length}},d.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{&quot;./lib/glyphs&quot;:280,&quot;./lib/shaders&quot;:281,&quot;gl-buffer&quot;:229,&quot;gl-mat4/multiply&quot;:255,&quot;gl-vao&quot;:308,&quot;typedarray-pool&quot;:519}],283:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;);r.boxVertex=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n&quot;]),r.boxFragment=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n  gl_FragColor = color;\n}\n&quot;])},{glslify:390}],284:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;./lib/shaders&quot;);function o(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}e.exports=function(t,e){var r=t.gl,s=i(r,[0,0,0,1,1,0,1,1]),l=n(r,a.boxVertex,a.boxFragment),c=new o(t,s,l);return c.update(e),t.addOverlay(c),c};var s=o.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,c=t.viewBox,u=t.pixelRatio,f=(e[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],h=(e[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],p=(e[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],d=(e[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(f=Math.max(f,c[0]),h=Math.max(h,c[1]),p=Math.min(p,c[2]),d=Math.min(d,c[3]),!(p&lt;f||d&lt;h)){o.bind();var g=s[2]-s[0],m=s[3]-s[1];if(this.outerFill&amp;&amp;(o.drawBox(0,0,g,h,i),o.drawBox(0,h,f,d,i),o.drawBox(0,d,g,m,i),o.drawBox(p,h,g,d,i)),this.innerFill&amp;&amp;o.drawBox(f,h,p,d,n),r&gt;0){var v=r*u;o.drawBox(f-v,h-v,p+v,h+v,a),o.drawBox(f-v,d-v,p+v,d+v,a),o.drawBox(f-v,h-v,f+v,d+v,a),o.drawBox(p-v,h-v,p+v,d+v,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{&quot;./lib/shaders&quot;:283,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],285:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=n(t,e),a=i.mallocUint8(e[0]*e[1]*4);return new c(t,r,a)};var n=t(&quot;gl-fbo&quot;),i=t(&quot;typedarray-pool&quot;),a=t(&quot;ndarray&quot;),o=t(&quot;bit-twiddle&quot;).nextPow2,s=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;array&quot;,{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},&quot;scalar&quot;,&quot;scalar&quot;,&quot;index&quot;],pre:{body:&quot;{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}&quot;,args:[],thisVars:[&quot;this_closestD2&quot;,&quot;this_closestX&quot;,&quot;this_closestY&quot;],localVars:[]},body:{body:&quot;{if(_inline_16_arg0_&lt;255||_inline_16_arg1_&lt;255||_inline_16_arg2_&lt;255||_inline_16_arg3_&lt;255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_f&lt;this_closestD2&amp;&amp;(this_closestD2=_inline_16_f,this_closestX=_inline_16_arg6_[0],this_closestY=_inline_16_arg6_[1])}}&quot;,args:[{name:&quot;_inline_16_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg1_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg4_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg5_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg6_&quot;,lvalue:!1,rvalue:!0,count:4}],thisVars:[&quot;this_closestD2&quot;,&quot;this_closestX&quot;,&quot;this_closestY&quot;],localVars:[&quot;_inline_16_a&quot;,&quot;_inline_16_f&quot;,&quot;_inline_16_l&quot;]},post:{body:&quot;{return[this_closestX,this_closestY,this_closestD2]}&quot;,args:[],thisVars:[&quot;this_closestD2&quot;,&quot;this_closestX&quot;,&quot;this_closestY&quot;],localVars:[]},debug:!1,funcName:&quot;cwise&quot;,blockSize:64});function l(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function c(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&amp;&amp;(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=c.prototype;Object.defineProperty(u,&quot;shape&quot;,{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4&gt;this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;a&lt;r*e*4;++a)n[a]=255}return t}}}),u.begin=function(){var t=this.gl;this.shape;t&amp;&amp;(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},u.end=function(){var t=this.gl;t&amp;&amp;(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},u.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,&quot;number&quot;!=typeof r&amp;&amp;(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),o=0|Math.min(Math.max(t+r,0),n[0]),c=0|Math.min(Math.max(e-r,0),n[1]),u=0|Math.min(Math.max(e+r,0),n[1]);if(o&lt;=i||u&lt;=c)return null;var f=[o-i,u-c],h=a(this.buffer,[f[0],f[1],4],[4,4*n[0],1],4*(i+n[0]*c)),p=s(h.hi(f[0],f[1],1),r,r),d=p[0],g=p[1];return d&lt;0||Math.pow(this.radius,2)&lt;p[2]?null:new l(d+i|0,g+c|0,h.get(d,g,0),[h.get(d,g,1),h.get(d,g,2),h.get(d,g,3)],Math.sqrt(p[2]))},u.dispose=function(){this.gl&amp;&amp;(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&amp;&amp;clearTimeout(this._readTimeout))}},{&quot;bit-twiddle&quot;:79,&quot;cwise/lib/wrapper&quot;:136,&quot;gl-fbo&quot;:238,ndarray:430,&quot;typedarray-pool&quot;:519}],286:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/create-uniforms&quot;),i=t(&quot;./lib/create-attributes&quot;),a=t(&quot;./lib/reflect&quot;),o=t(&quot;./lib/shader-cache&quot;),s=t(&quot;./lib/runtime-reflect&quot;),l=t(&quot;./lib/GLError&quot;);function c(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var u=c.prototype;function f(t,e){return t.name&lt;e.name?-1:1}u.bind=function(){var t;this.program||this._relink();var e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e&gt;r)for(t=r;t&lt;e;t++)this.gl.enableVertexAttribArray(t);else if(r&gt;e)for(t=e;t&lt;r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},u.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e&lt;t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&amp;&amp;this._fref.dispose(),this._vref&amp;&amp;this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},u.update=function(t,e,r,c){if(!e||1===arguments.length){var u=t;t=u.vertex,e=u.fragment,r=u.uniforms,c=u.attributes}var h=this,p=h.gl,d=h._vref;h._vref=o.shader(p,p.VERTEX_SHADER,t),d&amp;&amp;d.dispose(),h.vertShader=h._vref.shader;var g=this._fref;if(h._fref=o.shader(p,p.FRAGMENT_SHADER,e),g&amp;&amp;g.dispose(),h.fragShader=h._fref.shader,!r||!c){var m=p.createProgram();if(p.attachShader(m,h.fragShader),p.attachShader(m,h.vertShader),p.linkProgram(m),!p.getProgramParameter(m,p.LINK_STATUS)){var v=p.getProgramInfoLog(m);throw new l(v,&quot;Error linking program:&quot;+v)}r=r||s.uniforms(p,m),c=c||s.attributes(p,m),p.deleteProgram(m)}(c=c.slice()).sort(f);var y,x=[],b=[],_=[];for(y=0;y&lt;c.length;++y){var w=c[y];if(w.type.indexOf(&quot;mat&quot;)&gt;=0){for(var k=0|w.type.charAt(w.type.length-1),M=new Array(k),A=0;A&lt;k;++A)M[A]=_.length,b.push(w.name+&quot;[&quot;+A+&quot;]&quot;),&quot;number&quot;==typeof w.location?_.push(w.location+A):Array.isArray(w.location)&amp;&amp;w.location.length===k&amp;&amp;&quot;number&quot;==typeof w.location[A]?_.push(0|w.location[A]):_.push(-1);x.push({name:w.name,type:w.type,locations:M})}else x.push({name:w.name,type:w.type,locations:[_.length]}),b.push(w.name),&quot;number&quot;==typeof w.location?_.push(0|w.location):_.push(-1)}var T=0;for(y=0;y&lt;_.length;++y)if(_[y]&lt;0){for(;_.indexOf(T)&gt;=0;)T+=1;_[y]=T}var S=new Array(r.length);function E(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t&lt;r.length;++t)S[t]=p.getUniformLocation(h.program,r[t].name)}E(),h._relink=E,h.types={uniforms:a(r),attributes:a(c)},h.attributes=i(p,h,x,_),Object.defineProperty(h,&quot;uniforms&quot;,n(p,h,r,S))},e.exports=function(t,e,r,n,i){var a=new c(t);return a.update(e,r,n,i),a}},{&quot;./lib/GLError&quot;:287,&quot;./lib/create-attributes&quot;:288,&quot;./lib/create-uniforms&quot;:289,&quot;./lib/reflect&quot;:290,&quot;./lib/runtime-reflect&quot;:291,&quot;./lib/shader-cache&quot;:292}],287:[function(t,e,r){function n(t,e,r){this.shortMessage=e||&quot;&quot;,this.longMessage=r||&quot;&quot;,this.rawError=t||&quot;&quot;,this.message=&quot;gl-shader: &quot;+(e||t||&quot;&quot;)+(r?&quot;\n&quot;+r:&quot;&quot;),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name=&quot;GLError&quot;,n.prototype.constructor=n,e.exports=n},{}],288:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,i){for(var a={},l=0,c=r.length;l&lt;c;++l){var u=r[l],f=u.name,h=u.type,p=u.locations;switch(h){case&quot;bool&quot;:case&quot;int&quot;:case&quot;float&quot;:o(t,e,p[0],i,1,a,f);break;default:if(h.indexOf(&quot;vec&quot;)&gt;=0){var d=h.charCodeAt(h.length-1)-48;if(d&lt;2||d&gt;4)throw new n(&quot;&quot;,&quot;Invalid data type for attribute &quot;+f+&quot;: &quot;+h);o(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf(&quot;mat&quot;)&gt;=0))throw new n(&quot;&quot;,&quot;Unknown data type for attribute &quot;+f+&quot;: &quot;+h);var d=h.charCodeAt(h.length-1)-48;if(d&lt;2||d&gt;4)throw new n(&quot;&quot;,&quot;Invalid data type for attribute &quot;+f+&quot;: &quot;+h);s(t,e,p,i,d,a,f)}}}return a};var n=t(&quot;./GLError&quot;);function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;function o(t,e,r,n,a,o,s){for(var l=[&quot;gl&quot;,&quot;v&quot;],c=[],u=0;u&lt;a;++u)l.push(&quot;x&quot;+u),c.push(&quot;x&quot;+u);l.push(&quot;if(x0.length===void 0){return gl.vertexAttrib&quot;+a+&quot;f(v,&quot;+c.join()+&quot;)}else{return gl.vertexAttrib&quot;+a+&quot;fv(v,x0)}&quot;);var f=Function.apply(null,l),h=new i(t,e,r,n,a,f);Object.defineProperty(o,s,{set:function(e){return t.disableVertexAttribArray(n[r]),f(t,n[r],e),e},get:function(){return h},enumerable:!0})}function s(t,e,r,n,i,a,s){for(var l=new Array(i),c=new Array(i),u=0;u&lt;i;++u)o(t,e,r[u],n,i,l,u),c[u]=l[u];Object.defineProperty(l,&quot;location&quot;,{set:function(t){if(Array.isArray(t))for(var e=0;e&lt;i;++e)c[e].location=t[e];else for(e=0;e&lt;i;++e)c[e].location=t+e;return t},get:function(){for(var t=new Array(i),e=0;e&lt;i;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,a,o,s){e=e||t.FLOAT,a=!!a,o=o||i*i,s=s||0;for(var l=0;l&lt;i;++l){var c=n[r[l]];t.vertexAttribPointer(c,i,e,a,o,s+l*i),t.enableVertexAttribArray(c)}};var f=new Array(i),h=t[&quot;vertexAttrib&quot;+i+&quot;fv&quot;];Object.defineProperty(a,s,{set:function(e){for(var a=0;a&lt;i;++a){var o=n[r[a]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[a]);else{for(var s=0;s&lt;i;++s)f[s]=e[i*a+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}a.pointer=function(t,e,r,n){var i=this._gl,a=this._locations[this._index];i.vertexAttribPointer(a,this._dimension,t||i.FLOAT,!!e,r||0,n||0),i.enableVertexAttribArray(a)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,&quot;location&quot;,{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&amp;&amp;(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{&quot;./GLError&quot;:287}],289:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./reflect&quot;),i=t(&quot;./GLError&quot;);function a(t){return new Function(&quot;y&quot;,&quot;return function(){return y}&quot;)(t)}function o(t,e){for(var r=new Array(t),n=0;n&lt;t;++n)r[n]=e;return r}e.exports=function(t,e,r,s){function l(t,e,r){switch(r){case&quot;bool&quot;:case&quot;int&quot;:case&quot;sampler2D&quot;:case&quot;samplerCube&quot;:return&quot;gl.uniform1i(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;case&quot;float&quot;:return&quot;gl.uniform1f(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;default:var n=r.indexOf(&quot;vec&quot;);if(!(0&lt;=n&amp;&amp;n&lt;=1&amp;&amp;r.length===4+n)){if(0===r.indexOf(&quot;mat&quot;)&amp;&amp;4===r.length){var a=r.charCodeAt(r.length-1)-48;if(a&lt;2||a&gt;4)throw new i(&quot;&quot;,&quot;Invalid uniform dimension type for matrix &quot;+name+&quot;: &quot;+r);return&quot;gl.uniformMatrix&quot;+a+&quot;fv(locations[&quot;+e+&quot;],false,obj&quot;+t+&quot;)&quot;}throw new i(&quot;&quot;,&quot;Unknown uniform data type for &quot;+name+&quot;: &quot;+r)}var a=r.charCodeAt(r.length-1)-48;if(a&lt;2||a&gt;4)throw new i(&quot;&quot;,&quot;Invalid data type&quot;);switch(r.charAt(0)){case&quot;b&quot;:case&quot;i&quot;:return&quot;gl.uniform&quot;+a+&quot;iv(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;case&quot;v&quot;:return&quot;gl.uniform&quot;+a+&quot;fv(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;default:throw new i(&quot;&quot;,&quot;Unrecognized data type for vector &quot;+name+&quot;: &quot;+r)}}}function c(e){for(var n=[&quot;return function updateProperty(obj){&quot;],i=function t(e,r){if(&quot;object&quot;!=typeof r)return[[e,r]];var n=[];for(var i in r){var a=r[i],o=e;parseInt(i)+&quot;&quot;===i?o+=&quot;[&quot;+i+&quot;]&quot;:o+=&quot;.&quot;+i,&quot;object&quot;==typeof a?n.push.apply(n,t(o,a)):n.push([o,a])}return n}(&quot;&quot;,e),a=0;a&lt;i.length;++a){var o=i[a],c=o[0],u=o[1];s[u]&amp;&amp;n.push(l(c,u,r[u].type))}n.push(&quot;return obj}&quot;);var f=new Function(&quot;gl&quot;,&quot;locations&quot;,n.join(&quot;\n&quot;));return f(t,s)}function u(n,l,u){if(&quot;object&quot;==typeof u){var h=f(u);Object.defineProperty(n,l,{get:a(h),set:c(u),enumerable:!0,configurable:!1})}else s[u]?Object.defineProperty(n,l,{get:(p=u,new Function(&quot;gl&quot;,&quot;wrapper&quot;,&quot;locations&quot;,&quot;return function(){return gl.getUniform(wrapper.program,locations[&quot;+p+&quot;])}&quot;)(t,e,s)),set:c(u),enumerable:!0,configurable:!1}):n[l]=function(t){switch(t){case&quot;bool&quot;:return!1;case&quot;int&quot;:case&quot;sampler2D&quot;:case&quot;samplerCube&quot;:case&quot;float&quot;:return 0;default:var e=t.indexOf(&quot;vec&quot;);if(0&lt;=e&amp;&amp;e&lt;=1&amp;&amp;t.length===4+e){var r=t.charCodeAt(t.length-1)-48;if(r&lt;2||r&gt;4)throw new i(&quot;&quot;,&quot;Invalid data type&quot;);return&quot;b&quot;===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf(&quot;mat&quot;)&amp;&amp;4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r&lt;2||r&gt;4)throw new i(&quot;&quot;,&quot;Invalid uniform dimension type for matrix &quot;+name+&quot;: &quot;+t);return o(r*r,0)}throw new i(&quot;&quot;,&quot;Unknown uniform data type for &quot;+name+&quot;: &quot;+t)}}(r[u].type);var p}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r&lt;t.length;++r)u(e,r,t[r])}else for(var n in e={},t)u(e,n,t[n]);return e}var h=n(r,!0);return{get:a(f(h)),set:c(h),enumerable:!0,configurable:!0}}},{&quot;./GLError&quot;:287,&quot;./reflect&quot;:290}],290:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r={},n=0;n&lt;t.length;++n)for(var i=t[n].name,a=i.split(&quot;.&quot;),o=r,s=0;s&lt;a.length;++s){var l=a[s].split(&quot;[&quot;);if(l.length&gt;1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c&lt;l.length;++c){var u=parseInt(l[c]);c&lt;l.length-1||s&lt;a.length-1?(u in o||(c&lt;l.length-1?o[u]=[]:o[u]={}),o=o[u]):o[u]=e?n:t[n].type}}else s&lt;a.length-1?(l[0]in o||(o[l[0]]={}),o=o[l[0]]):o[l[0]]=e?n:t[n].type}return r}},{}],291:[function(t,e,r){&quot;use strict&quot;;r.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),n=[],i=0;i&lt;r;++i){var o=t.getActiveUniform(e,i);if(o){var s=a(t,o.type);if(o.size&gt;1)for(var l=0;l&lt;o.size;++l)n.push({name:o.name.replace(&quot;[0]&quot;,&quot;[&quot;+l+&quot;]&quot;),type:s});else n.push({name:o.name,type:s})}}return n},r.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),n=[],i=0;i&lt;r;++i){var o=t.getActiveAttrib(e,i);o&amp;&amp;n.push({name:o.name,type:a(t,o.type)})}return n};var n={FLOAT:&quot;float&quot;,FLOAT_VEC2:&quot;vec2&quot;,FLOAT_VEC3:&quot;vec3&quot;,FLOAT_VEC4:&quot;vec4&quot;,INT:&quot;int&quot;,INT_VEC2:&quot;ivec2&quot;,INT_VEC3:&quot;ivec3&quot;,INT_VEC4:&quot;ivec4&quot;,BOOL:&quot;bool&quot;,BOOL_VEC2:&quot;bvec2&quot;,BOOL_VEC3:&quot;bvec3&quot;,BOOL_VEC4:&quot;bvec4&quot;,FLOAT_MAT2:&quot;mat2&quot;,FLOAT_MAT3:&quot;mat3&quot;,FLOAT_MAT4:&quot;mat4&quot;,SAMPLER_2D:&quot;sampler2D&quot;,SAMPLER_CUBE:&quot;samplerCube&quot;},i=null;function a(t,e){if(!i){var r=Object.keys(n);i={};for(var a=0;a&lt;r.length;++a){var o=r[a];i[t[o]]=n[o]}}return i[e]}},{}],292:[function(t,e,r){&quot;use strict&quot;;r.shader=function(t,e,r){return u(t).getShaderReference(e,r)},r.program=function(t,e,r,n,i){return u(t).getProgram(e,r,n,i)};var n=t(&quot;./GLError&quot;),i=t(&quot;gl-format-compiler-error&quot;),a=new(&quot;undefined&quot;==typeof WeakMap?t(&quot;weakmap-shim&quot;):WeakMap),o=0;function s(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(t){this.gl=t,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n&lt;i;++n){var a=t.programs[r[n]];a&amp;&amp;(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var c=l.prototype;function u(t){var e=a.get(t);return e||(e=new l(t),a.set(t,e)),e}c.getShaderReference=function(t,e){var r=this.gl,a=this.shaders[t===r.FRAGMENT_SHADER|0],l=a[e];if(l&amp;&amp;r.isShader(l.shader))l.count+=1;else{var c=function(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(a);try{var s=i(o,r,e)}catch(t){throw console.warn(&quot;Failed to format compiler error: &quot;+t),new n(o,&quot;Error compiling shader:\n&quot;+o)}throw new n(o,s.short,s.long)}return a}(r,t,e);l=a[e]=new s(o++,e,t,c,[],1,this)}return l},c.getProgram=function(t,e,r,i){var a=[t.id,e.id,r.join(&quot;:&quot;),i.join(&quot;:&quot;)].join(&quot;@&quot;),o=this.programs[a];return o&amp;&amp;this.gl.isProgram(o)||(this.programs[a]=o=function(t,e,r,i,a){var o=t.createProgram();t.attachShader(o,e),t.attachShader(o,r);for(var s=0;s&lt;i.length;++s)t.bindAttribLocation(o,a[s],i[s]);if(t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS)){var l=t.getProgramInfoLog(o);throw new n(l,&quot;Error linking program: &quot;+l)}return o}(this.gl,t.shader,e.shader,r,i),t.programs.push(a),e.programs.push(a)),o}},{&quot;./GLError&quot;:287,&quot;gl-format-compiler-error&quot;:239,&quot;weakmap-shim&quot;:529}],293:[function(t,e,r){&quot;use strict&quot;;function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}e.exports=function(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r};var i=n.prototype;i.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},i.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]&lt;=n[0]&amp;&amp;n[0]&lt;=o[2]&amp;&amp;o[1]&lt;=n[1]&amp;&amp;n[1]&lt;=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),c=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&amp;&amp;a.drawLine(l,c,s[0],c,e[0],r[0]),t[1]&amp;&amp;a.drawLine(l,c,l,s[1],e[1],r[1]),t[2]&amp;&amp;a.drawLine(l,c,s[2],c,e[2],r[2]),t[3]&amp;&amp;a.drawLine(l,c,l,s[3],e[3],r[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],294:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n  vec3 vertexPosition = mix(coordinates[0],\n    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n  vec2 delta = weight * clipOffset * screenShape;\n  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n  gl_FragColor = fragColor;\n}&quot;]);e.exports=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec3&quot;},{name:&quot;weight&quot;,type:&quot;float&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],295:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders/index&quot;);e.exports=function(t,e){var r=[];function o(t,e,n,i,a,o){var s=[t,e,n,0,0,0,1];s[i+3]=1,s[i]=a,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[i]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[i]=a,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(t,r),c=i(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),u=a(t);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var f=new s(t,l,c,u);return f.update(e),f};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,c=[0,0,0],u=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||o,s=t.view||o,l=t.projection||o;this.axes&amp;&amp;(i=this.axes.lastCubeProps.axis);for(var h=c,p=u,d=0;d&lt;3;++d)i&amp;&amp;i[d]&lt;0?(h[d]=this.bounds[0][d],p[d]=this.bounds[1][d]):(h[d]=this.bounds[1][d],p[d]=this.bounds[0][d]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,h,p],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(d=0;d&lt;3;++d)n.uniforms.lineWidth=this.lineWidth[d]*this.pixelRatio,this.enabled[d]&amp;&amp;(r.draw(e.TRIANGLES,6,6*d),this.drawSides[d]&amp;&amp;r.draw(e.TRIANGLES,12,18+12*d));r.unbind()},l.update=function(t){t&amp;&amp;(&quot;bounds&quot;in t&amp;&amp;(this.bounds=t.bounds),&quot;position&quot;in t&amp;&amp;(this.position=t.position),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;colors&quot;in t&amp;&amp;(this.colors=t.colors),&quot;enabled&quot;in t&amp;&amp;(this.enabled=t.enabled),&quot;drawSides&quot;in t&amp;&amp;(this.drawSides=t.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{&quot;./shaders/index&quot;:294,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],296:[function(t,e,r){arguments[4][231][0].apply(r,arguments)},{barycentric:60,dup:231,&quot;polytope-closest-point/lib/closest_point_2d.js&quot;:461}],297:[function(t,e,r){var n=t(&quot;glslify&quot;),i=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n  float segmentCount = 8.0;\n\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d);\n  vec3 y = v * sin(angle) * length(d);\n  vec3 v3 = x + y;\n\n  normal = normalize(v3);\n\n  return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float tubeScale;\n\nuniform mat4 model\n           , view\n           , projection;\nuniform vec3 eyePosition\n           , lightPosition;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  // Scale the vector magnitude to stay constant with\n  // model &amp; view changes.\n  vec3 normal;\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal), 0.0);\n  normal = normalize(normal * inverse(mat3(model)));\n\n  vec4 t_position  = view * tubePosition;\n  gl_Position      = projection * t_position;\n  f_color          = color;\n  f_normal         = normal;\n  f_data           = tubePosition.xyz;\n  f_eyeDirection   = eyePosition   - tubePosition.xyz;\n  f_lightDirection = lightPosition - tubePosition.xyz;\n  f_uv             = uv;\n}\n&quot;]),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n            , fresnel\n            , kambient\n            , kdiffuse\n            , kspecular\n            , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n  \n  if(!gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor =  texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n  float segmentCount = 8.0;\n\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d);\n  vec3 y = v * sin(angle) * length(d);\n  vec3 v3 = x + y;\n\n  normal = normalize(v3);\n\n  return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  vec3 normal;\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal), 0.0);\n  gl_Position = projection * view * tubePosition;\n  f_id        = id;\n  f_position  = position.xyz;\n}\n&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}&quot;]);r.meshShader={vertex:i,fragment:a,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;},{name:&quot;vector&quot;,type:&quot;vec4&quot;}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;},{name:&quot;vector&quot;,type:&quot;vec4&quot;}]}},{glslify:390}],298:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;normals&quot;),l=t(&quot;gl-mat4/multiply&quot;),c=t(&quot;gl-mat4/invert&quot;),u=t(&quot;ndarray&quot;),f=t(&quot;colormap&quot;),h=t(&quot;simplicial-complex-contour&quot;),p=t(&quot;typedarray-pool&quot;),d=t(&quot;./shaders&quot;),g=(t(&quot;./closest-point&quot;),d.meshShader),m=d.pickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,y,x,b,_,w,k,M,A,T,S,E){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=E,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=v,this._view=v,this._projection=v,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,m.vertex,m.fragment,null,m.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity&gt;=1},x.isTransparent=function(){return this.opacity&lt;1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&amp;&amp;this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l&lt;a;++l)for(var c=r[l],u=0;u&lt;2;++u){var f=c[0];2===c.length&amp;&amp;(f=c[u]);for(var d=n[f][0],g=n[f][1],m=i[f],v=1-m,y=this.positions[d],x=this.positions[g],b=0;b&lt;3;++b)o[s++]=m*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,&quot;contourEnable&quot;in t&amp;&amp;(this.contourEnable=t.contourEnable),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=t.contourColor),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;lightPosition&quot;in t&amp;&amp;(this.lightPosition=t.lightPosition),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;ambient&quot;in t&amp;&amp;(this.ambientLight=t.ambient),&quot;diffuse&quot;in t&amp;&amp;(this.diffuseLight=t.diffuse),&quot;specular&quot;in t&amp;&amp;(this.specularLight=t.specular),&quot;roughness&quot;in t&amp;&amp;(this.roughness=t.roughness),&quot;fresnel&quot;in t&amp;&amp;(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&amp;&amp;(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:&quot;rgba&quot;}),r=new Uint8Array(1024),n=0;n&lt;256;++n){for(var i=e[n],a=0;a&lt;3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&amp;&amp;r&amp;&amp;i){void 0!==t.tubeScale&amp;&amp;(this.tubeScale=t.tubeScale);var a=[],l=[],c=[],h=[],p=[],d=[],g=[],m=[],v=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n,this.vectors=i;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&amp;&amp;!A&amp;&amp;(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var E=t.vertexColors,C=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,P=t.vertexIntensity,O=t.cellUVs,I=t.cellIntensity,D=1/0,R=-1/0;if(!z&amp;&amp;!O)if(P)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B&lt;P.length;++B){var F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else if(I)for(B=0;B&lt;I.length;++B){F=I[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B&lt;n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=P||(I?function(t,e,r){for(var n=new Array(e),i=0;i&lt;e;++i)n[i]=0;var a=t.length;for(i=0;i&lt;a;++i)for(var o=t[i],s=0;s&lt;o.length;++s)n[o[s]]=r[i];return n}(r,n.length,I):function(t){for(var e=t.length,r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B&lt;n.length;++B)for(var V=n[B],U=0;U&lt;3;++U)!isNaN(V[U])&amp;&amp;isFinite(V[U])&amp;&amp;(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B&lt;r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U&lt;3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=E?E[X]:C?C[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U&lt;2;++U){V=n[X=W[U]];for(var Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U&lt;2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=E?E[X]:C?C[B]:L).length?m.push(Z[0],Z[1],Z[2],1):m.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],v.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U&lt;3;++U)for(V=n[X=W[U]],Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U&lt;3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2],K[3]),3===(Z=E?E[X]:C?C[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(m),this.edgeUVs.update(v),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o&lt;3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o&lt;3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o&lt;3;++o){for(var p=u[12+o],d=0;d&lt;3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount&gt;0&amp;&amp;((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount&gt;0&amp;&amp;this.lineWidth&gt;0&amp;&amp;((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount&gt;0&amp;&amp;((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&amp;&amp;this.contourCount&gt;0&amp;&amp;this.contourLineWidth&gt;0&amp;&amp;((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount&gt;0&amp;&amp;(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount&gt;0&amp;&amp;(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount&gt;0)&amp;&amp;((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&amp;&amp;(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),m=i(t),v=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:m,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:4}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),z=i(t),P=new y(t,l,r,null,null,s,null,null,c,f,m,h,p,d,v,x,k,_,w,M,A,C,T,S,E,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return P.update(e),P}},{&quot;./closest-point&quot;:296,&quot;./shaders&quot;:297,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-shader&quot;:286,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,normals:433,&quot;simplicial-complex-contour&quot;:491,&quot;typedarray-pool&quot;:519}],299:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-vec3&quot;),i=t(&quot;gl-vec4&quot;),a=function(t,e,r,a){for(var o=0,s=0;s&lt;t.length;s++)for(var l=t[s].velocities,c=0;c&lt;l.length;c++){var u=n.length(l[c]);u&gt;o&amp;&amp;(o=u)}var f=t.map(function(t){return function(t,e,r,a){var o,s,l,c=t.points,u=t.velocities,f=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var h=[],p=[],d=[],g=[],m=[],v=[],y=0,x=0,b=i.create(),_=i.create(),w=0;w&lt;c.length;w++){o=c[w],s=u[w],l=f[w],0===e&amp;&amp;(l=.05*r),x=n.length(s)/a,b=i.create(),n.copy(b,s),b[3]=l;for(var k=0;k&lt;8;k++)m[k]=[o[0],o[1],o[2],k];if(g.length&gt;0)for(k=0;k&lt;8;k++){var M=(k+1)%8;h.push(g[k],m[k],m[M],m[M],g[M],g[k]),d.push(_,b,b,b,_,_),v.push(y,x,x,x,y,y),p.push([h.length-6,h.length-5,h.length-4],[h.length-3,h.length-2,h.length-1])}var A=g;g=m,m=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:h,cells:p,vectors:d,vertexIntensity:v}}(t,r,a,o)}),h=[],p=[],d=[],g=[];for(s=0;s&lt;f.length;s++){var m=f[s],v=h.length;h=h.concat(m.positions),d=d.concat(m.vectors),g=g.concat(m.vertexIntensity);for(c=0;c&lt;m.cells.length;c++){var y=m.cells[c],x=[];p.push(x);for(var b=0;b&lt;y.length;b++)x.push(y[b]+v)}}return{positions:h,cells:p,vectors:d,vertexIntensity:g,colormap:e}},o=function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=this.getVelocity(r);n.subtract(a,a,e),n.scale(a,a,1e4),n.add(r,t,[0,i,0]);var o=this.getVelocity(r);n.subtract(o,o,e),n.scale(o,o,1e4),n.add(r,t,[0,0,i]);var s=this.getVelocity(r);return n.subtract(s,s,e),n.scale(s,s,1e4),n.add(r,a,o),n.add(r,r,s),r},s=function(t){return h(t,this.vectors,this.meshgrid,this.clampBorders)},l=function(t,e){for(var r=0;r&lt;t.length;r++){var n=t[r];if(n===e)return r;if(n&gt;e)return r-1}return r},c=n.create(),u=n.create(),f=function(t,e,r){return t&lt;e?e:t&gt;r?r:t},h=function(t,e,r,i){var a=t[0],o=t[1],s=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],a),m=l(r[1],o),v=l(r[2],s),y=g+1,x=m+1,b=v+1;if(r[0][g]===a&amp;&amp;(y=g),r[1][m]===o&amp;&amp;(x=m),r[2][v]===s&amp;&amp;(b=v),i&amp;&amp;(g=f(g,0,h-1),y=f(y,0,h-1),m=f(m,0,p-1),x=f(x,0,p-1),v=f(v,0,d-1),b=f(b,0,d-1)),g&lt;0||m&lt;0||v&lt;0||y&gt;=h||x&gt;=p||b&gt;=d)return n.create();var _=(a-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][m])/(r[1][x]-r[1][m]),k=(s-r[2][v])/(r[2][b]-r[2][v]);(_&lt;0||_&gt;1||isNaN(_))&amp;&amp;(_=0),(w&lt;0||w&gt;1||isNaN(w))&amp;&amp;(w=0),(k&lt;0||k&gt;1||isNaN(k))&amp;&amp;(k=0);var M=v*h*p,A=b*h*p,T=m*h,S=x*h,E=g,C=y,L=e[T+M+E],z=e[T+M+C],P=e[S+M+E],O=e[S+M+C],I=e[T+A+E],D=e[T+A+C],R=e[S+A+E],B=e[S+A+C],F=n.create();return n.lerp(F,L,z,_),n.lerp(c,P,O,_),n.lerp(F,F,c,w),n.lerp(c,I,D,_),n.lerp(u,R,B,_),n.lerp(c,c,u,w),n.lerp(F,F,c,k),F},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r&lt;t.length;r++){var n=Math.abs(t[r]-t[r-1]);n&lt;e&amp;&amp;(e=n)}return e};e.exports=function(t,e){var r=t.startingPositions,i=t.maxLength||1e3,l=t.tubeSize||1,c=t.absoluteTubeSize;t.getDivergence||(t.getDivergence=o),t.getVelocity||(t.getVelocity=s),void 0===t.clampBorders&amp;&amp;(t.clampBorders=!0);var u=[],f=e[0][0],h=e[0][1],d=e[0][2],g=e[1][0],m=e[1][1],v=e[1][2],y=function(t,e){var r=e[0],n=e[1],i=e[2];return r&gt;=f&amp;&amp;r&lt;=g&amp;&amp;n&gt;=h&amp;&amp;n&lt;=m&amp;&amp;i&gt;=d&amp;&amp;i&lt;=v},x=10*n.distance(e[0],e[1])/i,b=x*x,_=1,w=0;n.create();r.length&gt;=2&amp;&amp;(_=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=0;s&lt;t.length;s++){var l=t[s],c=l[0],u=l[1],f=l[2];i[c]||(e.push(c),i[c]=!0),a[u]||(r.push(u),a[u]=!0),o[f]||(n.push(f),o[f]=!0)}var h=p(e),d=p(r),g=p(n),m=Math.min(h,d,g);return isFinite(m)?m:1}(r));for(var k=0;k&lt;r.length;k++){var M=n.create();n.copy(M,r[k]);var A=[M],T=[],S=t.getVelocity(M),E=M;T.push(S);var C=[],L=t.getDivergence(M,S);(I=n.length(L))&gt;w&amp;&amp;!isNaN(I)&amp;&amp;isFinite(I)&amp;&amp;(w=I),C.push(I),u.push({points:A,velocities:T,divergences:C});for(var z=0;z&lt;100*i&amp;&amp;A.length&lt;i&amp;&amp;y(0,M);){z++;var P=n.clone(S),O=n.squaredLength(P);if(0===O)break;if(O&gt;b&amp;&amp;n.scale(P,P,x/Math.sqrt(O)),n.add(P,P,M),S=t.getVelocity(P),n.squaredDistance(E,P)-b&gt;-1e-4*b){A.push(P),E=P,T.push(S);L=t.getDivergence(P,S);(I=n.length(L))&gt;w&amp;&amp;!isNaN(I)&amp;&amp;isFinite(I)&amp;&amp;(w=I),C.push(I)}M=P}}for(k=0;k&lt;C.length;k++){var I=C[k];!isNaN(I)&amp;&amp;isFinite(I)||(C[k]=w)}var D=a(u,t.colormap,w,_);return c?D.tubeScale=c:(0===w&amp;&amp;(w=1),D.tubeScale=.5*l*_/w),D},e.exports.createTubeMesh=t(&quot;./lib/tubemesh&quot;)},{&quot;./lib/tubemesh&quot;:298,&quot;gl-vec3&quot;:327,&quot;gl-vec4&quot;:363}],300:[function(t,e,r){var n=t(&quot;gl-shader&quot;),i=t(&quot;glslify&quot;),a=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  worldCoordinate = vec3(uv.zw, f.x);\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n  vec4 clipPosition = projection * view * worldPosition;\n  gl_Position = clipPosition;\n  kill = f.y;\n  value = f.z;\n  planeCoordinate = uv.xy;\n\n  vColor = texture2D(colormap, vec2(value, value));\n\n  //Lighting geometry parameters\n  vec4 cameraCoordinate = view * worldPosition;\n  cameraCoordinate.xyz /= cameraCoordinate.w;\n  lightDirection = lightPosition - cameraCoordinate.xyz;\n  eyeDirection   = eyePosition - cameraCoordinate.xyz;\n  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n&quot;]),o=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness) {\n  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  if (kill &gt; 0.0 ||\n    any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n    discard;\n  }\n\n  vec3 N = normalize(surfaceNormal);\n  vec3 V = normalize(eyeDirection);\n  vec3 L = normalize(lightDirection);\n\n  if(gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  //decide how to interpolate color \u2014 in vertex or in fragment\n  vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n&quot;]),s=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n  vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n  vec4 clipPosition = projection * view * worldPosition;\n  clipPosition.z = clipPosition.z + zOffset;\n\n  gl_Position = clipPosition;\n  value = f;\n  kill = -1.0;\n  worldCoordinate = dataCoordinate;\n  planeCoordinate = uv.zw;\n\n  vColor = texture2D(colormap, vec2(value, value));\n\n  //Don't do lighting for contours\n  surfaceNormal   = vec3(1,0,0);\n  eyeDirection    = vec3(0,1,0);\n  lightDirection  = vec3(0,0,1);\n}\n&quot;]),l=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n  float vh = 255.0 * v;\n  float upper = floor(vh);\n  float lower = fract(vh);\n  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n  if(kill &gt; 0.0 ||\n    any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n    discard;\n  }\n  vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n  vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n&quot;]);r.createShader=function(t){var e=n(t,a,o,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;float&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;float&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{&quot;gl-shader&quot;:286,glslify:390}],301:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var m=new E(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,f,h,p,d),v={levels:[[],[],[]]};for(var k in t)v[k]=t[k];return v.colormap=v.colormap||&quot;jet&quot;,m.update(v),m};var n=t(&quot;bit-twiddle&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;typedarray-pool&quot;),l=t(&quot;colormap&quot;),c=t(&quot;ndarray-ops&quot;),u=t(&quot;ndarray-pack&quot;),f=t(&quot;ndarray&quot;),h=t(&quot;surface-nets&quot;),p=t(&quot;gl-mat4/multiply&quot;),d=t(&quot;gl-mat4/invert&quot;),g=t(&quot;binary-search-bounds&quot;),m=t(&quot;ndarray-gradient&quot;),v=t(&quot;./lib/shaders&quot;),y=v.createShader,x=v.createContourShader,b=v.createPickShader,_=v.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],M=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[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]];function T(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t&lt;3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function E(t,e,r,n,i,a,o,l,c,u,h,p,d,g){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.isTransparent=function(){return this.opacity&lt;1},C.isOpaque=function(){if(this.opacity&gt;=1)return!0;for(var t=0;t&lt;3;++t)if(this._contourCounts[t].length&gt;0||this._dynamicCounts[t]&gt;0)return!0;return!1},C.pickSlots=1,C.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(t,e){var r,n,i,a=e.axes&amp;&amp;e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r&lt;3;++r)for(o=o||e.surfaceProject[r],n=0;n&lt;3;++n)s=s||e.contourProject[r][n];for(r=0;r&lt;3;++r){var l=z.projections[r];for(n=0;n&lt;16;++n)l[n]=0;for(n=0;n&lt;4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]&gt;0)][r],p(l,t.model,l);var c=z.clipBounds[r];for(i=0;i&lt;2;++i)for(n=0;n&lt;3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var O={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=O;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i&lt;2;++i)for(var a=n.clipBounds[i],o=0;o&lt;3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=I;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i&lt;3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i&lt;3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i&lt;3;++i){var c=s[12+i];for(o=0;o&lt;3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=P(n,this);if(u.showSurface&amp;&amp;e===this.opacity&lt;1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&amp;&amp;this._vertexCount&amp;&amp;this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i&lt;3;++i)this.surfaceProject[i]&amp;&amp;this.vertexCount&amp;&amp;(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&amp;&amp;!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i&lt;3;++i)for(f.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]),o=0;o&lt;this.contourLevels[i].length;++o)o===this.highlightLevel[i]?(f.uniforms.contourColor=this.highlightColor[i],f.uniforms.contourTint=this.highlightTint[i]):0!==o&amp;&amp;o-1!==this.highlightLevel[i]||(f.uniforms.contourColor=this.contourColor[i],f.uniforms.contourTint=this.contourTint[i]),this._contourCounts[i][o]&amp;&amp;(f.uniforms.height=this.contourLevels[i][o],h.draw(r.LINES,this._contourCounts[i][o],this._contourOffsets[i][o]));for(i=0;i&lt;3;++i)for(f.uniforms.model=u.projections[i],f.uniforms.clipBounds=u.clipBounds[i],o=0;o&lt;3;++o)if(this.contourProject[i][o]){f.uniforms.permutation=A[o],r.lineWidth(this.contourWidth[o]);for(var g=0;g&lt;this.contourLevels[o].length;++g)g===this.highlightLevel[o]?(f.uniforms.contourColor=this.highlightColor[o],f.uniforms.contourTint=this.highlightTint[o]):0!==g&amp;&amp;g-1!==this.highlightLevel[o]||(f.uniforms.contourColor=this.contourColor[o],f.uniforms.contourTint=this.contourTint[o]),f.uniforms.height=this.contourLevels[o][g],h.draw(r.LINES,this._contourCounts[o][g],this._contourOffsets[o][g])}for(h.unbind(),(h=this._dynamicVAO).bind(),i=0;i&lt;3;++i)if(0!==this._dynamicCounts[i])for(f.uniforms.model=n.model,f.uniforms.clipBounds=n.clipBounds,f.uniforms.permutation=A[i],r.lineWidth(this.dynamicWidth[i]),f.uniforms.contourColor=this.dynamicColor[i],f.uniforms.contourTint=this.dynamicTint[i],f.uniforms.height=this.dynamicLevel[i],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]),o=0;o&lt;3;++o)this.contourProject[o][i]&amp;&amp;(f.uniforms.model=u.projections[o],f.uniforms.clipBounds=u.clipBounds[o],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]));h.unbind()}}C.draw=function(t){return R.call(this,t,!1)},C.drawTransparent=function(t){return R.call(this,t,!0)};var B={model:k,view:k,projection:k,inverseModel:k,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function F(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))}function N(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function j(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function V(t){if(Array.isArray(t)){if(Array.isArray(t))return[j(t[0]),j(t[1]),j(t[2])];var e=j(t);return[e.slice(),e.slice(),e.slice()]}}C.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=B;r.model=t.model||k,r.view=t.view||k,r.projection=t.projection||k,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=D;for(var n=0;n&lt;2;++n)for(var i=r.clipBounds[n],a=0;a&lt;3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var o=P(r,this);if(o.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n&lt;3;++n)this.surfaceProject[n]&amp;&amp;(this._pickShader.uniforms.model=o.projections[n],this._pickShader.uniforms.clipBounds=o.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(o.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=r;var l=this._contourVAO;for(l.bind(),a=0;a&lt;3;++a)for(e.lineWidth(this.contourWidth[a]),s.uniforms.permutation=A[a],n=0;n&lt;this.contourLevels[a].length;++n)this._contourCounts[a][n]&amp;&amp;(s.uniforms.height=this.contourLevels[a][n],l.draw(e.LINES,this._contourCounts[a][n],this._contourOffsets[a][n]));for(n=0;n&lt;3;++n)for(s.uniforms.model=o.projections[n],s.uniforms.clipBounds=o.clipBounds[n],a=0;a&lt;3;++a)if(this.contourProject[n][a]){s.uniforms.permutation=A[a],e.lineWidth(this.contourWidth[a]);for(var c=0;c&lt;this.contourLevels[a].length;++c)this._contourCounts[a][c]&amp;&amp;(s.uniforms.height=this.contourLevels[a][c],l.draw(e.LINES,this._contourCounts[a][c],this._contourOffsets[a][c]))}l.unbind()}},C.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]&gt;&gt;4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&amp;t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u&lt;2;++u)for(var f=u?a:1-a,h=0;h&lt;2;++h)for(var p=i+u,d=s+h,m=f*(h?l:1-l),v=0;v&lt;3;++v)c[v]+=this._field[v].get(p,d)*m;for(var y=this._pickResult.level,x=0;x&lt;3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]&lt;0)this.contourLevels[x].length&gt;0&amp;&amp;(y[x]=0);else if(y[x]&lt;this.contourLevels[x].length-1){var b=this.contourLevels[x][y[x]],_=this.contourLevels[x][y[x]+1];Math.abs(b-c[x])&gt;Math.abs(_-c[x])&amp;&amp;(y[x]+=1)}for(r.index[0]=a&lt;.5?i:i+1,r.index[1]=l&lt;.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v&lt;3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},C.update=function(t){t=t||{},this.dirty=!0,&quot;contourWidth&quot;in t&amp;&amp;(this.contourWidth=N(t.contourWidth,Number)),&quot;showContour&quot;in t&amp;&amp;(this.showContour=N(t.showContour,Boolean)),&quot;showSurface&quot;in t&amp;&amp;(this.showSurface=!!t.showSurface),&quot;contourTint&quot;in t&amp;&amp;(this.contourTint=N(t.contourTint,Boolean)),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=V(t.contourColor)),&quot;contourProject&quot;in t&amp;&amp;(this.contourProject=N(t.contourProject,function(t){return N(t,Boolean)})),&quot;surfaceProject&quot;in t&amp;&amp;(this.surfaceProject=t.surfaceProject),&quot;dynamicColor&quot;in t&amp;&amp;(this.dynamicColor=V(t.dynamicColor)),&quot;dynamicTint&quot;in t&amp;&amp;(this.dynamicTint=N(t.dynamicTint,Number)),&quot;dynamicWidth&quot;in t&amp;&amp;(this.dynamicWidth=N(t.dynamicWidth,Number)),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;colorBounds&quot;in t&amp;&amp;(this.colorBounds=t.colorBounds),&quot;vertexColor&quot;in t&amp;&amp;(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&amp;&amp;t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),&quot;field&quot;in t||&quot;coords&quot;in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i&gt;this._field[2].data.length&amp;&amp;(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),F(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o&lt;2;++o)this._field[2].size&gt;this._field[o].data.length&amp;&amp;(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error(&quot;gl-surface: invalid coordinates for x/y&quot;);for(o=0;o&lt;2;++o){var d=p[o];for(b=0;b&lt;2;++b)if(d.shape[b]!==a[b])throw new Error(&quot;gl-surface: coords have incorrect shape&quot;);F(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error(&quot;gl-surface: invalid ticks&quot;);for(o=0;o&lt;2;++o){var v=g[o];if((Array.isArray(v)||v.length)&amp;&amp;(v=f(v)),v.shape[0]!==a[o])throw new Error(&quot;gl-surface: invalid tick length&quot;);var y=f(v.data,a);y.stride[o]=v.stride[0],y.stride[1^o]=0,F(this._field[o],y)}}else{for(o=0;o&lt;2;++o){var x=[0,0];x[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b&lt;a[0];++b)this._field[0].set(b+1,0,b);for(this._field[0].set(a[0]+1,0,a[0]-1),this._field[1].set(0,0,0),b=0;b&lt;a[1];++b)this._field[1].set(0,b+1,b);this._field[1].set(0,a[1]+1,a[1]-1)}var _=this._field,w=f(s.mallocFloat(3*_[2].size*2),[3,a[0]+2,a[1]+2,2]);for(o=0;o&lt;3;++o)m(w.pick(o),_[o],&quot;mirror&quot;);var k=f(s.mallocFloat(3*_[2].size),[a[0]+2,a[1]+2,3]);for(o=0;o&lt;a[0]+2;++o)for(b=0;b&lt;a[1]+2;++b){var A=w.get(0,o,b,0),T=w.get(0,o,b,1),E=w.get(1,o,b,0),C=w.get(1,o,b,1),L=w.get(2,o,b,0),z=w.get(2,o,b,1),P=E*z-C*L,O=L*T-z*A,I=A*C-T*E,D=Math.sqrt(P*P+O*O+I*I);D&lt;1e-8?(D=Math.max(Math.abs(P),Math.abs(O),Math.abs(I)))&lt;1e-8?(I=1,O=P=0,D=1):D=1/D:D=1/Math.sqrt(D),k.set(o,b,0,P*D),k.set(o,b,1,O*D),k.set(o,b,2,I*D)}s.free(w.data);var R=[1/0,1/0,1/0],B=[-1/0,-1/0,-1/0],j=1/0,U=-1/0,q=(a[0]-1)*(a[1]-1)*6,H=s.mallocFloat(n.nextPow2(10*q)),G=0,W=0;for(o=0;o&lt;a[0]-1;++o)t:for(b=0;b&lt;a[1]-1;++b){for(var Y=0;Y&lt;2;++Y)for(var X=0;X&lt;2;++X)for(var Z=0;Z&lt;3;++Z){var $=this._field[Z].get(1+o+Y,1+b+X);if(isNaN($)||!isFinite($))continue t}for(Z=0;Z&lt;6;++Z){var J=o+M[Z][0],K=b+M[Z][1],Q=this._field[0].get(J+1,K+1),tt=this._field[1].get(J+1,K+1),et=$=this._field[2].get(J+1,K+1);P=k.get(J+1,K+1,0),O=k.get(J+1,K+1,1),I=k.get(J+1,K+1,2),t.intensity&amp;&amp;(et=t.intensity.get(J,K)),H[G++]=J,H[G++]=K,H[G++]=Q,H[G++]=tt,H[G++]=$,H[G++]=0,H[G++]=et,H[G++]=P,H[G++]=O,H[G++]=I,R[0]=Math.min(R[0],Q),R[1]=Math.min(R[1],tt),R[2]=Math.min(R[2],$),j=Math.min(j,et),B[0]=Math.max(B[0],Q),B[1]=Math.max(B[1],tt),B[2]=Math.max(B[2],$),U=Math.max(U,et),W+=1}}for(t.intensityBounds&amp;&amp;(j=+t.intensityBounds[0],U=+t.intensityBounds[1]),o=6;o&lt;G;o+=10)H[o]=(H[o]-j)/(U-j);this._vertexCount=W,this._coordinateBuffer.update(H.subarray(0,G)),s.freeFloat(H),s.free(k.data),this.bounds=[R,B],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===j&amp;&amp;this.intensityBounds[1]===U||(r=!0),this.intensityBounds=[j,U]}if(&quot;levels&quot;in t){var rt=t.levels;for(rt=Array.isArray(rt[0])?rt.slice():[[],[],rt],o=0;o&lt;3;++o)rt[o]=rt[o].slice(),rt.sort(function(t,e){return t-e});t:for(o=0;o&lt;3;++o){if(rt[o].length!==this.contourLevels[o].length){r=!0;break}for(b=0;b&lt;rt[o].length;++b)if(rt[o][b]!==this.contourLevels[o][b]){r=!0;break t}}this.contourLevels=rt}if(r){_=this._field,a=this.shape;for(var nt=[],it=0;it&lt;3;++it){rt=this.contourLevels[it];var at=[],ot=[],st=[0,0,0];for(o=0;o&lt;rt.length;++o){var lt=h(this._field[it],rt[o]);at.push(nt.length/5|0),W=0;t:for(b=0;b&lt;lt.cells.length;++b){var ct=lt.cells[b];for(Z=0;Z&lt;2;++Z){var ut=lt.positions[ct[Z]],ft=ut[0],ht=0|Math.floor(ft),pt=ft-ht,dt=ut[1],gt=0|Math.floor(dt),mt=dt-gt,vt=!1;e:for(var yt=0;yt&lt;3;++yt){st[yt]=0;var xt=(it+yt+1)%3;for(Y=0;Y&lt;2;++Y){var bt=Y?pt:1-pt;for(J=0|Math.min(Math.max(ht+Y,0),a[0]),X=0;X&lt;2;++X){var _t=X?mt:1-mt;if(K=0|Math.min(Math.max(gt+X,0),a[1]),$=yt&lt;2?this._field[xt].get(J,K):(this.intensity.get(J,K)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite($)||isNaN($)){vt=!0;break e}var wt=bt*_t;st[yt]+=wt*$}}}if(vt){if(Z&gt;0){for(var kt=0;kt&lt;5;++kt)nt.pop();W-=1}continue t}nt.push(st[0],st[1],ut[0],ut[1],st[2]),W+=1}}ot.push(W)}this._contourOffsets[it]=at,this._contourCounts[it]=ot}var Mt=s.mallocFloat(nt.length);for(o=0;o&lt;nt.length;++o)Mt[o]=nt[o];this._contourBuffer.update(Mt),s.freeFloat(Mt)}t.colormap&amp;&amp;this._colorMap.setPixels(function(t){var e=u([l({colormap:t,nshades:S,format:&quot;rgba&quot;}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return c.divseq(e,255),e}(t.colormap))},C.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t&lt;3;++t)s.freeFloat(this._field[t].data)},C.highlight=function(t){if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(var e=0;e&lt;3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;var r;if(r=this.snapToData?t.dataCoordinate:t.position,this.enableDynamic[0]&amp;&amp;r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&amp;&amp;r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&amp;&amp;r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o&lt;3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,c=(o+2)%3,u=this._field[o],f=this._field[l],p=this._field[c],d=(this.intensity,h(u,r[o])),g=d.cells,m=d.positions;for(this._dynamicOffsets[o]=n,e=0;e&lt;g.length;++e)for(var v=g[e],y=0;y&lt;2;++y){var x=m[v[y]],b=+x[0],_=0|b,w=0|Math.min(_+1,i[0]),k=b-_,M=1-k,A=+x[1],T=0|A,S=0|Math.min(T+1,i[1]),E=A-T,C=1-E,L=M*C,z=M*E,P=k*C,O=k*E,I=L*f.get(_,T)+z*f.get(_,S)+P*f.get(w,T)+O*f.get(w,S),D=L*p.get(_,T)+z*p.get(_,S)+P*p.get(w,T)+O*p.get(w,S);if(isNaN(I)||isNaN(D)){y&amp;&amp;(n-=1);break}a[2*n+0]=I,a[2*n+1]=D,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),s.freeFloat(a)}}},{&quot;./lib/shaders&quot;:300,&quot;binary-search-bounds&quot;:78,&quot;bit-twiddle&quot;:79,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,&quot;ndarray-gradient&quot;:421,&quot;ndarray-ops&quot;:424,&quot;ndarray-pack&quot;:425,&quot;surface-nets&quot;:505,&quot;typedarray-pool&quot;:519}],302:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;css-font&quot;),i=t(&quot;pick-by-alias&quot;),a=t(&quot;regl&quot;),o=t(&quot;gl-util/context&quot;),s=t(&quot;es6-weak-map&quot;),l=t(&quot;color-normalize&quot;),c=t(&quot;font-atlas&quot;),u=t(&quot;typedarray-pool&quot;),f=t(&quot;parse-rect&quot;),h=t(&quot;is-plain-obj&quot;),p=t(&quot;parse-unit&quot;),d=t(&quot;to-px&quot;),g=t(&quot;detect-kerning&quot;),m=t(&quot;object-assign&quot;),v=t(&quot;font-measure&quot;),y=t(&quot;flatten-vertex-data&quot;),x=t(&quot;bit-twiddle&quot;).nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement(&quot;div&quot;));w.style.font=&quot;italic small-caps bold condensed 16px/2 cursive&quot;,getComputedStyle(w).fontStretch&amp;&amp;(_=!0),document.body.removeChild(w)}var k=function(t){!function(t){return&quot;function&quot;==typeof t&amp;&amp;t._gl&amp;&amp;t.prop&amp;&amp;t.texture&amp;&amp;t.buffer}(t)?this.gl=o(t):(t={regl:t},this.gl=t.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:&quot;uint8&quot;,usage:&quot;stream&quot;}),this.sizeBuffer=this.regl.buffer({type:&quot;float&quot;,usage:&quot;stream&quot;}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},stencil:{enable:!1},depth:{enable:!1},count:t.prop(&quot;count&quot;),offset:t.prop(&quot;offset&quot;),attributes:{charOffset:{offset:4,stride:8,buffer:t.this(&quot;sizeBuffer&quot;)},width:{offset:0,stride:8,buffer:t.this(&quot;sizeBuffer&quot;)},char:t.this(&quot;charBuffer&quot;),position:t.this(&quot;position&quot;)},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop(&quot;color&quot;),opacity:t.prop(&quot;opacity&quot;),viewport:t.this(&quot;viewportArray&quot;),scale:t.this(&quot;scale&quot;),align:t.prop(&quot;align&quot;),baseline:t.prop(&quot;baseline&quot;),translate:t.this(&quot;translate&quot;),positionOffset:t.prop(&quot;positionOffset&quot;)},primitive:&quot;points&quot;,viewport:t.this(&quot;viewport&quot;),vert:&quot;\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\t&quot;+(k.normalViewport?&quot;&quot;:&quot;vec2 positionOffset = vec2(positionOffset.x,- positionOffset.y);&quot;)+&quot;\n\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ positionOffset))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\t&quot;+(k.normalViewport?&quot;position.y = 1. - position.y;&quot;:&quot;&quot;)+&quot;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}&quot;,frag:&quot;\n\t\t\tprecision highp float;\n\t\t\tuniform sampler2D atlas;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) &gt; halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) &lt; halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}&quot;});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if(&quot;string&quot;==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:&quot;position positions coord coords coordinates&quot;,font:&quot;font fontFace fontface typeface cssFont css-font family fontFamily&quot;,fontSize:&quot;fontSize fontsize size font-size&quot;,text:&quot;text texts chars characters value values symbols&quot;,align:&quot;align alignment textAlign textbaseline&quot;,baseline:&quot;baseline textBaseline textbaseline&quot;,direction:&quot;dir direction textDirection&quot;,color:&quot;color colour fill fill-color fillColor textColor textcolor&quot;,kerning:&quot;kerning kern&quot;,range:&quot;range dataBox&quot;,viewport:&quot;vp viewport viewBox viewbox viewPort&quot;,opacity:&quot;opacity alpha transparency visible visibility opaque&quot;,offset:&quot;offset positionOffset padding shift indent indentation&quot;},!0)).opacity&amp;&amp;(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(t){return parseFloat(t)}):this.opacity=parseFloat(t.opacity)),null!=t.viewport&amp;&amp;(this.viewport=f(t.viewport),k.normalViewport&amp;&amp;(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&amp;&amp;(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&amp;&amp;(this.kerning=t.kerning),null!=t.offset&amp;&amp;(&quot;number&quot;==typeof t.offset&amp;&amp;(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&amp;&amp;(this.direction=t.direction),t.range&amp;&amp;(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&amp;&amp;(this.scale=t.scale),t.translate&amp;&amp;(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+&quot;px sans-serif&quot;);var r,a=!1,o=!1;if(t.font&amp;&amp;(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if(&quot;string&quot;==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+&quot;px &quot;+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&amp;&amp;(o=!0,e.fontSize[r]=l),!(e.font[r]&amp;&amp;i==e.font[r].baseString||(a=!0,e.font[r]=k.fonts[i],e.font[r]))){var c=t.family.join(&quot;, &quot;),u=[t.style];t.style!=t.variant&amp;&amp;u.push(t.variant),t.variant!=t.weight&amp;&amp;u.push(t.weight),_&amp;&amp;t.weight!=t.stretch&amp;&amp;u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(c,{origin:&quot;top&quot;,fontSize:k.baseFontSize,fontStyle:u.join(&quot; &quot;)})},k.fonts[i]=e.font[r]}}),(a||o)&amp;&amp;this.font.forEach(function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&amp;&amp;(t.text=e.text)}),&quot;string&quot;==typeof t.text&amp;&amp;t.position&amp;&amp;t.position.length&gt;2){for(var s=Array(.5*t.position.length),h=0;h&lt;s.length;h++)s[h]=t.text;t.text=s}if(null!=t.text||a){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var b=1;b&lt;t.text.length;b++)e.textOffsets[b]=e.textOffsets[b-1]+t.text[b-1].length,e.count+=t.text[b].length,e.counts.push(t.text[b].length);this.text=t.text.join(&quot;&quot;)}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];r=[],this.font.forEach(function(t,n){k.atlasContext.font=t.baseString;for(var i=e.fontAtlas[n],a=0;a&lt;e.text.length;a++){var o=e.text.charAt(a);if(null==i.ids[o]&amp;&amp;(i.ids[o]=i.chars.length,i.chars.push(o),r.push(o)),null==t.width[o]&amp;&amp;(t.width[o]=k.atlasContext.measureText(o).width/k.baseFontSize,e.kerning)){var s=[];for(var l in t.width)s.push(l+o,o+l);m(t.kerning,g(t.family,{pairs:s}))}}})}if(t.position)if(t.position.length&gt;2){for(var w=!t.position[0].length,M=u.mallocFloat(2*this.count),A=0,T=0;A&lt;this.counts.length;A++){var S=e.counts[A];if(w)for(var E=0;E&lt;S;E++)M[T++]=t.position[2*A],M[T++]=t.position[2*A+1];else for(var C=0;C&lt;S;C++)M[T++]=t.position[A][0],M[T++]=t.position[A][1]}this.position.call?this.position({type:&quot;float&quot;,data:M}):this.position=this.regl.buffer({type:&quot;float&quot;,data:M}),u.freeFloat(M)}else this.position.destroy&amp;&amp;this.position.destroy(),this.position={constant:t.position};if(t.text||a){var L=u.mallocUint8(this.count),z=u.mallocFloat(2*this.count);this.textWidth=[];for(var P=0,O=0;P&lt;this.counts.length;P++){for(var I=e.counts[P],D=e.font[P]||e.font[0],R=e.fontAtlas[P]||e.fontAtlas[0],B=0;B&lt;I;B++){var F=e.text.charAt(O),N=e.text.charAt(O-1);if(L[O]=R.ids[F],z[2*O]=D.width[F],B){var j=z[2*O-2],V=z[2*O],U=z[2*O-1]+.5*j+.5*V;if(e.kerning){var q=D.kerning[N+F];q&amp;&amp;(U+=.001*q)}z[2*O+1]=U}else z[2*O+1]=.5*z[2*O];O++}e.textWidth.push(z.length?.5*z[2*O-2]+z[2*O-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:L,type:&quot;uint8&quot;,usage:&quot;stream&quot;}),this.sizeBuffer({data:z,type:&quot;float&quot;,usage:&quot;stream&quot;}),u.freeUint8(L),u.freeFloat(z),r.length&amp;&amp;this.font.forEach(function(t,r){var n=e.fontAtlas[r],i=n.step,a=Math.floor(k.maxAtlasSize/i),o=Math.min(a,n.chars.length),s=Math.ceil(n.chars.length/o),l=x(o*i),u=x(s*i);n.width=l,n.height=u,n.rows=s,n.cols=o,n.em&amp;&amp;n.texture({data:c({canvas:k.atlasCanvas,font:n.fontString,chars:n.chars,shape:[l,u],step:[i,i]})})})}if(t.align&amp;&amp;(this.align=t.align,this.alignOffset=this.textWidth.map(function(t,r){var n=Array.isArray(e.align)?e.align.length&gt;1?e.align[r]:e.align[0]:e.align;if(&quot;number&quot;==typeof n)return n;switch(n){case&quot;right&quot;:case&quot;end&quot;:return-t;case&quot;center&quot;:case&quot;centre&quot;:case&quot;middle&quot;:return.5*-t}return 0})),null==this.baseline&amp;&amp;null==t.baseline&amp;&amp;(t.baseline=0),null!=t.baseline&amp;&amp;(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,i+=&quot;number&quot;==typeof t?t-n.baseline:-n[t],k.normalViewport||(i*=-1),i})),null!=t.color)if(t.color||(t.color=&quot;transparent&quot;),&quot;string&quot;!=typeof t.color&amp;&amp;isNaN(t.color)){var H;if(&quot;number&quot;==typeof t.color[0]&amp;&amp;t.color.length&gt;this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var W=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y&lt;G;Y+=4)H.set(l(W(Y,Y+4),&quot;uint8&quot;),Y)}else{var X=t.color.length;H=u.mallocUint8(4*X);for(var Z=0;Z&lt;X;Z++)H.set(l(t.color[Z]||0,&quot;uint8&quot;),4*Z)}this.color=H}else this.color=l(t.color,&quot;uint8&quot;);if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity)if(this.color.length&gt;4||this.baselineOffset.length&gt;1||this.align&amp;&amp;this.align.length&gt;1||this.fontAtlas.length&gt;1||this.positionOffset.length&gt;2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var J=0;J&lt;this.batch.length;J++)e.batch[J]={count:e.counts.length&gt;1?e.counts[J]:e.counts[0],offset:e.textOffsets.length&gt;1?e.textOffsets[J]:e.textOffsets[0],color:e.color?e.color.length&lt;=4?e.color:e.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(e.opacity)?e.opacity[J]:e.opacity,baseline:null!=e.baselineOffset[J]?e.baselineOffset[J]:e.baselineOffset[0],align:e.align?null!=e.alignOffset[J]?e.alignOffset[J]:e.alignOffset[0]:0,atlas:e.fontAtlas[J]||e.fontAtlas[0],positionOffset:e.positionOffset.length&gt;2?e.positionOffset.subarray(2*J,2*J+2):e.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text=&quot;&quot;,k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement(&quot;canvas&quot;),k.atlasContext=k.atlasCanvas.getContext(&quot;2d&quot;,{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{&quot;bit-twiddle&quot;:79,&quot;color-normalize&quot;:107,&quot;css-font&quot;:126,&quot;detect-kerning&quot;:150,&quot;es6-weak-map&quot;:208,&quot;flatten-vertex-data&quot;:215,&quot;font-atlas&quot;:216,&quot;font-measure&quot;:217,&quot;gl-util/context&quot;:304,&quot;is-plain-obj&quot;:403,&quot;object-assign&quot;:434,&quot;parse-rect&quot;:439,&quot;parse-unit&quot;:441,&quot;pick-by-alias&quot;:445,regl:475,&quot;to-px&quot;:513,&quot;typedarray-pool&quot;:519}],303:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray&quot;),i=t(&quot;ndarray-ops&quot;),a=t(&quot;typedarray-pool&quot;);e.exports=function(t){if(arguments.length&lt;=1)throw new Error(&quot;gl-texture2d: Missing arguments for texture2d constructor&quot;);o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if(&quot;number&quot;==typeof arguments[1])return m(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return m(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(&quot;object&quot;==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new h(t,o,r,n,i,a)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&amp;&amp;e.data&amp;&amp;e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]&lt;0||o[0]&gt;s||o[1]&lt;0||o[1]&gt;s)throw new Error(&quot;gl-texture2d: Invalid texture size&quot;);var l=d(o,e.stride.slice()),c=0;&quot;float32&quot;===r?c=t.FLOAT:&quot;float64&quot;===r?(c=t.FLOAT,l=!1,r=&quot;float32&quot;):&quot;uint8&quot;===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r=&quot;uint8&quot;);var f,p,m=0;if(2===o.length)m=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error(&quot;gl-texture2d: Invalid shape for texture&quot;);if(1===o[2])m=t.ALPHA;else if(2===o[2])m=t.LUMINANCE_ALPHA;else if(3===o[2])m=t.RGB;else{if(4!==o[2])throw new Error(&quot;gl-texture2d: Invalid shape for pixel coords&quot;);m=t.RGBA}}c!==t.FLOAT||t.getExtension(&quot;OES_texture_float&quot;)||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)f=0===e.offset&amp;&amp;e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var y=[o[2],o[2]*o[0],1];p=a.malloc(v,r);var x=n(p,o,y,0);&quot;float32&quot;!==r&amp;&amp;&quot;float64&quot;!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):u(x,e),f=p.subarray(0,v)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,m,o[0],o[1],0,m,c,f),l||a.free(p);return new h(t,b,o[0],o[1],m,c)}(t,e)}throw new Error(&quot;gl-texture2d: Invalid arguments for texture2d constructor&quot;)};var o=null,s=null,l=null;function c(t){return&quot;undefined&quot;!=typeof HTMLCanvasElement&amp;&amp;t instanceof HTMLCanvasElement||&quot;undefined&quot;!=typeof HTMLImageElement&amp;&amp;t instanceof HTMLImageElement||&quot;undefined&quot;!=typeof HTMLVideoElement&amp;&amp;t instanceof HTMLVideoElement||&quot;undefined&quot;!=typeof ImageData&amp;&amp;t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function f(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e&lt;0||e&gt;i||r&lt;0||r&gt;i)throw new Error(&quot;gl-texture2d: Invalid texture size&quot;);return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=h.prototype;function d(t,e){return 3===t.length?1===e[2]&amp;&amp;e[1]===t[0]*t[2]&amp;&amp;e[0]===t[2]:1===e[0]&amp;&amp;e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function m(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e&lt;0||e&gt;a||r&lt;0||r&gt;a)throw new Error(&quot;gl-texture2d: Invalid texture shape&quot;);if(i===t.FLOAT&amp;&amp;!t.getExtension(&quot;OES_texture_float&quot;))throw new Error(&quot;gl-texture2d: Floating point textures not supported on this platform&quot;);var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,o,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&amp;&amp;o.indexOf(t)&gt;=0&amp;&amp;(e.getExtension(&quot;OES_texture_float_linear&quot;)||(t=e.NEAREST)),s.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown filter mode &quot;+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&amp;&amp;o.indexOf(t)&gt;=0&amp;&amp;(e.getExtension(&quot;OES_texture_float_linear&quot;)||(t=e.NEAREST)),s.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown filter mode &quot;+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension(&quot;EXT_texture_filter_anisotropic&quot;);r&amp;&amp;this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown wrap mode &quot;+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown wrap mode &quot;+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error(&quot;gl-texture2d: Must specify wrap mode for rows and columns&quot;);for(var e=0;e&lt;2;++e)if(l.indexOf(t[e])&lt;0)throw new Error(&quot;gl-texture2d: Unknown wrap mode &quot;+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error(&quot;gl-texture2d: Invalid texture shape&quot;)}else t=[0|t,0|t];return f(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return f(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,f(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&amp;&amp;e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t&gt;0;++e,t&gt;&gt;&gt;=1)this._mipLevels.indexOf(e)&lt;0&amp;&amp;this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)&lt;0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&amp;&amp;t.stride&amp;&amp;t.data))throw new Error(&quot;gl-texture2d: Unsupported data type&quot;);if(t.shape.length&lt;2||e+t.shape[1]&gt;this._shape[1]&gt;&gt;&gt;o||r+t.shape[0]&gt;this._shape[0]&gt;&gt;&gt;o||e&lt;0||r&lt;0)throw new Error(&quot;gl-texture2d: Texture dimensions are out of bounds&quot;);!function(t,e,r,o,s,l,c,f){var h=f.dtype,p=f.shape.slice();if(p.length&lt;2||p.length&gt;3)throw new Error(&quot;gl-texture2d: Invalid ndarray, must be 2d or 3d&quot;);var g=0,m=0,v=d(p,f.stride.slice());&quot;float32&quot;===h?g=t.FLOAT:&quot;float64&quot;===h?(g=t.FLOAT,v=!1,h=&quot;float32&quot;):&quot;uint8&quot;===h?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,v=!1,h=&quot;uint8&quot;);if(2===p.length)m=t.LUMINANCE,p=[p[0],p[1],1],f=n(f.data,p,[f.stride[0],f.stride[1],1],f.offset);else{if(3!==p.length)throw new Error(&quot;gl-texture2d: Invalid shape for texture&quot;);if(1===p[2])m=t.ALPHA;else if(2===p[2])m=t.LUMINANCE_ALPHA;else if(3===p[2])m=t.RGB;else{if(4!==p[2])throw new Error(&quot;gl-texture2d: Invalid shape for pixel coords&quot;);m=t.RGBA}p[2]}m!==t.LUMINANCE&amp;&amp;m!==t.ALPHA||s!==t.LUMINANCE&amp;&amp;s!==t.ALPHA||(m=s);if(m!==s)throw new Error(&quot;gl-texture2d: Incompatible texture format for setPixels&quot;);var y=f.size,x=c.indexOf(o)&lt;0;x&amp;&amp;c.push(o);if(g===l&amp;&amp;v)0===f.offset&amp;&amp;f.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data.subarray(f.offset,f.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data.subarray(f.offset,f.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&amp;&amp;l===t.UNSIGNED_BYTE?u(_,f):i.assign(_,f),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:430,&quot;ndarray-ops&quot;:424,&quot;typedarray-pool&quot;:519}],304:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;pick-by-alias&quot;);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return&quot;function&quot;==typeof t.getContext&amp;&amp;&quot;width&quot;in t&amp;&amp;&quot;height&quot;in t}e.exports=function(t){var e;if(t?&quot;string&quot;==typeof t&amp;&amp;(t={container:t}):t={},a(t)?t={container:t}:t=&quot;string&quot;==typeof(e=t).nodeName&amp;&amp;&quot;function&quot;==typeof e.appendChild&amp;&amp;&quot;function&quot;==typeof e.getBoundingClientRect?{container:t}:function(t){return&quot;function&quot;==typeof t.drawArrays||&quot;function&quot;==typeof t.drawElements}(t)?{gl:t}:n(t,{container:&quot;container target element el canvas holder parent parentNode wrapper use ref root node&quot;,gl:&quot;gl context webgl glContext&quot;,attrs:&quot;attributes attrs contextAttributes&quot;,pixelRatio:&quot;pixelRatio pxRatio px ratio pxratio pixelratio&quot;},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&amp;&amp;(t.container=t.canvas.parentNode),t.container){if(&quot;string&quot;==typeof t.container){var r=document.querySelector(t.container);if(!r)throw Error(&quot;Element &quot;+t.container+&quot; is not found&quot;);t.container=r}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=document.createElement(&quot;canvas&quot;),t.container.appendChild(t.canvas),i(t))}else t.canvas||(t.container=document.body||document.documentElement,t.canvas=document.createElement(&quot;canvas&quot;),t.canvas.style.position=&quot;absolute&quot;,t.canvas.style.top=0,t.canvas.style.left=0,t.container.appendChild(t.canvas),i(t));if(!t.gl)try{t.gl=t.canvas.getContext(&quot;webgl&quot;,t.attrs)}catch(e){try{t.gl=t.canvas.getContext(&quot;experimental-webgl&quot;,t.attrs)}catch(e){t.gl=t.canvas.getContext(&quot;webgl-experimental&quot;,t.attrs)}}return t.gl}},{&quot;pick-by-alias&quot;:445}],305:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length&gt;n)throw new Error(&quot;gl-vao: Too many vertex attributes&quot;);for(var i=0;i&lt;r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,c=!!a.normalized,u=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,c,u,f)}else{if(&quot;number&quot;==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error(&quot;gl-vao: Invalid vertex attribute&quot;);t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i&lt;n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i&lt;n;++i)t.disableVertexAttribArray(i)}},{}],306:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./do-bind.js&quot;);function i(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},i.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t){return new i(t)}},{&quot;./do-bind.js&quot;:305}],307:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./do-bind.js&quot;);function i(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function a(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},a.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t&lt;this._attribs.length;++t)this._attribs[t].bind(this.gl)},a.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},a.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},a.prototype.update=function(t,e,r){if(this.bind(),n(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var a=0;a&lt;t.length;++a){var o=t[a];&quot;number&quot;==typeof o?this._attribs.push(new i(a,1,o)):Array.isArray(o)&amp;&amp;this._attribs.push(new i(a,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},a.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t,e){return new a(t,e,e.createVertexArrayOES())}},{&quot;./do-bind.js&quot;:305}],308:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/vao-native.js&quot;),i=t(&quot;./lib/vao-emulated.js&quot;);function a(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}e.exports=function(t,e,r,o){var s,l=t.createVertexArray?new a(t):t.getExtension(&quot;OES_vertex_array_object&quot;);return(s=l?n(t,l):i(t)).update(e,r,o),s}},{&quot;./lib/vao-emulated.js&quot;:306,&quot;./lib/vao-native.js&quot;:307}],309:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}},{}],310:[function(t,e,r){e.exports=function(t,e){var r=n(t[0],t[1],t[2]),o=n(e[0],e[1],e[2]);i(r,r),i(o,o);var s=a(r,o);return s&gt;1?0:Math.acos(s)};var n=t(&quot;./fromValues&quot;),i=t(&quot;./normalize&quot;),a=t(&quot;./dot&quot;)},{&quot;./dot&quot;:320,&quot;./fromValues&quot;:326,&quot;./normalize&quot;:337}],311:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],312:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],313:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],314:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],315:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],316:[function(t,e,r){e.exports=t(&quot;./distance&quot;)},{&quot;./distance&quot;:317}],317:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],318:[function(t,e,r){e.exports=t(&quot;./divide&quot;)},{&quot;./divide&quot;:319}],319:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],320:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],321:[function(t,e,r){e.exports=1e-6},{}],322:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)&lt;=n*Math.max(1,Math.abs(r),Math.abs(o))&amp;&amp;Math.abs(i-s)&lt;=n*Math.max(1,Math.abs(i),Math.abs(s))&amp;&amp;Math.abs(a-l)&lt;=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t(&quot;./epsilon&quot;)},{&quot;./epsilon&quot;:321}],323:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]}},{}],324:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],325:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s&lt;l;s+=e)n[0]=t[s],n[1]=t[s+1],n[2]=t[s+2],a(n,n,o),t[s]=n[0],t[s+1]=n[1],t[s+2]=n[2];return t};var n=t(&quot;./create&quot;)()},{&quot;./create&quot;:314}],326:[function(t,e,r){e.exports=function(t,e,r){var n=new Float32Array(3);return n[0]=t,n[1]=e,n[2]=r,n}},{}],327:[function(t,e,r){e.exports={EPSILON:t(&quot;./epsilon&quot;),create:t(&quot;./create&quot;),clone:t(&quot;./clone&quot;),angle:t(&quot;./angle&quot;),fromValues:t(&quot;./fromValues&quot;),copy:t(&quot;./copy&quot;),set:t(&quot;./set&quot;),equals:t(&quot;./equals&quot;),exactEquals:t(&quot;./exactEquals&quot;),add:t(&quot;./add&quot;),subtract:t(&quot;./subtract&quot;),sub:t(&quot;./sub&quot;),multiply:t(&quot;./multiply&quot;),mul:t(&quot;./mul&quot;),divide:t(&quot;./divide&quot;),div:t(&quot;./div&quot;),min:t(&quot;./min&quot;),max:t(&quot;./max&quot;),floor:t(&quot;./floor&quot;),ceil:t(&quot;./ceil&quot;),round:t(&quot;./round&quot;),scale:t(&quot;./scale&quot;),scaleAndAdd:t(&quot;./scaleAndAdd&quot;),distance:t(&quot;./distance&quot;),dist:t(&quot;./dist&quot;),squaredDistance:t(&quot;./squaredDistance&quot;),sqrDist:t(&quot;./sqrDist&quot;),length:t(&quot;./length&quot;),len:t(&quot;./len&quot;),squaredLength:t(&quot;./squaredLength&quot;),sqrLen:t(&quot;./sqrLen&quot;),negate:t(&quot;./negate&quot;),inverse:t(&quot;./inverse&quot;),normalize:t(&quot;./normalize&quot;),dot:t(&quot;./dot&quot;),cross:t(&quot;./cross&quot;),lerp:t(&quot;./lerp&quot;),random:t(&quot;./random&quot;),transformMat4:t(&quot;./transformMat4&quot;),transformMat3:t(&quot;./transformMat3&quot;),transformQuat:t(&quot;./transformQuat&quot;),rotateX:t(&quot;./rotateX&quot;),rotateY:t(&quot;./rotateY&quot;),rotateZ:t(&quot;./rotateZ&quot;),forEach:t(&quot;./forEach&quot;)}},{&quot;./add&quot;:309,&quot;./angle&quot;:310,&quot;./ceil&quot;:311,&quot;./clone&quot;:312,&quot;./copy&quot;:313,&quot;./create&quot;:314,&quot;./cross&quot;:315,&quot;./dist&quot;:316,&quot;./distance&quot;:317,&quot;./div&quot;:318,&quot;./divide&quot;:319,&quot;./dot&quot;:320,&quot;./epsilon&quot;:321,&quot;./equals&quot;:322,&quot;./exactEquals&quot;:323,&quot;./floor&quot;:324,&quot;./forEach&quot;:325,&quot;./fromValues&quot;:326,&quot;./inverse&quot;:328,&quot;./len&quot;:329,&quot;./length&quot;:330,&quot;./lerp&quot;:331,&quot;./max&quot;:332,&quot;./min&quot;:333,&quot;./mul&quot;:334,&quot;./multiply&quot;:335,&quot;./negate&quot;:336,&quot;./normalize&quot;:337,&quot;./random&quot;:338,&quot;./rotateX&quot;:339,&quot;./rotateY&quot;:340,&quot;./rotateZ&quot;:341,&quot;./round&quot;:342,&quot;./scale&quot;:343,&quot;./scaleAndAdd&quot;:344,&quot;./set&quot;:345,&quot;./sqrDist&quot;:346,&quot;./sqrLen&quot;:347,&quot;./squaredDistance&quot;:348,&quot;./squaredLength&quot;:349,&quot;./sub&quot;:350,&quot;./subtract&quot;:351,&quot;./transformMat3&quot;:352,&quot;./transformMat4&quot;:353,&quot;./transformQuat&quot;:354}],328:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},{}],329:[function(t,e,r){e.exports=t(&quot;./length&quot;)},{&quot;./length&quot;:330}],330:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},{}],331:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t}},{}],332:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}},{}],333:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}},{}],334:[function(t,e,r){e.exports=t(&quot;./multiply&quot;)},{&quot;./multiply&quot;:335}],335:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}},{}],336:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},{}],337:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;a&gt;0&amp;&amp;(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],338:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],339:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],340:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],341:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],342:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],343:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],344:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],345:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],346:[function(t,e,r){e.exports=t(&quot;./squaredDistance&quot;)},{&quot;./squaredDistance&quot;:348}],347:[function(t,e,r){e.exports=t(&quot;./squaredLength&quot;)},{&quot;./squaredLength&quot;:349}],348:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],349:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],350:[function(t,e,r){e.exports=t(&quot;./subtract&quot;)},{&quot;./subtract&quot;:351}],351:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],352:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],353:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],354:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t}},{}],355:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],356:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],357:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],358:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],359:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],360:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],361:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],362:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],363:[function(t,e,r){e.exports={create:t(&quot;./create&quot;),clone:t(&quot;./clone&quot;),fromValues:t(&quot;./fromValues&quot;),copy:t(&quot;./copy&quot;),set:t(&quot;./set&quot;),add:t(&quot;./add&quot;),subtract:t(&quot;./subtract&quot;),multiply:t(&quot;./multiply&quot;),divide:t(&quot;./divide&quot;),min:t(&quot;./min&quot;),max:t(&quot;./max&quot;),scale:t(&quot;./scale&quot;),scaleAndAdd:t(&quot;./scaleAndAdd&quot;),distance:t(&quot;./distance&quot;),squaredDistance:t(&quot;./squaredDistance&quot;),length:t(&quot;./length&quot;),squaredLength:t(&quot;./squaredLength&quot;),negate:t(&quot;./negate&quot;),inverse:t(&quot;./inverse&quot;),normalize:t(&quot;./normalize&quot;),dot:t(&quot;./dot&quot;),lerp:t(&quot;./lerp&quot;),random:t(&quot;./random&quot;),transformMat4:t(&quot;./transformMat4&quot;),transformQuat:t(&quot;./transformQuat&quot;)}},{&quot;./add&quot;:355,&quot;./clone&quot;:356,&quot;./copy&quot;:357,&quot;./create&quot;:358,&quot;./distance&quot;:359,&quot;./divide&quot;:360,&quot;./dot&quot;:361,&quot;./fromValues&quot;:362,&quot;./inverse&quot;:364,&quot;./length&quot;:365,&quot;./lerp&quot;:366,&quot;./max&quot;:367,&quot;./min&quot;:368,&quot;./multiply&quot;:369,&quot;./negate&quot;:370,&quot;./normalize&quot;:371,&quot;./random&quot;:372,&quot;./scale&quot;:373,&quot;./scaleAndAdd&quot;:374,&quot;./set&quot;:375,&quot;./squaredDistance&quot;:376,&quot;./squaredLength&quot;:377,&quot;./subtract&quot;:378,&quot;./transformMat4&quot;:379,&quot;./transformQuat&quot;:380}],364:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],365:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],366:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],367:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],368:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],369:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],370:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],371:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o&gt;0&amp;&amp;(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],372:[function(t,e,r){var n=t(&quot;./normalize&quot;),i=t(&quot;./scale&quot;);e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{&quot;./normalize&quot;:371,&quot;./scale&quot;:373}],373:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],374:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],375:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],376:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],377:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],378:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],379:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],380:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t[3]=e[3],t}},{}],381:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],382:[function(t,e,r){var n=t(&quot;glsl-tokenizer&quot;),i=t(&quot;atob-lite&quot;);e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r&lt;e.length;r++){var a=e[r];if(&quot;preprocessor&quot;===a.type){var o=a.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(o&amp;&amp;o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},{&quot;atob-lite&quot;:59,&quot;glsl-tokenizer&quot;:389}],383:[function(t,e,r){e.exports=function(t){var e,r,k,M=0,A=0,T=l,S=[],E=[],C=1,L=0,z=0,P=!1,O=!1,I=&quot;&quot;,D=a,R=n;&quot;300 es&quot;===(t=t||{}).version&amp;&amp;(D=s,R=o);return function(t){return E=[],null!==t?function(t){var r;M=0,k=(I+=t).length;for(;e=I[M],M&lt;k;){switch(r=M,T){case u:M=V();break;case f:case h:M=j();break;case p:M=U();break;case d:M=G();break;case _:M=H();break;case g:M=W();break;case c:M=Y();break;case x:M=N();break;case l:M=F()}if(r!==M)switch(I[r]){case&quot;\n&quot;:L=0,++C;break;default:++L}}return A+=M,I=I.slice(M),E}(t.replace?t.replace(/\r\n/g,&quot;\n&quot;):t):function(t){S.length&amp;&amp;B(S.join(&quot;&quot;));return T=b,B(&quot;(eof)&quot;),E}()};function B(t){t.length&amp;&amp;E.push({type:w[T],data:t,position:z,line:C,column:L})}function F(){return S=S.length?[]:S,&quot;/&quot;===r&amp;&amp;&quot;*&quot;===e?(z=A+M-1,T=u,r=e,M+1):&quot;/&quot;===r&amp;&amp;&quot;/&quot;===e?(z=A+M-1,T=f,r=e,M+1):&quot;#&quot;===e?(T=h,z=A+M,M):/\s/.test(e)?(T=x,z=A+M,M):(P=/\d/.test(e),O=/[^\w_]/.test(e),z=A+M,T=P?d:O?p:c,M)}function N(){return/[^\s]/g.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function j(){return&quot;\r&quot;!==e&amp;&amp;&quot;\n&quot;!==e||&quot;\\&quot;===r?(S.push(e),r=e,M+1):(B(S.join(&quot;&quot;)),T=l,M)}function V(){return&quot;/&quot;===e&amp;&amp;&quot;*&quot;===r?(S.push(e),B(S.join(&quot;&quot;)),T=l,M+1):(S.push(e),r=e,M+1)}function U(){if(&quot;.&quot;===r&amp;&amp;/\d/.test(e))return T=g,M;if(&quot;/&quot;===r&amp;&amp;&quot;*&quot;===e)return T=u,M;if(&quot;/&quot;===r&amp;&amp;&quot;/&quot;===e)return T=f,M;if(&quot;.&quot;===e&amp;&amp;S.length){for(;q(S););return T=g,M}if(&quot;;&quot;===e||&quot;)&quot;===e||&quot;(&quot;===e){if(S.length)for(;q(S););return B(e),T=l,M+1}var t=2===S.length&amp;&amp;&quot;=&quot;!==e;if(/[\w_\d\s]/.test(e)||t){for(;q(S););return T=l,M}return S.push(e),r=e,M+1}function q(t){for(var e,r,n=0;;){if(e=i.indexOf(t.slice(0,t.length+n).join(&quot;&quot;)),r=i[e],-1===e){if(n--+t.length&gt;0)continue;r=t.slice(0,1).join(&quot;&quot;)}return B(r),z+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function G(){return&quot;.&quot;===e?(S.push(e),T=g,r=e,M+1):/[eE]/.test(e)?(S.push(e),T=g,r=e,M+1):&quot;x&quot;===e&amp;&amp;1===S.length&amp;&amp;&quot;0&quot;===S[0]?(T=_,S.push(e),r=e,M+1):/[^\d]/.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function W(){return&quot;f&quot;===e&amp;&amp;(S.push(e),r=e,M+=1),/[eE]/.test(e)?(S.push(e),r=e,M+1):&quot;-&quot;===e&amp;&amp;/[eE]/.test(r)?(S.push(e),r=e,M+1):/[^\d]/.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function Y(){if(/[^\d\w_]/.test(e)){var t=S.join(&quot;&quot;);return T=R.indexOf(t)&gt;-1?y:D.indexOf(t)&gt;-1?v:m,B(S.join(&quot;&quot;)),T=l,M}return S.push(e),r=e,M+1}};var n=t(&quot;./lib/literals&quot;),i=t(&quot;./lib/operators&quot;),a=t(&quot;./lib/builtins&quot;),o=t(&quot;./lib/literals-300es&quot;),s=t(&quot;./lib/builtins-300es&quot;),l=999,c=9999,u=0,f=1,h=2,p=3,d=4,g=5,m=6,v=7,y=8,x=9,b=10,_=11,w=[&quot;block-comment&quot;,&quot;line-comment&quot;,&quot;preprocessor&quot;,&quot;operator&quot;,&quot;integer&quot;,&quot;float&quot;,&quot;ident&quot;,&quot;builtin&quot;,&quot;keyword&quot;,&quot;whitespace&quot;,&quot;eof&quot;,&quot;integer&quot;]},{&quot;./lib/builtins&quot;:385,&quot;./lib/builtins-300es&quot;:384,&quot;./lib/literals&quot;:387,&quot;./lib/literals-300es&quot;:386,&quot;./lib/operators&quot;:388}],384:[function(t,e,r){var n=t(&quot;./builtins&quot;);n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat([&quot;gl_VertexID&quot;,&quot;gl_InstanceID&quot;,&quot;gl_Position&quot;,&quot;gl_PointSize&quot;,&quot;gl_FragCoord&quot;,&quot;gl_FrontFacing&quot;,&quot;gl_FragDepth&quot;,&quot;gl_PointCoord&quot;,&quot;gl_MaxVertexAttribs&quot;,&quot;gl_MaxVertexUniformVectors&quot;,&quot;gl_MaxVertexOutputVectors&quot;,&quot;gl_MaxFragmentInputVectors&quot;,&quot;gl_MaxVertexTextureImageUnits&quot;,&quot;gl_MaxCombinedTextureImageUnits&quot;,&quot;gl_MaxTextureImageUnits&quot;,&quot;gl_MaxFragmentUniformVectors&quot;,&quot;gl_MaxDrawBuffers&quot;,&quot;gl_MinProgramTexelOffset&quot;,&quot;gl_MaxProgramTexelOffset&quot;,&quot;gl_DepthRangeParameters&quot;,&quot;gl_DepthRange&quot;,&quot;trunc&quot;,&quot;round&quot;,&quot;roundEven&quot;,&quot;isnan&quot;,&quot;isinf&quot;,&quot;floatBitsToInt&quot;,&quot;floatBitsToUint&quot;,&quot;intBitsToFloat&quot;,&quot;uintBitsToFloat&quot;,&quot;packSnorm2x16&quot;,&quot;unpackSnorm2x16&quot;,&quot;packUnorm2x16&quot;,&quot;unpackUnorm2x16&quot;,&quot;packHalf2x16&quot;,&quot;unpackHalf2x16&quot;,&quot;outerProduct&quot;,&quot;transpose&quot;,&quot;determinant&quot;,&quot;inverse&quot;,&quot;texture&quot;,&quot;textureSize&quot;,&quot;textureProj&quot;,&quot;textureLod&quot;,&quot;textureOffset&quot;,&quot;texelFetch&quot;,&quot;texelFetchOffset&quot;,&quot;textureProjOffset&quot;,&quot;textureLodOffset&quot;,&quot;textureProjLod&quot;,&quot;textureProjLodOffset&quot;,&quot;textureGrad&quot;,&quot;textureGradOffset&quot;,&quot;textureProjGrad&quot;,&quot;textureProjGradOffset&quot;])},{&quot;./builtins&quot;:385}],385:[function(t,e,r){e.exports=[&quot;abs&quot;,&quot;acos&quot;,&quot;all&quot;,&quot;any&quot;,&quot;asin&quot;,&quot;atan&quot;,&quot;ceil&quot;,&quot;clamp&quot;,&quot;cos&quot;,&quot;cross&quot;,&quot;dFdx&quot;,&quot;dFdy&quot;,&quot;degrees&quot;,&quot;distance&quot;,&quot;dot&quot;,&quot;equal&quot;,&quot;exp&quot;,&quot;exp2&quot;,&quot;faceforward&quot;,&quot;floor&quot;,&quot;fract&quot;,&quot;gl_BackColor&quot;,&quot;gl_BackLightModelProduct&quot;,&quot;gl_BackLightProduct&quot;,&quot;gl_BackMaterial&quot;,&quot;gl_BackSecondaryColor&quot;,&quot;gl_ClipPlane&quot;,&quot;gl_ClipVertex&quot;,&quot;gl_Color&quot;,&quot;gl_DepthRange&quot;,&quot;gl_DepthRangeParameters&quot;,&quot;gl_EyePlaneQ&quot;,&quot;gl_EyePlaneR&quot;,&quot;gl_EyePlaneS&quot;,&quot;gl_EyePlaneT&quot;,&quot;gl_Fog&quot;,&quot;gl_FogCoord&quot;,&quot;gl_FogFragCoord&quot;,&quot;gl_FogParameters&quot;,&quot;gl_FragColor&quot;,&quot;gl_FragCoord&quot;,&quot;gl_FragData&quot;,&quot;gl_FragDepth&quot;,&quot;gl_FragDepthEXT&quot;,&quot;gl_FrontColor&quot;,&quot;gl_FrontFacing&quot;,&quot;gl_FrontLightModelProduct&quot;,&quot;gl_FrontLightProduct&quot;,&quot;gl_FrontMaterial&quot;,&quot;gl_FrontSecondaryColor&quot;,&quot;gl_LightModel&quot;,&quot;gl_LightModelParameters&quot;,&quot;gl_LightModelProducts&quot;,&quot;gl_LightProducts&quot;,&quot;gl_LightSource&quot;,&quot;gl_LightSourceParameters&quot;,&quot;gl_MaterialParameters&quot;,&quot;gl_MaxClipPlanes&quot;,&quot;gl_MaxCombinedTextureImageUnits&quot;,&quot;gl_MaxDrawBuffers&quot;,&quot;gl_MaxFragmentUniformComponents&quot;,&quot;gl_MaxLights&quot;,&quot;gl_MaxTextureCoords&quot;,&quot;gl_MaxTextureImageUnits&quot;,&quot;gl_MaxTextureUnits&quot;,&quot;gl_MaxVaryingFloats&quot;,&quot;gl_MaxVertexAttribs&quot;,&quot;gl_MaxVertexTextureImageUnits&quot;,&quot;gl_MaxVertexUniformComponents&quot;,&quot;gl_ModelViewMatrix&quot;,&quot;gl_ModelViewMatrixInverse&quot;,&quot;gl_ModelViewMatrixInverseTranspose&quot;,&quot;gl_ModelViewMatrixTranspose&quot;,&quot;gl_ModelViewProjectionMatrix&quot;,&quot;gl_ModelViewProjectionMatrixInverse&quot;,&quot;gl_ModelViewProjectionMatrixInverseTranspose&quot;,&quot;gl_ModelViewProjectionMatrixTranspose&quot;,&quot;gl_MultiTexCoord0&quot;,&quot;gl_MultiTexCoord1&quot;,&quot;gl_MultiTexCoord2&quot;,&quot;gl_MultiTexCoord3&quot;,&quot;gl_MultiTexCoord4&quot;,&quot;gl_MultiTexCoord5&quot;,&quot;gl_MultiTexCoord6&quot;,&quot;gl_MultiTexCoord7&quot;,&quot;gl_Normal&quot;,&quot;gl_NormalMatrix&quot;,&quot;gl_NormalScale&quot;,&quot;gl_ObjectPlaneQ&quot;,&quot;gl_ObjectPlaneR&quot;,&quot;gl_ObjectPlaneS&quot;,&quot;gl_ObjectPlaneT&quot;,&quot;gl_Point&quot;,&quot;gl_PointCoord&quot;,&quot;gl_PointParameters&quot;,&quot;gl_PointSize&quot;,&quot;gl_Position&quot;,&quot;gl_ProjectionMatrix&quot;,&quot;gl_ProjectionMatrixInverse&quot;,&quot;gl_ProjectionMatrixInverseTranspose&quot;,&quot;gl_ProjectionMatrixTranspose&quot;,&quot;gl_SecondaryColor&quot;,&quot;gl_TexCoord&quot;,&quot;gl_TextureEnvColor&quot;,&quot;gl_TextureMatrix&quot;,&quot;gl_TextureMatrixInverse&quot;,&quot;gl_TextureMatrixInverseTranspose&quot;,&quot;gl_TextureMatrixTranspose&quot;,&quot;gl_Vertex&quot;,&quot;greaterThan&quot;,&quot;greaterThanEqual&quot;,&quot;inversesqrt&quot;,&quot;length&quot;,&quot;lessThan&quot;,&quot;lessThanEqual&quot;,&quot;log&quot;,&quot;log2&quot;,&quot;matrixCompMult&quot;,&quot;max&quot;,&quot;min&quot;,&quot;mix&quot;,&quot;mod&quot;,&quot;normalize&quot;,&quot;not&quot;,&quot;notEqual&quot;,&quot;pow&quot;,&quot;radians&quot;,&quot;reflect&quot;,&quot;refract&quot;,&quot;sign&quot;,&quot;sin&quot;,&quot;smoothstep&quot;,&quot;sqrt&quot;,&quot;step&quot;,&quot;tan&quot;,&quot;texture2D&quot;,&quot;texture2DLod&quot;,&quot;texture2DProj&quot;,&quot;texture2DProjLod&quot;,&quot;textureCube&quot;,&quot;textureCubeLod&quot;,&quot;texture2DLodEXT&quot;,&quot;texture2DProjLodEXT&quot;,&quot;textureCubeLodEXT&quot;,&quot;texture2DGradEXT&quot;,&quot;texture2DProjGradEXT&quot;,&quot;textureCubeGradEXT&quot;]},{}],386:[function(t,e,r){var n=t(&quot;./literals&quot;);e.exports=n.slice().concat([&quot;layout&quot;,&quot;centroid&quot;,&quot;smooth&quot;,&quot;case&quot;,&quot;mat2x2&quot;,&quot;mat2x3&quot;,&quot;mat2x4&quot;,&quot;mat3x2&quot;,&quot;mat3x3&quot;,&quot;mat3x4&quot;,&quot;mat4x2&quot;,&quot;mat4x3&quot;,&quot;mat4x4&quot;,&quot;uint&quot;,&quot;uvec2&quot;,&quot;uvec3&quot;,&quot;uvec4&quot;,&quot;samplerCubeShadow&quot;,&quot;sampler2DArray&quot;,&quot;sampler2DArrayShadow&quot;,&quot;isampler2D&quot;,&quot;isampler3D&quot;,&quot;isamplerCube&quot;,&quot;isampler2DArray&quot;,&quot;usampler2D&quot;,&quot;usampler3D&quot;,&quot;usamplerCube&quot;,&quot;usampler2DArray&quot;,&quot;coherent&quot;,&quot;restrict&quot;,&quot;readonly&quot;,&quot;writeonly&quot;,&quot;resource&quot;,&quot;atomic_uint&quot;,&quot;noperspective&quot;,&quot;patch&quot;,&quot;sample&quot;,&quot;subroutine&quot;,&quot;common&quot;,&quot;partition&quot;,&quot;active&quot;,&quot;filter&quot;,&quot;image1D&quot;,&quot;image2D&quot;,&quot;image3D&quot;,&quot;imageCube&quot;,&quot;iimage1D&quot;,&quot;iimage2D&quot;,&quot;iimage3D&quot;,&quot;iimageCube&quot;,&quot;uimage1D&quot;,&quot;uimage2D&quot;,&quot;uimage3D&quot;,&quot;uimageCube&quot;,&quot;image1DArray&quot;,&quot;image2DArray&quot;,&quot;iimage1DArray&quot;,&quot;iimage2DArray&quot;,&quot;uimage1DArray&quot;,&quot;uimage2DArray&quot;,&quot;image1DShadow&quot;,&quot;image2DShadow&quot;,&quot;image1DArrayShadow&quot;,&quot;image2DArrayShadow&quot;,&quot;imageBuffer&quot;,&quot;iimageBuffer&quot;,&quot;uimageBuffer&quot;,&quot;sampler1DArray&quot;,&quot;sampler1DArrayShadow&quot;,&quot;isampler1D&quot;,&quot;isampler1DArray&quot;,&quot;usampler1D&quot;,&quot;usampler1DArray&quot;,&quot;isampler2DRect&quot;,&quot;usampler2DRect&quot;,&quot;samplerBuffer&quot;,&quot;isamplerBuffer&quot;,&quot;usamplerBuffer&quot;,&quot;sampler2DMS&quot;,&quot;isampler2DMS&quot;,&quot;usampler2DMS&quot;,&quot;sampler2DMSArray&quot;,&quot;isampler2DMSArray&quot;,&quot;usampler2DMSArray&quot;])},{&quot;./literals&quot;:387}],387:[function(t,e,r){e.exports=[&quot;precision&quot;,&quot;highp&quot;,&quot;mediump&quot;,&quot;lowp&quot;,&quot;attribute&quot;,&quot;const&quot;,&quot;uniform&quot;,&quot;varying&quot;,&quot;break&quot;,&quot;continue&quot;,&quot;do&quot;,&quot;for&quot;,&quot;while&quot;,&quot;if&quot;,&quot;else&quot;,&quot;in&quot;,&quot;out&quot;,&quot;inout&quot;,&quot;float&quot;,&quot;int&quot;,&quot;void&quot;,&quot;bool&quot;,&quot;true&quot;,&quot;false&quot;,&quot;discard&quot;,&quot;return&quot;,&quot;mat2&quot;,&quot;mat3&quot;,&quot;mat4&quot;,&quot;vec2&quot;,&quot;vec3&quot;,&quot;vec4&quot;,&quot;ivec2&quot;,&quot;ivec3&quot;,&quot;ivec4&quot;,&quot;bvec2&quot;,&quot;bvec3&quot;,&quot;bvec4&quot;,&quot;sampler1D&quot;,&quot;sampler2D&quot;,&quot;sampler3D&quot;,&quot;samplerCube&quot;,&quot;sampler1DShadow&quot;,&quot;sampler2DShadow&quot;,&quot;struct&quot;,&quot;asm&quot;,&quot;class&quot;,&quot;union&quot;,&quot;enum&quot;,&quot;typedef&quot;,&quot;template&quot;,&quot;this&quot;,&quot;packed&quot;,&quot;goto&quot;,&quot;switch&quot;,&quot;default&quot;,&quot;inline&quot;,&quot;noinline&quot;,&quot;volatile&quot;,&quot;public&quot;,&quot;static&quot;,&quot;extern&quot;,&quot;external&quot;,&quot;interface&quot;,&quot;long&quot;,&quot;short&quot;,&quot;double&quot;,&quot;half&quot;,&quot;fixed&quot;,&quot;unsigned&quot;,&quot;input&quot;,&quot;output&quot;,&quot;hvec2&quot;,&quot;hvec3&quot;,&quot;hvec4&quot;,&quot;dvec2&quot;,&quot;dvec3&quot;,&quot;dvec4&quot;,&quot;fvec2&quot;,&quot;fvec3&quot;,&quot;fvec4&quot;,&quot;sampler2DRect&quot;,&quot;sampler3DRect&quot;,&quot;sampler2DRectShadow&quot;,&quot;sizeof&quot;,&quot;cast&quot;,&quot;namespace&quot;,&quot;using&quot;]},{}],388:[function(t,e,r){e.exports=[&quot;&lt;&lt;=&quot;,&quot;&gt;&gt;=&quot;,&quot;++&quot;,&quot;--&quot;,&quot;&lt;&lt;&quot;,&quot;&gt;&gt;&quot;,&quot;&lt;=&quot;,&quot;&gt;=&quot;,&quot;==&quot;,&quot;!=&quot;,&quot;&amp;&amp;&quot;,&quot;||&quot;,&quot;+=&quot;,&quot;-=&quot;,&quot;*=&quot;,&quot;/=&quot;,&quot;%=&quot;,&quot;&amp;=&quot;,&quot;^^&quot;,&quot;^=&quot;,&quot;|=&quot;,&quot;(&quot;,&quot;)&quot;,&quot;[&quot;,&quot;]&quot;,&quot;.&quot;,&quot;!&quot;,&quot;~&quot;,&quot;*&quot;,&quot;/&quot;,&quot;%&quot;,&quot;+&quot;,&quot;-&quot;,&quot;&lt;&quot;,&quot;&gt;&quot;,&quot;&amp;&quot;,&quot;^&quot;,&quot;|&quot;,&quot;?&quot;,&quot;:&quot;,&quot;=&quot;,&quot;,&quot;,&quot;;&quot;,&quot;{&quot;,&quot;}&quot;]},{}],389:[function(t,e,r){var n=t(&quot;./index&quot;);e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{&quot;./index&quot;:383}],390:[function(t,e,r){e.exports=function(t){&quot;string&quot;==typeof t&amp;&amp;(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n&lt;t.length-1;n++)r.push(t[n],e[n]||&quot;&quot;);return r.push(t[n]),r.join(&quot;&quot;)}},{}],391:[function(t,e,r){(function(r){&quot;use strict&quot;;var n,i=t(&quot;is-browser&quot;);n=&quot;function&quot;==typeof r.matchMedia?!r.matchMedia(&quot;(hover: none)&quot;).matches:i,e.exports=n}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;is-browser&quot;:398}],392:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;is-browser&quot;);e.exports=n&amp;&amp;function(){var t=!1;try{var e=Object.defineProperty({},&quot;passive&quot;,{get:function(){t=!0}});window.addEventListener(&quot;test&quot;,null,e),window.removeEventListener(&quot;test&quot;,null,e)}catch(e){t=!1}return t}()},{&quot;is-browser&quot;:398}],393:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1&lt;&lt;s)-1,c=l&gt;&gt;1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&amp;(1&lt;&lt;-u)-1,p&gt;&gt;=-u,u+=s;u&gt;0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&amp;(1&lt;&lt;-u)-1,a&gt;&gt;=-u,u+=n;u&gt;0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1&lt;&lt;c)-1,f=u&gt;&gt;1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e&lt;0||0===e&amp;&amp;1/e&lt;0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))&lt;1&amp;&amp;(o--,l*=2),(e+=o+f&gt;=1?h/l:h*Math.pow(2,1-f))*l&gt;=2&amp;&amp;(o++,l/=2),o+f&gt;=u?(s=0,o=u):o+f&gt;=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i&gt;=8;t[r+p]=255&amp;s,p+=d,s/=256,i-=8);for(o=o&lt;&lt;i|s,c+=i;c&gt;0;t[r+p]=255&amp;o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],394:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=t.length;if(0===r)throw new Error(&quot;Must have at least d+1 points&quot;);var i=t[0].length;if(r&lt;=i)throw new Error(&quot;Must input at least d+1 points&quot;);var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error(&quot;Input not in general position&quot;);for(var l=new Array(i+1),u=0;u&lt;=i;++u)l[u]=u;s&lt;0&amp;&amp;(l[0]=1,l[1]=0);for(var f=new a(l,new Array(i+1),!1),h=f.adjacent,p=new Array(i+2),u=0;u&lt;=i;++u){for(var d=l.slice(),g=0;g&lt;=i;++g)g===u&amp;&amp;(d[g]=-1);var m=d[0];d[0]=d[1],d[1]=m;var v=new a(d,new Array(i+1),!0);h[u]=v,p[u]=v}p[i+1]=f;for(var u=0;u&lt;=i;++u)for(var d=h[u].vertices,y=h[u].adjacent,g=0;g&lt;=i;++g){var x=d[g];if(x&lt;0)y[g]=f;else for(var b=0;b&lt;=i;++b)h[b].vertices.indexOf(x)&lt;0&amp;&amp;(y[g]=h[b])}for(var _=new c(i,o,p),w=!!e,u=i+1;u&lt;r;++u)_.insert(t[u],w);return _.boundary()};var n=t(&quot;robust-orientation&quot;),i=t(&quot;simplicial-complex&quot;).compareCells;function a(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function o(t,e,r){this.vertices=t,this.cell=e,this.index=r}function s(t,e){return i(t.vertices,e.vertices)}a.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var l=[];function c(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var i=0;i&lt;=t;++i)this.tuple[i]=this.vertices[i];var a=l[t];a||(a=l[t]=function(t){for(var e=[&quot;function orient(){var tuple=this.tuple;return test(&quot;],r=0;r&lt;=t;++r)r&gt;0&amp;&amp;e.push(&quot;,&quot;),e.push(&quot;tuple[&quot;,r,&quot;]&quot;);e.push(&quot;)}return orient&quot;);var i=new Function(&quot;test&quot;,e.join(&quot;&quot;)),a=n[t+1];return a||(a=n),i(a)}(t)),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length&gt;0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l&lt;=r;++l){var c=s[l];if(c.boundary&amp;&amp;!(c.lastVisited&lt;=-n)){for(var u=c.vertices,f=0;f&lt;=r;++f){var h=u[f];i[f]=h&lt;0?e:a[h]}var p=this.orient();if(p&gt;0)return c;c.lastVisited=-n,0===p&amp;&amp;o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u&lt;=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u&lt;=n;++u){var f=c[u];if(!(f.lastVisited&gt;=r)){var h=a[u];a[u]=t;var p=this.orient();if(a[u]=h,p&lt;0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length&gt;0;){var p=(e=f.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g&lt;0))for(var m=0;m&lt;=n;++m)if(m!==g){var v=d[m];if(v.boundary&amp;&amp;!(v.lastVisited&gt;=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var x=0,b=0;b&lt;=n;++b)y[b]&lt;0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()&gt;0){y[x]=r,v.boundary=!1,c.push(v),f.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=p.slice(),k=d.slice(),M=new a(w,k,!0);u.push(M);var A=_.indexOf(e);if(!(A&lt;0)){_[A]=M,k[g]=v,w[m]=-1,k[m]=e,d[m]=M,M.flip();for(b=0;b&lt;=n;++b){var T=w[b];if(!(T&lt;0||T===r)){for(var S=new Array(n-1),E=0,C=0;C&lt;=n;++C){var L=w[C];L&lt;0||C===b||(S[E++]=L)}h.push(new o(S,M,b))}}}}}}h.sort(s);for(m=0;m+1&lt;h.length;m+=2){var z=h[m],P=h[m+1],O=z.index,I=P.index;O&lt;0||I&lt;0||(z.cell.adjacent[z.index]=P.cell,P.cell.adjacent[P.index]=z.cell)}},u.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o&lt;=i;++o){var s=n.vertices[o];a[o]=s&lt;0?t:r[s]}var l=this.orient(a);l&lt;0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&amp;&amp;this.addPeaks(t,n)}},u.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i&lt;n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,c=0,u=0;u&lt;=t;++u)s[u]&gt;=0?o[l++]=s[u]:c=1&amp;u;if(c===(1&amp;t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{&quot;robust-orientation&quot;:483,&quot;simplicial-complex&quot;:493}],395:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=0,a=1;function o(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function f(t,e){var r=t.intervals([]),n=r.indexOf(e);return n&lt;0?i:(r.splice(n,1),c(t,r),a)}function h(t,e,r){for(var n=0;n&lt;t.length&amp;&amp;t[n][0]&lt;=e;++n){var i=r(t[n]);if(i)return i}}function p(t,e,r){for(var n=t.length-1;n&gt;=0&amp;&amp;t[n][1]&gt;=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r&lt;t.length;++r){var n=e(t[r]);if(n)return n}}function g(t,e){return t-e}function m(t,e){var r=t[0]-e[0];return r||t[1]-e[1]}function v(t,e){var r=t[1]-e[1];return r||t[0]-e[0]}function y(t){if(0===t.length)return null;for(var e=[],r=0;r&lt;t.length;++r)e.push(t[r][0],t[r][1]);e.sort(g);var n=e[e.length&gt;&gt;1],i=[],a=[],s=[];for(r=0;r&lt;t.length;++r){var l=t[r];l[1]&lt;n?i.push(l):n&lt;l[0]?a.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(m),u.sort(v),new o(n,y(i),y(a),c,u)}function x(t){this.root=t}s.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&amp;&amp;this.left.intervals(t),this.right&amp;&amp;this.right.intervals(t),t},s.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]&lt;this.mid)this.left?4*(this.left.count+1)&gt;3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]&gt;this.mid)this.right?4*(this.right.count+1)&gt;3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,m),i=n.ge(this.rightPoints,t,v);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]&lt;this.mid)return this.left?4*(this.right?this.right.count:0)&gt;3*(e-1)?f(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,a):(c===a&amp;&amp;(this.count-=1),c):i;if(t[0]&gt;this.mid)return this.right?4*(this.left?this.left.count:0)&gt;3*(e-1)?f(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,a):(c===a&amp;&amp;(this.count-=1),c):i;if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&amp;&amp;this.leftPoints[0]===t){if(this.left&amp;&amp;this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return a}for(s=n.ge(this.leftPoints,t,m);s&lt;this.leftPoints.length&amp;&amp;this.leftPoints[s][0]===t[0];++s)if(this.leftPoints[s]===t){this.count-=1,this.leftPoints.splice(s,1);for(c=n.ge(this.rightPoints,t,v);c&lt;this.rightPoints.length&amp;&amp;this.rightPoints[c][1]===t[1];++c)if(this.rightPoints[c]===t)return this.rightPoints.splice(c,1),a}return i},s.queryPoint=function(t,e){if(t&lt;this.mid){if(this.left)if(r=this.left.queryPoint(t,e))return r;return h(this.leftPoints,t,e)}if(t&gt;this.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(t&lt;this.mid&amp;&amp;this.left&amp;&amp;(n=this.left.queryInterval(t,e,r)))return n;if(e&gt;this.mid&amp;&amp;this.right&amp;&amp;(n=this.right.queryInterval(t,e,r)))return n;return e&lt;this.mid?h(this.leftPoints,e,r):t&gt;this.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&amp;&amp;(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t&lt;=e&amp;&amp;this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,&quot;count&quot;,{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,&quot;intervals&quot;,{get:function(){return this.root?this.root.intervals([]):[]}})},{&quot;binary-search-bounds&quot;:78}],396:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r&lt;t.length;++r)e[t[r]]=r;return e}},{}],397:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=new Array(t),r=0;r&lt;t;++r)e[r]=r;return e}},{}],398:[function(t,e,r){e.exports=!0},{}],399:[function(t,e,r){function n(t){return!!t.constructor&amp;&amp;&quot;function&quot;==typeof t.constructor.isBuffer&amp;&amp;t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&amp;&amp;(n(t)||function(t){return&quot;function&quot;==typeof t.readFloatLE&amp;&amp;&quot;function&quot;==typeof t.slice&amp;&amp;n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],400:[function(t,e,r){&quot;use strict&quot;;e.exports=&quot;undefined&quot;!=typeof navigator&amp;&amp;(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],401:[function(t,e,r){e.exports=function(t){t||&quot;undefined&quot;==typeof navigator||(t=navigator.userAgent);t&amp;&amp;t.headers&amp;&amp;&quot;string&quot;==typeof t.headers[&quot;user-agent&quot;]&amp;&amp;(t=t.headers[&quot;user-agent&quot;]);return&quot;string&quot;==typeof t&amp;&amp;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))}},{}],402:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=typeof t;return null!==t&amp;&amp;(&quot;object&quot;===e||&quot;function&quot;===e)}},{}],403:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString;e.exports=function(t){var e;return&quot;[object Object]&quot;===n.call(t)&amp;&amp;(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],404:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return&quot;string&quot;==typeof t&amp;&amp;(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&amp;&amp;/[\dz]$/i.test(t)&amp;&amp;t.length&gt;4))}},{}],405:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],406:[function(t,e,r){(function(t){!function(t,n){&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?e.exports=n():t.mapboxgl=n()}(this,function(){&quot;use strict&quot;;var e,r,n;function i(t,i){if(e)if(r){var a=&quot;var sharedChunk = {}; (&quot;+e+&quot;)(sharedChunk); (&quot;+r+&quot;)(sharedChunk);&quot;,o={};e(o),(n=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:&quot;text/javascript&quot;}))}else r=i;else e=i}return i(0,function(e){var r=&quot;undefined&quot;!=typeof window?window:&quot;undefined&quot;!=typeof t?t:&quot;undefined&quot;!=typeof self?self:{};function n(t){return t&amp;&amp;t.__esModule&amp;&amp;Object.prototype.hasOwnProperty.call(t,&quot;default&quot;)?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a=o;function o(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}o.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},o.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},o.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},o.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&amp;&amp;(e=1e-6),i=t,o=0;o&lt;8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)&lt;e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)&lt;1e-6)break;i-=a/s}if((i=t)&lt;(r=0))return r;if(i&gt;(n=1))return n;for(;r&lt;n;){if(a=this.sampleCurveX(i),Math.abs(a-t)&lt;e)return i;t&gt;a?r=i:n=i,i=.5*(n-r)+r}return i},o.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var s=function(t,e,r){this.column=t,this.row=e,this.zoom=r};s.prototype.clone=function(){return new s(this.column,this.row,this.zoom)},s.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},s.prototype.sub=function(t){return this.clone()._sub(t)},s.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},s.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var l=c;function c(t,e){this.x=t,this.y=e}function u(t,e,r,n){var i=new a(t,e,r,n);return function(t){return i.solve(t)}}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&amp;&amp;this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(t){return t instanceof c?t:Array.isArray(t)?new c(t[0],t[1]):t};var f=u(.25,.1,.25,1);function h(t,e,r){return Math.min(r,Math.max(e,t))}function p(t){for(var e=[],r=arguments.length-1;r-- &gt;0;)e[r]=arguments[r+1];for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}var d=1;function g(t,e){t.forEach(function(t){e[t]&amp;&amp;(e[t]=e[t].bind(e))})}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function y(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&amp;&amp;(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):&quot;object&quot;==typeof t&amp;&amp;t?v(t,x):t}var b={};function _(t){b[t]||(&quot;undefined&quot;!=typeof console&amp;&amp;console.warn(t),b[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)&gt;(e.y-t.y)*(r.x-t.x)}function k(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r&lt;n;i=r++)a=t[r],e+=((o=t[i]).x-a.x)*(a.y+o.y);return e}var M={Unknown:&quot;Unknown&quot;,Style:&quot;Style&quot;,Source:&quot;Source&quot;,Tile:&quot;Tile&quot;,Glyphs:&quot;Glyphs&quot;,SpriteImage:&quot;SpriteImage&quot;,SpriteJSON:&quot;SpriteJSON&quot;,Image:&quot;Image&quot;};&quot;function&quot;==typeof Object.freeze&amp;&amp;Object.freeze(M);var A=function(t){function e(e,r,n){t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+&quot;: &quot;+this.message+&quot; (&quot;+this.status+&quot;): &quot;+this.url},e}(Error);function T(t){var e=new self.XMLHttpRequest;for(var r in e.open(&quot;GET&quot;,t.url,!0),t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials=&quot;include&quot;===t.credentials,e}var S=function(t,e){var r=T(t);return r.responseType=&quot;arraybuffer&quot;,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var n=r.response;if(0===n.byteLength&amp;&amp;200===r.status)return e(new Error(&quot;http status 200 returned without content.&quot;));r.status&gt;=200&amp;&amp;r.status&lt;300&amp;&amp;r.response?e(null,{data:n,cacheControl:r.getResponseHeader(&quot;Cache-Control&quot;),expires:r.getResponseHeader(&quot;Expires&quot;)}):e(new A(r.statusText,r.status,t.url))},r.send(),r};function E(t,e,r){r[t]=r[t]||[],r[t].push(e)}function C(t,e,r){if(r&amp;&amp;r[t]){var n=r[t].indexOf(e);-1!==n&amp;&amp;r[t].splice(n,1)}}var L=function(t,e){void 0===e&amp;&amp;(e={}),p(this,e),this.type=t},z=function(t){function e(e,r){void 0===r&amp;&amp;(r={}),t.call(this,&quot;error&quot;,p({error:e},r))}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(L),P=function(){};P.prototype.on=function(t,e){return this._listeners=this._listeners||{},E(t,e,this._listeners),this},P.prototype.off=function(t,e){return C(t,e,this._listeners),C(t,e,this._oneTimeListeners),this},P.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},E(t,e,this._oneTimeListeners),this},P.prototype.fire=function(t){&quot;string&quot;==typeof t&amp;&amp;(t=new L(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var r=0,n=this._listeners&amp;&amp;this._listeners[e]?this._listeners[e].slice():[];r&lt;n.length;r+=1)n[r].call(this,t);for(var i=0,a=this._oneTimeListeners&amp;&amp;this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];i&lt;a.length;i+=1){var o=a[i];C(e,o,this._oneTimeListeners),o.call(this,t)}var s=this._eventedParent;s&amp;&amp;(p(t,&quot;function&quot;==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),s.fire(t))}else m(e,&quot;error&quot;)?console.error(t&amp;&amp;t.error||t||&quot;Empty error event&quot;):m(e,&quot;warning&quot;)&amp;&amp;console.warn(t&amp;&amp;t.warning||t||&quot;Empty warning event&quot;);return this},P.prototype.listens=function(t){return this._listeners&amp;&amp;this._listeners[t]&amp;&amp;this._listeners[t].length&gt;0||this._oneTimeListeners&amp;&amp;this._oneTimeListeners[t]&amp;&amp;this._oneTimeListeners[t].length&gt;0||this._eventedParent&amp;&amp;this._eventedParent.listens(t)},P.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var O={$version:8,$root:{version:{required:!0,type:&quot;enum&quot;,values:[8]},name:{type:&quot;string&quot;},metadata:{type:&quot;*&quot;},center:{type:&quot;array&quot;,value:&quot;number&quot;},zoom:{type:&quot;number&quot;},bearing:{type:&quot;number&quot;,default:0,period:360,units:&quot;degrees&quot;},pitch:{type:&quot;number&quot;,default:0,units:&quot;degrees&quot;},light:{type:&quot;light&quot;},sources:{required:!0,type:&quot;sources&quot;},sprite:{type:&quot;string&quot;},glyphs:{type:&quot;string&quot;},transition:{type:&quot;transition&quot;},layers:{required:!0,type:&quot;array&quot;,value:&quot;layer&quot;}},sources:{&quot;*&quot;:{type:&quot;source&quot;}},source:[&quot;source_vector&quot;,&quot;source_raster&quot;,&quot;source_raster_dem&quot;,&quot;source_geojson&quot;,&quot;source_video&quot;,&quot;source_image&quot;],source_vector:{type:{required:!0,type:&quot;enum&quot;,values:{vector:{}}},url:{type:&quot;string&quot;},tiles:{type:&quot;array&quot;,value:&quot;string&quot;},bounds:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:&quot;number&quot;,default:0},maxzoom:{type:&quot;number&quot;,default:22},attribution:{type:&quot;string&quot;},&quot;*&quot;:{type:&quot;*&quot;}},source_raster:{type:{required:!0,type:&quot;enum&quot;,values:{raster:{}}},url:{type:&quot;string&quot;},tiles:{type:&quot;array&quot;,value:&quot;string&quot;},bounds:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:&quot;number&quot;,default:0},maxzoom:{type:&quot;number&quot;,default:22},tileSize:{type:&quot;number&quot;,default:512,units:&quot;pixels&quot;},scheme:{type:&quot;enum&quot;,values:{xyz:{},tms:{}},default:&quot;xyz&quot;},attribution:{type:&quot;string&quot;},&quot;*&quot;:{type:&quot;*&quot;}},source_raster_dem:{type:{required:!0,type:&quot;enum&quot;,values:{&quot;raster-dem&quot;:{}}},url:{type:&quot;string&quot;},tiles:{type:&quot;array&quot;,value:&quot;string&quot;},bounds:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:&quot;number&quot;,default:0},maxzoom:{type:&quot;number&quot;,default:22},tileSize:{type:&quot;number&quot;,default:512,units:&quot;pixels&quot;},attribution:{type:&quot;string&quot;},encoding:{type:&quot;enum&quot;,values:{terrarium:{},mapbox:{}},default:&quot;mapbox&quot;},&quot;*&quot;:{type:&quot;*&quot;}},source_geojson:{type:{required:!0,type:&quot;enum&quot;,values:{geojson:{}}},data:{type:&quot;*&quot;},maxzoom:{type:&quot;number&quot;,default:18},buffer:{type:&quot;number&quot;,default:128,maximum:512,minimum:0},tolerance:{type:&quot;number&quot;,default:.375},cluster:{type:&quot;boolean&quot;,default:!1},clusterRadius:{type:&quot;number&quot;,default:50,minimum:0},clusterMaxZoom:{type:&quot;number&quot;},lineMetrics:{type:&quot;boolean&quot;,default:!1}},source_video:{type:{required:!0,type:&quot;enum&quot;,values:{video:{}}},urls:{required:!0,type:&quot;array&quot;,value:&quot;string&quot;},coordinates:{required:!0,type:&quot;array&quot;,length:4,value:{type:&quot;array&quot;,length:2,value:&quot;number&quot;}}},source_image:{type:{required:!0,type:&quot;enum&quot;,values:{image:{}}},url:{required:!0,type:&quot;string&quot;},coordinates:{required:!0,type:&quot;array&quot;,length:4,value:{type:&quot;array&quot;,length:2,value:&quot;number&quot;}}},layer:{id:{type:&quot;string&quot;,required:!0},type:{type:&quot;enum&quot;,values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},&quot;fill-extrusion&quot;:{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:&quot;*&quot;},source:{type:&quot;string&quot;},&quot;source-layer&quot;:{type:&quot;string&quot;},minzoom:{type:&quot;number&quot;,minimum:0,maximum:24},maxzoom:{type:&quot;number&quot;,minimum:0,maximum:24},filter:{type:&quot;filter&quot;},layout:{type:&quot;layout&quot;},paint:{type:&quot;paint&quot;}},layout:[&quot;layout_fill&quot;,&quot;layout_line&quot;,&quot;layout_circle&quot;,&quot;layout_heatmap&quot;,&quot;layout_fill-extrusion&quot;,&quot;layout_symbol&quot;,&quot;layout_raster&quot;,&quot;layout_hillshade&quot;,&quot;layout_background&quot;],layout_background:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_fill:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_circle:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_heatmap:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_line:{&quot;line-cap&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{butt:{},round:{},square:{}},default:&quot;butt&quot;},&quot;line-join&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{bevel:{},round:{},miter:{}},default:&quot;miter&quot;},&quot;line-miter-limit&quot;:{type:&quot;number&quot;,default:2,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[{&quot;line-join&quot;:&quot;miter&quot;}]},&quot;line-round-limit&quot;:{type:&quot;number&quot;,default:1.05,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[{&quot;line-join&quot;:&quot;round&quot;}]},visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_symbol:{&quot;symbol-placement&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{point:{},line:{}},default:&quot;point&quot;},&quot;symbol-spacing&quot;:{type:&quot;number&quot;,default:250,minimum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,units:&quot;pixels&quot;,requires:[{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;symbol-avoid-edges&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1},&quot;icon-allow-overlap&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;]},&quot;icon-ignore-placement&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;]},&quot;icon-optional&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;,&quot;text-field&quot;]},&quot;icon-rotation-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-size&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,units:&quot;factor of the original icon size&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-text-fit&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{none:{},width:{},height:{},both:{}},default:&quot;none&quot;,requires:[&quot;icon-image&quot;,&quot;text-field&quot;]},&quot;icon-text-fit-padding&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[0,0,0,0],units:&quot;pixels&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;icon-image&quot;,&quot;text-field&quot;,{&quot;icon-text-fit&quot;:[&quot;both&quot;,&quot;width&quot;,&quot;height&quot;]}]},&quot;icon-image&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,tokens:!0},&quot;icon-rotate&quot;:{type:&quot;number&quot;,default:0,period:360,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,units:&quot;degrees&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-padding&quot;:{type:&quot;number&quot;,default:2,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-keep-upright&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;,{&quot;icon-rotation-alignment&quot;:&quot;map&quot;},{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;icon-offset&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;icon-image&quot;]},&quot;icon-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{center:{},left:{},right:{},top:{},bottom:{},&quot;top-left&quot;:{},&quot;top-right&quot;:{},&quot;bottom-left&quot;:{},&quot;bottom-right&quot;:{}},default:&quot;center&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-pitch-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;icon-image&quot;]},&quot;text-pitch-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;text-field&quot;]},&quot;text-rotation-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;text-field&quot;]},&quot;text-field&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:&quot;&quot;,tokens:!0},&quot;text-font&quot;:{type:&quot;array&quot;,value:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:[&quot;Open Sans Regular&quot;,&quot;Arial Unicode MS Regular&quot;],requires:[&quot;text-field&quot;]},&quot;text-size&quot;:{type:&quot;number&quot;,default:16,minimum:0,units:&quot;pixels&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-max-width&quot;:{type:&quot;number&quot;,default:10,minimum:0,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-line-height&quot;:{type:&quot;number&quot;,default:1.2,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-letter-spacing&quot;:{type:&quot;number&quot;,default:0,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-justify&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{left:{},center:{},right:{}},default:&quot;center&quot;,requires:[&quot;text-field&quot;]},&quot;text-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{center:{},left:{},right:{},top:{},bottom:{},&quot;top-left&quot;:{},&quot;top-right&quot;:{},&quot;bottom-left&quot;:{},&quot;bottom-right&quot;:{}},default:&quot;center&quot;,requires:[&quot;text-field&quot;]},&quot;text-max-angle&quot;:{type:&quot;number&quot;,default:45,units:&quot;degrees&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;text-field&quot;,{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;text-rotate&quot;:{type:&quot;number&quot;,default:0,period:360,units:&quot;degrees&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-padding&quot;:{type:&quot;number&quot;,default:2,minimum:0,units:&quot;pixels&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-keep-upright&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!0,requires:[&quot;text-field&quot;,{&quot;text-rotation-alignment&quot;:&quot;map&quot;},{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;text-transform&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{none:{},uppercase:{},lowercase:{}},default:&quot;none&quot;,requires:[&quot;text-field&quot;]},&quot;text-offset&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,length:2,default:[0,0],requires:[&quot;text-field&quot;]},&quot;text-allow-overlap&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;text-field&quot;]},&quot;text-ignore-placement&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;text-field&quot;]},&quot;text-optional&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;text-field&quot;,&quot;icon-image&quot;]},visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_raster:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_hillshade:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},filter:{type:&quot;array&quot;,value:&quot;*&quot;},filter_operator:{type:&quot;enum&quot;,values:{&quot;==&quot;:{},&quot;!=&quot;:{},&quot;&gt;&quot;:{},&quot;&gt;=&quot;:{},&quot;&lt;&quot;:{},&quot;&lt;=&quot;:{},in:{},&quot;!in&quot;:{},all:{},any:{},none:{},has:{},&quot;!has&quot;:{}}},geometry_type:{type:&quot;enum&quot;,values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:&quot;array&quot;,minimum:0,maximum:22,value:[&quot;number&quot;,&quot;color&quot;],length:2},expression:{type:&quot;array&quot;,value:&quot;*&quot;,minimum:1},expression_name:{type:&quot;enum&quot;,values:{let:{group:&quot;Variable binding&quot;},var:{group:&quot;Variable binding&quot;},literal:{group:&quot;Types&quot;},array:{group:&quot;Types&quot;},at:{group:&quot;Lookup&quot;},case:{group:&quot;Decision&quot;},match:{group:&quot;Decision&quot;},coalesce:{group:&quot;Decision&quot;},step:{group:&quot;Ramps, scales, curves&quot;},interpolate:{group:&quot;Ramps, scales, curves&quot;},ln2:{group:&quot;Math&quot;},pi:{group:&quot;Math&quot;},e:{group:&quot;Math&quot;},typeof:{group:&quot;Types&quot;},string:{group:&quot;Types&quot;},number:{group:&quot;Types&quot;},boolean:{group:&quot;Types&quot;},object:{group:&quot;Types&quot;},collator:{group:&quot;Types&quot;},&quot;to-string&quot;:{group:&quot;Types&quot;},&quot;to-number&quot;:{group:&quot;Types&quot;},&quot;to-boolean&quot;:{group:&quot;Types&quot;},&quot;to-rgba&quot;:{group:&quot;Color&quot;},&quot;to-color&quot;:{group:&quot;Types&quot;},rgb:{group:&quot;Color&quot;},rgba:{group:&quot;Color&quot;},get:{group:&quot;Lookup&quot;},has:{group:&quot;Lookup&quot;},length:{group:&quot;Lookup&quot;},properties:{group:&quot;Feature data&quot;},&quot;geometry-type&quot;:{group:&quot;Feature data&quot;},id:{group:&quot;Feature data&quot;},zoom:{group:&quot;Zoom&quot;},&quot;heatmap-density&quot;:{group:&quot;Heatmap&quot;},&quot;line-progress&quot;:{group:&quot;Heatmap&quot;},&quot;+&quot;:{group:&quot;Math&quot;},&quot;*&quot;:{group:&quot;Math&quot;},&quot;-&quot;:{group:&quot;Math&quot;},&quot;/&quot;:{group:&quot;Math&quot;},&quot;%&quot;:{group:&quot;Math&quot;},&quot;^&quot;:{group:&quot;Math&quot;},sqrt:{group:&quot;Math&quot;},log10:{group:&quot;Math&quot;},ln:{group:&quot;Math&quot;},log2:{group:&quot;Math&quot;},sin:{group:&quot;Math&quot;},cos:{group:&quot;Math&quot;},tan:{group:&quot;Math&quot;},asin:{group:&quot;Math&quot;},acos:{group:&quot;Math&quot;},atan:{group:&quot;Math&quot;},min:{group:&quot;Math&quot;},max:{group:&quot;Math&quot;},round:{group:&quot;Math&quot;},abs:{group:&quot;Math&quot;},ceil:{group:&quot;Math&quot;},floor:{group:&quot;Math&quot;},&quot;==&quot;:{group:&quot;Decision&quot;},&quot;!=&quot;:{group:&quot;Decision&quot;},&quot;&gt;&quot;:{group:&quot;Decision&quot;},&quot;&lt;&quot;:{group:&quot;Decision&quot;},&quot;&gt;=&quot;:{group:&quot;Decision&quot;},&quot;&lt;=&quot;:{group:&quot;Decision&quot;},all:{group:&quot;Decision&quot;},any:{group:&quot;Decision&quot;},&quot;!&quot;:{group:&quot;Decision&quot;},&quot;is-supported-script&quot;:{group:&quot;String&quot;},upcase:{group:&quot;String&quot;},downcase:{group:&quot;String&quot;},concat:{group:&quot;String&quot;},&quot;resolved-locale&quot;:{group:&quot;String&quot;}}},light:{anchor:{type:&quot;enum&quot;,default:&quot;viewport&quot;,values:{map:{},viewport:{}},transition:!1,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,function:&quot;piecewise-constant&quot;},position:{type:&quot;array&quot;,default:[1.15,210,30],length:3,value:&quot;number&quot;,transition:!0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1},color:{type:&quot;color&quot;,default:&quot;#ffffff&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0},intensity:{type:&quot;number&quot;,default:.5,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0}},paint:[&quot;paint_fill&quot;,&quot;paint_line&quot;,&quot;paint_circle&quot;,&quot;paint_heatmap&quot;,&quot;paint_fill-extrusion&quot;,&quot;paint_symbol&quot;,&quot;paint_raster&quot;,&quot;paint_hillshade&quot;,&quot;paint_background&quot;],paint_fill:{&quot;fill-antialias&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!0},&quot;fill-opacity&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:1,minimum:0,maximum:1,transition:!0},&quot;fill-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;fill-pattern&quot;}]},&quot;fill-outline-color&quot;:{type:&quot;color&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;fill-pattern&quot;},{&quot;fill-antialias&quot;:!0}]},&quot;fill-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;fill-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;fill-translate&quot;]},&quot;fill-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0}},paint_line:{&quot;line-opacity&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:1,minimum:0,maximum:1,transition:!0},&quot;line-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;line-pattern&quot;}]},&quot;line-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;line-translate&quot;]},&quot;line-width&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-gap-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-offset&quot;:{type:&quot;number&quot;,default:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-blur&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-dasharray&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,minimum:0,transition:!0,units:&quot;line widths&quot;,requires:[{&quot;!&quot;:&quot;line-pattern&quot;}]},&quot;line-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;line-gradient&quot;:{type:&quot;color&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!1,&quot;property-function&quot;:!1,transition:!1,requires:[{&quot;!&quot;:&quot;line-dasharray&quot;},{&quot;!&quot;:&quot;line-pattern&quot;},{source:&quot;geojson&quot;,has:{lineMetrics:!0}}]}},paint_circle:{&quot;circle-radius&quot;:{type:&quot;number&quot;,default:5,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;circle-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-blur&quot;:{type:&quot;number&quot;,default:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;circle-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;circle-translate&quot;]},&quot;circle-pitch-scale&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;},&quot;circle-pitch-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;viewport&quot;},&quot;circle-stroke-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;circle-stroke-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-stroke-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0}},paint_heatmap:{&quot;heatmap-radius&quot;:{type:&quot;number&quot;,default:30,minimum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;heatmap-weight&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!1},&quot;heatmap-intensity&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0},&quot;heatmap-color&quot;:{type:&quot;color&quot;,default:[&quot;interpolate&quot;,[&quot;linear&quot;],[&quot;heatmap-density&quot;],0,&quot;rgba(0, 0, 255, 0)&quot;,.1,&quot;royalblue&quot;,.3,&quot;cyan&quot;,.5,&quot;lime&quot;,.7,&quot;yellow&quot;,1,&quot;red&quot;],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!1,&quot;property-function&quot;:!1,transition:!1},&quot;heatmap-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0}},paint_symbol:{&quot;icon-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;icon-image&quot;]},&quot;icon-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;icon-image&quot;]},&quot;icon-halo-color&quot;:{type:&quot;color&quot;,default:&quot;rgba(0, 0, 0, 0)&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;icon-image&quot;]},&quot;icon-halo-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-halo-blur&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;icon-image&quot;,&quot;icon-translate&quot;]},&quot;text-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;text-field&quot;]},&quot;text-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;text-field&quot;]},&quot;text-halo-color&quot;:{type:&quot;color&quot;,default:&quot;rgba(0, 0, 0, 0)&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;text-field&quot;]},&quot;text-halo-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;text-field&quot;]},&quot;text-halo-blur&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;text-field&quot;]},&quot;text-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;text-field&quot;]},&quot;text-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;text-field&quot;,&quot;text-translate&quot;]}},paint_raster:{&quot;raster-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;raster-hue-rotate&quot;:{type:&quot;number&quot;,default:0,period:360,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;degrees&quot;},&quot;raster-brightness-min&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,default:0,minimum:0,maximum:1,transition:!0},&quot;raster-brightness-max&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,default:1,minimum:0,maximum:1,transition:!0},&quot;raster-saturation&quot;:{type:&quot;number&quot;,default:0,minimum:-1,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;raster-contrast&quot;:{type:&quot;number&quot;,default:0,minimum:-1,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;raster-fade-duration&quot;:{type:&quot;number&quot;,default:300,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!1,units:&quot;milliseconds&quot;}},paint_hillshade:{&quot;hillshade-illumination-direction&quot;:{type:&quot;number&quot;,default:335,minimum:0,maximum:359,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!1},&quot;hillshade-illumination-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;viewport&quot;},&quot;hillshade-exaggeration&quot;:{type:&quot;number&quot;,default:.5,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;hillshade-shadow-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;hillshade-highlight-color&quot;:{type:&quot;color&quot;,default:&quot;#FFFFFF&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;hillshade-accent-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0}},paint_background:{&quot;background-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;background-pattern&quot;}]},&quot;background-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;background-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0}},transition:{duration:{type:&quot;number&quot;,default:300,minimum:0,units:&quot;milliseconds&quot;},delay:{type:&quot;number&quot;,default:0,minimum:0,units:&quot;milliseconds&quot;}},&quot;layout_fill-extrusion&quot;:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},function:{expression:{type:&quot;expression&quot;},stops:{type:&quot;array&quot;,value:&quot;function_stop&quot;},base:{type:&quot;number&quot;,default:1,minimum:0},property:{type:&quot;string&quot;,default:&quot;$zoom&quot;},type:{type:&quot;enum&quot;,values:{identity:{},exponential:{},interval:{},categorical:{}},default:&quot;exponential&quot;},colorSpace:{type:&quot;enum&quot;,values:{rgb:{},lab:{},hcl:{}},default:&quot;rgb&quot;},default:{type:&quot;*&quot;,required:!1}},&quot;paint_fill-extrusion&quot;:{&quot;fill-extrusion-opacity&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,default:1,minimum:0,maximum:1,transition:!0},&quot;fill-extrusion-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;fill-extrusion-pattern&quot;}]},&quot;fill-extrusion-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;fill-extrusion-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;fill-extrusion-translate&quot;]},&quot;fill-extrusion-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;fill-extrusion-height&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:0,minimum:0,units:&quot;meters&quot;,transition:!0},&quot;fill-extrusion-base&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:0,minimum:0,units:&quot;meters&quot;,transition:!0,requires:[&quot;fill-extrusion-height&quot;]}}},I=function(t,e,r,n){this.message=(t?t+&quot;: &quot;:&quot;&quot;)+r,n&amp;&amp;(this.identifier=n),null!=e&amp;&amp;e.__line__&amp;&amp;(this.line=e.__line__)};function D(t){var e=t.key,r=t.value;return r?[new I(e,r,&quot;constants have been deprecated as of v8&quot;)]:[]}function R(t){for(var e=[],r=arguments.length-1;r-- &gt;0;)e[r]=arguments[r+1];for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}function B(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function F(t){return Array.isArray(t)?t.map(F):B(t)}var N=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Error),j=function(t,e){void 0===e&amp;&amp;(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r&lt;n.length;r+=1){var i=n[r],a=i[0],o=i[1];this.bindings[a]=o}};j.prototype.concat=function(t){return new j(this,t)},j.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+&quot; not found in scope.&quot;)},j.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&amp;&amp;this.parent.has(t)};var V={kind:&quot;null&quot;},U={kind:&quot;number&quot;},q={kind:&quot;string&quot;},H={kind:&quot;boolean&quot;},G={kind:&quot;color&quot;},W={kind:&quot;object&quot;},Y={kind:&quot;value&quot;},X={kind:&quot;collator&quot;};function Z(t,e){return{kind:&quot;array&quot;,itemType:t,N:e}}function $(t){if(&quot;array&quot;===t.kind){var e=$(t.itemType);return&quot;number&quot;==typeof t.N?&quot;array&lt;&quot;+e+&quot;, &quot;+t.N+&quot;&gt;&quot;:&quot;value&quot;===t.itemType.kind?&quot;array&quot;:&quot;array&lt;&quot;+e+&quot;&gt;&quot;}return t.kind}var J=[V,U,q,H,G,W,Z(Y)];function K(t,e){if(&quot;error&quot;===e.kind)return null;if(&quot;array&quot;===t.kind){if(&quot;array&quot;===e.kind&amp;&amp;!K(t.itemType,e.itemType)&amp;&amp;(&quot;number&quot;!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(&quot;value&quot;===t.kind)for(var r=0,n=J;r&lt;n.length;r+=1)if(!K(n[r],e))return null}return&quot;Expected &quot;+$(t)+&quot; but found &quot;+$(e)+&quot; instead.&quot;}var Q=i(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))&lt;0?0:t&gt;255?255:t}function i(t){return t&lt;0?0:t&gt;1?1:t}function a(t){return&quot;%&quot;===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return&quot;%&quot;===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r&lt;0?r+=1:r&gt;1&amp;&amp;(r-=1),6*r&lt;1?t+(e-t)*r*6:2*r&lt;1?e:3*r&lt;2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,&quot;&quot;).toLowerCase();if(i in r)return r[i].slice();if(&quot;#&quot;===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))&gt;=0&amp;&amp;e&lt;=4095?[(3840&amp;e)&gt;&gt;4|(3840&amp;e)&gt;&gt;8,240&amp;e|(240&amp;e)&gt;&gt;4,15&amp;e|(15&amp;e)&lt;&lt;4,1]:null:7===i.length&amp;&amp;(e=parseInt(i.substr(1),16))&gt;=0&amp;&amp;e&lt;=16777215?[(16711680&amp;e)&gt;&gt;16,(65280&amp;e)&gt;&gt;8,255&amp;e,1]:null;var l=i.indexOf(&quot;(&quot;),c=i.indexOf(&quot;)&quot;);if(-1!==l&amp;&amp;c+1===i.length){var u=i.substr(0,l),f=i.substr(l+1,c-(l+1)).split(&quot;,&quot;),h=1;switch(u){case&quot;rgba&quot;:if(4!==f.length)return null;h=o(f.pop());case&quot;rgb&quot;:return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case&quot;hsla&quot;:if(4!==f.length)return null;h=o(f.pop());case&quot;hsl&quot;:if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),g=o(f[2]),m=g&lt;=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,tt=function(t,e,r,n){void 0===n&amp;&amp;(n=1),this.r=t,this.g=e,this.b=r,this.a=n};tt.parse=function(t){if(t){if(t instanceof tt)return t;if(&quot;string&quot;==typeof t){var e=Q(t);if(e)return new tt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},tt.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return&quot;rgba(&quot;+Math.round(e)+&quot;,&quot;+Math.round(r)+&quot;,&quot;+Math.round(n)+&quot;,&quot;+i+&quot;)&quot;},tt.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},tt.black=new tt(0,0,0,1),tt.white=new tt(1,1,1,1),tt.transparent=new tt(0,0,0,0);var et=function(t,e,r){this.sensitivity=t?e?&quot;variant&quot;:&quot;case&quot;:e?&quot;accent&quot;:&quot;base&quot;,this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:&quot;search&quot;})};et.prototype.compare=function(t,e){return this.collator.compare(t,e)},et.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var rt=function(t,e,r){this.type=X,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function nt(t,e,r,n){return&quot;number&quot;==typeof t&amp;&amp;t&gt;=0&amp;&amp;t&lt;=255&amp;&amp;&quot;number&quot;==typeof e&amp;&amp;e&gt;=0&amp;&amp;e&lt;=255&amp;&amp;&quot;number&quot;==typeof r&amp;&amp;r&gt;=0&amp;&amp;r&lt;=255?void 0===n||&quot;number&quot;==typeof n&amp;&amp;n&gt;=0&amp;&amp;n&lt;=1?null:&quot;Invalid rgba value [&quot;+[t,e,r,n].join(&quot;, &quot;)+&quot;]: 'a' must be between 0 and 1.&quot;:&quot;Invalid rgba value [&quot;+(&quot;number&quot;==typeof n?[t,e,r,n]:[t,e,r]).join(&quot;, &quot;)+&quot;]: 'r', 'g', and 'b' must be between 0 and 255.&quot;}function it(t){if(null===t)return V;if(&quot;string&quot;==typeof t)return q;if(&quot;boolean&quot;==typeof t)return H;if(&quot;number&quot;==typeof t)return U;if(t instanceof tt)return G;if(t instanceof et)return X;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n&lt;i.length;n+=1){var a=it(i[n]);if(e){if(e===a)continue;e=Y;break}e=a}return Z(e||Y,r)}return W}rt.parse=function(t,e){if(2!==t.length)return e.error(&quot;Expected one argument.&quot;);var r=t[1];if(&quot;object&quot;!=typeof r||Array.isArray(r))return e.error(&quot;Collator options argument must be an object.&quot;);var n=e.parse(void 0!==r[&quot;case-sensitive&quot;]&amp;&amp;r[&quot;case-sensitive&quot;],1,H);if(!n)return null;var i=e.parse(void 0!==r[&quot;diacritic-sensitive&quot;]&amp;&amp;r[&quot;diacritic-sensitive&quot;],1,H);if(!i)return null;var a=null;return r.locale&amp;&amp;!(a=e.parse(r.locale,1,q))?null:new rt(n,i,a)},rt.prototype.evaluate=function(t){return new et(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},rt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&amp;&amp;t(this.locale)},rt.prototype.possibleOutputs=function(){return[void 0]},rt.prototype.serialize=function(){var t={};return t[&quot;case-sensitive&quot;]=this.caseSensitive.serialize(),t[&quot;diacritic-sensitive&quot;]=this.diacriticSensitive.serialize(),this.locale&amp;&amp;(t.locale=this.locale.serialize()),[&quot;collator&quot;,t]};var at=function(t,e){this.type=t,this.value=e};at.parse=function(t,e){if(2!==t.length)return e.error(&quot;'literal' expression requires exactly one argument, but found &quot;+(t.length-1)+&quot; instead.&quot;);if(!function t(e){if(null===e)return!0;if(&quot;string&quot;==typeof e)return!0;if(&quot;boolean&quot;==typeof e)return!0;if(&quot;number&quot;==typeof e)return!0;if(e instanceof tt)return!0;if(e instanceof et)return!0;if(Array.isArray(e)){for(var r=0,n=e;r&lt;n.length;r+=1)if(!t(n[r]))return!1;return!0}if(&quot;object&quot;==typeof e){for(var i in e)if(!t(e[i]))return!1;return!0}return!1}(t[1]))return e.error(&quot;invalid value&quot;);var r=t[1],n=it(r),i=e.expectedType;return&quot;array&quot;!==n.kind||0!==n.N||!i||&quot;array&quot;!==i.kind||&quot;number&quot;==typeof i.N&amp;&amp;0!==i.N||(n=i),new at(n,r)},at.prototype.evaluate=function(){return this.value},at.prototype.eachChild=function(){},at.prototype.possibleOutputs=function(){return[this.value]},at.prototype.serialize=function(){return&quot;array&quot;===this.type.kind||&quot;object&quot;===this.type.kind?[&quot;literal&quot;,this.value]:this.value instanceof tt?[&quot;rgba&quot;].concat(this.value.toArray()):this.value};var ot=function(t){this.name=&quot;ExpressionEvaluationError&quot;,this.message=t};ot.prototype.toJSON=function(){return this.message};var st={string:q,number:U,boolean:H,object:W},lt=function(t,e){this.type=t,this.args=e};lt.parse=function(t,e){if(t.length&lt;2)return e.error(&quot;Expected at least one argument.&quot;);for(var r=t[0],n=st[r],i=[],a=1;a&lt;t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new lt(n,i)},lt.prototype.evaluate=function(t){for(var e=0;e&lt;this.args.length;e++){var r=this.args[e].evaluate(t);if(!K(this.type,it(r)))return r;if(e===this.args.length-1)throw new ot(&quot;Expected value to be of type &quot;+$(this.type)+&quot;, but found &quot;+$(it(r))+&quot; instead.&quot;)}return null},lt.prototype.eachChild=function(t){this.args.forEach(t)},lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},lt.prototype.serialize=function(){return[this.type.kind].concat(this.args.map(function(t){return t.serialize()}))};var ct={string:q,number:U,boolean:H},ut=function(t,e){this.type=t,this.input=e};ut.parse=function(t,e){if(t.length&lt;2||t.length&gt;4)return e.error(&quot;Expected 1, 2, or 3 arguments, but found &quot;+(t.length-1)+&quot; instead.&quot;);var r,n;if(t.length&gt;2){var i=t[1];if(&quot;string&quot;!=typeof i||!(i in ct))return e.error('The item type argument of &quot;array&quot; must be one of string, number, boolean',1);r=ct[i]}else r=Y;if(t.length&gt;3){if(&quot;number&quot;!=typeof t[2]||t[2]&lt;0||t[2]!==Math.floor(t[2]))return e.error('The length argument to &quot;array&quot; must be a positive integer literal',2);n=t[2]}var a=Z(r,n),o=e.parse(t[t.length-1],t.length-1,Y);return o?new ut(a,o):null},ut.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(K(this.type,it(e)))throw new ot(&quot;Expected value to be of type &quot;+$(this.type)+&quot;, but found &quot;+$(it(e))+&quot; instead.&quot;);return e},ut.prototype.eachChild=function(t){t(this.input)},ut.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},ut.prototype.serialize=function(){var t=[&quot;array&quot;],e=this.type.itemType;if(&quot;string&quot;===e.kind||&quot;number&quot;===e.kind||&quot;boolean&quot;===e.kind){t.push(e.kind);var r=this.type.N;&quot;number&quot;==typeof r&amp;&amp;t.push(r)}return t.push(this.input.serialize()),t};var ft={&quot;to-number&quot;:U,&quot;to-color&quot;:G},ht=function(t,e){this.type=t,this.args=e};ht.parse=function(t,e){if(t.length&lt;2)return e.error(&quot;Expected at least one argument.&quot;);for(var r=t[0],n=ft[r],i=[],a=1;a&lt;t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new ht(n,i)},ht.prototype.evaluate=function(t){if(&quot;color&quot;===this.type.kind){for(var e,r,n=0,i=this.args;n&lt;i.length;n+=1)if(r=null,&quot;string&quot;==typeof(e=i[n].evaluate(t))){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&amp;&amp;!(r=e.length&lt;3||e.length&gt;4?&quot;Invalid rbga value &quot;+JSON.stringify(e)+&quot;: expected an array containing either three or four numeric values.&quot;:nt(e[0],e[1],e[2],e[3])))return new tt(e[0]/255,e[1]/255,e[2]/255,e[3]);throw new ot(r||&quot;Could not parse color from value '&quot;+(&quot;string&quot;==typeof e?e:JSON.stringify(e))+&quot;'&quot;)}for(var o=null,s=0,l=this.args;s&lt;l.length;s+=1)if(null!==(o=l[s].evaluate(t))){var c=Number(o);if(!isNaN(c))return c}throw new ot(&quot;Could not convert &quot;+JSON.stringify(o)+&quot; to number.&quot;)},ht.prototype.eachChild=function(t){this.args.forEach(t)},ht.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},ht.prototype.serialize=function(){var t=[&quot;to-&quot;+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var pt=[&quot;Unknown&quot;,&quot;Point&quot;,&quot;LineString&quot;,&quot;Polygon&quot;],dt=function(){this._parseColorCache={}};dt.prototype.id=function(){return this.feature&amp;&amp;&quot;id&quot;in this.feature?this.feature.id:null},dt.prototype.geometryType=function(){return this.feature?&quot;number&quot;==typeof this.feature.type?pt[this.feature.type]:this.feature.type:null},dt.prototype.properties=function(){return this.feature&amp;&amp;this.feature.properties||{}},dt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=tt.parse(t)),e};var gt=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};function mt(t){if(t instanceof gt){if(&quot;get&quot;===t.name&amp;&amp;1===t.args.length)return!1;if(&quot;has&quot;===t.name&amp;&amp;1===t.args.length)return!1;if(&quot;properties&quot;===t.name||&quot;geometry-type&quot;===t.name||&quot;id&quot;===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&amp;&amp;!mt(t)&amp;&amp;(e=!1)}),e}function vt(t,e){if(t instanceof gt&amp;&amp;e.indexOf(t.name)&gt;=0)return!1;var r=!0;return t.eachChild(function(t){r&amp;&amp;!vt(t,e)&amp;&amp;(r=!1)}),r}gt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},gt.prototype.eachChild=function(t){this.args.forEach(t)},gt.prototype.possibleOutputs=function(){return[void 0]},gt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},gt.parse=function(t,e){var r=t[0],n=gt.definitions[r];if(!n)return e.error('Unknown expression &quot;'+r+'&quot;. If you wanted a literal array, use [&quot;literal&quot;, [...]].',0);for(var i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),s=[],l=1;l&lt;t.length;l++){var c=t[l],u=void 0;if(1===o.length){var f=o[0][0];u=Array.isArray(f)?f[l-1]:f.type}var h=e.parse(c,1+s.length,u);if(!h)return null;s.push(h)}for(var p=null,d=0,g=o;d&lt;g.length;d+=1){var m=g[d],v=m[0],y=m[1];if(p=new xt(e.registry,e.path,null,e.scope),Array.isArray(v)&amp;&amp;v.length!==s.length)p.error(&quot;Expected &quot;+v.length+&quot; arguments, but found &quot;+s.length+&quot; instead.&quot;);else{for(var x=0;x&lt;s.length;x++){var b=Array.isArray(v)?v[x]:v.type,_=s[x];p.concat(x+1).checkSubtype(b,_.type)}if(0===p.errors.length)return new gt(r,i,y,s)}}if(1===o.length)e.errors.push.apply(e.errors,p.errors);else{var w=(o.length?o:a).map(function(t){var e;return e=t[0],Array.isArray(e)?&quot;(&quot;+e.map($).join(&quot;, &quot;)+&quot;)&quot;:&quot;(&quot;+$(e.type)+&quot;...)&quot;}).join(&quot; | &quot;),k=s.map(function(t){return $(t.type)}).join(&quot;, &quot;);e.error(&quot;Expected arguments of type &quot;+w+&quot;, but found (&quot;+k+&quot;) instead.&quot;)}return null},gt.register=function(t,e){for(var r in gt.definitions=e,e)t[r]=gt};var yt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};yt.parse=function(t,e){if(2!==t.length||&quot;string&quot;!=typeof t[1])return e.error(&quot;'var' expression requires exactly one string literal argument.&quot;);var r=t[1];return e.scope.has(r)?new yt(r,e.scope.get(r)):e.error('Unknown variable &quot;'+r+'&quot;. Make sure &quot;'+r+'&quot; has been bound in an enclosing &quot;let&quot; expression before using it.',1)},yt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},yt.prototype.eachChild=function(){},yt.prototype.possibleOutputs=function(){return[void 0]},yt.prototype.serialize=function(){return[&quot;var&quot;,this.name]};var xt=function(t,e,r,n,i){void 0===e&amp;&amp;(e=[]),void 0===n&amp;&amp;(n=new j),void 0===i&amp;&amp;(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return&quot;[&quot;+t+&quot;]&quot;}).join(&quot;&quot;),this.scope=n,this.errors=i,this.expectedType=r};function bt(t,e){for(var r,n,i=0,a=t.length-1,o=0;i&lt;=a;){if(r=t[o=Math.floor((i+a)/2)],n=t[o+1],e===r||e&gt;r&amp;&amp;e&lt;n)return o;if(r&lt;e)i=o+1;else{if(!(r&gt;e))throw new ot(&quot;Input is not a number.&quot;);a=o-1}}return Math.max(o-1,0)}xt.prototype.parse=function(t,e,r,n,i){return void 0===i&amp;&amp;(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},xt.prototype._parse=function(t,e){if(null!==t&amp;&amp;&quot;string&quot;!=typeof t&amp;&amp;&quot;boolean&quot;!=typeof t&amp;&amp;&quot;number&quot;!=typeof t||(t=[&quot;literal&quot;,t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use [&quot;literal&quot;, []].');var r=t[0];if(&quot;string&quot;!=typeof r)return this.error(&quot;Expression name must be a string, but found &quot;+typeof r+' instead. If you wanted a literal array, use [&quot;literal&quot;, [...]].',0),null;var n=this.registry[r];if(n){var i=n.parse(t,this);if(!i)return null;if(this.expectedType){var a=this.expectedType,o=i.type;if(&quot;string&quot;!==a.kind&amp;&amp;&quot;number&quot;!==a.kind&amp;&amp;&quot;boolean&quot;!==a.kind&amp;&amp;&quot;object&quot;!==a.kind||&quot;value&quot;!==o.kind)if(&quot;array&quot;===a.kind&amp;&amp;&quot;value&quot;===o.kind)e.omitTypeAnnotations||(i=new ut(a,i));else if(&quot;color&quot;!==a.kind||&quot;value&quot;!==o.kind&amp;&amp;&quot;string&quot;!==o.kind){if(this.checkSubtype(this.expectedType,i.type))return null}else e.omitTypeAnnotations||(i=new ht(a,[i]));else e.omitTypeAnnotations||(i=new lt(a,[i]))}if(!(i instanceof at)&amp;&amp;function t(e){if(e instanceof yt)return t(e.boundExpression);if(e instanceof gt&amp;&amp;&quot;error&quot;===e.name)return!1;if(e instanceof rt)return!1;var r=e instanceof ht||e instanceof lt||e instanceof ut,n=!0;return e.eachChild(function(e){n=r?n&amp;&amp;t(e):n&amp;&amp;e instanceof at}),!!n&amp;&amp;(mt(e)&amp;&amp;vt(e,[&quot;zoom&quot;,&quot;heatmap-density&quot;,&quot;line-progress&quot;,&quot;is-supported-script&quot;]))}(i)){var s=new dt;try{i=new at(i.type,i.evaluate(s))}catch(t){return this.error(t.message),null}}return i}return this.error('Unknown expression &quot;'+r+'&quot;. If you wanted a literal array, use [&quot;literal&quot;, [...]].',0)}return void 0===t?this.error(&quot;'undefined' value invalid. Use null instead.&quot;):&quot;object&quot;==typeof t?this.error('Bare objects invalid. Use [&quot;literal&quot;, {...}] instead.'):this.error(&quot;Expected an array, but found &quot;+typeof t+&quot; instead.&quot;)},xt.prototype.concat=function(t,e,r){var n=&quot;number&quot;==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new xt(this.registry,n,e||null,i,this.errors)},xt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- &gt;0;)e[r]=arguments[r+1];var n=&quot;&quot;+this.key+e.map(function(t){return&quot;[&quot;+t+&quot;]&quot;}).join(&quot;&quot;);this.errors.push(new N(n,t))},xt.prototype.checkSubtype=function(t,e){var r=K(t,e);return r&amp;&amp;this.error(r),r};var _t=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n&lt;i.length;n+=1){var a=i[n],o=a[0],s=a[1];this.labels.push(o),this.outputs.push(s)}};function wt(t,e,r){return t*(1-r)+e*r}_t.parse=function(t,e){var r=t[1],n=t.slice(2);if(t.length-1&lt;4)return e.error(&quot;Expected at least 4 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if((t.length-1)%2!=0)return e.error(&quot;Expected an even number of arguments.&quot;);if(!(r=e.parse(r,1,U)))return null;var i=[],a=null;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(a=e.expectedType),n.unshift(-1/0);for(var o=0;o&lt;n.length;o+=2){var s=n[o],l=n[o+1],c=o+1,u=o+2;if(&quot;number&quot;!=typeof s)return e.error('Input/output pairs for &quot;step&quot; expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(i.length&amp;&amp;i[i.length-1][0]&gt;=s)return e.error('Input/output pairs for &quot;step&quot; expressions must be arranged with input values in strictly ascending order.',c);var f=e.parse(l,u,a);if(!f)return null;a=a||f.type,i.push([s,f])}return new _t(a,r,i)},_t.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n&lt;=e[0])return r[0].evaluate(t);var i=e.length;return n&gt;=e[i-1]?r[i-1].evaluate(t):r[bt(e,n)].evaluate(t)},_t.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e&lt;r.length;e+=1)t(r[e])},_t.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},_t.prototype.serialize=function(){for(var t=[&quot;step&quot;,this.input.serialize()],e=0;e&lt;this.labels.length;e++)e&gt;0&amp;&amp;t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var kt=Object.freeze({number:wt,color:function(t,e,r){return new tt(wt(t.r,e.r,r),wt(t.g,e.g,r),wt(t.b,e.b,r),wt(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return wt(t,e[n],r)})}}),Mt=function(t,e,r,n){this.type=t,this.interpolation=e,this.input=r,this.labels=[],this.outputs=[];for(var i=0,a=n;i&lt;a.length;i+=1){var o=a[i],s=o[0],l=o[1];this.labels.push(s),this.outputs.push(l)}};function At(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}Mt.interpolationFactor=function(t,e,r,n){var i=0;if(&quot;exponential&quot;===t.name)i=At(e,t.base,r,n);else if(&quot;linear&quot;===t.name)i=At(e,1,r,n);else if(&quot;cubic-bezier&quot;===t.name){var o=t.controlPoints;i=new a(o[0],o[1],o[2],o[3]).solve(At(e,1,r,n))}return i},Mt.parse=function(t,e){var r=t[1],n=t[2],i=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error(&quot;Expected an interpolation type expression.&quot;,1);if(&quot;linear&quot;===r[0])r={name:&quot;linear&quot;};else if(&quot;exponential&quot;===r[0]){var a=r[1];if(&quot;number&quot;!=typeof a)return e.error(&quot;Exponential interpolation requires a numeric base.&quot;,1,1);r={name:&quot;exponential&quot;,base:a}}else{if(&quot;cubic-bezier&quot;!==r[0])return e.error(&quot;Unknown interpolation type &quot;+String(r[0]),1,0);var o=r.slice(1);if(4!==o.length||o.some(function(t){return&quot;number&quot;!=typeof t||t&lt;0||t&gt;1}))return e.error(&quot;Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.&quot;,1);r={name:&quot;cubic-bezier&quot;,controlPoints:o}}if(t.length-1&lt;4)return e.error(&quot;Expected at least 4 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if((t.length-1)%2!=0)return e.error(&quot;Expected an even number of arguments.&quot;);if(!(n=e.parse(n,2,U)))return null;var s=[],l=null;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(l=e.expectedType);for(var c=0;c&lt;i.length;c+=2){var u=i[c],f=i[c+1],h=c+3,p=c+4;if(&quot;number&quot;!=typeof u)return e.error('Input/output pairs for &quot;interpolate&quot; expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(s.length&amp;&amp;s[s.length-1][0]&gt;=u)return e.error('Input/output pairs for &quot;interpolate&quot; expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(f,p,l);if(!d)return null;l=l||d.type,s.push([u,d])}return&quot;number&quot;===l.kind||&quot;color&quot;===l.kind||&quot;array&quot;===l.kind&amp;&amp;&quot;number&quot;===l.itemType.kind&amp;&amp;&quot;number&quot;==typeof l.N?new Mt(l,r,n,s):e.error(&quot;Type &quot;+$(l)+&quot; is not interpolatable.&quot;)},Mt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n&lt;=e[0])return r[0].evaluate(t);var i=e.length;if(n&gt;=e[i-1])return r[i-1].evaluate(t);var a=bt(e,n),o=e[a],s=e[a+1],l=Mt.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return kt[this.type.kind.toLowerCase()](c,u,l)},Mt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e&lt;r.length;e+=1)t(r[e])},Mt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},Mt.prototype.serialize=function(){for(var t=[&quot;interpolate&quot;,&quot;linear&quot;===this.interpolation.name?[&quot;linear&quot;]:&quot;exponential&quot;===this.interpolation.name?1===this.interpolation.base?[&quot;linear&quot;]:[&quot;exponential&quot;,this.interpolation.base]:[&quot;cubic-bezier&quot;].concat(this.interpolation.controlPoints),this.input.serialize()],e=0;e&lt;this.labels.length;e++)t.push(this.labels[e],this.outputs[e].serialize());return t};var Tt=function(t,e){this.type=t,this.args=e};Tt.parse=function(t,e){if(t.length&lt;2)return e.error(&quot;Expectected at least one argument.&quot;);var r=null,n=e.expectedType;n&amp;&amp;&quot;value&quot;!==n.kind&amp;&amp;(r=n);for(var i=[],a=0,o=t.slice(1);a&lt;o.length;a+=1){var s=o[a],l=e.parse(s,1+i.length,r,void 0,{omitTypeAnnotations:!0});if(!l)return null;r=r||l.type,i.push(l)}var c=n&amp;&amp;i.some(function(t){return K(n,t.type)});return new Tt(c?Y:r,i)},Tt.prototype.evaluate=function(t){for(var e=null,r=0,n=this.args;r&lt;n.length&amp;&amp;null===(e=n[r].evaluate(t));r+=1);return e},Tt.prototype.eachChild=function(t){this.args.forEach(t)},Tt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},Tt.prototype.serialize=function(){var t=[&quot;coalesce&quot;];return this.eachChild(function(e){t.push(e.serialize())}),t};var St=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};St.prototype.evaluate=function(t){return this.result.evaluate(t)},St.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e&lt;r.length;e+=1)t(r[e][1]);t(this.result)},St.parse=function(t,e){if(t.length&lt;4)return e.error(&quot;Expected at least 3 arguments, but found &quot;+(t.length-1)+&quot; instead.&quot;);for(var r=[],n=1;n&lt;t.length-1;n+=2){var i=t[n];if(&quot;string&quot;!=typeof i)return e.error(&quot;Expected string, but found &quot;+typeof i+&quot; instead.&quot;,n);if(/[^a-zA-Z0-9_]/.test(i))return e.error(&quot;Variable names must contain only alphanumeric characters or '_'.&quot;,n);var a=e.parse(t[n+1],n+1);if(!a)return null;r.push([i,a])}var o=e.parse(t[t.length-1],t.length-1,void 0,r);return o?new St(r,o):null},St.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},St.prototype.serialize=function(){for(var t=[&quot;let&quot;],e=0,r=this.bindings;e&lt;r.length;e+=1){var n=r[e],i=n[0],a=n[1];t.push(i,a.serialize())}return t.push(this.result.serialize()),t};var Et=function(t,e,r){this.type=t,this.index=e,this.input=r};Et.parse=function(t,e){if(3!==t.length)return e.error(&quot;Expected 2 arguments, but found &quot;+(t.length-1)+&quot; instead.&quot;);var r=e.parse(t[1],1,U),n=e.parse(t[2],2,Z(e.expectedType||Y));if(!r||!n)return null;var i=n.type;return new Et(i.itemType,r,n)},Et.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e&lt;0)throw new ot(&quot;Array index out of bounds: &quot;+e+&quot; &lt; 0.&quot;);if(e&gt;=r.length)throw new ot(&quot;Array index out of bounds: &quot;+e+&quot; &gt; &quot;+(r.length-1)+&quot;.&quot;);if(e!==Math.floor(e))throw new ot(&quot;Array index must be an integer, but found &quot;+e+&quot; instead.&quot;);return r[e]},Et.prototype.eachChild=function(t){t(this.index),t(this.input)},Et.prototype.possibleOutputs=function(){return[void 0]},Et.prototype.serialize=function(){return[&quot;at&quot;,this.index.serialize(),this.input.serialize()]};var Ct=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Ct.parse=function(t,e){if(t.length&lt;5)return e.error(&quot;Expected at least 4 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if(t.length%2!=1)return e.error(&quot;Expected an even number of arguments.&quot;);var r,n;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(n=e.expectedType);for(var i={},a=[],o=2;o&lt;t.length-1;o+=2){var s=t[o],l=t[o+1];Array.isArray(s)||(s=[s]);var c=e.concat(o);if(0===s.length)return c.error(&quot;Expected at least one branch label.&quot;);for(var u=0,f=s;u&lt;f.length;u+=1){var h=f[u];if(&quot;number&quot;!=typeof h&amp;&amp;&quot;string&quot;!=typeof h)return c.error(&quot;Branch labels must be numbers or strings.&quot;);if(&quot;number&quot;==typeof h&amp;&amp;Math.abs(h)&gt;Number.MAX_SAFE_INTEGER)return c.error(&quot;Branch labels must be integers no larger than &quot;+Number.MAX_SAFE_INTEGER+&quot;.&quot;);if(&quot;number&quot;==typeof h&amp;&amp;Math.floor(h)!==h)return c.error(&quot;Numeric branch labels must be integer values.&quot;);if(r){if(c.checkSubtype(r,it(h)))return null}else r=it(h);if(void 0!==i[String(h)])return c.error(&quot;Branch labels must be unique.&quot;);i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,r);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?new Ct(r,n,d,i,a,g):null},Ct.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Ct.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Ct.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Ct.prototype.serialize=function(){for(var t=this,e=[&quot;match&quot;,this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i&lt;a.length;i+=1){var o=a[i],s=n[t.cases[o]];void 0===s?(n[t.cases[o]]=r.length,r.push([t.cases[o],[o]])):r[s][1].push(o)}for(var l=function(e){return&quot;number&quot;===t.input.type.kind?Number(e):e},c=0,u=r;c&lt;u.length;c+=1){var f=u[c],h=f[0],p=f[1];1===p.length?e.push(l(p[0])):e.push(p.map(l)),e.push(t.outputs[h].serialize())}return e.push(this.otherwise.serialize()),e};var Lt=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function zt(t){return&quot;string&quot;===t.kind||&quot;number&quot;===t.kind||&quot;boolean&quot;===t.kind||&quot;null&quot;===t.kind}function Pt(t,e){return function(){function r(t,e,r){this.type=H,this.lhs=t,this.rhs=e,this.collator=r}return r.parse=function(t,e){if(3!==t.length&amp;&amp;4!==t.length)return e.error(&quot;Expected two or three arguments.&quot;);var n=e.parse(t[1],1,Y);if(!n)return null;var i=e.parse(t[2],2,Y);if(!i)return null;if(!zt(n.type)&amp;&amp;!zt(i.type))return e.error(&quot;Expected at least one argument to be a string, number, boolean, or null, but found (&quot;+$(n.type)+&quot;, &quot;+$(i.type)+&quot;) instead.&quot;);if(n.type.kind!==i.type.kind&amp;&amp;&quot;value&quot;!==n.type.kind&amp;&amp;&quot;value&quot;!==i.type.kind)return e.error(&quot;Cannot compare &quot;+$(n.type)+&quot; and &quot;+$(i.type)+&quot;.&quot;);var a=null;if(4===t.length){if(&quot;string&quot;!==n.type.kind&amp;&amp;&quot;string&quot;!==i.type.kind)return e.error(&quot;Cannot use collator to compare non-string types.&quot;);if(!(a=e.parse(t[3],3,X)))return null}return new r(n,i,a)},r.prototype.evaluate=function(t){var r=this.collator?0===this.collator.evaluate(t).compare(this.lhs.evaluate(t),this.rhs.evaluate(t)):this.lhs.evaluate(t)===this.rhs.evaluate(t);return e?!r:r},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&amp;&amp;t(this.collator)},r.prototype.possibleOutputs=function(){return[!0,!1]},r.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},r}()}Lt.parse=function(t,e){if(t.length&lt;4)return e.error(&quot;Expected at least 3 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if(t.length%2!=0)return e.error(&quot;Expected an odd number of arguments.&quot;);var r;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(r=e.expectedType);for(var n=[],i=1;i&lt;t.length-1;i+=2){var a=e.parse(t[i],i,H);if(!a)return null;var o=e.parse(t[i+1],i+1,r);if(!o)return null;n.push([a,o]),r=r||o.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Lt(r,n,s):null},Lt.prototype.evaluate=function(t){for(var e=0,r=this.branches;e&lt;r.length;e+=1){var n=r[e],i=n[0],a=n[1];if(i.evaluate(t))return a.evaluate(t)}return this.otherwise.evaluate(t)},Lt.prototype.eachChild=function(t){for(var e=0,r=this.branches;e&lt;r.length;e+=1){var n=r[e],i=n[0],a=n[1];t(i),t(a)}t(this.otherwise)},Lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Lt.prototype.serialize=function(){var t=[&quot;case&quot;];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ot=Pt(&quot;==&quot;,!1),It=Pt(&quot;!=&quot;,!0),Dt=function(t){this.type=U,this.input=t};Dt.parse=function(t,e){if(2!==t.length)return e.error(&quot;Expected 1 argument, but found &quot;+(t.length-1)+&quot; instead.&quot;);var r=e.parse(t[1],1);return r?&quot;array&quot;!==r.type.kind&amp;&amp;&quot;string&quot;!==r.type.kind&amp;&amp;&quot;value&quot;!==r.type.kind?e.error(&quot;Expected argument of type string or array, but found &quot;+$(r.type)+&quot; instead.&quot;):new Dt(r):null},Dt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(&quot;string&quot;==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ot(&quot;Expected value to be of type string or array, but found &quot;+$(it(e))+&quot; instead.&quot;)},Dt.prototype.eachChild=function(t){t(this.input)},Dt.prototype.possibleOutputs=function(){return[void 0]},Dt.prototype.serialize=function(){var t=[&quot;length&quot;];return this.eachChild(function(e){t.push(e.serialize())}),t};var Rt={&quot;==&quot;:Ot,&quot;!=&quot;:It,array:ut,at:Et,boolean:lt,case:Lt,coalesce:Tt,collator:rt,interpolate:Mt,length:Dt,let:St,literal:at,match:Ct,number:lt,object:lt,step:_t,string:lt,&quot;to-color&quot;:ht,&quot;to-number&quot;:ht,var:yt};function Bt(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=nt(r,n,i,o);if(s)throw new ot(s);return new tt(r/255*o,n/255*o,i/255*o,o)}function Ft(t,e){return t in e}function Nt(t,e){var r=e[t];return void 0===r?null:r}function jt(t,e){var r=e[0],n=e[1];return r.evaluate(t)&lt;n.evaluate(t)}function Vt(t,e){var r=e[0],n=e[1];return r.evaluate(t)&gt;n.evaluate(t)}function Ut(t,e){var r=e[0],n=e[1];return r.evaluate(t)&lt;=n.evaluate(t)}function qt(t,e){var r=e[0],n=e[1];return r.evaluate(t)&gt;=n.evaluate(t)}function Ht(t){return{type:t}}function Gt(t){return{result:&quot;success&quot;,value:t}}function Wt(t){return{result:&quot;error&quot;,value:t}}gt.register(Rt,{error:[{kind:&quot;error&quot;},[q],function(t,e){var r=e[0];throw new ot(r.evaluate(t))}],typeof:[q,[Y],function(t,e){return $(it(e[0].evaluate(t)))}],&quot;to-string&quot;:[q,[Y],function(t,e){var r=e[0],n=typeof(r=r.evaluate(t));return null===r?&quot;&quot;:&quot;string&quot;===n||&quot;number&quot;===n||&quot;boolean&quot;===n?String(r):r instanceof tt?r.toString():JSON.stringify(r)}],&quot;to-boolean&quot;:[H,[Y],function(t,e){var r=e[0];return Boolean(r.evaluate(t))}],&quot;to-rgba&quot;:[Z(U,4),[G],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[G,[U,U,U],Bt],rgba:[G,[U,U,U,U],Bt],has:{type:H,overloads:[[[q],function(t,e){return Ft(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Ft(r.evaluate(t),n.evaluate(t))}]]},get:{type:Y,overloads:[[[q],function(t,e){return Nt(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Nt(r.evaluate(t),n.evaluate(t))}]]},properties:[W,[],function(t){return t.properties()}],&quot;geometry-type&quot;:[q,[],function(t){return t.geometryType()}],id:[Y,[],function(t){return t.id()}],zoom:[U,[],function(t){return t.globals.zoom}],&quot;heatmap-density&quot;:[U,[],function(t){return t.globals.heatmapDensity||0}],&quot;line-progress&quot;:[U,[],function(t){return t.globals.lineProgress||0}],&quot;+&quot;:[U,Ht(U),function(t,e){for(var r=0,n=0,i=e;n&lt;i.length;n+=1)r+=i[n].evaluate(t);return r}],&quot;*&quot;:[U,Ht(U),function(t,e){for(var r=1,n=0,i=e;n&lt;i.length;n+=1)r*=i[n].evaluate(t);return r}],&quot;-&quot;:{type:U,overloads:[[[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[U],function(t,e){return-e[0].evaluate(t)}]]},&quot;/&quot;:[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],&quot;%&quot;:[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[U,[],function(){return Math.LN2}],pi:[U,[],function(){return Math.PI}],e:[U,[],function(){return Math.E}],&quot;^&quot;:[U,[U,U],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[U,[U],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[U,[U],function(t,e){var r=e[0];return Math.log10(r.evaluate(t))}],ln:[U,[U],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[U,[U],function(t,e){var r=e[0];return Math.log2(r.evaluate(t))}],sin:[U,[U],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[U,[U],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[U,[U],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[U,[U],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[U,[U],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[U,[U],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[U,Ht(U),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[U,Ht(U),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[U,[U],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[U,[U],function(t,e){var r=e[0].evaluate(t);return r&lt;0?-Math.round(-r):Math.round(r)}],floor:[U,[U],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[U,[U],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],&quot;filter-==&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],&quot;filter-id-==&quot;:[H,[Y],function(t,e){var r=e[0];return t.id()===r.value}],&quot;filter-type-==&quot;:[H,[q],function(t,e){var r=e[0];return t.geometryType()===r.value}],&quot;filter-&lt;&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&lt;a}],&quot;filter-id-&lt;&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&lt;i}],&quot;filter-&gt;&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&gt;a}],&quot;filter-id-&gt;&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&gt;i}],&quot;filter-&lt;=&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&lt;=a}],&quot;filter-id-&lt;=&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&lt;=i}],&quot;filter-&gt;=&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&gt;=a}],&quot;filter-id-&gt;=&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&gt;=i}],&quot;filter-has&quot;:[H,[Y],function(t,e){return e[0].value in t.properties()}],&quot;filter-has-id&quot;:[H,[],function(t){return null!==t.id()}],&quot;filter-type-in&quot;:[H,[Z(q)],function(t,e){return e[0].value.indexOf(t.geometryType())&gt;=0}],&quot;filter-id-in&quot;:[H,[Z(Y)],function(t,e){return e[0].value.indexOf(t.id())&gt;=0}],&quot;filter-in-small&quot;:[H,[q,Z(Y)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])&gt;=0}],&quot;filter-in-large&quot;:[H,[q,Z(Y)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r&lt;=n;){var i=r+n&gt;&gt;1;if(e[i]===t)return!0;e[i]&gt;t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],&quot;&gt;&quot;:{type:H,overloads:[[[U,U],Vt],[[q,q],Vt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&gt;0}]]},&quot;&lt;&quot;:{type:H,overloads:[[[U,U],jt],[[q,q],jt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&lt;0}]]},&quot;&gt;=&quot;:{type:H,overloads:[[[U,U],qt],[[q,q],qt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&gt;=0}]]},&quot;&lt;=&quot;:{type:H,overloads:[[[U,U],Ut],[[q,q],Ut],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&lt;=0}]]},all:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&amp;&amp;n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r&lt;n.length;r+=1)if(!n[r].evaluate(t))return!1;return!0}]]},any:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r&lt;n.length;r+=1)if(n[r].evaluate(t))return!0;return!1}]]},&quot;!&quot;:[H,[H],function(t,e){return!e[0].evaluate(t)}],&quot;is-supported-script&quot;:[H,[q],function(t,e){var r=e[0],n=t.globals&amp;&amp;t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[q,[q],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[q,[q],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[q,Ht(q),function(t,e){return e.map(function(e){return e.evaluate(t)}).join(&quot;&quot;)}],&quot;resolved-locale&quot;:[q,[X],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Yt=.95047,Xt=1,Zt=1.08883,$t=4/29,Jt=6/29,Kt=3*Jt*Jt,Qt=Jt*Jt*Jt,te=Math.PI/180,ee=180/Math.PI;function re(t){return t&gt;Qt?Math.pow(t,1/3):t/Kt+$t}function ne(t){return t&gt;Jt?t*t*t:Kt*(t-$t)}function ie(t){return 255*(t&lt;=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ae(t){return(t/=255)&lt;=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oe(t){var e=ae(t.r),r=ae(t.g),n=ae(t.b),i=re((.4124564*e+.3575761*r+.1804375*n)/Yt),a=re((.2126729*e+.7151522*r+.072175*n)/Xt);return{l:116*a-16,a:500*(i-a),b:200*(a-re((.0193339*e+.119192*r+.9503041*n)/Zt)),alpha:t.a}}function se(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Xt*ne(e),r=Yt*ne(r),n=Zt*ne(n),new tt(ie(3.2404542*r-1.5371385*e-.4985314*n),ie(-.969266*r+1.8760108*e+.041556*n),ie(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var le={forward:oe,reverse:se,interpolate:function(t,e,r){return{l:wt(t.l,e.l,r),a:wt(t.a,e.a,r),b:wt(t.b,e.b,r),alpha:wt(t.alpha,e.alpha,r)}}},ce={forward:function(t){var e=oe(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*ee;return{h:a&lt;0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*te,r=t.c;return se({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n&gt;180||n&lt;-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:wt(t.c,e.c,r),l:wt(t.l,e.l,r),alpha:wt(t.alpha,e.alpha,r)}}},ue=Object.freeze({lab:le,hcl:ce});function fe(t){return t instanceof Number?&quot;number&quot;:t instanceof String?&quot;string&quot;:t instanceof Boolean?&quot;boolean&quot;:Array.isArray(t)?&quot;array&quot;:null===t?&quot;null&quot;:typeof t}function he(t){return&quot;object&quot;==typeof t&amp;&amp;null!==t&amp;&amp;!Array.isArray(t)}function pe(t){return t}function de(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function ge(t,e,r,n,i){return de(typeof r===i?n[r]:void 0,t.default,e.default)}function me(t,e,r){if(&quot;number&quot;!==fe(r))return de(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r&lt;=t.stops[0][0])return t.stops[0][1];if(r&gt;=t.stops[n-1][0])return t.stops[n-1][1];var i=xe(t.stops,r);return t.stops[i][1]}function ve(t,e,r){var n=void 0!==t.base?t.base:1;if(&quot;number&quot;!==fe(r))return de(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r&lt;=t.stops[0][0])return t.stops[0][1];if(r&gt;=t.stops[i-1][0])return t.stops[i-1][1];var a=xe(t.stops,r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],c=kt[e.type]||pe;if(t.colorSpace&amp;&amp;&quot;rgb&quot;!==t.colorSpace){var u=ue[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),o))}}return&quot;function&quot;==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&amp;&amp;void 0!==n)return c(r,n,o)}}:c(s,l,o)}function ye(t,e,r){return&quot;color&quot;===e.type?r=tt.parse(r):fe(r)===e.type||&quot;enum&quot;===e.type&amp;&amp;e.values[r]||(r=void 0),de(r,t.default,e.default)}function xe(t,e){for(var r,n,i=0,a=t.length-1,o=0;i&lt;=a;){if(r=t[o=Math.floor((i+a)/2)][0],n=t[o+1][0],e===r||e&gt;r&amp;&amp;e&lt;n)return o;r&lt;e?i=o+1:r&gt;e&amp;&amp;(a=o-1)}return Math.max(o-1,0)}var be=function(t,e){var r;this.expression=t,this._warningHistory={},this._defaultValue=&quot;color&quot;===(r=e).type&amp;&amp;he(r.default)?new tt(0,0,0,0):&quot;color&quot;===r.type?tt.parse(r.default)||null:void 0===r.default?null:r.default,&quot;enum&quot;===e.type&amp;&amp;(this._enumValues=e.values)};function _e(t){return Array.isArray(t)&amp;&amp;t.length&gt;0&amp;&amp;&quot;string&quot;==typeof t[0]&amp;&amp;t[0]in Rt}function we(t,e){var r=new xt(Rt,[],function(t){var e={color:G,string:q,number:U,enum:q,boolean:H};return&quot;array&quot;===t.type?Z(e[t.value]||Y,t.length):e[t.type]||null}(e)),n=r.parse(t);return n?Gt(new be(n,e)):Wt(r.errors)}be.prototype.evaluateWithoutErrorHandling=function(t,e){return this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)},be.prototype.evaluate=function(t,e){this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e;try{var r=this.expression.evaluate(this._evaluator);if(null==r)return this._defaultValue;if(this._enumValues&amp;&amp;!(r in this._enumValues))throw new ot(&quot;Expected value to be one of &quot;+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(&quot;, &quot;)+&quot;, but found &quot;+JSON.stringify(r)+&quot; instead.&quot;);return r}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,&quot;undefined&quot;!=typeof console&amp;&amp;console.warn(t.message)),this._defaultValue}};var ke=function(t,e){this.kind=t,this._styleExpression=e};ke.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},ke.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)};var Me=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,r instanceof Mt&amp;&amp;(this._interpolationType=r.interpolation)};function Ae(t,e){if(&quot;error&quot;===(t=we(t,e)).result)return t;var r=t.value.expression,n=mt(r);if(!n&amp;&amp;!e[&quot;property-function&quot;])return Wt([new N(&quot;&quot;,&quot;property expressions not supported&quot;)]);var i=vt(r,[&quot;zoom&quot;]);if(!i&amp;&amp;!1===e[&quot;zoom-function&quot;])return Wt([new N(&quot;&quot;,&quot;zoom expressions not supported&quot;)]);var a=function t(e){var r=null;if(e instanceof St)r=t(e.result);else if(e instanceof Tt)for(var n=0,i=e.args;n&lt;i.length;n+=1){var a=i[n];if(r=t(a))break}else(e instanceof _t||e instanceof Mt)&amp;&amp;e.input instanceof gt&amp;&amp;&quot;zoom&quot;===e.input.name&amp;&amp;(r=e);return r instanceof N?r:(e.eachChild(function(e){var n=t(e);n instanceof N?r=n:!r&amp;&amp;n?r=new N(&quot;&quot;,'&quot;zoom&quot; expression may only be used as input to a top-level &quot;step&quot; or &quot;interpolate&quot; expression.'):r&amp;&amp;n&amp;&amp;r!==n&amp;&amp;(r=new N(&quot;&quot;,'Only one zoom-based &quot;step&quot; or &quot;interpolate&quot; subexpression may be used in an expression.'))}),r)}(r);return a||i?a instanceof N?Wt([a]):a instanceof Mt&amp;&amp;&quot;piecewise-constant&quot;===e.function?Wt([new N(&quot;&quot;,'&quot;interpolate&quot; expressions cannot be used with this property')]):Gt(a?new Me(n?&quot;camera&quot;:&quot;composite&quot;,t.value,a):new ke(n?&quot;constant&quot;:&quot;source&quot;,t.value)):Wt([new N(&quot;&quot;,'&quot;zoom&quot; expression may only be used as input to a top-level &quot;step&quot; or &quot;interpolate&quot; expression.')])}Me.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Me.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)},Me.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?Mt.interpolationFactor(this._interpolationType,t,e,r):0};var Te=function(t,e){this._parameters=t,this._specification=e,R(this,function t(e,r){var n,i,a,o=&quot;color&quot;===r.type,s=e.stops&amp;&amp;&quot;object&quot;==typeof e.stops[0][0],l=s||void 0!==e.property,c=s||!l,u=e.type||(&quot;interpolated&quot;===r.function?&quot;exponential&quot;:&quot;interval&quot;);if(o&amp;&amp;((e=R({},e)).stops&amp;&amp;(e.stops=e.stops.map(function(t){return[t[0],tt.parse(t[1])]})),e.default?e.default=tt.parse(e.default):e.default=tt.parse(r.default)),e.colorSpace&amp;&amp;&quot;rgb&quot;!==e.colorSpace&amp;&amp;!ue[e.colorSpace])throw new Error(&quot;Unknown color space: &quot;+e.colorSpace);if(&quot;exponential&quot;===u)n=ve;else if(&quot;interval&quot;===u)n=me;else if(&quot;categorical&quot;===u){n=ge,i=Object.create(null);for(var f=0,h=e.stops;f&lt;h.length;f+=1){var p=h[f];i[p[0]]=p[1]}a=typeof e.stops[0][0]}else{if(&quot;identity&quot;!==u)throw new Error('Unknown function type &quot;'+u+'&quot;');n=ye}if(s){for(var d={},g=[],m=0;m&lt;e.stops.length;m++){var v=e.stops[m],y=v[0].zoom;void 0===d[y]&amp;&amp;(d[y]={zoom:y,type:e.type,property:e.property,default:e.default,stops:[]},g.push(y)),d[y].stops.push([v[0].value,v[1]])}for(var x=[],b=0,_=g;b&lt;_.length;b+=1){var w=_[b];x.push([d[w].zoom,t(d[w],r)])}return{kind:&quot;composite&quot;,interpolationFactor:Mt.interpolationFactor.bind(void 0,{name:&quot;linear&quot;}),zoomStops:x.map(function(t){return t[0]}),evaluate:function(t,n){var i=t.zoom;return ve({stops:x,base:e.base},r,i).evaluate(i,n)}}}return c?{kind:&quot;camera&quot;,interpolationFactor:&quot;exponential&quot;===u?Mt.interpolationFactor.bind(void 0,{name:&quot;exponential&quot;,base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var o=t.zoom;return n(e,r,o,i,a)}}:{kind:&quot;source&quot;,evaluate:function(t,o){var s=o&amp;&amp;o.properties?o.properties[e.property]:void 0;return void 0===s?de(e.default,r.default):n(e,r,s,i,a)}}}(this._parameters,this._specification))};function Se(t,e){if(he(t))return new Te(t,e);if(_e(t)){var r=Ae(t,e);if(&quot;error&quot;===r.result)throw new Error(r.value.map(function(t){return t.key+&quot;: &quot;+t.message}).join(&quot;, &quot;));return r.value}var n=t;return&quot;string&quot;==typeof t&amp;&amp;&quot;color&quot;===e.type&amp;&amp;(n=tt.parse(t)),{kind:&quot;constant&quot;,evaluate:function(){return n}}}function Ee(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},a=t.style,o=t.styleSpec,s=[],l=fe(r);if(&quot;object&quot;!==l)return[new I(e,r,&quot;object expected, &quot;+l+&quot; found&quot;)];for(var c in r){var u=c.split(&quot;.&quot;)[0],f=n[u]||n[&quot;*&quot;],h=void 0;if(i[u])h=i[u];else if(n[u])h=Ke;else if(i[&quot;*&quot;])h=i[&quot;*&quot;];else{if(!n[&quot;*&quot;]){s.push(new I(e,r[c],'unknown property &quot;'+c+'&quot;'));continue}h=Ke}s=s.concat(h({key:(e?e+&quot;.&quot;:e)+c,value:r[c],valueSpec:f,style:a,styleSpec:o,object:r,objectKey:c},r))}for(var p in n)i[p]||n[p].required&amp;&amp;void 0===n[p].default&amp;&amp;void 0===r[p]&amp;&amp;s.push(new I(e,r,'missing required property &quot;'+p+'&quot;'));return s}function Ce(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,a=t.key,o=t.arrayElementValidator||Ke;if(&quot;array&quot;!==fe(e))return[new I(a,e,&quot;array expected, &quot;+fe(e)+&quot; found&quot;)];if(r.length&amp;&amp;e.length!==r.length)return[new I(a,e,&quot;array length &quot;+r.length+&quot; expected, length &quot;+e.length+&quot; found&quot;)];if(r[&quot;min-length&quot;]&amp;&amp;e.length&lt;r[&quot;min-length&quot;])return[new I(a,e,&quot;array length at least &quot;+r[&quot;min-length&quot;]+&quot; expected, length &quot;+e.length+&quot; found&quot;)];var s={type:r.value};i.$version&lt;7&amp;&amp;(s.function=r.function),&quot;object&quot;===fe(r.value)&amp;&amp;(s=r.value);for(var l=[],c=0;c&lt;e.length;c++)l=l.concat(o({array:e,arrayIndex:c,value:e[c],valueSpec:s,style:n,styleSpec:i,key:a+&quot;[&quot;+c+&quot;]&quot;}));return l}function Le(t){var e=t.key,r=t.value,n=t.valueSpec,i=fe(r);return&quot;number&quot;!==i?[new I(e,r,&quot;number expected, &quot;+i+&quot; found&quot;)]:&quot;minimum&quot;in n&amp;&amp;r&lt;n.minimum?[new I(e,r,r+&quot; is less than the minimum value &quot;+n.minimum)]:&quot;maximum&quot;in n&amp;&amp;r&gt;n.maximum?[new I(e,r,r+&quot; is greater than the maximum value &quot;+n.maximum)]:[]}function ze(t){var e,r,n,i=t.valueSpec,a=B(t.value.type),o={},s=&quot;categorical&quot;!==a&amp;&amp;void 0===t.value.property,l=!s,c=&quot;array&quot;===fe(t.value.stops)&amp;&amp;&quot;array&quot;===fe(t.value.stops[0])&amp;&amp;&quot;object&quot;===fe(t.value.stops[0][0]),u=Ee({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if(&quot;identity&quot;===a)return[new I(t.key,t.value,'identity function may not have a &quot;stops&quot; property')];var e=[],r=t.value;return e=e.concat(Ce({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),&quot;array&quot;===fe(r)&amp;&amp;0===r.length&amp;&amp;e.push(new I(t.key,r,&quot;array must have at least one stop&quot;)),e},default:function(t){return Ke({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return&quot;identity&quot;===a&amp;&amp;s&amp;&amp;u.push(new I(t.key,t.value,'missing required property &quot;property&quot;')),&quot;identity&quot;===a||t.value.stops||u.push(new I(t.key,t.value,'missing required property &quot;stops&quot;')),&quot;exponential&quot;===a&amp;&amp;&quot;piecewise-constant&quot;===t.valueSpec.function&amp;&amp;u.push(new I(t.key,t.value,&quot;exponential functions not supported&quot;)),t.styleSpec.$version&gt;=8&amp;&amp;(l&amp;&amp;!t.valueSpec[&quot;property-function&quot;]?u.push(new I(t.key,t.value,&quot;property functions not supported&quot;)):s&amp;&amp;!t.valueSpec[&quot;zoom-function&quot;]&amp;&amp;&quot;heatmap-color&quot;!==t.objectKey&amp;&amp;&quot;line-gradient&quot;!==t.objectKey&amp;&amp;u.push(new I(t.key,t.value,&quot;zoom functions not supported&quot;))),&quot;categorical&quot;!==a&amp;&amp;!c||void 0!==t.value.property||u.push(new I(t.key,t.value,'&quot;property&quot; property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(&quot;array&quot;!==fe(a))return[new I(s,a,&quot;array expected, &quot;+fe(a)+&quot; found&quot;)];if(2!==a.length)return[new I(s,a,&quot;array length 2 expected, length &quot;+a.length+&quot; found&quot;)];if(c){if(&quot;object&quot;!==fe(a[0]))return[new I(s,a,&quot;object expected, &quot;+fe(a[0])+&quot; found&quot;)];if(void 0===a[0].zoom)return[new I(s,a,&quot;object stop key must have zoom&quot;)];if(void 0===a[0].value)return[new I(s,a,&quot;object stop key must have value&quot;)];if(n&amp;&amp;n&gt;B(a[0].zoom))return[new I(s,a[0].zoom,&quot;stop zoom values must appear in ascending order&quot;)];B(a[0].zoom)!==n&amp;&amp;(n=B(a[0].zoom),r=void 0,o={}),e=e.concat(Ee({key:s+&quot;[0]&quot;,value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Le,value:h}}))}else e=e.concat(h({key:s+&quot;[0]&quot;,value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return e.concat(Ke({key:s+&quot;[1]&quot;,value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=fe(t.value),l=B(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new I(t.key,c,s+&quot; stop domain type must match previous stop domain type &quot;+e)]}else e=s;if(&quot;number&quot;!==s&amp;&amp;&quot;string&quot;!==s&amp;&amp;&quot;boolean&quot;!==s)return[new I(t.key,c,&quot;stop domain value must be a number, string, or boolean&quot;)];if(&quot;number&quot;!==s&amp;&amp;&quot;categorical&quot;!==a){var u=&quot;number expected, &quot;+s+&quot; found&quot;;return i[&quot;property-function&quot;]&amp;&amp;void 0===a&amp;&amp;(u+='\nIf you intended to use a categorical function, specify `&quot;type&quot;: &quot;categorical&quot;`.'),[new I(t.key,c,u)]}return&quot;categorical&quot;!==a||&quot;number&quot;!==s||isFinite(l)&amp;&amp;Math.floor(l)===l?&quot;categorical&quot;!==a&amp;&amp;&quot;number&quot;===s&amp;&amp;void 0!==r&amp;&amp;l&lt;r?[new I(t.key,c,&quot;stop domain values must appear in ascending order&quot;)]:(r=l,&quot;categorical&quot;===a&amp;&amp;l in o?[new I(t.key,c,&quot;stop domain values must be unique&quot;)]:(o[l]=!0,[])):[new I(t.key,c,&quot;integer expected, found &quot;+l)]}}function Pe(t){var e=(&quot;property&quot;===t.expressionContext?Ae:we)(F(t.value),t.valueSpec);return&quot;error&quot;===e.result?e.value.map(function(e){return new I(&quot;&quot;+t.key+e.key,t.value,e.message)}):&quot;property&quot;===t.expressionContext&amp;&amp;&quot;text-font&quot;===t.propertyKey&amp;&amp;-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new I(t.key,t.value,'Invalid data expression for &quot;text-font&quot;. Output values must be contained as literals within the expression.')]:[]}function Oe(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(B(r))&amp;&amp;i.push(new I(e,r,&quot;expected one of [&quot;+n.values.join(&quot;, &quot;)+&quot;], &quot;+JSON.stringify(r)+&quot; found&quot;)):-1===Object.keys(n.values).indexOf(B(r))&amp;&amp;i.push(new I(e,r,&quot;expected one of [&quot;+Object.keys(n.values).join(&quot;, &quot;)+&quot;], &quot;+JSON.stringify(r)+&quot; found&quot;)),i}function Ie(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case&quot;has&quot;:return t.length&gt;=2&amp;&amp;&quot;$id&quot;!==t[1]&amp;&amp;&quot;$type&quot;!==t[1];case&quot;in&quot;:case&quot;!in&quot;:case&quot;!has&quot;:case&quot;none&quot;:return!1;case&quot;==&quot;:case&quot;!=&quot;:case&quot;&gt;&quot;:case&quot;&gt;=&quot;:case&quot;&lt;&quot;:case&quot;&lt;=&quot;:return 3===t.length&amp;&amp;(Array.isArray(t[1])||Array.isArray(t[2]));case&quot;any&quot;:case&quot;all&quot;:for(var e=0,r=t.slice(1);e&lt;r.length;e+=1){var n=r[e];if(!Ie(n)&amp;&amp;&quot;boolean&quot;!=typeof n)return!1}return!0;default:return!0}}Te.deserialize=function(t){return new Te(t._parameters,t._specification)},Te.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var De={type:&quot;boolean&quot;,default:!1,function:!0,&quot;property-function&quot;:!0,&quot;zoom-function&quot;:!0};function Re(t){if(!t)return function(){return!0};Ie(t)||(t=Fe(t));var e=we(t,De);if(&quot;error&quot;===e.result)throw new Error(e.value.map(function(t){return t.key+&quot;: &quot;+t.message}).join(&quot;, &quot;));return function(t,r){return e.value.evaluate(t,r)}}function Be(t,e){return t&lt;e?-1:t&gt;e?1:0}function Fe(t){if(!t)return!0;var e,r=t[0];return t.length&lt;=1?&quot;any&quot;!==r:&quot;==&quot;===r?Ne(t[1],t[2],&quot;==&quot;):&quot;!=&quot;===r?Ue(Ne(t[1],t[2],&quot;==&quot;)):&quot;&lt;&quot;===r||&quot;&gt;&quot;===r||&quot;&lt;=&quot;===r||&quot;&gt;=&quot;===r?Ne(t[1],t[2],r):&quot;any&quot;===r?(e=t.slice(1),[&quot;any&quot;].concat(e.map(Fe))):&quot;all&quot;===r?[&quot;all&quot;].concat(t.slice(1).map(Fe)):&quot;none&quot;===r?[&quot;all&quot;].concat(t.slice(1).map(Fe).map(Ue)):&quot;in&quot;===r?je(t[1],t.slice(2)):&quot;!in&quot;===r?Ue(je(t[1],t.slice(2))):&quot;has&quot;===r?Ve(t[1]):&quot;!has&quot;!==r||Ue(Ve(t[1]))}function Ne(t,e,r){switch(t){case&quot;$type&quot;:return[&quot;filter-type-&quot;+r,e];case&quot;$id&quot;:return[&quot;filter-id-&quot;+r,e];default:return[&quot;filter-&quot;+r,t,e]}}function je(t,e){if(0===e.length)return!1;switch(t){case&quot;$type&quot;:return[&quot;filter-type-in&quot;,[&quot;literal&quot;,e]];case&quot;$id&quot;:return[&quot;filter-id-in&quot;,[&quot;literal&quot;,e]];default:return e.length&gt;200&amp;&amp;!e.some(function(t){return typeof t!=typeof e[0]})?[&quot;filter-in-large&quot;,t,[&quot;literal&quot;,e.sort(Be)]]:[&quot;filter-in-small&quot;,t,[&quot;literal&quot;,e]]}}function Ve(t){switch(t){case&quot;$type&quot;:return!0;case&quot;$id&quot;:return[&quot;filter-has-id&quot;];default:return[&quot;filter-has&quot;,t]}}function Ue(t){return[&quot;!&quot;,t]}function qe(t){return Ie(F(t.value))?Pe(R({},t,{expressionContext:&quot;filter&quot;,valueSpec:{value:&quot;boolean&quot;}})):function t(e){var r=e.value,n=e.key;if(&quot;array&quot;!==fe(r))return[new I(n,r,&quot;array expected, &quot;+fe(r)+&quot; found&quot;)];var i,a=e.styleSpec,o=[];if(r.length&lt;1)return[new I(n,r,&quot;filter array must have at least 1 element&quot;)];switch(o=o.concat(Oe({key:n+&quot;[0]&quot;,value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),B(r[0])){case&quot;&lt;&quot;:case&quot;&lt;=&quot;:case&quot;&gt;&quot;:case&quot;&gt;=&quot;:r.length&gt;=2&amp;&amp;&quot;$type&quot;===B(r[1])&amp;&amp;o.push(new I(n,r,'&quot;$type&quot; cannot be use with operator &quot;'+r[0]+'&quot;'));case&quot;==&quot;:case&quot;!=&quot;:3!==r.length&amp;&amp;o.push(new I(n,r,'filter array for operator &quot;'+r[0]+'&quot; must have 3 elements'));case&quot;in&quot;:case&quot;!in&quot;:r.length&gt;=2&amp;&amp;&quot;string&quot;!==(i=fe(r[1]))&amp;&amp;o.push(new I(n+&quot;[1]&quot;,r[1],&quot;string expected, &quot;+i+&quot; found&quot;));for(var s=2;s&lt;r.length;s++)i=fe(r[s]),&quot;$type&quot;===B(r[1])?o=o.concat(Oe({key:n+&quot;[&quot;+s+&quot;]&quot;,value:r[s],valueSpec:a.geometry_type,style:e.style,styleSpec:e.styleSpec})):&quot;string&quot;!==i&amp;&amp;&quot;number&quot;!==i&amp;&amp;&quot;boolean&quot;!==i&amp;&amp;o.push(new I(n+&quot;[&quot;+s+&quot;]&quot;,r[s],&quot;string, number, or boolean expected, &quot;+i+&quot; found&quot;));break;case&quot;any&quot;:case&quot;all&quot;:case&quot;none&quot;:for(var l=1;l&lt;r.length;l++)o=o.concat(t({key:n+&quot;[&quot;+l+&quot;]&quot;,value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case&quot;has&quot;:case&quot;!has&quot;:i=fe(r[1]),2!==r.length?o.push(new I(n,r,'filter array for &quot;'+r[0]+'&quot; operator must have 2 elements')):&quot;string&quot;!==i&amp;&amp;o.push(new I(n+&quot;[1]&quot;,r[1],&quot;string expected, &quot;+i+&quot; found&quot;))}return o}(t)}function He(t,e){var r=t.key,n=t.style,i=t.styleSpec,a=t.value,o=t.objectKey,s=i[e+&quot;_&quot;+t.layerType];if(!s)return[];var l=o.match(/^(.*)-transition$/);if(&quot;paint&quot;===e&amp;&amp;l&amp;&amp;s[l[1]]&amp;&amp;s[l[1]].transition)return Ke({key:r,value:a,valueSpec:i.transition,style:n,styleSpec:i});var c,u=t.valueSpec||s[o];if(!u)return[new I(r,a,'unknown property &quot;'+o+'&quot;')];if(&quot;string&quot;===fe(a)&amp;&amp;u[&quot;property-function&quot;]&amp;&amp;!u.tokens&amp;&amp;(c=/^{([^}]+)}$/.exec(a)))return[new I(r,a,'&quot;'+o+'&quot; does not support interpolation syntax\nUse an identity property function instead: `{ &quot;type&quot;: &quot;identity&quot;, &quot;property&quot;: '+JSON.stringify(c[1])+&quot; }`.&quot;)];var f=[];return&quot;symbol&quot;===t.layerType&amp;&amp;(&quot;text-field&quot;===o&amp;&amp;n&amp;&amp;!n.glyphs&amp;&amp;f.push(new I(r,a,'use of &quot;text-field&quot; requires a style &quot;glyphs&quot; property')),&quot;text-font&quot;===o&amp;&amp;he(F(a))&amp;&amp;&quot;identity&quot;===B(a.type)&amp;&amp;f.push(new I(r,a,'&quot;text-font&quot; does not support identity functions'))),f.concat(Ke({key:t.key,value:a,valueSpec:u,style:n,styleSpec:i,expressionContext:&quot;property&quot;,propertyKey:o}))}function Ge(t){return He(t,&quot;paint&quot;)}function We(t){return He(t,&quot;layout&quot;)}function Ye(t){var e=[],r=t.value,n=t.key,i=t.style,a=t.styleSpec;r.type||r.ref||e.push(new I(n,r,'either &quot;type&quot; or &quot;ref&quot; is required'));var o,s=B(r.type),l=B(r.ref);if(r.id)for(var c=B(r.id),u=0;u&lt;t.arrayIndex;u++){var f=i.layers[u];B(f.id)===c&amp;&amp;e.push(new I(n,r.id,'duplicate layer id &quot;'+r.id+'&quot;, previously used at line '+f.id.__line__))}if(&quot;ref&quot;in r)[&quot;type&quot;,&quot;source&quot;,&quot;source-layer&quot;,&quot;filter&quot;,&quot;layout&quot;].forEach(function(t){t in r&amp;&amp;e.push(new I(n,r[t],'&quot;'+t+'&quot; is prohibited for ref layers'))}),i.layers.forEach(function(t){B(t.id)===l&amp;&amp;(o=t)}),o?o.ref?e.push(new I(n,r.ref,&quot;ref cannot reference another ref layer&quot;)):s=B(o.type):e.push(new I(n,r.ref,'ref layer &quot;'+l+'&quot; not found'));else if(&quot;background&quot;!==s)if(r.source){var h=i.sources&amp;&amp;i.sources[r.source],p=h&amp;&amp;B(h.type);h?&quot;vector&quot;===p&amp;&amp;&quot;raster&quot;===s?e.push(new I(n,r.source,'layer &quot;'+r.id+'&quot; requires a raster source')):&quot;raster&quot;===p&amp;&amp;&quot;raster&quot;!==s?e.push(new I(n,r.source,'layer &quot;'+r.id+'&quot; requires a vector source')):&quot;vector&quot;!==p||r[&quot;source-layer&quot;]?&quot;raster-dem&quot;===p&amp;&amp;&quot;hillshade&quot;!==s?e.push(new I(n,r.source,&quot;raster-dem source can only be used with layer type 'hillshade'.&quot;)):&quot;line&quot;!==s||!r.paint||!r.paint[&quot;line-gradient&quot;]||&quot;geojson&quot;===p&amp;&amp;h.lineMetrics||e.push(new I(n,r,'layer &quot;'+r.id+'&quot; specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new I(n,r,'layer &quot;'+r.id+'&quot; must specify a &quot;source-layer&quot;')):e.push(new I(n,r.source,'source &quot;'+r.source+'&quot; not found'))}else e.push(new I(n,r,'missing required property &quot;source&quot;'));return e=e.concat(Ee({key:n,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{&quot;*&quot;:function(){return[]},type:function(){return Ke({key:n+&quot;.type&quot;,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:&quot;type&quot;})},filter:qe,layout:function(t){return Ee({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{&quot;*&quot;:function(t){return We(R({layerType:s},t))}}})},paint:function(t){return Ee({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{&quot;*&quot;:function(t){return Ge(R({layerType:s},t))}}})}}}))}function Xe(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new I(r,e,'&quot;type&quot; is required')];var a=B(e.type),o=[];switch(a){case&quot;vector&quot;:case&quot;raster&quot;:case&quot;raster-dem&quot;:if(o=o.concat(Ee({key:r,value:e,valueSpec:n[&quot;source_&quot;+a.replace(&quot;-&quot;,&quot;_&quot;)],style:t.style,styleSpec:n})),&quot;url&quot;in e)for(var s in e)[&quot;type&quot;,&quot;url&quot;,&quot;tileSize&quot;].indexOf(s)&lt;0&amp;&amp;o.push(new I(r+&quot;.&quot;+s,e[s],'a source with a &quot;url&quot; property may not include a &quot;'+s+'&quot; property'));return o;case&quot;geojson&quot;:return Ee({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n});case&quot;video&quot;:return Ee({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case&quot;image&quot;:return Ee({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case&quot;canvas&quot;:return o.push(new I(r,null,&quot;Please use runtime APIs to add canvas sources, rather than including them in stylesheets.&quot;,&quot;source.canvas&quot;)),o;default:return Oe({key:r+&quot;.type&quot;,value:e.type,valueSpec:{values:[&quot;vector&quot;,&quot;raster&quot;,&quot;raster-dem&quot;,&quot;geojson&quot;,&quot;video&quot;,&quot;image&quot;]},style:i,styleSpec:n})}}function Ze(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,a=[],o=fe(e);if(void 0===e)return a;if(&quot;object&quot;!==o)return a.concat([new I(&quot;light&quot;,e,&quot;object expected, &quot;+o+&quot; found&quot;)]);for(var s in e){var l=s.match(/^(.*)-transition$/);a=l&amp;&amp;n[l[1]]&amp;&amp;n[l[1]].transition?a.concat(Ke({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?a.concat(Ke({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):a.concat([new I(s,e[s],'unknown property &quot;'+s+'&quot;')])}return a}function $e(t){var e=t.value,r=t.key,n=fe(e);return&quot;string&quot;!==n?[new I(r,e,&quot;string expected, &quot;+n+&quot; found&quot;)]:[]}var Je={&quot;*&quot;:function(){return[]},array:Ce,boolean:function(t){var e=t.value,r=t.key,n=fe(e);return&quot;boolean&quot;!==n?[new I(r,e,&quot;boolean expected, &quot;+n+&quot; found&quot;)]:[]},number:Le,color:function(t){var e=t.key,r=t.value,n=fe(r);return&quot;string&quot;!==n?[new I(e,r,&quot;color expected, &quot;+n+&quot; found&quot;)]:null===Q(r)?[new I(e,r,'color expected, &quot;'+r+'&quot; found')]:[]},constants:D,enum:Oe,filter:qe,function:ze,layer:Ye,object:Ee,source:Xe,light:Ze,string:$e};function Ke(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.function&amp;&amp;he(B(e))?ze(t):r.function&amp;&amp;_e(F(e))?Pe(t):r.type&amp;&amp;Je[r.type]?Je[r.type](t):Ee(R({},t,{valueSpec:r.type?n[r.type]:r}))}function Qe(t){var e=t.value,r=t.key,n=$e(t);return n.length?n:(-1===e.indexOf(&quot;{fontstack}&quot;)&amp;&amp;n.push(new I(r,e,'&quot;glyphs&quot; url must include a &quot;{fontstack}&quot; token')),-1===e.indexOf(&quot;{range}&quot;)&amp;&amp;n.push(new I(r,e,'&quot;glyphs&quot; url must include a &quot;{range}&quot; token')),n)}function tr(t,e){e=e||O;var r=[];return r=r.concat(Ke({key:&quot;&quot;,value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Qe,&quot;*&quot;:function(){return[]}}})),t.constants&amp;&amp;(r=r.concat(D({key:&quot;constants&quot;,value:t.constants,style:t,styleSpec:e}))),er(r)}function er(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function rr(t){return function(){return er(t.apply(this,arguments))}}tr.source=rr(Xe),tr.light=rr(Ze),tr.layer=rr(Ye),tr.filter=rr(qe),tr.paintProperty=rr(Ge),tr.layoutProperty=rr(We);var nr=tr,ir=tr.light,ar=tr.paintProperty,or=tr.layoutProperty;function sr(t,e){var r=!1;if(e&amp;&amp;e.length)for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n];t.fire(new z(new Error(a.message))),r=!0}return r}var lr=ur,cr=3;function ur(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var a=0;a&lt;this.d*this.d;a++){var o=i[cr+a],s=i[cr+a+1];n.push(o===s?null:i.subarray(o,s))}var l=i[cr+n.length],c=i[cr+n.length+1];this.keys=i.subarray(l,c),this.bboxes=i.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var u=0;u&lt;this.d*this.d;u++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var f=r/e*t;this.min=-f,this.max=t+f}ur.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ur.prototype._insertReadonly=function(){throw&quot;Cannot insert into a GridIndex created from an ArrayBuffer.&quot;},ur.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},ur.prototype.query=function(t,e,r,n){var i=this.min,a=this.max;if(t&lt;=i&amp;&amp;e&lt;=i&amp;&amp;a&lt;=r&amp;&amp;a&lt;=n)return Array.prototype.slice.call(this.keys);var o=[];return this._forEachCell(t,e,r,n,this._queryCell,o,{}),o},ur.prototype._queryCell=function(t,e,r,n,i,a,o){var s=this.cells[i];if(null!==s)for(var l=this.keys,c=this.bboxes,u=0;u&lt;s.length;u++){var f=s[u];if(void 0===o[f]){var h=4*f;t&lt;=c[h+2]&amp;&amp;e&lt;=c[h+3]&amp;&amp;r&gt;=c[h+0]&amp;&amp;n&gt;=c[h+1]?(o[f]=!0,a.push(l[f])):o[f]=!1}}},ur.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(r),u=this._convertToCellCoord(n),f=s;f&lt;=c;f++)for(var h=l;h&lt;=u;h++){var p=this.d*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ur.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ur.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=cr+this.cells.length+1+1,r=0,n=0;n&lt;this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var a=e,o=0;o&lt;t.length;o++){var s=t[o];i[cr+o]=a,i.set(s,a),a+=s.length}return i[cr+t.length]=a,i.set(this.keys,a),a+=this.keys.length,i[cr+t.length+1]=a,i.set(this.bboxes,a),a+=this.bboxes.length,i.buffer};var fr=self.ImageData,hr={};function pr(t,e,r){void 0===r&amp;&amp;(r={}),Object.defineProperty(e,&quot;_classRegistryKey&quot;,{value:t,writeable:!1}),hr[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var dr in pr(&quot;Object&quot;,Object),lr.serialize=function(t,e){var r=t.toArrayBuffer();return e&amp;&amp;e.push(r),r},lr.deserialize=function(t){return new lr(t)},pr(&quot;Grid&quot;,lr),pr(&quot;Color&quot;,tt),pr(&quot;Error&quot;,Error),pr(&quot;StylePropertyFunction&quot;,Te),pr(&quot;StyleExpression&quot;,be,{omit:[&quot;_evaluator&quot;]}),pr(&quot;ZoomDependentExpression&quot;,Me),pr(&quot;ZoomConstantExpression&quot;,ke),pr(&quot;CompoundExpression&quot;,gt,{omit:[&quot;_evaluate&quot;]}),Rt)Rt[dr]._classRegistryKey||pr(&quot;Expression_&quot;+dr,Rt[dr]);function gr(t,e){if(null==t||&quot;boolean&quot;==typeof t||&quot;number&quot;==typeof t||&quot;string&quot;==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&amp;&amp;e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&amp;&amp;e.push(r.buffer),r}if(t instanceof fr)return e&amp;&amp;e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,a=t;i&lt;a.length;i+=1){var o=a[i];n.push(gr(o,e))}return n}if(&quot;object&quot;==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error(&quot;can't serialize object of unregistered class&quot;);var c={};if(s.serialize)c._serialized=s.serialize(t,e);else{for(var u in t)if(t.hasOwnProperty(u)&amp;&amp;!(hr[l].omit.indexOf(u)&gt;=0)){var f=t[u];c[u]=hr[l].shallow.indexOf(u)&gt;=0?f:gr(f,e)}t instanceof Error&amp;&amp;(c.message=t.message)}return{name:l,properties:c}}throw new Error(&quot;can't serialize object of type &quot;+typeof t)}function mr(t){if(null==t||&quot;boolean&quot;==typeof t||&quot;number&quot;==typeof t||&quot;string&quot;==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof fr)return t;if(Array.isArray(t))return t.map(function(t){return mr(t)});if(&quot;object&quot;==typeof t){var e=t,r=e.name,n=e.properties;if(!r)throw new Error(&quot;can't deserialize object of anonymous class&quot;);var i=hr[r].klass;if(!i)throw new Error(&quot;can't deserialize unregistered class &quot;+r);if(i.deserialize)return i.deserialize(n._serialized);for(var a=Object.create(i.prototype),o=0,s=Object.keys(n);o&lt;s.length;o+=1){var l=s[o];a[l]=hr[r].shallow.indexOf(l)&gt;=0?n[l]:mr(n[l])}return a}throw new Error(&quot;can't deserialize object of type &quot;+typeof t)}var vr=function(){this.first=!0};vr.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom&gt;r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom&lt;r&amp;&amp;(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&amp;&amp;(this.lastZoom=t,this.lastFloorZoom=r,!0))};var yr={&quot;Latin-1 Supplement&quot;:function(t){return t&gt;=128&amp;&amp;t&lt;=255},Arabic:function(t){return t&gt;=1536&amp;&amp;t&lt;=1791},&quot;Arabic Supplement&quot;:function(t){return t&gt;=1872&amp;&amp;t&lt;=1919},&quot;Arabic Extended-A&quot;:function(t){return t&gt;=2208&amp;&amp;t&lt;=2303},&quot;Hangul Jamo&quot;:function(t){return t&gt;=4352&amp;&amp;t&lt;=4607},&quot;Unified Canadian Aboriginal Syllabics&quot;:function(t){return t&gt;=5120&amp;&amp;t&lt;=5759},Khmer:function(t){return t&gt;=6016&amp;&amp;t&lt;=6143},&quot;Unified Canadian Aboriginal Syllabics Extended&quot;:function(t){return t&gt;=6320&amp;&amp;t&lt;=6399},&quot;General Punctuation&quot;:function(t){return t&gt;=8192&amp;&amp;t&lt;=8303},&quot;Letterlike Symbols&quot;:function(t){return t&gt;=8448&amp;&amp;t&lt;=8527},&quot;Number Forms&quot;:function(t){return t&gt;=8528&amp;&amp;t&lt;=8591},&quot;Miscellaneous Technical&quot;:function(t){return t&gt;=8960&amp;&amp;t&lt;=9215},&quot;Control Pictures&quot;:function(t){return t&gt;=9216&amp;&amp;t&lt;=9279},&quot;Optical Character Recognition&quot;:function(t){return t&gt;=9280&amp;&amp;t&lt;=9311},&quot;Enclosed Alphanumerics&quot;:function(t){return t&gt;=9312&amp;&amp;t&lt;=9471},&quot;Geometric Shapes&quot;:function(t){return t&gt;=9632&amp;&amp;t&lt;=9727},&quot;Miscellaneous Symbols&quot;:function(t){return t&gt;=9728&amp;&amp;t&lt;=9983},&quot;Miscellaneous Symbols and Arrows&quot;:function(t){return t&gt;=11008&amp;&amp;t&lt;=11263},&quot;CJK Radicals Supplement&quot;:function(t){return t&gt;=11904&amp;&amp;t&lt;=12031},&quot;Kangxi Radicals&quot;:function(t){return t&gt;=12032&amp;&amp;t&lt;=12255},&quot;Ideographic Description Characters&quot;:function(t){return t&gt;=12272&amp;&amp;t&lt;=12287},&quot;CJK Symbols and Punctuation&quot;:function(t){return t&gt;=12288&amp;&amp;t&lt;=12351},Hiragana:function(t){return t&gt;=12352&amp;&amp;t&lt;=12447},Katakana:function(t){return t&gt;=12448&amp;&amp;t&lt;=12543},Bopomofo:function(t){return t&gt;=12544&amp;&amp;t&lt;=12591},&quot;Hangul Compatibility Jamo&quot;:function(t){return t&gt;=12592&amp;&amp;t&lt;=12687},Kanbun:function(t){return t&gt;=12688&amp;&amp;t&lt;=12703},&quot;Bopomofo Extended&quot;:function(t){return t&gt;=12704&amp;&amp;t&lt;=12735},&quot;CJK Strokes&quot;:function(t){return t&gt;=12736&amp;&amp;t&lt;=12783},&quot;Katakana Phonetic Extensions&quot;:function(t){return t&gt;=12784&amp;&amp;t&lt;=12799},&quot;Enclosed CJK Letters and Months&quot;:function(t){return t&gt;=12800&amp;&amp;t&lt;=13055},&quot;CJK Compatibility&quot;:function(t){return t&gt;=13056&amp;&amp;t&lt;=13311},&quot;CJK Unified Ideographs Extension A&quot;:function(t){return t&gt;=13312&amp;&amp;t&lt;=19903},&quot;Yijing Hexagram Symbols&quot;:function(t){return t&gt;=19904&amp;&amp;t&lt;=19967},&quot;CJK Unified Ideographs&quot;:function(t){return t&gt;=19968&amp;&amp;t&lt;=40959},&quot;Yi Syllables&quot;:function(t){return t&gt;=40960&amp;&amp;t&lt;=42127},&quot;Yi Radicals&quot;:function(t){return t&gt;=42128&amp;&amp;t&lt;=42191},&quot;Hangul Jamo Extended-A&quot;:function(t){return t&gt;=43360&amp;&amp;t&lt;=43391},&quot;Hangul Syllables&quot;:function(t){return t&gt;=44032&amp;&amp;t&lt;=55215},&quot;Hangul Jamo Extended-B&quot;:function(t){return t&gt;=55216&amp;&amp;t&lt;=55295},&quot;Private Use Area&quot;:function(t){return t&gt;=57344&amp;&amp;t&lt;=63743},&quot;CJK Compatibility Ideographs&quot;:function(t){return t&gt;=63744&amp;&amp;t&lt;=64255},&quot;Arabic Presentation Forms-A&quot;:function(t){return t&gt;=64336&amp;&amp;t&lt;=65023},&quot;Vertical Forms&quot;:function(t){return t&gt;=65040&amp;&amp;t&lt;=65055},&quot;CJK Compatibility Forms&quot;:function(t){return t&gt;=65072&amp;&amp;t&lt;=65103},&quot;Small Form Variants&quot;:function(t){return t&gt;=65104&amp;&amp;t&lt;=65135},&quot;Arabic Presentation Forms-B&quot;:function(t){return t&gt;=65136&amp;&amp;t&lt;=65279},&quot;Halfwidth and Fullwidth Forms&quot;:function(t){return t&gt;=65280&amp;&amp;t&lt;=65519}};function xr(t){for(var e=0,r=t;e&lt;r.length;e+=1)if(_r(r[e].charCodeAt(0)))return!0;return!1}function br(t){return!(yr.Arabic(t)||yr[&quot;Arabic Supplement&quot;](t)||yr[&quot;Arabic Extended-A&quot;](t)||yr[&quot;Arabic Presentation Forms-A&quot;](t)||yr[&quot;Arabic Presentation Forms-B&quot;](t))}function _r(t){return!!(746===t||747===t||!(t&lt;4352)&amp;&amp;(yr[&quot;Bopomofo Extended&quot;](t)||yr.Bopomofo(t)||yr[&quot;CJK Compatibility Forms&quot;](t)&amp;&amp;!(t&gt;=65097&amp;&amp;t&lt;=65103)||yr[&quot;CJK Compatibility Ideographs&quot;](t)||yr[&quot;CJK Compatibility&quot;](t)||yr[&quot;CJK Radicals Supplement&quot;](t)||yr[&quot;CJK Strokes&quot;](t)||!(!yr[&quot;CJK Symbols and Punctuation&quot;](t)||t&gt;=12296&amp;&amp;t&lt;=12305||t&gt;=12308&amp;&amp;t&lt;=12319||12336===t)||yr[&quot;CJK Unified Ideographs Extension A&quot;](t)||yr[&quot;CJK Unified Ideographs&quot;](t)||yr[&quot;Enclosed CJK Letters and Months&quot;](t)||yr[&quot;Hangul Compatibility Jamo&quot;](t)||yr[&quot;Hangul Jamo Extended-A&quot;](t)||yr[&quot;Hangul Jamo Extended-B&quot;](t)||yr[&quot;Hangul Jamo&quot;](t)||yr[&quot;Hangul Syllables&quot;](t)||yr.Hiragana(t)||yr[&quot;Ideographic Description Characters&quot;](t)||yr.Kanbun(t)||yr[&quot;Kangxi Radicals&quot;](t)||yr[&quot;Katakana Phonetic Extensions&quot;](t)||yr.Katakana(t)&amp;&amp;12540!==t||!(!yr[&quot;Halfwidth and Fullwidth Forms&quot;](t)||65288===t||65289===t||65293===t||t&gt;=65306&amp;&amp;t&lt;=65310||65339===t||65341===t||65343===t||t&gt;=65371&amp;&amp;t&lt;=65503||65507===t||t&gt;=65512&amp;&amp;t&lt;=65519)||!(!yr[&quot;Small Form Variants&quot;](t)||t&gt;=65112&amp;&amp;t&lt;=65118||t&gt;=65123&amp;&amp;t&lt;=65126)||yr[&quot;Unified Canadian Aboriginal Syllabics&quot;](t)||yr[&quot;Unified Canadian Aboriginal Syllabics Extended&quot;](t)||yr[&quot;Vertical Forms&quot;](t)||yr[&quot;Yijing Hexagram Symbols&quot;](t)||yr[&quot;Yi Syllables&quot;](t)||yr[&quot;Yi Radicals&quot;](t)))}function wr(t){return!(_r(t)||function(t){return!!(yr[&quot;Latin-1 Supplement&quot;](t)&amp;&amp;(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||yr[&quot;General Punctuation&quot;](t)&amp;&amp;(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||yr[&quot;Letterlike Symbols&quot;](t)||yr[&quot;Number Forms&quot;](t)||yr[&quot;Miscellaneous Technical&quot;](t)&amp;&amp;(t&gt;=8960&amp;&amp;t&lt;=8967||t&gt;=8972&amp;&amp;t&lt;=8991||t&gt;=8996&amp;&amp;t&lt;=9e3||9003===t||t&gt;=9085&amp;&amp;t&lt;=9114||t&gt;=9150&amp;&amp;t&lt;=9165||9167===t||t&gt;=9169&amp;&amp;t&lt;=9179||t&gt;=9186&amp;&amp;t&lt;=9215)||yr[&quot;Control Pictures&quot;](t)&amp;&amp;9251!==t||yr[&quot;Optical Character Recognition&quot;](t)||yr[&quot;Enclosed Alphanumerics&quot;](t)||yr[&quot;Geometric Shapes&quot;](t)||yr[&quot;Miscellaneous Symbols&quot;](t)&amp;&amp;!(t&gt;=9754&amp;&amp;t&lt;=9759)||yr[&quot;Miscellaneous Symbols and Arrows&quot;](t)&amp;&amp;(t&gt;=11026&amp;&amp;t&lt;=11055||t&gt;=11088&amp;&amp;t&lt;=11097||t&gt;=11192&amp;&amp;t&lt;=11243)||yr[&quot;CJK Symbols and Punctuation&quot;](t)||yr.Katakana(t)||yr[&quot;Private Use Area&quot;](t)||yr[&quot;CJK Compatibility Forms&quot;](t)||yr[&quot;Small Form Variants&quot;](t)||yr[&quot;Halfwidth and Fullwidth Forms&quot;](t)||8734===t||8756===t||8757===t||t&gt;=9984&amp;&amp;t&lt;=10087||t&gt;=10102&amp;&amp;t&lt;=10131||65532===t||65533===t)}(t))}function kr(t,e){return!(!e&amp;&amp;(t&gt;=1424&amp;&amp;t&lt;=2303||yr[&quot;Arabic Presentation Forms-A&quot;](t)||yr[&quot;Arabic Presentation Forms-B&quot;](t))||t&gt;=2304&amp;&amp;t&lt;=3583||t&gt;=3840&amp;&amp;t&lt;=4255||yr.Khmer(t))}var Mr,Ar=!1,Tr=null,Sr=!1,Er=new P,Cr={applyArabicShaping:null,processBidirectionalText:null,isLoaded:function(){return Sr||null!=Cr.applyArabicShaping}},Lr=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new vr,this.transition={})};Lr.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1)if(!kr(n[r].charCodeAt(0),e))return!1;return!0}(t,Cr.isLoaded())},Lr.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};var zr=function(t,e){this.property=t,this.value=e,this.expression=Se(void 0===e?t.specification.default:e,t.specification)};zr.prototype.isDataDriven=function(){return&quot;source&quot;===this.expression.kind||&quot;composite&quot;===this.expression.kind},zr.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Pr=function(t){this.property=t,this.value=new zr(t,void 0)};Pr.prototype.transitioned=function(t,e){return new Ir(this.property,this.value,e,p({},t.transition,this.transition),t.now)},Pr.prototype.untransitioned=function(){return new Ir(this.property,this.value,null,{},0)};var Or=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Or.prototype.getValue=function(t){return x(this._values[t].value.value)},Or.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Pr(this._values[t].property)),this._values[t].value=new zr(this._values[t].property,null===e?void 0:x(e))},Or.prototype.getTransition=function(t){return x(this._values[t].transition)},Or.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Pr(this._values[t].property)),this._values[t].transition=x(e)||void 0},Or.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e&lt;r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&amp;&amp;(t[n]=i);var a=this.getTransition(n);void 0!==a&amp;&amp;(t[n+&quot;-transition&quot;]=a)}return t},Or.prototype.transitioned=function(t,e){for(var r=new Dr(this._properties),n=0,i=Object.keys(this._values);n&lt;i.length;n+=1){var a=i[n];r._values[a]=this._values[a].transitioned(t,e._values[a])}return r},Or.prototype.untransitioned=function(){for(var t=new Dr(this._properties),e=0,r=Object.keys(this._values);e&lt;r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var Ir=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&amp;&amp;(n.delay||n.duration)&amp;&amp;(this.prior=r)};Ir.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),n=this.prior;if(n){if(e&gt;this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e&lt;this.begin)return n.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t),r,function(t){if(i&lt;=0)return 0;if(i&gt;=1)return 1;var e=i*i,r=e*i;return 4*(i&lt;.5?r:3*(i-e)+r-.75)}())}return r};var Dr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Dr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r&lt;n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e},Dr.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t&lt;e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Rr=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Rr.prototype.getValue=function(t){return x(this._values[t].value)},Rr.prototype.setValue=function(t,e){this._values[t]=new zr(this._values[t].property,null===e?void 0:x(e))},Rr.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e&lt;r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&amp;&amp;(t[n]=i)}return t},Rr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r&lt;n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e};var Br=function(t,e,r){this.property=t,this.value=e,this.globals=r};Br.prototype.isConstant=function(){return&quot;constant&quot;===this.value.kind},Br.prototype.constantOr=function(t){return&quot;constant&quot;===this.value.kind?this.value.value:t},Br.prototype.evaluate=function(t){return this.property.evaluate(this.value,this.globals,t)};var Fr=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Fr.prototype.get=function(t){return this._values[t]};var Nr=function(t){this.specification=t};Nr.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Nr.prototype.interpolate=function(t,e,r){var n=kt[this.specification.type];return n?n(t,e,r):t};var jr=function(t){this.specification=t};jr.prototype.possiblyEvaluate=function(t,e){return&quot;constant&quot;===t.expression.kind||&quot;camera&quot;===t.expression.kind?new Br(this,{kind:&quot;constant&quot;,value:t.expression.evaluate(e)},e):new Br(this,t.expression,e)},jr.prototype.interpolate=function(t,e,r){if(&quot;constant&quot;!==t.value.kind||&quot;constant&quot;!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Br(this,{kind:&quot;constant&quot;,value:void 0},t.globals);var n=kt[this.specification.type];return n?new Br(this,{kind:&quot;constant&quot;,value:n(t.value.value,e.value.value,r)},t.globals):t},jr.prototype.evaluate=function(t,e,r){return&quot;constant&quot;===t.kind?t.value:t.evaluate(e,r)};var Vr=function(t){this.specification=t};Vr.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if(&quot;constant&quot;===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Lr(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom+1),e)),e)}},Vr.prototype._calculate=function(t,e,r,n){var i=n.zoom,a=i-Math.floor(i),o=n.crossFadingFactor();return i&gt;n.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:a+(1-a)*o}:{from:r,to:e,fromScale:.5,toScale:1,t:1-(1-o)*a}},Vr.prototype.interpolate=function(t){return t};var Ur=function(t){this.specification=t};Ur.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Ur.prototype.interpolate=function(){return!1};var qr=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new zr(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Pr(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};pr(&quot;DataDrivenProperty&quot;,jr),pr(&quot;DataConstantProperty&quot;,Nr),pr(&quot;CrossFadedProperty&quot;,Vr),pr(&quot;ColorRampProperty&quot;,Ur);var Hr=function(t){function e(e,r){for(var n in t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility=&quot;visible&quot;,&quot;background&quot;!==e.type&amp;&amp;(this.source=e.source,this.sourceLayer=e[&quot;source-layer&quot;],this.filter=e.filter),this._featureFilter=function(){return!0},r.layout&amp;&amp;(this._unevaluatedLayout=new Rr(r.layout)),this._transitionablePaint=new Or(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return&quot;visibility&quot;===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(null!=e){var n=&quot;layers.&quot;+this.id+&quot;.layout.&quot;+t;if(this._validate(or,n,t,e,r))return}&quot;visibility&quot;!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=&quot;none&quot;===e?e:&quot;visible&quot;},e.prototype.getPaintProperty=function(t){return m(t,&quot;-transition&quot;)?this._transitionablePaint.getTransition(t.slice(0,-&quot;-transition&quot;.length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(null!=e){var n=&quot;layers.&quot;+this.id+&quot;.paint.&quot;+t;if(this._validate(ar,n,t,e,r))return}m(t,&quot;-transition&quot;)?this._transitionablePaint.setTransition(t.slice(0,-&quot;-transition&quot;.length),e||void 0):this._transitionablePaint.setValue(t,e)},e.prototype.isHidden=function(t){return!!(this.minzoom&amp;&amp;t&lt;this.minzoom)||!!(this.maxzoom&amp;&amp;t&gt;=this.maxzoom)||&quot;none&quot;===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&amp;&amp;(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,&quot;source-layer&quot;:this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&amp;&amp;this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&amp;&amp;this._transitionablePaint.serialize()};return&quot;none&quot;===this.visibility&amp;&amp;(t.layout=t.layout||{},t.layout.visibility=&quot;none&quot;),y(t,function(t,e){return!(void 0===t||&quot;layout&quot;===e&amp;&amp;!Object.keys(t).length||&quot;paint&quot;===e&amp;&amp;!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,n,i){return(!i||!1!==i.validate)&amp;&amp;sr(this,t.call(nr,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:O,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e}(P),Gr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Wr=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Yr=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Xr(t,e){void 0===e&amp;&amp;(e=1);var r=0,n=0;return{members:t.map(function(t){var i,a=(i=t.type,Gr[i].BYTES_PER_ELEMENT),o=r=Zr(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}}),size:Zr(r,Math.max(n,e)),alignment:e}}function Zr(t,e){return Math.ceil(t/e)*e}Yr.serialize=function(t,e){return t._trim(),e&amp;&amp;(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Yr.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Yr.prototype._trim=function(){this.length!==this.capacity&amp;&amp;(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Yr.prototype.clear=function(){this.length=0},Yr.prototype.resize=function(t){this.reserve(t),this.length=t},Yr.prototype.reserve=function(t){if(t&gt;this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&amp;&amp;this.uint8.set(e)}},Yr.prototype._refreshViews=function(){throw new Error(&quot;_refreshViews() must be implemented by each concrete StructArray layout&quot;)};var $r=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.int16[n+0]=t,this.int16[n+1]=e,r},e}(Yr);$r.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout2i4&quot;,$r);var Jr=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.int16[a+0]=t,this.int16[a+1]=e,this.int16[a+2]=r,this.int16[a+3]=n,i},e}(Yr);Jr.prototype.bytesPerElement=8,pr(&quot;StructArrayLayout4i8&quot;,Jr);var Kr=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);Kr.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout2i4i12&quot;,Kr);var Qr=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=6*l,u=12*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint8[u+8]=i,this.uint8[u+9]=a,this.uint8[u+10]=o,this.uint8[u+11]=s,l},e}(Yr);Qr.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout4i4ub12&quot;,Qr);var tn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=8*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint16[c+4]=i,this.uint16[c+5]=a,this.uint16[c+6]=o,this.uint16[c+7]=s,l},e}(Yr);tn.prototype.bytesPerElement=16,pr(&quot;StructArrayLayout4i4ui16&quot;,tn);var en=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=r,n},e}(Yr);en.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout3f12&quot;,en);var rn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.uint32[r+0]=t,e},e}(Yr);rn.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout1ul4&quot;,rn);var nn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u){var f=this.length;this.resize(f+1);var h=12*f,p=6*f;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=r,this.int16[h+3]=n,this.int16[h+4]=i,this.int16[h+5]=a,this.uint32[p+3]=o,this.uint16[h+8]=s,this.uint16[h+9]=l,this.int16[h+10]=c,this.int16[h+11]=u,f},e}(Yr);nn.prototype.bytesPerElement=24,pr(&quot;StructArrayLayout6i1ul2ui2i24&quot;,nn);var an=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);an.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout2i2i2i12&quot;,an);var on=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=4*r;return this.uint8[n+0]=t,this.uint8[n+1]=e,r},e}(Yr);on.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout2ub4&quot;,on);var sn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p){var d=this.length;this.resize(d+1);var g=20*d,m=10*d,v=40*d;return this.int16[g+0]=t,this.int16[g+1]=e,this.uint16[g+2]=r,this.uint16[g+3]=n,this.uint32[m+2]=i,this.uint32[m+3]=a,this.uint32[m+4]=o,this.uint16[g+10]=s,this.uint16[g+11]=l,this.uint16[g+12]=c,this.float32[m+7]=u,this.float32[m+8]=f,this.uint8[v+36]=h,this.uint8[v+37]=p,d},e}(Yr);sn.prototype.bytesPerElement=40,pr(&quot;StructArrayLayout2i2ui3ul3ui2f2ub40&quot;,sn);var ln=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.float32[r+0]=t,e},e}(Yr);ln.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout1f4&quot;,ln);var cn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=r,n},e}(Yr);cn.prototype.bytesPerElement=6,pr(&quot;StructArrayLayout3i6&quot;,cn);var un=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=2*n,a=4*n;return this.uint32[i+0]=t,this.uint16[a+2]=e,this.uint16[a+3]=r,n},e}(Yr);un.prototype.bytesPerElement=8,pr(&quot;StructArrayLayout1ul2ui8&quot;,un);var fn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=r,n},e}(Yr);fn.prototype.bytesPerElement=6,pr(&quot;StructArrayLayout3ui6&quot;,fn);var hn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.uint16[n+0]=t,this.uint16[n+1]=e,r},e}(Yr);hn.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout2ui4&quot;,hn);var pn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.float32[n+0]=t,this.float32[n+1]=e,r},e}(Yr);pn.prototype.bytesPerElement=8,pr(&quot;StructArrayLayout2f8&quot;,pn);var dn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.float32[a+0]=t,this.float32[a+1]=e,this.float32[a+2]=r,this.float32[a+3]=n,i},e}(Yr);dn.prototype.bytesPerElement=16,pr(&quot;StructArrayLayout4f16&quot;,dn);var gn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new l(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Wr);gn.prototype.size=24;var mn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new gn(this,t)},e}(nn);pr(&quot;CollisionBoxArray&quot;,mn);var vn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,r),e}(Wr);vn.prototype.size=40;var yn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new vn(this,t)},e}(sn);pr(&quot;PlacedSymbolArray&quot;,yn);var xn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Wr);xn.prototype.size=4;var bn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new xn(this,t)},e}(ln);pr(&quot;GlyphOffsetArray&quot;,bn);var _n=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Wr);_n.prototype.size=6;var wn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new _n(this,t)},e}(cn);pr(&quot;SymbolLineVertexArray&quot;,wn);var kn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Wr);kn.prototype.size=8;var Mn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new kn(this,t)},e}(un);pr(&quot;FeatureIndexArray&quot;,Mn);var An=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;}],4).members,Tn=function(t){void 0===t&amp;&amp;(t=[]),this.segments=t};Tn.prototype.prepareSegment=function(t,e,r){var n=this.segments[this.segments.length-1];return t&gt;Tn.MAX_VERTEX_ARRAY_LENGTH&amp;&amp;_(&quot;Max vertices per segment is &quot;+Tn.MAX_VERTEX_ARRAY_LENGTH+&quot;: bucket requested &quot;+t),(!n||n.vertexLength+t&gt;Tn.MAX_VERTEX_ARRAY_LENGTH)&amp;&amp;(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(n)),n},Tn.prototype.get=function(){return this.segments},Tn.prototype.destroy=function(){for(var t=0,e=this.segments;t&lt;e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy()}},Tn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,pr(&quot;SegmentVector&quot;,Tn);var Sn=function(t,e){return 256*(t=h(Math.floor(t),0,255))+h(Math.floor(e),0,255)};function En(t){return[Sn(255*t.r,255*t.g),Sn(255*t.b,255*t.a)]}var Cn=function(t,e,r){this.value=t,this.name=e,this.type=r,this.statistics={max:-1/0}};Cn.prototype.defines=function(){return[&quot;#define HAS_UNIFORM_u_&quot;+this.name]},Cn.prototype.populatePaintArray=function(){},Cn.prototype.upload=function(){},Cn.prototype.destroy=function(){},Cn.prototype.setUniforms=function(t,e,r,n){var i=n.constantOr(this.value),a=t.gl;&quot;color&quot;===this.type?a.uniform4f(e.uniforms[&quot;u_&quot;+this.name],i.r,i.g,i.b,i.a):a.uniform1f(e.uniforms[&quot;u_&quot;+this.name],i)};var Ln=function(t,e,r){this.expression=t,this.name=e,this.type=r,this.statistics={max:-1/0};var n=&quot;color&quot;===r?pn:ln;this.paintVertexAttributes=[{name:&quot;a_&quot;+e,type:&quot;Float32&quot;,components:&quot;color&quot;===r?2:1,offset:0}],this.paintVertexArray=new n};Ln.prototype.defines=function(){return[]},Ln.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(0),e);if(&quot;color&quot;===this.type)for(var a=En(i),o=n;o&lt;t;o++)r.emplaceBack(a[0],a[1]);else{for(var s=n;s&lt;t;s++)r.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}},Ln.prototype.upload=function(t){this.paintVertexArray&amp;&amp;(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},Ln.prototype.destroy=function(){this.paintVertexBuffer&amp;&amp;this.paintVertexBuffer.destroy()},Ln.prototype.setUniforms=function(t,e){t.gl.uniform1f(e.uniforms[&quot;a_&quot;+this.name+&quot;_t&quot;],0)};var zn=function(t,e,r,n,i){this.expression=t,this.name=e,this.type=r,this.useIntegerZoom=n,this.zoom=i,this.statistics={max:-1/0};var a=&quot;color&quot;===r?dn:pn;this.paintVertexAttributes=[{name:&quot;a_&quot;+e,type:&quot;Float32&quot;,components:&quot;color&quot;===r?4:2,offset:0}],this.paintVertexArray=new a};zn.prototype.defines=function(){return[]},zn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(this.zoom),e),a=this.expression.evaluate(new Lr(this.zoom+1),e);if(&quot;color&quot;===this.type)for(var o=En(i),s=En(a),l=n;l&lt;t;l++)r.emplaceBack(o[0],o[1],s[0],s[1]);else{for(var c=n;c&lt;t;c++)r.emplaceBack(i,a);this.statistics.max=Math.max(this.statistics.max,i,a)}},zn.prototype.upload=function(t){this.paintVertexArray&amp;&amp;(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},zn.prototype.destroy=function(){this.paintVertexBuffer&amp;&amp;this.paintVertexBuffer.destroy()},zn.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},zn.prototype.setUniforms=function(t,e,r){t.gl.uniform1f(e.uniforms[&quot;a_&quot;+this.name+&quot;_t&quot;],this.interpolationFactor(r.zoom))};var Pn=function(){this.binders={},this.cacheKey=&quot;&quot;,this._buffers=[]};Pn.createDynamic=function(t,e,r){var n=new Pn,i=[];for(var a in t.paint._values)if(r(a)){var o=t.paint.get(a);if(o instanceof Br&amp;&amp;o.property.specification[&quot;property-function&quot;]){var s=In(a,t.type),l=o.property.specification.type,c=o.property.useIntegerZoom;&quot;constant&quot;===o.value.kind?(n.binders[a]=new Cn(o.value,s,l),i.push(&quot;/u_&quot;+s)):&quot;source&quot;===o.value.kind?(n.binders[a]=new Ln(o.value,s,l),i.push(&quot;/a_&quot;+s)):(n.binders[a]=new zn(o.value,s,l,c,e),i.push(&quot;/z_&quot;+s))}}return n.cacheKey=i.sort().join(&quot;&quot;),n},Pn.prototype.populatePaintArrays=function(t,e){for(var r in this.binders)this.binders[r].populatePaintArray(t,e)},Pn.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},Pn.prototype.setUniforms=function(t,e,r,n){for(var i in this.binders)this.binders[i].setUniforms(t,e,n,r.get(i))},Pn.prototype.getPaintVertexBuffers=function(){return this._buffers},Pn.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var n in this.binders){var i=this.binders[n];(i instanceof Ln||i instanceof zn)&amp;&amp;i.paintVertexBuffer&amp;&amp;r.push(i.paintVertexBuffer)}this._buffers=r},Pn.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var On=function(t,e,r,n){void 0===n&amp;&amp;(n=function(){return!0}),this.programConfigurations={};for(var i=0,a=e;i&lt;a.length;i+=1){var o=a[i];this.programConfigurations[o.id]=Pn.createDynamic(o,r,n),this.programConfigurations[o.id].layoutAttributes=t}};function In(t,e){return{&quot;text-opacity&quot;:&quot;opacity&quot;,&quot;icon-opacity&quot;:&quot;opacity&quot;,&quot;text-color&quot;:&quot;fill_color&quot;,&quot;icon-color&quot;:&quot;fill_color&quot;,&quot;text-halo-color&quot;:&quot;halo_color&quot;,&quot;icon-halo-color&quot;:&quot;halo_color&quot;,&quot;text-halo-blur&quot;:&quot;halo_blur&quot;,&quot;icon-halo-blur&quot;:&quot;halo_blur&quot;,&quot;text-halo-width&quot;:&quot;halo_width&quot;,&quot;icon-halo-width&quot;:&quot;halo_width&quot;,&quot;line-gap-width&quot;:&quot;gapwidth&quot;}[t]||t.replace(e+&quot;-&quot;,&quot;&quot;).replace(/-/g,&quot;_&quot;)}On.prototype.populatePaintArrays=function(t,e){for(var r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e)},On.prototype.get=function(t){return this.programConfigurations[t]},On.prototype.upload=function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)},On.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},pr(&quot;ConstantBinder&quot;,Cn),pr(&quot;SourceExpressionBinder&quot;,Ln),pr(&quot;CompositeExpressionBinder&quot;,zn),pr(&quot;ProgramConfiguration&quot;,Pn,{omit:[&quot;_buffers&quot;]}),pr(&quot;ProgramConfigurationSet&quot;,On);var Dn=8192,Rn=(16,{min:-1*Math.pow(2,15),max:Math.pow(2,15)-1});function Bn(t){for(var e=Dn/t.extent,r=t.loadGeometry(),n=0;n&lt;r.length;n++)for(var i=r[n],a=0;a&lt;i.length;a++){var o=i[a];o.x=Math.round(o.x*e),o.y=Math.round(o.y*e),(o.x&lt;Rn.min||o.x&gt;Rn.max||o.y&lt;Rn.min||o.y&gt;Rn.max)&amp;&amp;_(&quot;Geometry exceeds allowed extent, reduce your vector tile buffer size&quot;)}return r}function Fn(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Nn=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.segments=new Tn,this.programConfigurations=new On(An,t.layers,t.zoom)};function jn(t,e,r){for(var n=0;n&lt;t.length;n++){var i=t[n];if(Zn(i,e))return!0;if(Wn(e,i,r))return!0}return!1}function Vn(t,e){if(1===t.length&amp;&amp;1===t[0].length)return Xn(e,t[0][0]);for(var r=0;r&lt;e.length;r++)for(var n=e[r],i=0;i&lt;n.length;i++)if(Xn(t,n[i]))return!0;for(var a=0;a&lt;t.length;a++){for(var o=t[a],s=0;s&lt;o.length;s++)if(Xn(e,o[s]))return!0;for(var l=0;l&lt;e.length;l++)if(Hn(o,e[l]))return!0}return!1}function Un(t,e,r){for(var n=0;n&lt;e.length;n++)for(var i=e[n],a=0;a&lt;t.length;a++){var o=t[a];if(o.length&gt;=3)for(var s=0;s&lt;i.length;s++)if(Zn(o,i[s]))return!0;if(qn(o,i,r))return!0}return!1}function qn(t,e,r){if(t.length&gt;1){if(Hn(t,e))return!0;for(var n=0;n&lt;e.length;n++)if(Wn(e[n],t,r))return!0}for(var i=0;i&lt;t.length;i++)if(Wn(t[i],e,r))return!0;return!1}function Hn(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r&lt;t.length-1;r++)for(var n=t[r],i=t[r+1],a=0;a&lt;e.length-1;a++)if(Gn(n,i,e[a],e[a+1]))return!0;return!1}function Gn(t,e,r,n){return w(t,r,n)!==w(e,r,n)&amp;&amp;w(t,e,r)!==w(t,e,n)}function Wn(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])&lt;n;for(var i=1;i&lt;e.length;i++)if(Yn(t,e[i-1],e[i])&lt;n)return!0;return!1}function Yn(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i&lt;0?t.distSqr(e):i&gt;1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Xn(t,e){for(var r,n,i,a=!1,o=0;o&lt;t.length;o++)for(var s=0,l=(r=t[o]).length-1;s&lt;r.length;l=s++)n=r[s],i=r[l],n.y&gt;e.y!=i.y&gt;e.y&amp;&amp;e.x&lt;(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&amp;&amp;(a=!a);return a}function Zn(t,e){for(var r=!1,n=0,i=t.length-1;n&lt;t.length;i=n++){var a=t[n],o=t[i];a.y&gt;e.y!=o.y&gt;e.y&amp;&amp;e.x&lt;(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&amp;&amp;(r=!r)}return r}function $n(t,e,r){var n=e.paint.get(t).value;return&quot;constant&quot;===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].statistics.max}function Jn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Kn(t,e,r,n,i){if(!e[0]&amp;&amp;!e[1])return t;var a=l.convert(e);&quot;viewport&quot;===r&amp;&amp;a._rotate(-n);for(var o=[],s=0;s&lt;t.length;s++){for(var c=t[s],u=[],f=0;f&lt;c.length;f++)u.push(c[f].sub(a._mult(i)));o.push(u)}return o}Nn.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Nn.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Nn.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,An),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},Nn.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Nn.prototype.addFeature=function(t,e){for(var r=0,n=e;r&lt;n.length;r+=1)for(var i=0,a=n[r];i&lt;a.length;i+=1){var o=a[i],s=o.x,l=o.y;if(!(s&lt;0||s&gt;=Dn||l&lt;0||l&gt;=Dn)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),u=c.vertexLength;Fn(this.layoutVertexArray,s,l,-1,-1),Fn(this.layoutVertexArray,s,l,1,-1),Fn(this.layoutVertexArray,s,l,1,1),Fn(this.layoutVertexArray,s,l,-1,1),this.indexArray.emplaceBack(u,u+1,u+2),this.indexArray.emplaceBack(u,u+3,u+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(&quot;CircleBucket&quot;,Nn,{omit:[&quot;layers&quot;]});var Qn={paint:new qr({&quot;circle-radius&quot;:new jr(O.paint_circle[&quot;circle-radius&quot;]),&quot;circle-color&quot;:new jr(O.paint_circle[&quot;circle-color&quot;]),&quot;circle-blur&quot;:new jr(O.paint_circle[&quot;circle-blur&quot;]),&quot;circle-opacity&quot;:new jr(O.paint_circle[&quot;circle-opacity&quot;]),&quot;circle-translate&quot;:new Nr(O.paint_circle[&quot;circle-translate&quot;]),&quot;circle-translate-anchor&quot;:new Nr(O.paint_circle[&quot;circle-translate-anchor&quot;]),&quot;circle-pitch-scale&quot;:new Nr(O.paint_circle[&quot;circle-pitch-scale&quot;]),&quot;circle-pitch-alignment&quot;:new Nr(O.paint_circle[&quot;circle-pitch-alignment&quot;]),&quot;circle-stroke-width&quot;:new jr(O.paint_circle[&quot;circle-stroke-width&quot;]),&quot;circle-stroke-color&quot;:new jr(O.paint_circle[&quot;circle-stroke-color&quot;]),&quot;circle-stroke-opacity&quot;:new jr(O.paint_circle[&quot;circle-stroke-opacity&quot;])})},ti=i(function(t,e){var r;t.exports=((r=new Float32Array(3))[0]=0,r[1]=0,r[2]=0,function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}(),{vec3:{transformMat3:function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},vec4:{transformMat4:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},mat2:{create:function(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},rotate:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+a*s,t[1]=i*l+o*s,t[2]=n*-s+a*l,t[3]=i*-s+o*l,t},scale:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1];return t[0]=n*s,t[1]=i*s,t[2]=a*l,t[3]=o*l,t}},mat3:{create:function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromRotation:function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},mat4:{create:function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},translate:function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],m=r[1],v=r[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*m+f*v+e[12],t[13]=i*g+l*m+h*v+e[13],t[14]=a*g+c*m+p*v+e[14],t[15]=o*g+u*m+d*v+e[15]),t},scale:function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},multiply:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],m=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*m,t[2]=x*a+b*c+_*p+w*v,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*m,t[6]=x*a+b*c+_*p+w*v,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*m,t[10]=x*a+b*c+_*p+w*v,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t},perspective:function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},rotateX:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&amp;&amp;(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t},rotateZ:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&amp;&amp;(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t},invert:function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],m=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*m-h*d,T=u*v-p*d,S=f*m-h*g,E=f*v-p*g,C=h*v-p*m,L=y*C-x*E+b*S+_*T-w*A+k*M;return L?(L=1/L,t[0]=(s*C-l*E+c*S)*L,t[1]=(i*E-n*C-a*S)*L,t[2]=(g*k-m*w+v*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*C-c*A)*L,t[5]=(r*C-i*T+a*A)*L,t[6]=(m*b-d*k-v*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*E-s*T+c*M)*L,t[9]=(n*T-r*E-a*M)*L,t[10]=(d*w-g*b+v*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-m*y)*L,t[15]=(u*_-f*x+h*y)*L,t):null},ortho:function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t}}})}),ei=(ti.vec3,ti.vec4),ri=(ti.mat2,ti.mat3,ti.mat4),ni=function(t){function e(e){t.call(this,e,Qn)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Nn(t)},e.prototype.queryRadius=function(t){var e=t;return $n(&quot;circle-radius&quot;,this,e)+$n(&quot;circle-stroke-width&quot;,this,e)+Jn(this.paint.get(&quot;circle-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){for(var s=Kn(t,this.paint.get(&quot;circle-translate&quot;),this.paint.get(&quot;circle-translate-anchor&quot;),i.angle,a),l=this.paint.get(&quot;circle-radius&quot;).evaluate(e)+this.paint.get(&quot;circle-stroke-width&quot;).evaluate(e),c=&quot;map&quot;===this.paint.get(&quot;circle-pitch-alignment&quot;),u=c?s:function(t,e,r){return s.map(function(t){return t.map(function(t){return ii(t,e,r)})})}(0,o,i),f=c?l*a:l,h=0,p=r;h&lt;p.length;h+=1)for(var d=0,g=p[h];d&lt;g.length;d+=1){var m=g[d],v=c?m:ii(m,o,i),y=f,x=ei.transformMat4([],[m.x,m.y,0,1],o);if(&quot;viewport&quot;===this.paint.get(&quot;circle-pitch-scale&quot;)&amp;&amp;&quot;map&quot;===this.paint.get(&quot;circle-pitch-alignment&quot;)?y*=x[3]/i.cameraToCenterDistance:&quot;map&quot;===this.paint.get(&quot;circle-pitch-scale&quot;)&amp;&amp;&quot;viewport&quot;===this.paint.get(&quot;circle-pitch-alignment&quot;)&amp;&amp;(y*=i.cameraToCenterDistance/x[3]),jn(u,v,y))return!0}return!1},e}(Hr);function ii(t,e,r){var n=ei.transformMat4([],[t.x,t.y,0,1],e);return new l((n[0]/n[3]+1)*r.width*.5,(n[1]/n[3]+1)*r.height*.5)}var ai=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Nn);function oi(t,e,r,n){var i=e.width,a=e.height;if(n){if(n.length!==i*a*r)throw new RangeError(&quot;mismatched image size&quot;)}else n=new Uint8Array(i*a*r);return t.width=i,t.height=a,t.data=n,t}function si(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var a=oi({},{width:n,height:i},r);li(t,a,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=a.data}}function li(t,e,r,n,i,a){if(0===i.width||0===i.height)return e;if(i.width&gt;t.width||i.height&gt;t.height||r.x&gt;t.width-i.width||r.y&gt;t.height-i.height)throw new RangeError(&quot;out of range source coordinates for image copy&quot;);if(i.width&gt;e.width||i.height&gt;e.height||n.x&gt;e.width-i.width||n.y&gt;e.height-i.height)throw new RangeError(&quot;out of range destination coordinates for image copy&quot;);for(var o=t.data,s=e.data,l=0;l&lt;i.height;l++)for(var c=((r.y+l)*t.width+r.x)*a,u=((n.y+l)*e.width+n.x)*a,f=0;f&lt;i.width*a;f++)s[u+f]=o[c+f];return e}pr(&quot;HeatmapBucket&quot;,ai,{omit:[&quot;layers&quot;]});var ci=function(t,e){oi(this,t,1,e)};ci.prototype.resize=function(t){si(this,t,1)},ci.prototype.clone=function(){return new ci({width:this.width,height:this.height},new Uint8Array(this.data))},ci.copy=function(t,e,r,n,i){li(t,e,r,n,i,1)};var ui=function(t,e){oi(this,t,4,e)};ui.prototype.resize=function(t){si(this,t,4)},ui.prototype.clone=function(){return new ui({width:this.width,height:this.height},new Uint8Array(this.data))},ui.copy=function(t,e,r,n,i){li(t,e,r,n,i,4)},pr(&quot;AlphaImage&quot;,ci),pr(&quot;RGBAImage&quot;,ui);var fi={paint:new qr({&quot;heatmap-radius&quot;:new jr(O.paint_heatmap[&quot;heatmap-radius&quot;]),&quot;heatmap-weight&quot;:new jr(O.paint_heatmap[&quot;heatmap-weight&quot;]),&quot;heatmap-intensity&quot;:new Nr(O.paint_heatmap[&quot;heatmap-intensity&quot;]),&quot;heatmap-color&quot;:new Ur(O.paint_heatmap[&quot;heatmap-color&quot;]),&quot;heatmap-opacity&quot;:new Nr(O.paint_heatmap[&quot;heatmap-opacity&quot;])})};function hi(t,e){for(var r=new Uint8Array(1024),n={},i=0,a=0;i&lt;256;i++,a+=4){n[e]=i/255;var o=t.evaluate(n);r[a+0]=Math.floor(255*o.r/o.a),r[a+1]=Math.floor(255*o.g/o.a),r[a+2]=Math.floor(255*o.b/o.a),r[a+3]=Math.floor(255*o.a)}return new ui({width:256,height:1},r)}var pi=function(t){function e(e){t.call(this,e,fi),this._updateColorRamp()}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ai(t)},e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),&quot;heatmap-color&quot;===e&amp;&amp;this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values[&quot;heatmap-color&quot;].value.expression;this.colorRamp=hi(t,&quot;heatmapDensity&quot;),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&amp;&amp;(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(&quot;heatmap-opacity&quot;)&amp;&amp;&quot;none&quot;!==this.visibility},e}(Hr),di={paint:new qr({&quot;hillshade-illumination-direction&quot;:new Nr(O.paint_hillshade[&quot;hillshade-illumination-direction&quot;]),&quot;hillshade-illumination-anchor&quot;:new Nr(O.paint_hillshade[&quot;hillshade-illumination-anchor&quot;]),&quot;hillshade-exaggeration&quot;:new Nr(O.paint_hillshade[&quot;hillshade-exaggeration&quot;]),&quot;hillshade-shadow-color&quot;:new Nr(O.paint_hillshade[&quot;hillshade-shadow-color&quot;]),&quot;hillshade-highlight-color&quot;:new Nr(O.paint_hillshade[&quot;hillshade-highlight-color&quot;]),&quot;hillshade-accent-color&quot;:new Nr(O.paint_hillshade[&quot;hillshade-accent-color&quot;])})},gi=function(t){function e(e){t.call(this,e,di)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(&quot;hillshade-exaggeration&quot;)&amp;&amp;&quot;none&quot;!==this.visibility},e}(Hr),mi=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;}],4).members,vi=xi,yi=xi;function xi(t,e,r){r=r||2;var n,i,a,o,s,l,c,u=e&amp;&amp;e.length,f=u?e[0]*r:t.length,h=bi(t,0,f,r,!0),p=[];if(!h)return p;if(u&amp;&amp;(h=function(t,e,r,n){var i,a,o,s=[];for(i=0,a=e.length;i&lt;a;i++)(o=bi(t,e[i]*n,i&lt;a-1?e[i+1]*n:t.length,n,!1))===o.next&amp;&amp;(o.steiner=!0),s.push(Li(o));for(s.sort(Si),i=0;i&lt;s.length;i++)Ei(s[i],r),r=_i(r,r.next);return r}(t,e,h,r)),t.length&gt;80*r){n=a=t[0],i=o=t[1];for(var d=r;d&lt;f;d+=r)(s=t[d])&lt;n&amp;&amp;(n=s),(l=t[d+1])&lt;i&amp;&amp;(i=l),s&gt;a&amp;&amp;(a=s),l&gt;o&amp;&amp;(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return wi(h,p,r,n,i,c),p}function bi(t,e,r,n,i){var a,o;if(i===Vi(t,e,r,n)&gt;0)for(a=e;a&lt;r;a+=n)o=Fi(a,t[a],t[a+1],o);else for(a=r-n;a&gt;=e;a-=n)o=Fi(a,t[a],t[a+1],o);return o&amp;&amp;Ii(o,o.next)&amp;&amp;(Ni(o),o=o.next),o}function _i(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Ii(n,n.next)&amp;&amp;0!==Oi(n.prev,n,n.next))n=n.next;else{if(Ni(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function wi(t,e,r,n,i,a,o){if(t){!o&amp;&amp;a&amp;&amp;function(t,e,r,n){var i=t;do{null===i.z&amp;&amp;(i.z=Ci(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e&lt;c&amp;&amp;(s++,n=n.nextZ);e++);for(l=c;s&gt;0||l&gt;0&amp;&amp;n;)0!==s&amp;&amp;(0===l||!n||r.z&lt;=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o&gt;1)}(i)}(t,n,i,a);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?Mi(t,n,i,a):ki(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Ni(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?wi(t=Ai(t,e,r),e,r,n,i,a,2):2===o&amp;&amp;Ti(t,e,r,n,i,a):wi(_i(t),e,r,n,i,a,1);break}}}function ki(t){var e=t.prev,r=t,n=t.next;if(Oi(e,r,n)&gt;=0)return!1;for(var i=t.next.next;i!==t.prev;){if(zi(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&amp;&amp;Oi(i.prev,i,i.next)&gt;=0)return!1;i=i.next}return!0}function Mi(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Oi(i,a,o)&gt;=0)return!1;for(var s=i.x&lt;a.x?i.x&lt;o.x?i.x:o.x:a.x&lt;o.x?a.x:o.x,l=i.y&lt;a.y?i.y&lt;o.y?i.y:o.y:a.y&lt;o.y?a.y:o.y,c=i.x&gt;a.x?i.x&gt;o.x?i.x:o.x:a.x&gt;o.x?a.x:o.x,u=i.y&gt;a.y?i.y&gt;o.y?i.y:o.y:a.y&gt;o.y?a.y:o.y,f=Ci(s,l,e,r,n),h=Ci(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&amp;&amp;p.z&gt;=f&amp;&amp;d&amp;&amp;d.z&lt;=h;){if(p!==t.prev&amp;&amp;p!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&amp;&amp;Oi(p.prev,p,p.next)&gt;=0)return!1;if(p=p.prevZ,d!==t.prev&amp;&amp;d!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;Oi(d.prev,d,d.next)&gt;=0)return!1;d=d.nextZ}for(;p&amp;&amp;p.z&gt;=f;){if(p!==t.prev&amp;&amp;p!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&amp;&amp;Oi(p.prev,p,p.next)&gt;=0)return!1;p=p.prevZ}for(;d&amp;&amp;d.z&lt;=h;){if(d!==t.prev&amp;&amp;d!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;Oi(d.prev,d,d.next)&gt;=0)return!1;d=d.nextZ}return!0}function Ai(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Ii(i,a)&amp;&amp;Di(i,n,n.next,a)&amp;&amp;Ri(i,a)&amp;&amp;Ri(a,i)&amp;&amp;(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),Ni(n),Ni(n.next),n=t=a),n=n.next}while(n!==t);return n}function Ti(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&amp;&amp;Pi(o,s)){var l=Bi(o,s);return o=_i(o,o.next),l=_i(l,l.next),wi(o,e,r,n,i,a),void wi(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Si(t,e){return t.x-e.x}function Ei(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a&lt;=n.y&amp;&amp;a&gt;=n.next.y&amp;&amp;n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s&lt;=i&amp;&amp;s&gt;o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x&lt;n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;for(n=r.next;n!==c;)i&gt;=n.x&amp;&amp;n.x&gt;=u&amp;&amp;i!==n.x&amp;&amp;zi(a&lt;f?i:o,a,u,f,a&lt;f?o:i,a,n.x,n.y)&amp;&amp;((l=Math.abs(a-n.y)/(i-n.x))&lt;h||l===h&amp;&amp;n.x&gt;r.x)&amp;&amp;Ri(n,t)&amp;&amp;(r=n,h=l),n=n.next;return r}(t,e)){var r=Bi(e,t);_i(r,r.next)}}function Ci(t,e,r,n,i){return(t=1431655765&amp;((t=858993459&amp;((t=252645135&amp;((t=16711935&amp;((t=32767*(t-r)*i)|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2))|t&lt;&lt;1))|(e=1431655765&amp;((e=858993459&amp;((e=252645135&amp;((e=16711935&amp;((e=32767*(e-n)*i)|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))|e&lt;&lt;1))&lt;&lt;1}function Li(t){var e=t,r=t;do{e.x&lt;r.x&amp;&amp;(r=e),e=e.next}while(e!==t);return r}function zi(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)&gt;=0&amp;&amp;(t-o)*(n-s)-(r-o)*(e-s)&gt;=0&amp;&amp;(r-o)*(a-s)-(i-o)*(n-s)&gt;=0}function Pi(t,e){return t.next.i!==e.i&amp;&amp;t.prev.i!==e.i&amp;&amp;!function(t,e){var r=t;do{if(r.i!==t.i&amp;&amp;r.next.i!==t.i&amp;&amp;r.i!==e.i&amp;&amp;r.next.i!==e.i&amp;&amp;Di(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&amp;&amp;Ri(t,e)&amp;&amp;Ri(e,t)&amp;&amp;function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y&gt;a!=r.next.y&gt;a&amp;&amp;r.next.y!==r.y&amp;&amp;i&lt;(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&amp;&amp;(n=!n),r=r.next}while(r!==t);return n}(t,e)}function Oi(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Ii(t,e){return t.x===e.x&amp;&amp;t.y===e.y}function Di(t,e,r,n){return!!(Ii(t,e)&amp;&amp;Ii(r,n)||Ii(t,n)&amp;&amp;Ii(r,e))||Oi(t,e,r)&gt;0!=Oi(t,e,n)&gt;0&amp;&amp;Oi(r,n,t)&gt;0!=Oi(r,n,e)&gt;0}function Ri(t,e){return Oi(t.prev,t,t.next)&lt;0?Oi(t,e,t.next)&gt;=0&amp;&amp;Oi(t,t.prev,e)&gt;=0:Oi(t,e,t.prev)&lt;0||Oi(t,t.next,e)&lt;0}function Bi(t,e){var r=new ji(t.i,t.x,t.y),n=new ji(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Fi(t,e,r,n){var i=new ji(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ni(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&amp;&amp;(t.prevZ.nextZ=t.nextZ),t.nextZ&amp;&amp;(t.nextZ.prevZ=t.prevZ)}function ji(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Vi(t,e,r,n){for(var i=0,a=e,o=r-n;a&lt;r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}xi.deviation=function(t,e,r,n){var i=e&amp;&amp;e.length,a=i?e[0]*r:t.length,o=Math.abs(Vi(t,0,a,r));if(i)for(var s=0,l=e.length;s&lt;l;s++){var c=e[s]*r,u=s&lt;l-1?e[s+1]*r:t.length;o-=Math.abs(Vi(t,c,u,r))}var f=0;for(s=0;s&lt;n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&amp;&amp;0===f?0:Math.abs((f-o)/o)},xi.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i&lt;t.length;i++){for(var a=0;a&lt;t[i].length;a++)for(var o=0;o&lt;e;o++)r.vertices.push(t[i][a][o]);i&gt;0&amp;&amp;(n+=t[i-1].length,r.holes.push(n))}return r},vi.default=yi;var Ui=Hi,qi=Hi;function Hi(t,e,r,n,i){!function t(e,r,n,i,a){for(;i&gt;n;){if(i-n&gt;600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2&lt;0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var f=e[r],h=n,p=i;for(Gi(e,n,r),a(e[i],f)&gt;0&amp;&amp;Gi(e,n,i);h&lt;p;){for(Gi(e,h,p),h++,p--;a(e[h],f)&lt;0;)h++;for(;a(e[p],f)&gt;0;)p--}0===a(e[n],f)?Gi(e,n,p):Gi(e,++p,i),p&lt;=r&amp;&amp;(n=p+1),r&lt;=p&amp;&amp;(i=p-1)}}(t,e,r||0,n||t.length-1,i||Wi)}function Gi(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Wi(t,e){return t&lt;e?-1:t&gt;e?1:0}function Yi(t,e){var r=t.length;if(r&lt;=1)return[t];for(var n,i,a=[],o=0;o&lt;r;o++){var s=k(t[o]);0!==s&amp;&amp;(t[o].area=Math.abs(s),void 0===i&amp;&amp;(i=s&lt;0),i===s&lt;0?(n&amp;&amp;a.push(n),n=[t[o]]):n.push(t[o]))}if(n&amp;&amp;a.push(n),e&gt;1)for(var l=0;l&lt;a.length;l++)a[l].length&lt;=e||(Ui(a[l],e,1,a[l].length-1,Xi),a[l]=a[l].slice(0,e));return a}function Xi(t,e){return e.area-t.area}Ui.default=qi;var Zi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.indexArray2=new hn,this.programConfigurations=new On(mi,t.layers,t.zoom),this.segments=new Tn,this.segments2=new Tn};Zi.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Zi.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Zi.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,mi),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)},Zi.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Zi.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r&lt;n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o&lt;s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray),c=l.vertexLength,u=[],f=[],h=0,p=i;h&lt;p.length;h+=1){var d=p[h];if(0!==d.length){d!==i[0]&amp;&amp;f.push(u.length/2);var g=this.segments2.prepareSegment(d.length,this.layoutVertexArray,this.indexArray2),m=g.vertexLength;this.layoutVertexArray.emplaceBack(d[0].x,d[0].y),this.indexArray2.emplaceBack(m+d.length-1,m),u.push(d[0].x),u.push(d[0].y);for(var v=1;v&lt;d.length;v++)this.layoutVertexArray.emplaceBack(d[v].x,d[v].y),this.indexArray2.emplaceBack(m+v-1,m+v),u.push(d[v].x),u.push(d[v].y);g.vertexLength+=d.length,g.primitiveLength+=d.length}}for(var y=vi(u,f),x=0;x&lt;y.length;x+=3)this.indexArray.emplaceBack(c+y[x],c+y[x+1],c+y[x+2]);l.vertexLength+=a,l.primitiveLength+=y.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(&quot;FillBucket&quot;,Zi,{omit:[&quot;layers&quot;]});var $i={paint:new qr({&quot;fill-antialias&quot;:new Nr(O.paint_fill[&quot;fill-antialias&quot;]),&quot;fill-opacity&quot;:new jr(O.paint_fill[&quot;fill-opacity&quot;]),&quot;fill-color&quot;:new jr(O.paint_fill[&quot;fill-color&quot;]),&quot;fill-outline-color&quot;:new jr(O.paint_fill[&quot;fill-outline-color&quot;]),&quot;fill-translate&quot;:new Nr(O.paint_fill[&quot;fill-translate&quot;]),&quot;fill-translate-anchor&quot;:new Nr(O.paint_fill[&quot;fill-translate-anchor&quot;]),&quot;fill-pattern&quot;:new Vr(O.paint_fill[&quot;fill-pattern&quot;])})},Ji=function(t){function e(e){t.call(this,e,$i)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t);var e=this.paint._values[&quot;fill-outline-color&quot;];&quot;constant&quot;===e.value.kind&amp;&amp;void 0===e.value.value&amp;&amp;(this.paint._values[&quot;fill-outline-color&quot;]=this.paint._values[&quot;fill-color&quot;])},e.prototype.createBucket=function(t){return new Zi(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(&quot;fill-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(&quot;fill-translate&quot;),this.paint.get(&quot;fill-translate-anchor&quot;),i.angle,a),r)},e}(Hr),Ki=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_normal_ed&quot;,components:4,type:&quot;Int16&quot;}],4).members,Qi=Math.pow(2,13);function ta(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Qi)+o,i*Qi*2,a*Qi*2,Math.round(s))}var ea=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Kr,this.indexArray=new fn,this.programConfigurations=new On(Ki,t.layers,t.zoom),this.segments=new Tn};function ra(t,e){return t.x===e.x&amp;&amp;(t.x&lt;0||t.x&gt;Dn)||t.y===e.y&amp;&amp;(t.y&lt;0||t.y&gt;Dn)}function na(t){return t.every(function(t){return t.x&lt;0})||t.every(function(t){return t.x&gt;Dn})||t.every(function(t){return t.y&lt;0})||t.every(function(t){return t.y&gt;Dn})}ea.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},ea.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ea.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ki),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},ea.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ea.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r&lt;n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o&lt;s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=0,u=i;c&lt;u.length;c+=1){var f=u[c];if(0!==f.length&amp;&amp;!na(f))for(var h=0,p=0;p&lt;f.length;p++){var d=f[p];if(p&gt;=1){var g=f[p-1];if(!ra(d,g)){l.vertexLength+4&gt;Tn.MAX_VERTEX_ARRAY_LENGTH&amp;&amp;(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var m=d.sub(g)._perp()._unit(),v=g.dist(d);h+v&gt;32768&amp;&amp;(h=0),ta(this.layoutVertexArray,d.x,d.y,m.x,m.y,0,0,h),ta(this.layoutVertexArray,d.x,d.y,m.x,m.y,0,1,h),h+=v,ta(this.layoutVertexArray,g.x,g.y,m.x,m.y,0,0,h),ta(this.layoutVertexArray,g.x,g.y,m.x,m.y,0,1,h);var y=l.vertexLength;this.indexArray.emplaceBack(y,y+1,y+2),this.indexArray.emplaceBack(y+1,y+2,y+3),l.vertexLength+=4,l.primitiveLength+=2}}}}l.vertexLength+a&gt;Tn.MAX_VERTEX_ARRAY_LENGTH&amp;&amp;(l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray));for(var x=[],b=[],_=l.vertexLength,w=0,k=i;w&lt;k.length;w+=1){var M=k[w];if(0!==M.length){M!==i[0]&amp;&amp;b.push(x.length/2);for(var A=0;A&lt;M.length;A++){var T=M[A];ta(this.layoutVertexArray,T.x,T.y,0,0,1,1,0),x.push(T.x),x.push(T.y)}}}for(var S=vi(x,b),E=0;E&lt;S.length;E+=3)this.indexArray.emplaceBack(_+S[E],_+S[E+1],_+S[E+2]);l.primitiveLength+=S.length/3,l.vertexLength+=a}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(&quot;FillExtrusionBucket&quot;,ea,{omit:[&quot;layers&quot;]});var ia={paint:new qr({&quot;fill-extrusion-opacity&quot;:new Nr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-opacity&quot;]),&quot;fill-extrusion-color&quot;:new jr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-color&quot;]),&quot;fill-extrusion-translate&quot;:new Nr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-translate&quot;]),&quot;fill-extrusion-translate-anchor&quot;:new Nr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-translate-anchor&quot;]),&quot;fill-extrusion-pattern&quot;:new Vr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-pattern&quot;]),&quot;fill-extrusion-height&quot;:new jr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-height&quot;]),&quot;fill-extrusion-base&quot;:new jr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-base&quot;])})},aa=function(t){function e(e){t.call(this,e,ia)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ea(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(&quot;fill-extrusion-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(&quot;fill-extrusion-translate&quot;),this.paint.get(&quot;fill-extrusion-translate-anchor&quot;),i.angle,a),r)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(&quot;fill-extrusion-opacity&quot;)&amp;&amp;&quot;none&quot;!==this.visibility},e.prototype.resize=function(){this.viewportFrame&amp;&amp;(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(Hr),oa=Xr([{name:&quot;a_pos_normal&quot;,components:4,type:&quot;Int16&quot;},{name:&quot;a_data&quot;,components:4,type:&quot;Uint8&quot;}],4).members,sa=la;function la(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(ca,this,e)}function ca(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos&lt;r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&amp;&amp;(e._geometry=r.pos)}function ua(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i&lt;a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}la.types=[&quot;Unknown&quot;,&quot;Point&quot;,&quot;LineString&quot;,&quot;Polygon&quot;],la.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,a=0,o=0,s=[];t.pos&lt;r;){if(i&lt;=0){var c=t.readVarint();n=7&amp;c,i=c&gt;&gt;3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&amp;&amp;(e&amp;&amp;s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error(&quot;unknown command &quot;+n);e&amp;&amp;e.push(e[0].clone())}}return e&amp;&amp;s.push(e),s},la.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos&lt;e;){if(n&lt;=0){var u=t.readVarint();r=7&amp;u,n=u&gt;&gt;3}if(n--,1===r||2===r)(i+=t.readSVarint())&lt;o&amp;&amp;(o=i),i&gt;s&amp;&amp;(s=i),(a+=t.readSVarint())&lt;l&amp;&amp;(l=a),a&gt;c&amp;&amp;(c=a);else if(7!==r)throw new Error(&quot;unknown command &quot;+r)}return[o,l,s,c]},la.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=la.types[this.type];function u(t){for(var e=0;e&lt;t.length;e++){var r=t[e],n=180-360*(r.y+s)/a;t[e]=[360*(r.x+o)/a-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(n=0;n&lt;l.length;n++)f[n]=l[n][0];u(l=f);break;case 2:for(n=0;n&lt;l.length;n++)u(l[n]);break;case 3:for(l=function(t){var e=t.length;if(e&lt;=1)return[t];for(var r,n,i=[],a=0;a&lt;e;a++){var o=ua(t[a]);0!==o&amp;&amp;(void 0===n&amp;&amp;(n=o&lt;0),n===o&lt;0?(r&amp;&amp;i.push(r),r=[t[a]]):r.push(t[a]))}return r&amp;&amp;i.push(r),i}(l),n=0;n&lt;l.length;n++)for(i=0;i&lt;l[n].length;i++)u(l[n][i])}1===l.length?l=l[0]:c=&quot;Multi&quot;+c;var h={type:&quot;Feature&quot;,geometry:{type:c,coordinates:l},properties:this.properties};return&quot;id&quot;in this&amp;&amp;(h.id=this.id),h};var fa=ha;function ha(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(pa,this,e),this.length=this._features.length}function pa(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&amp;&amp;e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos&lt;r;){var n=t.readVarint()&gt;&gt;3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function da(t,e,r){if(3===t){var n=new fa(r,r.readVarint()+r.pos);n.length&amp;&amp;(e[n.name]=n)}}ha.prototype.feature=function(t){if(t&lt;0||t&gt;=this._features.length)throw new Error(&quot;feature index out of bounds&quot;);this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new sa(this._pbf,e,this.extent,this._keys,this._values)};var ga={VectorTile:function(t,e){this.layers=t.readFields(da,{},e)},VectorTileFeature:sa,VectorTileLayer:fa},ma=ga.VectorTileFeature.types,va=63,ya=Math.cos(Math.PI/180*37.5),xa=.5,ba=Math.pow(2,14)/xa;function _a(t,e,r,n,i,a,o){t.emplaceBack(e.x,e.y,n?1:0,i?1:-1,Math.round(va*r.x)+128,Math.round(va*r.y)+128,1+(0===a?0:a&lt;0?-1:1)|(o*xa&amp;63)&lt;&lt;2,o*xa&gt;&gt;6)}var wa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Qr,this.indexArray=new fn,this.programConfigurations=new On(oa,t.layers,t.zoom),this.segments=new Tn};function ka(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(ba-1)}wa.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},wa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},wa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,oa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},wa.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wa.prototype.addFeature=function(t,e){for(var r=this.layers[0].layout,n=r.get(&quot;line-join&quot;).evaluate(t),i=r.get(&quot;line-cap&quot;),a=r.get(&quot;line-miter-limit&quot;),o=r.get(&quot;line-round-limit&quot;),s=0,l=e;s&lt;l.length;s+=1){var c=l[s];this.addLine(c,t,n,i,a,o)}},wa.prototype.addLine=function(t,e,r,n,i,a){var o=null;e.properties&amp;&amp;e.properties.hasOwnProperty(&quot;mapbox_clip_start&quot;)&amp;&amp;e.properties.hasOwnProperty(&quot;mapbox_clip_end&quot;)&amp;&amp;(o={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var s=&quot;Polygon&quot;===ma[e.type],l=t.length;l&gt;=2&amp;&amp;t[l-1].equals(t[l-2]);)l--;for(var c=0;c&lt;l-1&amp;&amp;t[c].equals(t[c+1]);)c++;if(!(l&lt;(s?3:2))){o&amp;&amp;(o.tileTotal=function(t,e,r){for(var n,i,a=0,o=c;o&lt;r-1;o++)n=t[o],i=t[o+1],a+=n.dist(i);return a}(t,0,l)),&quot;bevel&quot;===r&amp;&amp;(i=1.05);var u=Dn/(512*this.overscaling)*15,f=t[c],h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray);this.distance=0;var p,d,g,m=n,v=s?&quot;butt&quot;:n,y=!0,x=void 0,b=void 0,_=void 0,w=void 0;this.e1=this.e2=this.e3=-1,s&amp;&amp;(p=t[l-2],w=f.sub(p)._unit()._perp());for(var k=c;k&lt;l;k++)if(!(b=s&amp;&amp;k===l-1?t[c+1]:t[k+1])||!t[k].equals(b)){w&amp;&amp;(_=w),p&amp;&amp;(x=p),p=t[k],w=b?b.sub(p)._unit()._perp():_;var M=(_=_||w).add(w);0===M.x&amp;&amp;0===M.y||M._unit();var A=M.x*w.x+M.y*w.y,T=0!==A?1/A:1/0,S=A&lt;ya&amp;&amp;x&amp;&amp;b;if(S&amp;&amp;k&gt;c){var E=p.dist(x);if(E&gt;2*u){var C=p.sub(p.sub(x)._mult(u/E)._round());this.distance+=C.dist(x),this.addCurrentVertex(C,this.distance,_.mult(1),0,0,!1,h,o),x=C}}var L=x&amp;&amp;b,z=L?r:b?m:v;if(L&amp;&amp;&quot;round&quot;===z&amp;&amp;(T&lt;a?z=&quot;miter&quot;:T&lt;=2&amp;&amp;(z=&quot;fakeround&quot;)),&quot;miter&quot;===z&amp;&amp;T&gt;i&amp;&amp;(z=&quot;bevel&quot;),&quot;bevel&quot;===z&amp;&amp;(T&gt;2&amp;&amp;(z=&quot;flipbevel&quot;),T&lt;i&amp;&amp;(z=&quot;miter&quot;)),x&amp;&amp;(this.distance+=p.dist(x)),&quot;miter&quot;===z)M._mult(T),this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o);else if(&quot;flipbevel&quot;===z){if(T&gt;100)M=w.clone().mult(-1);else{var P=_.x*w.y-_.y*w.x&gt;0?-1:1,O=T*_.add(w).mag()/_.sub(w).mag();M._perp()._mult(O*P)}this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,M.mult(-1),0,0,!1,h,o)}else if(&quot;bevel&quot;===z||&quot;fakeround&quot;===z){var I=_.x*w.y-_.y*w.x&gt;0,D=-Math.sqrt(T*T-1);if(I?(g=0,d=D):(d=0,g=D),y||this.addCurrentVertex(p,this.distance,_,d,g,!1,h,o),&quot;fakeround&quot;===z){for(var R=Math.floor(8*(.5-(A-.5))),B=void 0,F=0;F&lt;R;F++)B=w.mult((F+1)/(R+1))._add(_)._unit(),this.addPieSliceVertex(p,this.distance,B,I,h,o);this.addPieSliceVertex(p,this.distance,M,I,h,o);for(var N=R-1;N&gt;=0;N--)B=_.mult((N+1)/(R+1))._add(w)._unit(),this.addPieSliceVertex(p,this.distance,B,I,h,o)}b&amp;&amp;this.addCurrentVertex(p,this.distance,w,-d,-g,!1,h,o)}else&quot;butt&quot;===z?(y||this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),b&amp;&amp;this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)):&quot;square&quot;===z?(y||(this.addCurrentVertex(p,this.distance,_,1,1,!1,h,o),this.e1=this.e2=-1),b&amp;&amp;this.addCurrentVertex(p,this.distance,w,-1,-1,!1,h,o)):&quot;round&quot;===z&amp;&amp;(y||(this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,_,1,1,!0,h,o),this.e1=this.e2=-1),b&amp;&amp;(this.addCurrentVertex(p,this.distance,w,-1,-1,!0,h,o),this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)));if(S&amp;&amp;k&lt;l-1){var j=p.dist(b);if(j&gt;2*u){var V=p.add(b.sub(p)._mult(u/j)._round());this.distance+=V.dist(p),this.addCurrentVertex(V,this.distance,w.mult(1),0,0,!1,h,o),p=V}}y=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}},wa.prototype.addCurrentVertex=function(t,e,r,n,i,a,o,s){var l,c=this.layoutVertexArray,u=this.indexArray;s&amp;&amp;(e=ka(e,s)),l=r.clone(),n&amp;&amp;l._sub(r.perp()._mult(n)),_a(c,t,l,a,!1,n,e),this.e3=o.vertexLength++,this.e1&gt;=0&amp;&amp;this.e2&gt;=0&amp;&amp;(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),i&amp;&amp;l._sub(r.perp()._mult(i)),_a(c,t,l,a,!0,-i,e),this.e3=o.vertexLength++,this.e1&gt;=0&amp;&amp;this.e2&gt;=0&amp;&amp;(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e&gt;ba/2&amp;&amp;!s&amp;&amp;(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a,o))},wa.prototype.addPieSliceVertex=function(t,e,r,n,i,a){r=r.mult(n?-1:1);var o=this.layoutVertexArray,s=this.indexArray;a&amp;&amp;(e=ka(e,a)),_a(o,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1&gt;=0&amp;&amp;this.e2&gt;=0&amp;&amp;(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},pr(&quot;LineBucket&quot;,wa,{omit:[&quot;layers&quot;]});var Ma=new qr({&quot;line-cap&quot;:new Nr(O.layout_line[&quot;line-cap&quot;]),&quot;line-join&quot;:new jr(O.layout_line[&quot;line-join&quot;]),&quot;line-miter-limit&quot;:new Nr(O.layout_line[&quot;line-miter-limit&quot;]),&quot;line-round-limit&quot;:new Nr(O.layout_line[&quot;line-round-limit&quot;])}),Aa={paint:new qr({&quot;line-opacity&quot;:new jr(O.paint_line[&quot;line-opacity&quot;]),&quot;line-color&quot;:new jr(O.paint_line[&quot;line-color&quot;]),&quot;line-translate&quot;:new Nr(O.paint_line[&quot;line-translate&quot;]),&quot;line-translate-anchor&quot;:new Nr(O.paint_line[&quot;line-translate-anchor&quot;]),&quot;line-width&quot;:new jr(O.paint_line[&quot;line-width&quot;]),&quot;line-gap-width&quot;:new jr(O.paint_line[&quot;line-gap-width&quot;]),&quot;line-offset&quot;:new jr(O.paint_line[&quot;line-offset&quot;]),&quot;line-blur&quot;:new jr(O.paint_line[&quot;line-blur&quot;]),&quot;line-dasharray&quot;:new Vr(O.paint_line[&quot;line-dasharray&quot;]),&quot;line-pattern&quot;:new Vr(O.paint_line[&quot;line-pattern&quot;]),&quot;line-gradient&quot;:new Ur(O.paint_line[&quot;line-gradient&quot;])}),layout:Ma},Ta=new(function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Lr(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n){return r=p({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n)},e}(jr))(Aa.paint.properties[&quot;line-width&quot;].specification);Ta.useIntegerZoom=!0;var Sa=function(t){function e(e){t.call(this,e,Aa)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),&quot;line-gradient&quot;===e&amp;&amp;this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[&quot;line-gradient&quot;].value.expression;this.gradient=hi(t,&quot;lineProgress&quot;),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values[&quot;line-floorwidth&quot;]=Ta.possiblyEvaluate(this._transitioningPaint._values[&quot;line-width&quot;].value,e)},e.prototype.createBucket=function(t){return new wa(t)},e.prototype.queryRadius=function(t){var e=t,r=Ea($n(&quot;line-width&quot;,this,e),$n(&quot;line-gap-width&quot;,this,e)),n=$n(&quot;line-offset&quot;,this,e);return r/2+Math.abs(n)+Jn(this.paint.get(&quot;line-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){var o=Kn(t,this.paint.get(&quot;line-translate&quot;),this.paint.get(&quot;line-translate-anchor&quot;),i.angle,a),s=a/2*Ea(this.paint.get(&quot;line-width&quot;).evaluate(e),this.paint.get(&quot;line-gap-width&quot;).evaluate(e)),c=this.paint.get(&quot;line-offset&quot;).evaluate(e);return c&amp;&amp;(r=function(t,e){for(var r=[],n=new l(0,0),i=0;i&lt;t.length;i++){for(var a=t[i],o=[],s=0;s&lt;a.length;s++){var c=a[s-1],u=a[s],f=a[s+1],h=0===s?n:u.sub(c)._unit()._perp(),p=s===a.length-1?n:f.sub(u)._unit()._perp(),d=h._add(p)._unit(),g=d.x*p.x+d.y*p.y;d._mult(1/g),o.push(d._mult(e)._add(u))}r.push(o)}return r}(r,c*a)),Un(o,r,s)},e}(Hr);function Ea(t,e){return e&gt;0?e+2*t:t}var Ca=Xr([{name:&quot;a_pos_offset&quot;,components:4,type:&quot;Int16&quot;},{name:&quot;a_data&quot;,components:4,type:&quot;Uint16&quot;}]),La=Xr([{name:&quot;a_projected_pos&quot;,components:3,type:&quot;Float32&quot;}],4),za=(Xr([{name:&quot;a_fade_opacity&quot;,components:1,type:&quot;Uint32&quot;}],4),Xr([{name:&quot;a_placed&quot;,components:2,type:&quot;Uint8&quot;}],4)),Pa=(Xr([{type:&quot;Int16&quot;,name:&quot;anchorPointX&quot;},{type:&quot;Int16&quot;,name:&quot;anchorPointY&quot;},{type:&quot;Int16&quot;,name:&quot;x1&quot;},{type:&quot;Int16&quot;,name:&quot;y1&quot;},{type:&quot;Int16&quot;,name:&quot;x2&quot;},{type:&quot;Int16&quot;,name:&quot;y2&quot;},{type:&quot;Uint32&quot;,name:&quot;featureIndex&quot;},{type:&quot;Uint16&quot;,name:&quot;sourceLayerIndex&quot;},{type:&quot;Uint16&quot;,name:&quot;bucketIndex&quot;},{type:&quot;Int16&quot;,name:&quot;radius&quot;},{type:&quot;Int16&quot;,name:&quot;signedDistanceFromAnchor&quot;}]),Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_anchor_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_extrude&quot;,components:2,type:&quot;Int16&quot;}],4)),Oa=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_anchor_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_extrude&quot;,components:2,type:&quot;Int16&quot;}],4);function Ia(t,e,r){var n=e.layout.get(&quot;text-transform&quot;).evaluate(r);return&quot;uppercase&quot;===n?t=t.toLocaleUpperCase():&quot;lowercase&quot;===n&amp;&amp;(t=t.toLocaleLowerCase()),Cr.applyArabicShaping&amp;&amp;(t=Cr.applyArabicShaping(t)),t}Xr([{type:&quot;Int16&quot;,name:&quot;anchorX&quot;},{type:&quot;Int16&quot;,name:&quot;anchorY&quot;},{type:&quot;Uint16&quot;,name:&quot;glyphStartIndex&quot;},{type:&quot;Uint16&quot;,name:&quot;numGlyphs&quot;},{type:&quot;Uint32&quot;,name:&quot;vertexStartIndex&quot;},{type:&quot;Uint32&quot;,name:&quot;lineStartIndex&quot;},{type:&quot;Uint32&quot;,name:&quot;lineLength&quot;},{type:&quot;Uint16&quot;,name:&quot;segment&quot;},{type:&quot;Uint16&quot;,name:&quot;lowerSize&quot;},{type:&quot;Uint16&quot;,name:&quot;upperSize&quot;},{type:&quot;Float32&quot;,name:&quot;lineOffsetX&quot;},{type:&quot;Float32&quot;,name:&quot;lineOffsetY&quot;},{type:&quot;Uint8&quot;,name:&quot;writingMode&quot;},{type:&quot;Uint8&quot;,name:&quot;hidden&quot;}]),Xr([{type:&quot;Float32&quot;,name:&quot;offsetX&quot;}]),Xr([{type:&quot;Int16&quot;,name:&quot;x&quot;},{type:&quot;Int16&quot;,name:&quot;y&quot;},{type:&quot;Int16&quot;,name:&quot;tileUnitDistanceFromAnchor&quot;}]);var Da={&quot;!&quot;:&quot;\ufe15&quot;,&quot;#&quot;:&quot;\uff03&quot;,$:&quot;\uff04&quot;,&quot;%&quot;:&quot;\uff05&quot;,&quot;&amp;&quot;:&quot;\uff06&quot;,&quot;(&quot;:&quot;\ufe35&quot;,&quot;)&quot;:&quot;\ufe36&quot;,&quot;*&quot;:&quot;\uff0a&quot;,&quot;+&quot;:&quot;\uff0b&quot;,&quot;,&quot;:&quot;\ufe10&quot;,&quot;-&quot;:&quot;\ufe32&quot;,&quot;.&quot;:&quot;\u30fb&quot;,&quot;/&quot;:&quot;\uff0f&quot;,&quot;:&quot;:&quot;\ufe13&quot;,&quot;;&quot;:&quot;\ufe14&quot;,&quot;&lt;&quot;:&quot;\ufe3f&quot;,&quot;=&quot;:&quot;\uff1d&quot;,&quot;&gt;&quot;:&quot;\ufe40&quot;,&quot;?&quot;:&quot;\ufe16&quot;,&quot;@&quot;:&quot;\uff20&quot;,&quot;[&quot;:&quot;\ufe47&quot;,&quot;\\&quot;:&quot;\uff3c&quot;,&quot;]&quot;:&quot;\ufe48&quot;,&quot;^&quot;:&quot;\uff3e&quot;,_:&quot;\ufe33&quot;,&quot;`&quot;:&quot;\uff40&quot;,&quot;{&quot;:&quot;\ufe37&quot;,&quot;|&quot;:&quot;\u2015&quot;,&quot;}&quot;:&quot;\ufe38&quot;,&quot;~&quot;:&quot;\uff5e&quot;,&quot;\xa2&quot;:&quot;\uffe0&quot;,&quot;\xa3&quot;:&quot;\uffe1&quot;,&quot;\xa5&quot;:&quot;\uffe5&quot;,&quot;\xa6&quot;:&quot;\uffe4&quot;,&quot;\xac&quot;:&quot;\uffe2&quot;,&quot;\xaf&quot;:&quot;\uffe3&quot;,&quot;\u2013&quot;:&quot;\ufe32&quot;,&quot;\u2014&quot;:&quot;\ufe31&quot;,&quot;\u2018&quot;:&quot;\ufe43&quot;,&quot;\u2019&quot;:&quot;\ufe44&quot;,&quot;\u201c&quot;:&quot;\ufe41&quot;,&quot;\u201d&quot;:&quot;\ufe42&quot;,&quot;\u2026&quot;:&quot;\ufe19&quot;,&quot;\u2027&quot;:&quot;\u30fb&quot;,&quot;\u20a9&quot;:&quot;\uffe6&quot;,&quot;\u3001&quot;:&quot;\ufe11&quot;,&quot;\u3002&quot;:&quot;\ufe12&quot;,&quot;\u3008&quot;:&quot;\ufe3f&quot;,&quot;\u3009&quot;:&quot;\ufe40&quot;,&quot;\u300a&quot;:&quot;\ufe3d&quot;,&quot;\u300b&quot;:&quot;\ufe3e&quot;,&quot;\u300c&quot;:&quot;\ufe41&quot;,&quot;\u300d&quot;:&quot;\ufe42&quot;,&quot;\u300e&quot;:&quot;\ufe43&quot;,&quot;\u300f&quot;:&quot;\ufe44&quot;,&quot;\u3010&quot;:&quot;\ufe3b&quot;,&quot;\u3011&quot;:&quot;\ufe3c&quot;,&quot;\u3014&quot;:&quot;\ufe39&quot;,&quot;\u3015&quot;:&quot;\ufe3a&quot;,&quot;\u3016&quot;:&quot;\ufe17&quot;,&quot;\u3017&quot;:&quot;\ufe18&quot;,&quot;\uff01&quot;:&quot;\ufe15&quot;,&quot;\uff08&quot;:&quot;\ufe35&quot;,&quot;\uff09&quot;:&quot;\ufe36&quot;,&quot;\uff0c&quot;:&quot;\ufe10&quot;,&quot;\uff0d&quot;:&quot;\ufe32&quot;,&quot;\uff0e&quot;:&quot;\u30fb&quot;,&quot;\uff1a&quot;:&quot;\ufe13&quot;,&quot;\uff1b&quot;:&quot;\ufe14&quot;,&quot;\uff1c&quot;:&quot;\ufe3f&quot;,&quot;\uff1e&quot;:&quot;\ufe40&quot;,&quot;\uff1f&quot;:&quot;\ufe16&quot;,&quot;\uff3b&quot;:&quot;\ufe47&quot;,&quot;\uff3d&quot;:&quot;\ufe48&quot;,&quot;\uff3f&quot;:&quot;\ufe33&quot;,&quot;\uff5b&quot;:&quot;\ufe37&quot;,&quot;\uff5c&quot;:&quot;\u2015&quot;,&quot;\uff5d&quot;:&quot;\ufe38&quot;,&quot;\uff5f&quot;:&quot;\ufe35&quot;,&quot;\uff60&quot;:&quot;\ufe36&quot;,&quot;\uff61&quot;:&quot;\ufe12&quot;,&quot;\uff62&quot;:&quot;\ufe41&quot;,&quot;\uff63&quot;:&quot;\ufe42&quot;},Ra=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&amp;&amp;(this.segment=i)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(l);function Ba(t,e){var r=e.expression;if(&quot;constant&quot;===r.kind)return{functionType:&quot;constant&quot;,layoutSize:r.evaluate(new Lr(t+1))};if(&quot;source&quot;===r.kind)return{functionType:&quot;source&quot;};for(var n=r.zoomStops,i=0;i&lt;n.length&amp;&amp;n[i]&lt;=t;)i++;for(var a=i=Math.max(0,i-1);a&lt;n.length&amp;&amp;n[a]&lt;t+1;)a++;a=Math.min(n.length-1,a);var o={min:n[i],max:n[a]};return&quot;composite&quot;===r.kind?{functionType:&quot;composite&quot;,zoomRange:o,propertyValue:e.value}:{functionType:&quot;camera&quot;,layoutSize:r.evaluate(new Lr(t+1)),zoomRange:o,sizeRange:{min:r.evaluate(new Lr(o.min)),max:r.evaluate(new Lr(o.max))},propertyValue:e.value}}pr(&quot;Anchor&quot;,Ra);var Fa=ga.VectorTileFeature.types,Na=[{name:&quot;a_fade_opacity&quot;,components:1,type:&quot;Uint8&quot;,offset:0}];function ja(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),a,o,s?s[0]:0,s?s[1]:0)}function Va(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var Ua=function(t){this.layoutVertexArray=new tn,this.indexArray=new fn,this.programConfigurations=t,this.segments=new Tn,this.dynamicLayoutVertexArray=new en,this.opacityVertexArray=new rn,this.placedSymbolArray=new yn};Ua.prototype.upload=function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ca.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,La.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Na,!0),this.opacityVertexBuffer.itemSize=1},Ua.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},pr(&quot;SymbolBuffers&quot;,Ua);var qa=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Tn,this.collisionVertexArray=new on};qa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,za.members,!0)},qa.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},pr(&quot;CollisionBuffers&quot;,qa);var Ha=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ba(this.zoom,e[&quot;text-size&quot;]),this.iconSizeData=Ba(this.zoom,e[&quot;icon-size&quot;]);var r=this.layers[0].layout;this.sortFeaturesByY=r.get(&quot;text-allow-overlap&quot;)||r.get(&quot;icon-allow-overlap&quot;)||r.get(&quot;text-ignore-placement&quot;)||r.get(&quot;icon-ignore-placement&quot;)};Ha.prototype.createArrays=function(){this.text=new Ua(new On(Ca.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new Ua(new On(Ca.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new qa(an,Pa.members,hn),this.collisionCircle=new qa(an,Oa.members,fn),this.glyphOffsetArray=new bn,this.lineVertexArray=new wn},Ha.prototype.populate=function(t,e){var r=this.layers[0],n=r.layout,i=n.get(&quot;text-font&quot;),a=n.get(&quot;text-field&quot;),o=n.get(&quot;icon-image&quot;),s=(&quot;constant&quot;!==a.value.kind||a.value.value.length&gt;0)&amp;&amp;(&quot;constant&quot;!==i.value.kind||i.value.value.length&gt;0),l=&quot;constant&quot;!==o.value.kind||o.value.value&amp;&amp;o.value.value.length&gt;0;if(this.features=[],s||l){for(var c=e.iconDependencies,u=e.glyphDependencies,f=new Lr(this.zoom),h=0,p=t;h&lt;p.length;h+=1){var d=p[h],g=d.feature,m=d.index,v=d.sourceLayerIndex;if(r._featureFilter(f,g)){var y=void 0;s&amp;&amp;(y=Ia(y=r.getValueAndResolveTokens(&quot;text-field&quot;,g),r,g));var x=void 0;if(l&amp;&amp;(x=r.getValueAndResolveTokens(&quot;icon-image&quot;,g)),y||x){var b={text:y,icon:x,index:m,sourceLayerIndex:v,geometry:Bn(g),properties:g.properties,type:Fa[g.type]};if(void 0!==g.id&amp;&amp;(b.id=g.id),this.features.push(b),x&amp;&amp;(c[x]=!0),y)for(var _=i.evaluate(g).join(&quot;,&quot;),w=u[_]=u[_]||{},k=&quot;map&quot;===n.get(&quot;text-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===n.get(&quot;symbol-placement&quot;),M=xr(y),A=0;A&lt;y.length;A++)if(w[y.charCodeAt(A)]=!0,k&amp;&amp;M){var T=Da[y.charAt(A)];T&amp;&amp;(w[T.charCodeAt(0)]=!0)}}}}&quot;line&quot;===n.get(&quot;symbol-placement&quot;)&amp;&amp;(this.features=function(t){var e={},r={},n=[],i=0;function a(e){n.push(t[e]),i++}function o(t,e,i){var a=r[t];return delete r[t],r[e]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(t,r,i){var a=e[r];return delete e[r],e[t]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+&quot;:&quot;+n.x+&quot;:&quot;+n.y}for(var c=0;c&lt;t.length;c++){var u=t[c],f=u.geometry,h=u.text;if(h){var p=l(h,f),d=l(h,f,!0);if(p in r&amp;&amp;d in e&amp;&amp;r[p]!==e[d]){var g=s(p,d,f),m=o(p,d,n[g].geometry);delete e[p],delete r[d],r[l(h,n[m].geometry,!0)]=m,n[g].geometry=null}else p in r?o(p,d,f):d in e?s(p,d,f):(a(c),e[p]=i-1,r[d]=i-1)}else a(c)}return n.filter(function(t){return t.geometry})}(this.features))}},Ha.prototype.isEmpty=function(){return 0===this.symbolInstances.length},Ha.prototype.upload=function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)},Ha.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},Ha.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),a={},o=t.segment+1;o&lt;e.length;o++)a[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:n},o&lt;e.length-1&amp;&amp;(n+=e[o+1].dist(e[o]));for(var s=t.segment||0;s&gt;=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s&gt;0&amp;&amp;(i+=e[s-1].dist(e[s]));for(var l=0;l&lt;e.length;l++){var c=a[l];this.lineVertexArray.emplaceBack(c.x,c.y,c.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Ha.prototype.addSymbols=function(t,e,r,n,i,a,o,s,l,c){for(var u=t.indexArray,f=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,p=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,g=p.vertexLength,m=0,v=e;m&lt;v.length;m+=1){var y=v[m],x=y.tl,b=y.tr,_=y.bl,w=y.br,k=y.tex,M=p.vertexLength,A=y.glyphOffset[1];ja(f,s.x,s.y,x.x,A+x.y,k.x,k.y,r),ja(f,s.x,s.y,b.x,A+b.y,k.x+k.w,k.y,r),ja(f,s.x,s.y,_.x,A+_.y,k.x,k.y+k.h,r),ja(f,s.x,s.y,w.x,A+w.y,k.x+k.w,k.y+k.h,r),Va(h,s,0),u.emplaceBack(M,M+1,M+2),u.emplaceBack(M+1,M+2,M+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(y.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,g,l,c,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,a)},Ha.prototype._addCollisionDebugVertex=function(t,e,r,n,i){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n.x,n.y,Math.round(i.x),Math.round(i.y))},Ha.prototype.addCollisionDebugVertices=function(t,e,r,n,i,a,o,s){var c=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=c.vertexLength,f=i.layoutVertexArray,h=i.collisionVertexArray;if(this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,n)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,n)),c.vertexLength+=4,s){var p=i.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),c.primitiveLength+=2}else{var d=i.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),c.primitiveLength+=4}},Ha.prototype.generateCollisionDebugBuffers=function(){for(var t=0,e=this.symbolInstances;t&lt;e.length;t+=1){var r=e[t];r.textCollisionFeature={boxStartIndex:r.textBoxStartIndex,boxEndIndex:r.textBoxEndIndex},r.iconCollisionFeature={boxStartIndex:r.iconBoxStartIndex,boxEndIndex:r.iconBoxEndIndex};for(var n=0;n&lt;2;n++){var i=r[0===n?&quot;textCollisionFeature&quot;:&quot;iconCollisionFeature&quot;];if(i)for(var a=i.boxStartIndex;a&lt;i.boxEndIndex;a++){var o=this.collisionBoxArray.get(a),s=o.x1,l=o.y1,c=o.x2,u=o.y2,f=o.radius&gt;0;this.addCollisionDebugVertices(s,l,c,u,f?this.collisionCircle:this.collisionBox,o.anchorPoint,r,f)}}}},Ha.prototype.deserializeCollisionBoxes=function(t,e,r,n,i){for(var a={},o=e;o&lt;r;o++){var s=t.get(o);if(0===s.radius){a.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},a.textFeatureIndex=s.featureIndex;break}a.textCircles||(a.textCircles=[],a.textFeatureIndex=s.featureIndex),a.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=n;l&lt;i;l++){var c=t.get(l);if(0===c.radius){a.iconBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},a.iconFeatureIndex=c.featureIndex;break}}return a},Ha.prototype.hasTextData=function(){return this.text.segments.get().length&gt;0},Ha.prototype.hasIconData=function(){return this.icon.segments.get().length&gt;0},Ha.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length&gt;0},Ha.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length&gt;0},Ha.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&amp;&amp;this.sortedAngle!==t&amp;&amp;(this.sortedAngle=t,!(this.text.segments.get().length&gt;1||this.icon.segments.get().length&gt;1))){for(var r=[],n=0;n&lt;this.symbolInstances.length;n++)r.push(n);var i=Math.sin(t),a=Math.cos(t);r.sort(function(t,r){var n=e.symbolInstances[t],o=e.symbolInstances[r];return(i*n.anchor.x+a*n.anchor.y|0)-(i*o.anchor.x+a*o.anchor.y|0)||o.featureIndex-n.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var o=0,s=r;o&lt;s.length;o+=1){var l=s[o],c=e.symbolInstances[l];e.featureSortOrder.push(c.featureIndex);for(var u=0,f=c.placedTextSymbolIndices;u&lt;f.length;u+=1)for(var h=f[u],p=e.text.placedSymbolArray.get(h),d=p.vertexStartIndex+4*p.numGlyphs,g=p.vertexStartIndex;g&lt;d;g+=4)e.text.indexArray.emplaceBack(g,g+1,g+2),e.text.indexArray.emplaceBack(g+1,g+2,g+3);var m=e.icon.placedSymbolArray.get(l);if(m.numGlyphs){var v=m.vertexStartIndex;e.icon.indexArray.emplaceBack(v,v+1,v+2),e.icon.indexArray.emplaceBack(v+1,v+2,v+3)}}this.text.indexBuffer&amp;&amp;this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&amp;&amp;this.icon.indexBuffer.updateData(this.icon.indexArray)}},pr(&quot;SymbolBucket&quot;,Ha,{omit:[&quot;layers&quot;,&quot;collisionBoxArray&quot;,&quot;features&quot;,&quot;compareText&quot;],shallow:[&quot;symbolInstances&quot;]}),Ha.MAX_GLYPHS=65535,Ha.addDynamicAttributes=Va;var Ga=new qr({&quot;symbol-placement&quot;:new Nr(O.layout_symbol[&quot;symbol-placement&quot;]),&quot;symbol-spacing&quot;:new Nr(O.layout_symbol[&quot;symbol-spacing&quot;]),&quot;symbol-avoid-edges&quot;:new Nr(O.layout_symbol[&quot;symbol-avoid-edges&quot;]),&quot;icon-allow-overlap&quot;:new Nr(O.layout_symbol[&quot;icon-allow-overlap&quot;]),&quot;icon-ignore-placement&quot;:new Nr(O.layout_symbol[&quot;icon-ignore-placement&quot;]),&quot;icon-optional&quot;:new Nr(O.layout_symbol[&quot;icon-optional&quot;]),&quot;icon-rotation-alignment&quot;:new Nr(O.layout_symbol[&quot;icon-rotation-alignment&quot;]),&quot;icon-size&quot;:new jr(O.layout_symbol[&quot;icon-size&quot;]),&quot;icon-text-fit&quot;:new Nr(O.layout_symbol[&quot;icon-text-fit&quot;]),&quot;icon-text-fit-padding&quot;:new Nr(O.layout_symbol[&quot;icon-text-fit-padding&quot;]),&quot;icon-image&quot;:new jr(O.layout_symbol[&quot;icon-image&quot;]),&quot;icon-rotate&quot;:new jr(O.layout_symbol[&quot;icon-rotate&quot;]),&quot;icon-padding&quot;:new Nr(O.layout_symbol[&quot;icon-padding&quot;]),&quot;icon-keep-upright&quot;:new Nr(O.layout_symbol[&quot;icon-keep-upright&quot;]),&quot;icon-offset&quot;:new jr(O.layout_symbol[&quot;icon-offset&quot;]),&quot;icon-anchor&quot;:new jr(O.layout_symbol[&quot;icon-anchor&quot;]),&quot;icon-pitch-alignment&quot;:new Nr(O.layout_symbol[&quot;icon-pitch-alignment&quot;]),&quot;text-pitch-alignment&quot;:new Nr(O.layout_symbol[&quot;text-pitch-alignment&quot;]),&quot;text-rotation-alignment&quot;:new Nr(O.layout_symbol[&quot;text-rotation-alignment&quot;]),&quot;text-field&quot;:new jr(O.layout_symbol[&quot;text-field&quot;]),&quot;text-font&quot;:new jr(O.layout_symbol[&quot;text-font&quot;]),&quot;text-size&quot;:new jr(O.layout_symbol[&quot;text-size&quot;]),&quot;text-max-width&quot;:new jr(O.layout_symbol[&quot;text-max-width&quot;]),&quot;text-line-height&quot;:new Nr(O.layout_symbol[&quot;text-line-height&quot;]),&quot;text-letter-spacing&quot;:new jr(O.layout_symbol[&quot;text-letter-spacing&quot;]),&quot;text-justify&quot;:new jr(O.layout_symbol[&quot;text-justify&quot;]),&quot;text-anchor&quot;:new jr(O.layout_symbol[&quot;text-anchor&quot;]),&quot;text-max-angle&quot;:new Nr(O.layout_symbol[&quot;text-max-angle&quot;]),&quot;text-rotate&quot;:new jr(O.layout_symbol[&quot;text-rotate&quot;]),&quot;text-padding&quot;:new Nr(O.layout_symbol[&quot;text-padding&quot;]),&quot;text-keep-upright&quot;:new Nr(O.layout_symbol[&quot;text-keep-upright&quot;]),&quot;text-transform&quot;:new jr(O.layout_symbol[&quot;text-transform&quot;]),&quot;text-offset&quot;:new jr(O.layout_symbol[&quot;text-offset&quot;]),&quot;text-allow-overlap&quot;:new Nr(O.layout_symbol[&quot;text-allow-overlap&quot;]),&quot;text-ignore-placement&quot;:new Nr(O.layout_symbol[&quot;text-ignore-placement&quot;]),&quot;text-optional&quot;:new Nr(O.layout_symbol[&quot;text-optional&quot;])}),Wa={paint:new qr({&quot;icon-opacity&quot;:new jr(O.paint_symbol[&quot;icon-opacity&quot;]),&quot;icon-color&quot;:new jr(O.paint_symbol[&quot;icon-color&quot;]),&quot;icon-halo-color&quot;:new jr(O.paint_symbol[&quot;icon-halo-color&quot;]),&quot;icon-halo-width&quot;:new jr(O.paint_symbol[&quot;icon-halo-width&quot;]),&quot;icon-halo-blur&quot;:new jr(O.paint_symbol[&quot;icon-halo-blur&quot;]),&quot;icon-translate&quot;:new Nr(O.paint_symbol[&quot;icon-translate&quot;]),&quot;icon-translate-anchor&quot;:new Nr(O.paint_symbol[&quot;icon-translate-anchor&quot;]),&quot;text-opacity&quot;:new jr(O.paint_symbol[&quot;text-opacity&quot;]),&quot;text-color&quot;:new jr(O.paint_symbol[&quot;text-color&quot;]),&quot;text-halo-color&quot;:new jr(O.paint_symbol[&quot;text-halo-color&quot;]),&quot;text-halo-width&quot;:new jr(O.paint_symbol[&quot;text-halo-width&quot;]),&quot;text-halo-blur&quot;:new jr(O.paint_symbol[&quot;text-halo-blur&quot;]),&quot;text-translate&quot;:new Nr(O.paint_symbol[&quot;text-translate&quot;]),&quot;text-translate-anchor&quot;:new Nr(O.paint_symbol[&quot;text-translate-anchor&quot;])}),layout:Ga},Ya=function(t){function e(e){t.call(this,e,Wa)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),&quot;auto&quot;===this.layout.get(&quot;icon-rotation-alignment&quot;)&amp;&amp;(&quot;line&quot;===this.layout.get(&quot;symbol-placement&quot;)?this.layout._values[&quot;icon-rotation-alignment&quot;]=&quot;map&quot;:this.layout._values[&quot;icon-rotation-alignment&quot;]=&quot;viewport&quot;),&quot;auto&quot;===this.layout.get(&quot;text-rotation-alignment&quot;)&amp;&amp;(&quot;line&quot;===this.layout.get(&quot;symbol-placement&quot;)?this.layout._values[&quot;text-rotation-alignment&quot;]=&quot;map&quot;:this.layout._values[&quot;text-rotation-alignment&quot;]=&quot;viewport&quot;),&quot;auto&quot;===this.layout.get(&quot;text-pitch-alignment&quot;)&amp;&amp;(this.layout._values[&quot;text-pitch-alignment&quot;]=this.layout.get(&quot;text-rotation-alignment&quot;)),&quot;auto&quot;===this.layout.get(&quot;icon-pitch-alignment&quot;)&amp;&amp;(this.layout._values[&quot;icon-pitch-alignment&quot;]=this.layout.get(&quot;icon-rotation-alignment&quot;))},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||_e(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):&quot;&quot;}))},e.prototype.createBucket=function(t){return new Ha(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Hr),Xa={paint:new qr({&quot;background-color&quot;:new Nr(O.paint_background[&quot;background-color&quot;]),&quot;background-pattern&quot;:new Vr(O.paint_background[&quot;background-pattern&quot;]),&quot;background-opacity&quot;:new Nr(O.paint_background[&quot;background-opacity&quot;])})},Za=function(t){function e(e){t.call(this,e,Xa)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Hr),$a={paint:new qr({&quot;raster-opacity&quot;:new Nr(O.paint_raster[&quot;raster-opacity&quot;]),&quot;raster-hue-rotate&quot;:new Nr(O.paint_raster[&quot;raster-hue-rotate&quot;]),&quot;raster-brightness-min&quot;:new Nr(O.paint_raster[&quot;raster-brightness-min&quot;]),&quot;raster-brightness-max&quot;:new Nr(O.paint_raster[&quot;raster-brightness-max&quot;]),&quot;raster-saturation&quot;:new Nr(O.paint_raster[&quot;raster-saturation&quot;]),&quot;raster-contrast&quot;:new Nr(O.paint_raster[&quot;raster-contrast&quot;]),&quot;raster-fade-duration&quot;:new Nr(O.paint_raster[&quot;raster-fade-duration&quot;])})},Ja={circle:ni,heatmap:pi,hillshade:gi,fill:Ji,&quot;fill-extrusion&quot;:aa,line:Sa,symbol:Ya,background:Za,raster:function(t){function e(e){t.call(this,e,$a)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Hr)},Ka=i(function(t,e){t.exports=function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,n,i,a,o=[],s=0;s&lt;t.length;s++)if(r=t[s].w||t[s].width,n=t[s].h||t[s].height,i=t[s].id,r&amp;&amp;n){if(!(a=this.packOne(r,n,i)))continue;e.inPlace&amp;&amp;(t[s].x=a.x,t[s].y=a.y,t[s].id=a.id),o.push(a)}return this.shrink(),o},t.prototype.packOne=function(t,r,n){var i,a,o,s,l,c,u,f,h={freebin:-1,shelf:-1,waste:1/0},p=0;if(&quot;string&quot;==typeof n||&quot;number&quot;==typeof n){if(i=this.getBin(n))return this.ref(i),i;&quot;number&quot;==typeof n&amp;&amp;(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s&lt;this.freebins.length;s++){if(r===(i=this.freebins[s]).maxh&amp;&amp;t===i.maxw)return this.allocFreebin(s,t,r,n);r&gt;i.maxh||t&gt;i.maxw||r&lt;=i.maxh&amp;&amp;t&lt;=i.maxw&amp;&amp;(o=i.maxw*i.maxh-t*r)&lt;h.waste&amp;&amp;(h.waste=o,h.freebin=s)}for(s=0;s&lt;this.shelves.length;s++)if(p+=(a=this.shelves[s]).h,!(t&gt;a.free)){if(r===a.h)return this.allocShelf(s,t,r,n);r&gt;a.h||r&lt;a.h&amp;&amp;(o=(a.h-r)*t)&lt;h.waste&amp;&amp;(h.freebin=-1,h.waste=o,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,r,n):-1!==h.shelf?this.allocShelf(h.shelf,t,r,n):r&lt;=this.h-p&amp;&amp;t&lt;=this.w?(a=new e(p,this.w,r),this.allocShelf(this.shelves.push(a)-1,t,r,n)):this.autoResize?(l=c=this.h,((u=f=this.w)&lt;=l||t&gt;u)&amp;&amp;(f=2*Math.max(t,u)),(l&lt;u||r&gt;l)&amp;&amp;(c=2*Math.max(r,l)),this.resize(f,c),this.packOne(t,r,n)):null},t.prototype.allocFreebin=function(t,e,r,n){var i=this.freebins.splice(t,1)[0];return i.id=n,i.w=e,i.h=r,i.refcount=0,this.bins[n]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,r,n){var i=this.shelves[t].alloc(e,r,n);return this.bins[n]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length&gt;0){for(var t=0,e=0,r=0;r&lt;this.shelves.length;r++){var n=this.shelves[r];e+=n.h,t=Math.max(n.w-n.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&amp;&amp;(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r&lt;this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t&gt;this.free||e&gt;this.h)return null;var n=this.x;return this.x+=t,this.free-=t,new function(t,e,r,n,i,a,o){this.id=t,this.x=e,this.y=r,this.w=n,this.h=i,this.maxw=a||n,this.maxh=o||i,this.refcount=0}(r,n,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()}),Qa=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r},to={tl:{configurable:!0},br:{configurable:!0},displaySize:{configurable:!0}};to.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},to.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},to.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Qa.prototype,to);var eo=function(t){var e=new ui({width:0,height:0}),r={},n=new Ka(0,0,{autoResize:!0});for(var i in t){var a=t[i],o=n.packOne(a.data.width+2,a.data.height+2);e.resize({width:n.w,height:n.h}),ui.copy(a.data,e,{x:0,y:0},{x:o.x+1,y:o.y+1},a.data),r[i]=new Qa(o,a)}n.shrink(),e.resize({width:n.w,height:n.h}),this.image=e,this.positions=r};pr(&quot;ImagePosition&quot;,Qa),pr(&quot;ImageAtlas&quot;,eo);var ro=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1&lt;&lt;s)-1,c=l&gt;&gt;1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&amp;(1&lt;&lt;-u)-1,p&gt;&gt;=-u,u+=s;u&gt;0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&amp;(1&lt;&lt;-u)-1,a&gt;&gt;=-u,u+=n;u&gt;0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},no=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1&lt;&lt;c)-1,f=u&gt;&gt;1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e&lt;0||0===e&amp;&amp;1/e&lt;0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))&lt;1&amp;&amp;(o--,l*=2),(e+=o+f&gt;=1?h/l:h*Math.pow(2,1-f))*l&gt;=2&amp;&amp;(o++,l/=2),o+f&gt;=u?(s=0,o=u):o+f&gt;=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i&gt;=8;t[r+p]=255&amp;s,p+=d,s/=256,i-=8);for(o=o&lt;&lt;i|s,c+=i;c&gt;0;t[r+p]=255&amp;o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},io=ao;function ao(t){this.buf=ArrayBuffer.isView&amp;&amp;ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function oo(t){return t.type===ao.Bytes?t.readVarint()+t.pos:t.pos+1}function so(t,e,r){return r?4294967296*e+(t&gt;&gt;&gt;0):4294967296*(e&gt;&gt;&gt;0)+(t&gt;&gt;&gt;0)}function lo(t,e,r){var n=e&lt;=16383?1:e&lt;=2097151?2:e&lt;=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i&gt;=t;i--)r.buf[i+n]=r.buf[i]}function co(t,e){for(var r=0;r&lt;t.length;r++)e.writeVarint(t[r])}function uo(t,e){for(var r=0;r&lt;t.length;r++)e.writeSVarint(t[r])}function fo(t,e){for(var r=0;r&lt;t.length;r++)e.writeFloat(t[r])}function ho(t,e){for(var r=0;r&lt;t.length;r++)e.writeDouble(t[r])}function po(t,e){for(var r=0;r&lt;t.length;r++)e.writeBoolean(t[r])}function go(t,e){for(var r=0;r&lt;t.length;r++)e.writeFixed32(t[r])}function mo(t,e){for(var r=0;r&lt;t.length;r++)e.writeSFixed32(t[r])}function vo(t,e){for(var r=0;r&lt;t.length;r++)e.writeFixed64(t[r])}function yo(t,e){for(var r=0;r&lt;t.length;r++)e.writeSFixed64(t[r])}function xo(t,e){return(t[e]|t[e+1]&lt;&lt;8|t[e+2]&lt;&lt;16)+16777216*t[e+3]}function bo(t,e,r){t[r]=e,t[r+1]=e&gt;&gt;&gt;8,t[r+2]=e&gt;&gt;&gt;16,t[r+3]=e&gt;&gt;&gt;24}function _o(t,e){return(t[e]|t[e+1]&lt;&lt;8|t[e+2]&lt;&lt;16)+(t[e+3]&lt;&lt;24)}ao.Varint=0,ao.Fixed64=1,ao.Bytes=2,ao.Fixed32=5,ao.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos&lt;r;){var n=this.readVarint(),i=n&gt;&gt;3,a=this.pos;this.type=7&amp;n,t(i,e,this),this.pos===a&amp;&amp;this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=xo(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_o(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*xo(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*_o(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=ro(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=ro(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&amp;(r=n[this.pos++]),r&lt;128?e:(e|=(127&amp;(r=n[this.pos++]))&lt;&lt;7,r&lt;128?e:(e|=(127&amp;(r=n[this.pos++]))&lt;&lt;14,r&lt;128?e:(e|=(127&amp;(r=n[this.pos++]))&lt;&lt;21,r&lt;128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&amp;(i=a[r.pos++]))&gt;&gt;4,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;3,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;10,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;17,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;24,i&lt;128)return so(t,n,e);if(n|=(1&amp;(i=a[r.pos++]))&lt;&lt;31,i&lt;128)return so(t,n,e);throw new Error(&quot;Expected varint not more than 10 bytes&quot;)}(e|=(15&amp;(r=n[this.pos]))&lt;&lt;28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n=&quot;&quot;,i=e;i&lt;r;){var a,o,s,l=t[i],c=null,u=l&gt;239?4:l&gt;223?3:l&gt;191?2:1;if(i+u&gt;r)break;1===u?l&lt;128&amp;&amp;(c=l):2===u?128==(192&amp;(a=t[i+1]))&amp;&amp;(c=(31&amp;l)&lt;&lt;6|63&amp;a)&lt;=127&amp;&amp;(c=null):3===u?(a=t[i+1],o=t[i+2],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;((c=(15&amp;l)&lt;&lt;12|(63&amp;a)&lt;&lt;6|63&amp;o)&lt;=2047||c&gt;=55296&amp;&amp;c&lt;=57343)&amp;&amp;(c=null)):4===u&amp;&amp;(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;128==(192&amp;s)&amp;&amp;((c=(15&amp;l)&lt;&lt;18|(63&amp;a)&lt;&lt;12|(63&amp;o)&lt;&lt;6|63&amp;s)&lt;=65535||c&gt;=1114112)&amp;&amp;(c=null)),null===c?(c=65533,u=1):c&gt;65535&amp;&amp;(c-=65536,n+=String.fromCharCode(c&gt;&gt;&gt;10&amp;1023|55296),c=56320|1023&amp;c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=oo(this);for(t=t||[];this.pos&lt;r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&amp;t;if(e===ao.Varint)for(;this.buf[this.pos++]&gt;127;);else if(e===ao.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ao.Fixed32)this.pos+=4;else{if(e!==ao.Fixed64)throw new Error(&quot;Unimplemented type: &quot;+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t&lt;&lt;3|e)},realloc:function(t){for(var e=this.length||16;e&lt;this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),bo(this.buf,-1&amp;t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),bo(this.buf,-1&amp;t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)&gt;268435455||t&lt;0?function(t,e){var r,n;if(t&gt;=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t&gt;=0x10000000000000000||t&lt;-0x10000000000000000)throw new Error(&quot;Given varint doesn't fit into 10 bytes&quot;);e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos]=127&amp;t}(r,0,e),function(t,e){var r=(7&amp;t)&lt;&lt;4;e.buf[e.pos++]|=r|((t&gt;&gt;&gt;=3)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&amp;t|(t&gt;127?128:0),t&lt;=127||(this.buf[this.pos++]=127&amp;(t&gt;&gt;&gt;=7)|(t&gt;127?128:0),t&lt;=127||(this.buf[this.pos++]=127&amp;(t&gt;&gt;&gt;=7)|(t&gt;127?128:0),t&lt;=127||(this.buf[this.pos++]=t&gt;&gt;&gt;7&amp;127))))},writeSVarint:function(t){this.writeVarint(t&lt;0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a&lt;e.length;a++){if((n=e.charCodeAt(a))&gt;55295&amp;&amp;n&lt;57344){if(!i){n&gt;56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n&lt;56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296&lt;&lt;10|n-56320|65536,i=null}else i&amp;&amp;(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n&lt;128?t[r++]=n:(n&lt;2048?t[r++]=n&gt;&gt;6|192:(n&lt;65536?t[r++]=n&gt;&gt;12|224:(t[r++]=n&gt;&gt;18|240,t[r++]=n&gt;&gt;12&amp;63|128),t[r++]=n&gt;&gt;6&amp;63|128),t[r++]=63&amp;n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r&gt;=128&amp;&amp;lo(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),no(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),no(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r&lt;e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n&gt;=128&amp;&amp;lo(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ao.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,co,e)},writePackedSVarint:function(t,e){this.writeMessage(t,uo,e)},writePackedBoolean:function(t,e){this.writeMessage(t,po,e)},writePackedFloat:function(t,e){this.writeMessage(t,fo,e)},writePackedDouble:function(t,e){this.writeMessage(t,ho,e)},writePackedFixed32:function(t,e){this.writeMessage(t,go,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,mo,e)},writePackedFixed64:function(t,e){this.writeMessage(t,vo,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,yo,e)},writeBytesField:function(t,e){this.writeTag(t,ao.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ao.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ao.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var wo=3;function ko(t,e,r){1===t&amp;&amp;r.readMessage(Mo,e)}function Mo(t,e,r){if(3===t){var n=r.readMessage(Ao,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;e.push({id:i,bitmap:new ci({width:o+2*wo,height:s+2*wo},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Ao(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&amp;&amp;(e.advance=r.readVarint())}var To=wo,So=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,g([&quot;receive&quot;],this),this.target.addEventListener(&quot;message&quot;,this.receive,!1)};So.prototype.send=function(t,e,r,n){var i=r?this.mapId+&quot;:&quot;+this.callbackID++:null;r&amp;&amp;(this.callbacks[i]=r);var a=[];this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(i),data:gr(e,a)},a)},So.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var a=function(t,e){var n=[];r.target.postMessage({sourceMapId:r.mapId,type:&quot;&lt;response&gt;&quot;,id:String(i),error:t?gr(t):null,data:gr(e,n)},n)};if(&quot;&lt;response&gt;&quot;===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&amp;&amp;n.error?e(mr(n.error)):e&amp;&amp;e(null,mr(n.data));else if(void 0!==n.id&amp;&amp;this.parent[n.type])this.parent[n.type](n.sourceMapId,mr(n.data),a);else if(void 0!==n.id&amp;&amp;this.parent.getWorkerSource){var o=n.type.split(&quot;.&quot;);this.parent.getWorkerSource(n.sourceMapId,o[0],o[1])[o[2]](mr(n.data),a)}else this.parent[n.type](mr(n.data))}},So.prototype.remove=function(){this.target.removeEventListener(&quot;message&quot;,this.receive,!1)};var Eo=n(i(function(t,e){!function(t){function e(t,e,n){var i=r(256*t,256*(e=Math.pow(2,n)-e-1),n),a=r(256*(t+1),256*(e+1),n);return i[0]+&quot;,&quot;+i[1]+&quot;,&quot;+a[0]+&quot;,&quot;+a[1]}function r(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=function(t,r,n,i,a,o){return o=o||{},t+&quot;?&quot;+[&quot;bbox=&quot;+e(n,i,a),&quot;format=&quot;+(o.format||&quot;image/png&quot;),&quot;service=&quot;+(o.service||&quot;WMS&quot;),&quot;version=&quot;+(o.version||&quot;1.1.1&quot;),&quot;request=&quot;+(o.request||&quot;GetMap&quot;),&quot;srs=&quot;+(o.srs||&quot;EPSG:3857&quot;),&quot;width=&quot;+(o.width||256),&quot;height=&quot;+(o.height||256),&quot;layers=&quot;+r].join(&quot;&amp;&quot;)},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(e)})),Co=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Po(0,t,e,r)};Co.prototype.equals=function(t){return this.z===t.z&amp;&amp;this.x===t.x&amp;&amp;this.y===t.y},Co.prototype.url=function(t,e){var r=Eo.getTileBBox(this.x,this.y,this.z),n=function(t,e,r){for(var n,i=&quot;&quot;,a=t;a&gt;0;a--)i+=(e&amp;(n=1&lt;&lt;a-1)?1:0)+(r&amp;n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(&quot;{prefix}&quot;,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(&quot;{z}&quot;,String(this.z)).replace(&quot;{x}&quot;,String(this.x)).replace(&quot;{y}&quot;,String(&quot;tms&quot;===e?Math.pow(2,this.z)-this.y-1:this.y)).replace(&quot;{quadkey}&quot;,n).replace(&quot;{bbox-epsg-3857}&quot;,r)};var Lo=function(t,e){this.wrap=t,this.canonical=e,this.key=Po(t,e.z,e.x,e.y)},zo=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Co(r,+n,+i),this.key=Po(e,t,n,i)};function Po(t,e,r,n){(t*=2)&lt;0&amp;&amp;(t=-1*t-1);var i=1&lt;&lt;e;return 32*(i*i*t+i*n+r)+e}zo.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&amp;&amp;this.wrap===t.wrap&amp;&amp;this.canonical.equals(t.canonical)},zo.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t&gt;this.canonical.z?new zo(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zo(t,this.wrap,t,this.canonical.x&gt;&gt;e,this.canonical.y&gt;&gt;e)},zo.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ&lt;this.overscaledZ&amp;&amp;t.canonical.x===this.canonical.x&gt;&gt;e&amp;&amp;t.canonical.y===this.canonical.y&gt;&gt;e},zo.prototype.children=function(t){if(this.overscaledZ&gt;=t)return[new zo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new zo(e,this.wrap,e,r,n),new zo(e,this.wrap,e,r+1,n),new zo(e,this.wrap,e,r,n+1),new zo(e,this.wrap,e,r+1,n+1)]},zo.prototype.isLessThan=function(t){return this.wrap&lt;t.wrap||!(this.wrap&gt;t.wrap)&amp;&amp;(this.overscaledZ&lt;t.overscaledZ||!(this.overscaledZ&gt;t.overscaledZ)&amp;&amp;(this.canonical.x&lt;t.canonical.x||!(this.canonical.x&gt;t.canonical.x)&amp;&amp;this.canonical.y&lt;t.canonical.y))},zo.prototype.wrapped=function(){return new zo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.unwrapTo=function(t){return new zo(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},zo.prototype.toUnwrapped=function(){return new Lo(this.wrap,this.canonical)},zo.prototype.toString=function(){return this.overscaledZ+&quot;/&quot;+this.canonical.x+&quot;/&quot;+this.canonical.y},zo.prototype.toCoordinate=function(){return new s(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},pr(&quot;CanonicalTileID&quot;,Co),pr(&quot;OverscaledTileID&quot;,zo,{omit:[&quot;posMatrix&quot;]});var Oo=function(t,e,r){if(t&lt;=0)throw new RangeError(&quot;Level must have positive dimension&quot;);this.dim=t,this.border=e,this.stride=this.dim+2*this.border,this.data=r||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))};Oo.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},Oo.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},Oo.prototype._idx=function(t,e){if(t&lt;-this.border||t&gt;=this.dim+this.border||e&lt;-this.border||e&gt;=this.dim+this.border)throw new RangeError(&quot;out of range source coordinates for DEM data&quot;);return(e+this.border)*this.stride+(t+this.border)},pr(&quot;Level&quot;,Oo);var Io=function(t,e,r){this.uid=t,this.scale=e||1,this.level=r||new Oo(256,512),this.loaded=!!r};Io.prototype.loadFromImage=function(t,e){if(t.height!==t.width)throw new RangeError(&quot;DEM tiles must be square&quot;);if(e&amp;&amp;&quot;mapbox&quot;!==e&amp;&amp;&quot;terrarium&quot;!==e)return _('&quot;'+e+'&quot; is not a valid encoding type. Valid types include &quot;mapbox&quot; and &quot;terrarium&quot;.');var r=this.level=new Oo(t.width,t.width/2),n=t.data;this._unpackData(r,n,e||&quot;mapbox&quot;);for(var i=0;i&lt;r.dim;i++)r.set(-1,i,r.get(0,i)),r.set(r.dim,i,r.get(r.dim-1,i)),r.set(i,-1,r.get(i,0)),r.set(i,r.dim,r.get(i,r.dim-1));r.set(-1,-1,r.get(0,0)),r.set(r.dim,-1,r.get(r.dim-1,0)),r.set(-1,r.dim,r.get(0,r.dim-1)),r.set(r.dim,r.dim,r.get(r.dim-1,r.dim-1)),this.loaded=!0},Io.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Io.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Io.prototype._unpackData=function(t,e,r){for(var n={mapbox:this._unpackMapbox,terrarium:this._unpackTerrarium}[r],i=0;i&lt;t.dim;i++)for(var a=0;a&lt;t.dim;a++){var o=4*(i*t.dim+a);t.set(a,i,this.scale*n(e[o],e[o+1],e[o+2]))}},Io.prototype.getPixels=function(){return new ui({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))},Io.prototype.backfillBorder=function(t,e,r){var n=this.level,i=t.level;if(n.dim!==i.dim)throw new Error(&quot;level mismatch (dem dimension)&quot;);var a=e*n.dim,o=e*n.dim+n.dim,s=r*n.dim,l=r*n.dim+n.dim;switch(e){case-1:a=o-1;break;case 1:o=a+1}switch(r){case-1:s=l-1;break;case 1:l=s+1}for(var c=h(a,-n.border,n.dim+n.border),u=h(o,-n.border,n.dim+n.border),f=h(s,-n.border,n.dim+n.border),p=h(l,-n.border,n.dim+n.border),d=-e*n.dim,g=-r*n.dim,m=f;m&lt;p;m++)for(var v=c;v&lt;u;v++)n.set(v,m,i.get(v+d,m+g))},pr(&quot;DEMData&quot;,Io);var Do=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e&lt;t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Do.prototype.encode=function(t){return this._stringToNumber[t]},Do.prototype.decode=function(t){return this._numberToString[t]};var Ro=function(t,e,r,n){this.type=&quot;Feature&quot;,this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&amp;&amp;(this.id=t.id)},Bo={geometry:{configurable:!0}};Bo.geometry.get=function(){return void 0===this._geometry&amp;&amp;(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Bo.geometry.set=function(t){this._geometry=t},Ro.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)&quot;_geometry&quot;!==e&amp;&amp;&quot;_vectorTileFeature&quot;!==e&amp;&amp;(t[e]=this[e]);return t},Object.defineProperties(Ro.prototype,Bo);var Fo=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new lr(Dn,16,0),this.featureIndexArray=r||new Mn};function No(t,e){return e-t}Fo.prototype.insert=function(t,e,r,n,i){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var o=0;o&lt;e.length;o++){for(var s=e[o],l=[1/0,1/0,-1/0,-1/0],c=0;c&lt;s.length;c++){var u=s[c];l[0]=Math.min(l[0],u.x),l[1]=Math.min(l[1],u.y),l[2]=Math.max(l[2],u.x),l[3]=Math.max(l[3],u.y)}l[0]&lt;Dn&amp;&amp;l[1]&lt;Dn&amp;&amp;l[2]&gt;=0&amp;&amp;l[3]&gt;=0&amp;&amp;this.grid.insert(a,l[0],l[1],l[2],l[3])}},Fo.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ga.VectorTile(new io(this.rawTileData)).layers,this.sourceLayerCoder=new Do(this.vtLayers?Object.keys(this.vtLayers).sort():[&quot;_geojsonTileLayer&quot;])),this.vtLayers},Fo.prototype.query=function(t,e){var r=this;this.loadVTLayers();for(var n=t.params||{},i=Dn/t.tileSize/t.scale,a=Re(n.filter),o=t.queryGeometry,s=t.queryPadding*i,l=1/0,c=1/0,u=-1/0,f=-1/0,h=0;h&lt;o.length;h++)for(var p=o[h],d=0;d&lt;p.length;d++){var g=p[d];l=Math.min(l,g.x),c=Math.min(c,g.y),u=Math.max(u,g.x),f=Math.max(f,g.y)}var m=this.grid.query(l-s,c-s,u+s,f+s);m.sort(No);for(var v,y={},x=function(s){var l=m[s];if(l!==v){v=l;var c=r.featureIndexArray.get(l),u=null;r.loadMatchingFeature(y,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,a,n.layers,e,function(e,n){return u||(u=Bn(e)),n.queryIntersectsFeature(o,e,u,r.z,t.transform,i,t.posMatrix)})}},b=0;b&lt;m.length;b++)x(b);return y},Fo.prototype.loadMatchingFeature=function(t,e,r,n,i,a,o,s){var l=this.bucketLayerIDs[e];if(!a||function(t,e){for(var r=0;r&lt;t.length;r++)if(e.indexOf(t[r])&gt;=0)return!0;return!1}(a,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(i(new Lr(this.tileID.overscaledZ),u))for(var f=0;f&lt;l.length;f++){var h=l[f];if(!(a&amp;&amp;a.indexOf(h)&lt;0)){var p=o[h];if(p&amp;&amp;(!s||s(u,p))){var d=new Ro(u,this.z,this.x,this.y);d.layer=p.serialize();var g=t[h];void 0===g&amp;&amp;(g=t[h]=[]),g.push({featureIndex:n,feature:d})}}}}},Fo.prototype.lookupSymbolFeatures=function(t,e,r,n,i,a){var o={};this.loadVTLayers();for(var s=Re(n),l=0,c=t;l&lt;c.length;l+=1){var u=c[l];this.loadMatchingFeature(o,e,r,u,s,i,a)}return o},Fo.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e&lt;r.length;e+=1)for(var n=0,i=r[e];n&lt;i.length;n+=1)if(t===i[n])return!0;return!1},pr(&quot;FeatureIndex&quot;,Fo,{omit:[&quot;rawTileData&quot;,&quot;sourceLayerCoder&quot;]});var jo={horizontal:1,vertical:2,horizontalOnly:3},Vo={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Uo={};function qo(t,e,r,n){var i=Math.pow(t-e,2);return n?t&lt;e?i/2:2*i:i+Math.abs(r)*r}function Ho(t,e){var r=0;return 10===t&amp;&amp;(r-=1e4),40!==t&amp;&amp;65288!==t||(r+=50),41!==e&amp;&amp;65289!==e||(r+=50),r}function Go(t,e,r,n,i,a){for(var o=null,s=qo(e,r,i,a),l=0,c=n;l&lt;c.length;l+=1){var u=c[l],f=qo(e-u.x,r,i,a)+u.badness;f&lt;=s&amp;&amp;(o=u,s=f)}return{index:t,x:e,priorBreak:o,badness:s}}function Wo(t,e,r,n){if(!r)return[];if(!t)return[];for(var i,a=[],o=function(t,e,r,n){for(var i=0,a=0;a&lt;t.length;a++){var o=n[t.charCodeAt(a)];o&amp;&amp;(i+=o.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/r))}(t,e,r,n),s=0,l=0;l&lt;t.length;l++){var c=t.charCodeAt(l),u=n[c];u&amp;&amp;!Vo[c]&amp;&amp;(s+=u.metrics.advance+e),l&lt;t.length-1&amp;&amp;(Uo[c]||!((i=c)&lt;11904)&amp;&amp;(yr[&quot;Bopomofo Extended&quot;](i)||yr.Bopomofo(i)||yr[&quot;CJK Compatibility Forms&quot;](i)||yr[&quot;CJK Compatibility Ideographs&quot;](i)||yr[&quot;CJK Compatibility&quot;](i)||yr[&quot;CJK Radicals Supplement&quot;](i)||yr[&quot;CJK Strokes&quot;](i)||yr[&quot;CJK Symbols and Punctuation&quot;](i)||yr[&quot;CJK Unified Ideographs Extension A&quot;](i)||yr[&quot;CJK Unified Ideographs&quot;](i)||yr[&quot;Enclosed CJK Letters and Months&quot;](i)||yr[&quot;Halfwidth and Fullwidth Forms&quot;](i)||yr.Hiragana(i)||yr[&quot;Ideographic Description Characters&quot;](i)||yr[&quot;Kangxi Radicals&quot;](i)||yr[&quot;Katakana Phonetic Extensions&quot;](i)||yr.Katakana(i)||yr[&quot;Vertical Forms&quot;](i)||yr[&quot;Yi Radicals&quot;](i)||yr[&quot;Yi Syllables&quot;](i)))&amp;&amp;a.push(Go(l+1,s,o,a,Ho(c,t.charCodeAt(l+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Go(t.length,s,o,a,0,!0))}function Yo(t){var e=.5,r=.5;switch(t){case&quot;right&quot;:case&quot;top-right&quot;:case&quot;bottom-right&quot;:e=1;break;case&quot;left&quot;:case&quot;top-left&quot;:case&quot;bottom-left&quot;:e=0}switch(t){case&quot;bottom&quot;:case&quot;bottom-right&quot;:case&quot;bottom-left&quot;:r=1;break;case&quot;top&quot;:case&quot;top-right&quot;:case&quot;top-left&quot;:r=0}return{horizontalAlign:e,verticalAlign:r}}function Xo(t,e,r,n,i){if(i){var a=e[t[n].glyph];if(a)for(var o=a.metrics.advance,s=(t[n].x+o)*i,l=r;l&lt;=n;l++)t[l].x-=s}}Uo[10]=!0,Uo[32]=!0,Uo[38]=!0,Uo[40]=!0,Uo[41]=!0,Uo[43]=!0,Uo[45]=!0,Uo[47]=!0,Uo[173]=!0,Uo[183]=!0,Uo[8203]=!0,Uo[8208]=!0,Uo[8211]=!0,Uo[8231]=!0,e.commonjsGlobal=r,e.unwrapExports=n,e.createCommonjsModule=i,e.default=self,e.default$1=l,e.getJSON=function(t,e){var r=T(t);return r.setRequestHeader(&quot;Accept&quot;,&quot;application/json&quot;),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status&gt;=200&amp;&amp;r.status&lt;300&amp;&amp;r.response){var n;try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n)}else 401===r.status&amp;&amp;t.url.match(/mapbox.com/)?e(new A(r.statusText+&quot;: you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens&quot;,r.status,t.url)):e(new A(r.statusText,r.status,t.url))},r.send(),r},e.getImage=function(t,e){return S(t,function(t,r){if(t)e(t);else if(r){var n=new self.Image,i=self.URL||self.webkitURL;n.onload=function(){e(null,n),i.revokeObjectURL(n.src)};var a=new self.Blob([new Uint8Array(r.data)],{type:&quot;image/png&quot;});n.cacheControl=r.cacheControl,n.expires=r.expires,n.src=r.data.byteLength?i.createObjectURL(a):&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=&quot;}})},e.ResourceType=M,e.RGBAImage=ui,e.default$2=Ka,e.ImagePosition=Qa,e.getArrayBuffer=S,e.default$3=function(t){return new io(t).readFields(ko,[])},e.default$4=yr,e.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach(function(t,o){e(t,function(t,e){t&amp;&amp;(a=t),i[o]=e,0==--n&amp;&amp;r(a,i)})})},e.AlphaImage=ci,e.default$5=O,e.endsWith=m,e.extend=p,e.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},e.Evented=P,e.validateStyle=nr,e.validateLight=ir,e.emitValidationErrors=sr,e.default$6=tt,e.number=wt,e.Properties=qr,e.Transitionable=Or,e.Transitioning=Dr,e.PossiblyEvaluated=Fr,e.DataConstantProperty=Nr,e.warnOnce=_,e.uniqueId=function(){return d++},e.default$7=So,e.pick=function(t,e){for(var r={},n=0;n&lt;e.length;n++){var i=e[n];i in t&amp;&amp;(r[i]=t[i])}return r},e.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},e.clamp=h,e.Event=L,e.ErrorEvent=z,e.OverscaledTileID=zo,e.default$8=Dn,e.createLayout=Xr,e.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a&lt;t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),n=Math.max(n,t[a].column),i=Math.max(i,t[a].row);var o=n-e,l=i-r,c=Math.max(o,l),u=Math.max(0,Math.floor(-Math.log(c)/Math.LN2));return new s((e+n)/2,(r+i)/2,0).zoomTo(u)},e.CanonicalTileID=Co,e.RasterBoundsArray=Jr,e.getVideo=function(t,e){var r,n,i=self.document.createElement(&quot;video&quot;);i.onloadstart=function(){e(null,i)};for(var a=0;a&lt;t.length;a++){var o=self.document.createElement(&quot;source&quot;);r=t[a],n=void 0,(n=self.document.createElement(&quot;a&quot;)).href=r,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&amp;&amp;(i.crossOrigin=&quot;Anonymous&quot;),o.src=t[a],i.appendChild(o)}return i},e.default$9=I,e.bindAll=g,e.default$10=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n&lt;e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if(&quot;object&quot;==typeof e&amp;&amp;null!==e&amp;&amp;null!==r){if(&quot;object&quot;!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},e.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)&lt;&gt;@\,;\:\\&quot;\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)&lt;&gt;@\,;\:\\&quot;\/\[\]\?\=\{\}\x7F]+)|(?:\&quot;((?:[^&quot;\\]|\\.)*)\&quot;)))?/g,function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),&quot;&quot;}),e[&quot;max-age&quot;]){var r=parseInt(e[&quot;max-age&quot;],10);isNaN(r)?delete e[&quot;max-age&quot;]:e[&quot;max-age&quot;]=r}return e},e.default$11=Fo,e.default$12=Ro,e.default$13=Re,e.default$14=Ha,e.CollisionBoxArray=mn,e.default$15=Tn,e.TriangleIndexArray=fn,e.default$16=Lr,e.default$17=s,e.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},e.default$18=[&quot;type&quot;,&quot;source&quot;,&quot;source-layer&quot;,&quot;minzoom&quot;,&quot;maxzoom&quot;,&quot;filter&quot;,&quot;layout&quot;],e.mat4=ri,e.vec4=ei,e.getSizeData=Ba,e.evaluateSizeForFeature=function(t,e,r){var n=e;return&quot;source&quot;===t.functionType?r.lowerSize/10:&quot;composite&quot;===t.functionType?wt(r.lowerSize/10,r.upperSize/10,n.uSizeT):n.uSize},e.evaluateSizeForZoom=function(t,e,r){if(&quot;constant&quot;===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if(&quot;source&quot;===t.functionType)return{uSizeT:0,uSize:0};if(&quot;camera&quot;===t.functionType){var n=t.propertyValue,i=t.zoomRange,a=t.sizeRange,o=h(Se(n,r.specification).interpolationFactor(e,i.min,i.max),0,1);return{uSizeT:0,uSize:a.min+o*(a.max-a.min)}}var s=t.propertyValue,l=t.zoomRange;return{uSizeT:h(Se(s,r.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},e.addDynamicAttributes=Va,e.default$19=Wa,e.WritingMode=jo,e.multiPolygonIntersectsBufferedPoint=jn,e.multiPolygonIntersectsMultiPolygon=Vn,e.multiPolygonIntersectsBufferedMultiLine=Un,e.polygonIntersectsPolygon=function(t,e){for(var r=0;r&lt;t.length;r++)if(Zn(e,t[r]))return!0;for(var n=0;n&lt;e.length;n++)if(Zn(t,e[n]))return!0;return!!Hn(t,e)},e.distToSegmentSquared=Yn,e.default$20=ti,e.default$21=Hr,e.default$22=function(t){return new Ja[t.type](t)},e.clone=x,e.filterObject=y,e.mapObject=v,e.registerForPluginAvailability=function(t){return Tr?t({pluginURL:Tr,completionCallback:Mr}):Er.once(&quot;pluginAvailable&quot;,t),t},e.evented=Er,e.default$23=vr,e.default$24=Pn,e.PosArray=$r,e.UnwrappedTileID=Lo,e.ease=f,e.bezier=u,e.setRTLTextPlugin=function(t,e){if(Ar)throw new Error(&quot;setRTLTextPlugin cannot be called multiple times.&quot;);Ar=!0,Tr=t,Mr=function(t){t?(Ar=!1,Tr=null,e&amp;&amp;e(t)):Sr=!0},Er.fire(new L(&quot;pluginAvailable&quot;,{pluginURL:Tr,completionCallback:Mr}))},e.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},e.default$25=Ra,e.register=pr,e.GLYPH_PBF_BORDER=To,e.shapeText=function(t,e,r,n,i,a,o,s,l,c){var u=t.trim();c===jo.vertical&amp;&amp;(u=function(t){for(var e=&quot;&quot;,r=0;r&lt;t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&amp;&amp;wr(n)&amp;&amp;!Da[t[r+1]]||i&amp;&amp;wr(i)&amp;&amp;!Da[t[r-1]]||!Da[t[r]]?e+=t[r]:e+=Da[t[r]]}return e}(u));var f=[],h={positionedGlyphs:f,text:u,top:s[1],bottom:s[1],left:s[0],right:s[0],writingMode:c},p=Cr.processBidirectionalText;return function(t,e,r,n,i,a,o,s,l){for(var c=0,u=-17,f=0,h=t.positionedGlyphs,p=&quot;right&quot;===a?1:&quot;left&quot;===a?0:.5,d=0,g=r;d&lt;g.length;d+=1){var m=g[d];if((m=m.trim()).length){for(var v=h.length,y=0;y&lt;m.length;y++){var x=m.charCodeAt(y),b=e[x];b&amp;&amp;(_r(x)&amp;&amp;o!==jo.horizontal?(h.push({glyph:x,x:c,y:0,vertical:!0}),c+=l+s):(h.push({glyph:x,x:c,y:u,vertical:!1}),c+=b.metrics.advance+s))}if(h.length!==v){var _=c-s;f=Math.max(_,f),Xo(h,e,v,h.length-1,p)}c=0,u+=n}else u+=n}var w=Yo(i),k=w.horizontalAlign,M=w.verticalAlign;!function(t,e,r,n,i,a,o){for(var s=(e-r)*i,l=(-n*o+.5)*a,c=0;c&lt;t.length;c++)t[c].x+=s,t[c].y+=l}(h,p,k,M,f,n,r.length);var A=r.length*n;t.top+=-M*A,t.bottom=t.top+A,t.left+=-k*f,t.right=t.left+f}(h,e,p?p(u,Wo(u,o,r,e)):function(t,e){for(var r=[],n=0,i=0,a=e;i&lt;a.length;i+=1){var o=a[i];r.push(t.substring(n,o)),n=o}return n&lt;t.length&amp;&amp;r.push(t.substring(n,t.length)),r}(u,Wo(u,o,r,e)),n,i,a,c,o,l),!!f.length&amp;&amp;h},e.shapeIcon=function(t,e,r){var n=Yo(r),i=n.horizontalAlign,a=n.verticalAlign,o=e[0],s=e[1],l=o-t.displaySize[0]*i,c=l+t.displaySize[0],u=s-t.displaySize[1]*a;return{image:t,top:u,bottom:u+t.displaySize[1],left:l,right:c}},e.allowsVerticalWritingMode=xr,e.allowsLetterSpacing=function(t){for(var e=0,r=t;e&lt;r.length;e+=1)if(!br(r[e].charCodeAt(0)))return!1;return!0},e.default$26=Yi,e.default$27=Do,e.default$28=eo,e.default$29=ga,e.default$30=io,e.default$31=Io,e.__moduleExports=ga,e.default$32=l,e.__moduleExports$1=io,e.plugin=Cr}),i(0,function(t){function e(t){var r=typeof t;if(&quot;number&quot;===r||&quot;boolean&quot;===r||&quot;string&quot;===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var n=&quot;[&quot;,i=0,a=t;i&lt;a.length;i+=1)n+=e(a[i])+&quot;,&quot;;return n+&quot;]&quot;}for(var o=Object.keys(t).sort(),s=&quot;{&quot;,l=0;l&lt;o.length;l++)s+=JSON.stringify(o[l])+&quot;:&quot;+e(t[o[l]])+&quot;,&quot;;return s+&quot;}&quot;}function r(r){for(var n=&quot;&quot;,i=0,a=t.default$18;i&lt;a.length;i+=1)n+=&quot;/&quot;+e(r[a[i]]);return n}var n=function(t){t&amp;&amp;this.replace(t)};function i(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s&gt;-r/2;){if(--o&lt;0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;s&lt;r/2;){var u=t[o-1],f=t[o],h=t[o+1];if(!h)return!1;var p=u.angleTo(f)-f.angleTo(h);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:p}),c+=p;s-l[0].distance&gt;n;)c-=l.shift().angleDelta;if(c&gt;i)return!1;o++,s+=f.dist(h)}return!0}function a(e,r,n,a,o,s,l,c,u){var f=a?.6*s*l:0,h=Math.max(a?a.right-a.left:0,o?o.right-o.left:0),p=0===e[0].x||e[0].x===u||0===e[0].y||e[0].y===u;return r-h*l&lt;r/4&amp;&amp;(r=h*l+r/4),function e(r,n,a,o,s,l,c,u,f){for(var h=l/2,p=0,d=0;d&lt;r.length-1;d++)p+=r[d].dist(r[d+1]);for(var g=0,m=n-a,v=[],y=0;y&lt;r.length-1;y++){for(var x=r[y],b=r[y+1],_=x.dist(b),w=b.angleTo(x);m+a&lt;g+_;){var k=((m+=a)-g)/_,M=t.number(x.x,b.x,k),A=t.number(x.y,b.y,k);if(M&gt;=0&amp;&amp;M&lt;f&amp;&amp;A&gt;=0&amp;&amp;A&lt;f&amp;&amp;m-h&gt;=0&amp;&amp;m+h&lt;=p){var T=new t.default$25(M,A,w,y);T._round(),o&amp;&amp;!i(r,T,l,o,s)||v.push(T)}}g+=_}return u||v.length||c||(v=e(r,g/2,a,o,s,l,c,!0,f)),v}(e,p?r/2*c%r:(h/2+2*s)*l*c%r,r,f,n,h*l,p,!1,u)}n.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},n.prototype.update=function(e,n){for(var i=this,a=0,o=e;a&lt;o.length;a+=1){var s=o[a];i._layerConfigs[s.id]=s;var l=i._layers[s.id]=t.default$22(s);l._featureFilter=t.default$13(l.filter)}for(var c=0,u=n;c&lt;u.length;c+=1){var f=u[c];delete i._layerConfigs[f],delete i._layers[f]}this.familiesBySource={};for(var h=0,p=function(t){for(var e={},n=0;n&lt;t.length;n++){var i=r(t[n]),a=e[i];a||(a=e[i]=[]),a.push(t[n])}var o=[];for(var s in e)o.push(e[s]);return o}(t.values(this._layerConfigs));h&lt;p.length;h+=1){var d=p[h].map(function(t){return i._layers[t.id]}),g=d[0];if(&quot;none&quot;!==g.visibility){var m=g.source||&quot;&quot;,v=i.familiesBySource[m];v||(v=i.familiesBySource[m]={});var y=g.sourceLayer||&quot;_geojsonTileLayer&quot;,x=v[y];x||(x=v[y]=[]),x.push(d)}}};var o=function(){this.opacity=0,this.targetOpacity=0,this.time=0};o.prototype.clone=function(){var t=new o;return t.opacity=this.opacity,t.targetOpacity=this.targetOpacity,t.time=this.time,t},t.register(&quot;OpacityState&quot;,o);var s=function(t,e,r,n,i,a,o,s,l,c,u){var f=o.top*s-l,h=o.bottom*s+l,p=o.left*s-l,d=o.right*s+l;if(this.boxStartIndex=t.length,c){var g=h-f,m=d-p;g&gt;0&amp;&amp;(g=Math.max(10*s,g),this._addLineCollisionCircles(t,e,r,r.segment,m,g,n,i,a,u))}else t.emplaceBack(r.x,r.y,p,f,d,h,n,i,a,0,0);this.boxEndIndex=t.length};s.prototype._addLineCollisionCircles=function(t,e,r,n,i,a,o,s,l,c){var u=a/2,f=Math.floor(i/u),h=1+.4*Math.log(c)/Math.LN2,p=Math.floor(f*h/2),d=-a/2,g=r,m=n+1,v=d,y=-i/2,x=y-i/4;do{if(--m&lt;0){if(v&gt;y)return;m=0;break}v-=e[m].dist(g),g=e[m]}while(v&gt;x);for(var b=e[m].dist(e[m+1]),_=-p;_&lt;f+p;_++){var w=_*u,k=y+w;if(w&lt;0&amp;&amp;(k+=w),w&gt;i&amp;&amp;(k+=w-i),!(k&lt;v)){for(;v+b&lt;k;){if(v+=b,++m+1&gt;=e.length)return;b=e[m].dist(e[m+1])}var M=k-v,A=e[m],T=e[m+1].sub(A)._unit()._mult(M)._add(A)._round(),S=Math.abs(k-d)&lt;u?0:.8*(k-d);t.emplaceBack(T.x,T.y,-a/2,-a/2,a/2,a/2,o,s,l,a/2,S)}}};var l=u,c=u;function u(t,e){if(!(this instanceof u))return new u(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||f,this.length&gt;0)for(var r=(this.length&gt;&gt;1)-1;r&gt;=0;r--)this._down(r)}function f(t,e){return t&lt;e?-1:t&gt;e?1:0}function h(e,r,n){void 0===r&amp;&amp;(r=1),void 0===n&amp;&amp;(n=!1);for(var i=1/0,a=1/0,o=-1/0,s=-1/0,c=e[0],u=0;u&lt;c.length;u++){var f=c[u];(!u||f.x&lt;i)&amp;&amp;(i=f.x),(!u||f.y&lt;a)&amp;&amp;(a=f.y),(!u||f.x&gt;o)&amp;&amp;(o=f.x),(!u||f.y&gt;s)&amp;&amp;(s=f.y)}var h=o-i,g=s-a,m=Math.min(h,g),v=m/2,y=new l(null,p);if(0===m)return new t.default$1(i,a);for(var x=i;x&lt;o;x+=m)for(var b=a;b&lt;s;b+=m)y.push(new d(x+v,b+v,v,e));for(var _=function(t){for(var e=0,r=0,n=0,i=t[0],a=0,o=i.length,s=o-1;a&lt;o;s=a++){var l=i[a],c=i[s],u=l.x*c.y-c.x*l.y;r+=(l.x+c.x)*u,n+=(l.y+c.y)*u,e+=3*u}return new d(r/e,n/e,0,t)}(e),w=y.length;y.length;){var k=y.pop();(k.d&gt;_.d||!_.d)&amp;&amp;(_=k,n&amp;&amp;console.log(&quot;found best %d after %d probes&quot;,Math.round(1e4*k.d)/1e4,w)),k.max-_.d&lt;=r||(v=k.h/2,y.push(new d(k.p.x-v,k.p.y-v,v,e)),y.push(new d(k.p.x+v,k.p.y-v,v,e)),y.push(new d(k.p.x-v,k.p.y+v,v,e)),y.push(new d(k.p.x+v,k.p.y+v,v,e)),w+=4)}return n&amp;&amp;(console.log(&quot;num probes: &quot;+w),console.log(&quot;best distance: &quot;+_.d)),_.p}function p(t,e){return e.max-t.max}function d(e,r,n,i){this.p=new t.default$1(e,r),this.h=n,this.d=function(e,r){for(var n=!1,i=1/0,a=0;a&lt;r.length;a++)for(var o=r[a],s=0,l=o.length,c=l-1;s&lt;l;c=s++){var u=o[s],f=o[c];u.y&gt;e.y!=f.y&gt;e.y&amp;&amp;e.x&lt;(f.x-u.x)*(e.y-u.y)/(f.y-u.y)+u.x&amp;&amp;(n=!n),i=Math.min(i,t.distToSegmentSquared(e,u,f))}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}function g(e,r,n,i,a,o){e.createArrays(),e.symbolInstances=[];var s=512*e.overscaling;e.tilePixelRatio=t.default$8/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if(&quot;composite&quot;===e.textSizeData.functionType){var f=e.textSizeData.zoomRange,h=f.min,p=f.max;u.compositeTextSizes=[c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(h)),c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(p))]}if(&quot;composite&quot;===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,g=d.min,v=d.max;u.compositeIconSizes=[c[&quot;icon-size&quot;].possiblyEvaluate(new t.default$16(g)),c[&quot;icon-size&quot;].possiblyEvaluate(new t.default$16(v))]}u.layoutTextSize=c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(e.zoom+1)),u.layoutIconSize=c[&quot;icon-size&quot;].possiblyEvaluate(new t.default$16(e.zoom+1)),u.textMaxSize=c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(18));for(var y=24*l.get(&quot;text-line-height&quot;),x=&quot;map&quot;===l.get(&quot;text-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===l.get(&quot;symbol-placement&quot;),b=l.get(&quot;text-keep-upright&quot;),_=0,w=e.features;_&lt;w.length;_+=1){var k=w[_],M=l.get(&quot;text-font&quot;).evaluate(k).join(&quot;,&quot;),A=r[M]||{},T=n[M]||{},S={},E=k.text;if(E){var C=l.get(&quot;text-offset&quot;).evaluate(k).map(function(t){return 24*t}),L=24*l.get(&quot;text-letter-spacing&quot;).evaluate(k),z=t.allowsLetterSpacing(E)?L:0,P=l.get(&quot;text-anchor&quot;).evaluate(k),O=l.get(&quot;text-justify&quot;).evaluate(k),I=&quot;line&quot;!==l.get(&quot;symbol-placement&quot;)?24*l.get(&quot;text-max-width&quot;).evaluate(k):0;S.horizontal=t.shapeText(E,A,I,y,P,O,z,C,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(E)&amp;&amp;x&amp;&amp;b&amp;&amp;(S.vertical=t.shapeText(E,A,I,y,P,O,z,C,24,t.WritingMode.vertical))}var D=void 0;if(k.icon){var R=i[k.icon];R&amp;&amp;(D=t.shapeIcon(a[k.icon],l.get(&quot;icon-offset&quot;).evaluate(k),l.get(&quot;icon-anchor&quot;).evaluate(k)),void 0===e.sdfIcons?e.sdfIcons=R.sdf:e.sdfIcons!==R.sdf&amp;&amp;t.warnOnce(&quot;Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer&quot;),R.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get(&quot;icon-rotate&quot;).constantOr(1)&amp;&amp;(e.iconsNeedLinear=!0))}(S.horizontal||D)&amp;&amp;m(e,k,S,D,T,u)}o&amp;&amp;e.generateCollisionDebugBuffers()}function m(e,r,n,i,l,c){var u=c.layoutTextSize.evaluate(r),f=c.layoutIconSize.evaluate(r),p=c.textMaxSize.evaluate(r);void 0===p&amp;&amp;(p=u);var d=e.layers[0].layout,g=d.get(&quot;text-offset&quot;).evaluate(r),m=d.get(&quot;icon-offset&quot;).evaluate(r),x=u/24,b=e.tilePixelRatio*x,_=e.tilePixelRatio*p/24,w=e.tilePixelRatio*f,k=e.tilePixelRatio*d.get(&quot;symbol-spacing&quot;),M=d.get(&quot;text-padding&quot;)*e.tilePixelRatio,A=d.get(&quot;icon-padding&quot;)*e.tilePixelRatio,T=d.get(&quot;text-max-angle&quot;)/180*Math.PI,S=&quot;map&quot;===d.get(&quot;text-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===d.get(&quot;symbol-placement&quot;),E=&quot;map&quot;===d.get(&quot;icon-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===d.get(&quot;symbol-placement&quot;),C=k/2,L=function(a,u){u.x&lt;0||u.x&gt;=t.default$8||u.y&lt;0||u.y&gt;=t.default$8||e.symbolInstances.push(function(e,r,n,i,a,l,c,u,f,h,p,d,g,m,y,x,b,_,w,k,M){var A,T,S=e.addToLineVertexArray(r,n),E=0,C=0,L=0,z=i.horizontal?i.horizontal.text:&quot;&quot;,P=[];i.horizontal&amp;&amp;(A=new s(c,n,r,u,f,h,i.horizontal,p,d,g,e.overscaling),C+=v(e,r,i.horizontal,l,g,w,m,S,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,P,k,M),i.vertical&amp;&amp;(L+=v(e,r,i.vertical,l,g,w,m,S,t.WritingMode.vertical,P,k,M)));var O=A?A.boxStartIndex:e.collisionBoxArray.length,I=A?A.boxEndIndex:e.collisionBoxArray.length;if(a){var D=function(e,r,n,i,a,o){var s,l,c,u,f=r.image,h=n.layout,p=r.top-1/f.pixelRatio,d=r.left-1/f.pixelRatio,g=r.bottom+1/f.pixelRatio,m=r.right+1/f.pixelRatio;if(&quot;none&quot;!==h.get(&quot;icon-text-fit&quot;)&amp;&amp;a){var v=m-d,y=g-p,x=h.get(&quot;text-size&quot;).evaluate(o)/24,b=a.left*x,_=a.right*x,w=a.top*x,k=_-b,M=a.bottom*x-w,A=h.get(&quot;icon-text-fit-padding&quot;)[0],T=h.get(&quot;icon-text-fit-padding&quot;)[1],S=h.get(&quot;icon-text-fit-padding&quot;)[2],E=h.get(&quot;icon-text-fit-padding&quot;)[3],C=&quot;width&quot;===h.get(&quot;icon-text-fit&quot;)?.5*(M-y):0,L=&quot;height&quot;===h.get(&quot;icon-text-fit&quot;)?.5*(k-v):0,z=&quot;width&quot;===h.get(&quot;icon-text-fit&quot;)||&quot;both&quot;===h.get(&quot;icon-text-fit&quot;)?k:v,P=&quot;height&quot;===h.get(&quot;icon-text-fit&quot;)||&quot;both&quot;===h.get(&quot;icon-text-fit&quot;)?M:y;s=new t.default$1(b+L-E,w+C-A),l=new t.default$1(b+L+T+z,w+C-A),c=new t.default$1(b+L+T+z,w+C+S+P),u=new t.default$1(b+L-E,w+C+S+P)}else s=new t.default$1(d,p),l=new t.default$1(m,p),c=new t.default$1(m,g),u=new t.default$1(d,g);var O=n.layout.get(&quot;icon-rotate&quot;).evaluate(o)*Math.PI/180;if(O){var I=Math.sin(O),D=Math.cos(O),R=[D,-I,I,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:f.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,a,l,0,i.horizontal,w);T=new s(c,n,r,u,f,h,a,y,x,!1,e.overscaling),E=4*D.length;var R=e.iconSizeData,B=null;&quot;source&quot;===R.functionType?B=[10*l.layout.get(&quot;icon-size&quot;).evaluate(w)]:&quot;composite&quot;===R.functionType&amp;&amp;(B=[10*M.compositeIconSizes[0].evaluate(w),10*M.compositeIconSizes[1].evaluate(w)]),e.addSymbols(e.icon,D,B,_,b,w,!1,r,S.lineStartIndex,S.lineLength)}var F=T?T.boxStartIndex:e.collisionBoxArray.length,N=T?T.boxEndIndex:e.collisionBoxArray.length;return e.glyphOffsetArray.length&gt;=t.default$14.MAX_GLYPHS&amp;&amp;t.warnOnce(&quot;Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907&quot;),{key:z,textBoxStartIndex:O,textBoxEndIndex:I,iconBoxStartIndex:F,iconBoxEndIndex:N,textOffset:m,iconOffset:_,anchor:r,line:n,featureIndex:u,feature:w,numGlyphVertices:C,numVerticalGlyphVertices:L,numIconVertices:E,textOpacityState:new o,iconOpacityState:new o,isDuplicate:!1,placedTextSymbolIndices:P,crossTileID:0}}(e,u,a,n,i,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,b,M,S,g,w,A,E,m,r,l,c))};if(&quot;line&quot;===d.get(&quot;symbol-placement&quot;))for(var z=0,P=function(e,r,n,i,a){for(var o=[],s=0;s&lt;e.length;s++)for(var l=e[s],c=void 0,u=0;u&lt;l.length-1;u++){var f=l[u],h=l[u+1];f.x&lt;0&amp;&amp;h.x&lt;0||(f.x&lt;0?f=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round():h.x&lt;0&amp;&amp;(h=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round()),f.y&lt;0&amp;&amp;h.y&lt;0||(f.y&lt;0?f=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round():h.y&lt;0&amp;&amp;(h=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round()),f.x&gt;=i&amp;&amp;h.x&gt;=i||(f.x&gt;=i?f=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x&gt;=i&amp;&amp;(h=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y&gt;=a&amp;&amp;h.y&gt;=a||(f.y&gt;=a?f=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y&gt;=a&amp;&amp;(h=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round()),c&amp;&amp;f.equals(c[c.length-1])||(c=[f],o.push(c)),c.push(h)))))}return o}(r.geometry,0,0,t.default$8,t.default$8);z&lt;P.length;z+=1)for(var O=P[z],I=0,D=a(O,k,T,n.vertical||n.horizontal,i,24,_,e.overscaling,t.default$8);I&lt;D.length;I+=1){var R=D[I],B=n.horizontal;B&amp;&amp;y(e,B.text,C,R)||L(O,R)}else if(&quot;Polygon&quot;===r.type)for(var F=0,N=t.default$26(r.geometry,0);F&lt;N.length;F+=1){var j=N[F],V=h(j,16);L(j[0],new t.default$25(V.x,V.y,0))}else if(&quot;LineString&quot;===r.type)for(var U=0,q=r.geometry;U&lt;q.length;U+=1){var H=q[U];L(H,new t.default$25(H[0].x,H[0].y,0))}else if(&quot;Point&quot;===r.type)for(var G=0,W=r.geometry;G&lt;W.length;G+=1)for(var Y=0,X=W[G];Y&lt;X.length;Y+=1){var Z=X[Y];L([Z],new t.default$25(Z.x,Z.y,0))}}function v(e,r,n,i,a,o,s,l,c,u,f,h){var p=function(e,r,n,i,a,o){for(var s=n.layout.get(&quot;text-rotate&quot;).evaluate(a)*Math.PI/180,l=n.layout.get(&quot;text-offset&quot;).evaluate(a).map(function(t){return 24*t}),c=r.positionedGlyphs,u=[],f=0;f&lt;c.length;f++){var h=c[f],p=o[h.glyph];if(p){var d=p.rect;if(d){var g=t.GLYPH_PBF_BORDER+1,m=p.metrics.advance/2,v=i?[h.x+m,h.y]:[0,0],y=i?[0,0]:[h.x+m+l[0],h.y+l[1]],x=p.metrics.left-g-m+y[0],b=-p.metrics.top-g+y[1],_=x+d.w,w=b+d.h,k=new t.default$1(x,b),M=new t.default$1(_,b),A=new t.default$1(x,w),T=new t.default$1(_,w);if(i&amp;&amp;h.vertical){var S=new t.default$1(-m,m),E=-Math.PI/2,C=new t.default$1(5,0);k._rotateAround(E,S)._add(C),M._rotateAround(E,S)._add(C),A._rotateAround(E,S)._add(C),T._rotateAround(E,S)._add(C)}if(s){var L=Math.sin(s),z=Math.cos(s),P=[z,-L,L,z];k._matMult(P),M._matMult(P),A._matMult(P),T._matMult(P)}u.push({tl:k,tr:M,bl:A,br:T,tex:d,writingMode:r.writingMode,glyphOffset:v})}}}return u}(0,n,i,a,o,f),d=e.textSizeData,g=null;return&quot;source&quot;===d.functionType?g=[10*i.layout.get(&quot;text-size&quot;).evaluate(o)]:&quot;composite&quot;===d.functionType&amp;&amp;(g=[10*h.compositeTextSizes[0].evaluate(o),10*h.compositeTextSizes[1].evaluate(o)]),e.addSymbols(e.text,p,g,s,a,o,c,r,l.lineStartIndex,l.lineLength),u.push(e.text.placedSymbolArray.length-1),4*p.length}function y(t,e,r,n){var i=t.compareText;if(e in i){for(var a=i[e],o=a.length-1;o&gt;=0;o--)if(n.dist(a[o])&lt;r)return!0}else i[e]=[];return i[e].push(n),!1}u.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length&gt;0&amp;&amp;(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t&gt;0;){var i=t-1&gt;&gt;1,a=e[i];if(r(n,a)&gt;=0)break;e[t]=a,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length&gt;&gt;1,i=e[t];t&lt;n;){var a=1+(t&lt;&lt;1),o=a+1,s=e[a];if(o&lt;this.length&amp;&amp;r(e[o],s)&lt;0&amp;&amp;(a=o,s=e[o]),r(s,i)&gt;=0)break;e[t]=s,t=a}e[t]=i}},l.default=c;var x=function(e){var r=new t.AlphaImage({width:0,height:0}),n={},i=new t.default$2(0,0,{autoResize:!0});for(var a in e){var o=e[a],s=n[a]={};for(var l in o){var c=o[+l];if(c&amp;&amp;0!==c.bitmap.width&amp;&amp;0!==c.bitmap.height){var u=i.packOne(c.bitmap.width+2,c.bitmap.height+2);r.resize({width:i.w,height:i.h}),t.AlphaImage.copy(c.bitmap,r,{x:0,y:0},{x:u.x+1,y:u.y+1},c.bitmap),s[l]={rect:u,metrics:c.metrics}}}}i.shrink(),r.resize({width:i.w,height:i.h}),this.image=r,this.positions=n};t.register(&quot;GlyphAtlas&quot;,x);var b=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming};function _(e,r){for(var n=new t.default$16(r),i=0,a=e;i&lt;a.length;i+=1)a[i].recalculate(n)}b.prototype.parse=function(e,r,n,i){var a=this;this.status=&quot;parsing&quot;,this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var o=new t.default$27(Object.keys(e.layers).sort()),s=new t.default$11(this.tileID);s.bucketLayerIDs=[];var l,c,u,f={},h={featureIndex:s,iconDependencies:{},glyphDependencies:{}},p=r.familiesBySource[this.source];for(var d in p){var m=e.layers[d];if(m){1===m.version&amp;&amp;t.warnOnce('Vector tile source &quot;'+a.source+'&quot; layer &quot;'+d+'&quot; does not use vector tile spec v2 and therefore may have some rendering errors.');for(var v=o.encode(d),y=[],b=0;b&lt;m.length;b++){var w=m.feature(b);y.push({feature:w,index:b,sourceLayerIndex:v})}for(var k=0,M=p[d];k&lt;M.length;k+=1){var A=M[k],T=A[0];T.minzoom&amp;&amp;a.zoom&lt;Math.floor(T.minzoom)||T.maxzoom&amp;&amp;a.zoom&gt;=T.maxzoom||&quot;none&quot;!==T.visibility&amp;&amp;(_(A,a.zoom),(f[T.id]=T.createBucket({index:s.bucketLayerIDs.length,layers:A,zoom:a.zoom,pixelRatio:a.pixelRatio,overscaling:a.overscaling,collisionBoxArray:a.collisionBoxArray,sourceLayerIndex:v})).populate(y,h),s.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(h.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send(&quot;getGlyphs&quot;,{uid:this.uid,stacks:S},function(t,e){l||(l=t,c=e,C.call(a))}):c={};var E=Object.keys(h.iconDependencies);function C(){if(l)return i(l);if(c&amp;&amp;u){var e=new x(c),r=new t.default$28(u);for(var n in f){var a=f[n];a instanceof t.default$14&amp;&amp;(_(a.layers,this.zoom),g(a,c,e.positions,u,r.positions,this.showCollisionBoxes))}this.status=&quot;done&quot;,i(null,{buckets:t.values(f).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,iconAtlasImage:r.image})}}E.length?n.send(&quot;getImages&quot;,{icons:E},function(t,e){l||(l=t,u=e,C.call(a))}):u={},C.call(this)};var w=function(t){return!(!performance||!performance.getEntriesByName)&amp;&amp;performance.getEntriesByName(t)};function k(e,r){var n=t.getArrayBuffer(e.request,function(e,n){e?r(e):n&amp;&amp;r(null,{vectorTile:new t.default$29.VectorTile(new t.default$30(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires})});return function(){n.abort(),r()}}var M=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||k,this.loading={},this.loaded={}};M.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var a=this.loading[i]=new b(e);a.abort=this.loadVectorData(e,function(o,s){if(delete n.loading[i],o||!s)return r(o);var l=s.rawData,c={};s.expires&amp;&amp;(c.expires=s.expires),s.cacheControl&amp;&amp;(c.cacheControl=s.cacheControl);var u={};if(e.request&amp;&amp;e.request.collectResourceTiming){var f=w(e.request.url);f&amp;&amp;(u.resourceTiming=JSON.parse(JSON.stringify(f)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[i]=a})},M.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,i=this;if(r&amp;&amp;r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=a.reloadCallback;n&amp;&amp;(delete a.reloadCallback,a.parse(a.vectorTile,i.layerIndex,i.actor,n)),e(t,r)};&quot;parsing&quot;===a.status?a.reloadCallback=o:&quot;done&quot;===a.status&amp;&amp;a.parse(a.vectorTile,this.layerIndex,this.actor,o)}},M.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&amp;&amp;r[n]&amp;&amp;r[n].abort&amp;&amp;(r[n].abort(),delete r[n]),e()},M.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&amp;&amp;r[n]&amp;&amp;delete r[n],e()};var A=function(){this.loading={},this.loaded={}};A.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=new t.default$31(n);this.loading[n]=a,a.loadFromImage(e.rawImageData,i),delete this.loading[n],this.loaded=this.loaded||{},this.loaded[n]=a,r(null,a)},A.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&amp;&amp;e[r]&amp;&amp;delete e[r]};var T={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function S(t){var e=0;if(t&amp;&amp;t.length&gt;0){e+=Math.abs(E(t[0]));for(var r=1;r&lt;t.length;r++)e-=Math.abs(E(t[r]))}return e}function E(t){var e,r,n,i,a,o,s=0,l=t.length;if(l&gt;2){for(o=0;o&lt;l;o++)o===l-2?(n=l-2,i=l-1,a=0):o===l-1?(n=l-1,i=0,a=1):(n=o,i=o+1,a=o+2),e=t[n],r=t[i],s+=(C(t[a][0])-C(e[0]))*Math.sin(C(r[1]));s=s*T.RADIUS*T.RADIUS/2}return s}function C(t){return t*Math.PI/180}var L={geometry:function t(e){var r,n=0;switch(e.type){case&quot;Polygon&quot;:return S(e.coordinates);case&quot;MultiPolygon&quot;:for(r=0;r&lt;e.coordinates.length;r++)n+=S(e.coordinates[r]);return n;case&quot;Point&quot;:case&quot;MultiPoint&quot;:case&quot;LineString&quot;:case&quot;MultiLineString&quot;:return 0;case&quot;GeometryCollection&quot;:for(r=0;r&lt;e.geometries.length;r++)n+=t(e.geometries[r]);return n}},ring:E};function z(t,e){return function(r){return t(r,e)}}function P(t,e){e=!!e,t[0]=O(t[0],e);for(var r=1;r&lt;t.length;r++)t[r]=O(t[r],!e);return t}function O(t,e){return function(t){return L.ring(t)&gt;=0}(t)===e?t:t.reverse()}var I=t.default$29.VectorTileFeature.prototype.toGeoJSON,D=function(e){this._feature=e,this.extent=t.default$8,this.type=e.type,this.properties=e.tags,&quot;id&quot;in e&amp;&amp;!isNaN(e.id)&amp;&amp;(this.id=parseInt(e.id,10))};D.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r&lt;n.length;r+=1){var i=n[r];e.push([new t.default$1(i[0],i[1])])}return e}for(var a=[],o=0,s=this._feature.geometry;o&lt;s.length;o+=1){for(var l=[],c=0,u=s[o];c&lt;u.length;c+=1){var f=u[c];l.push(new t.default$1(f[0],f[1]))}a.push(l)}return a},D.prototype.toGeoJSON=function(t,e,r){return I.call(this,t,e,r)};var R=function(e){this.layers={_geojsonTileLayer:this},this.name=&quot;_geojsonTileLayer&quot;,this.extent=t.default$8,this.length=e.length,this._features=e};R.prototype.feature=function(t){return new D(this._features[t])};var B=t.__moduleExports.VectorTileFeature,F=N;function N(t,e){this.options=e||{},this.features=t,this.length=t.length}function j(t,e){this.id=&quot;number&quot;==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}N.prototype.feature=function(t){return new j(this.features[t],this.options.extent)},j.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r&lt;e.length;r++){for(var n=e[r],i=[],a=0;a&lt;n.length;a++)i.push(new t.default$32(n[a][0],n[a][1]));this.geometry.push(i)}return this.geometry},j.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a&lt;t.length;a++)for(var o=t[a],s=0;s&lt;o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},j.prototype.toGeoJSON=B.prototype.toGeoJSON;var V=H,U=H,q=F;function H(e){var r=new t.__moduleExports$1;return function(t,e){for(var r in t.layers)e.writeMessage(3,G,t.layers[r])}(e,r),r.finish()}function G(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||&quot;&quot;),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r&lt;t.length;r++)n.feature=t.feature(r),e.writeMessage(2,W,n);var i=n.keys;for(r=0;r&lt;i.length;r++)e.writeStringField(3,i[r]);var a=n.values;for(r=0;r&lt;a.length;r++)e.writeMessage(4,J,a[r])}function W(t,e){var r=t.feature;void 0!==r.id&amp;&amp;e.writeVarintField(1,r.id),e.writeMessage(2,Y,t),e.writeVarintField(3,r.type),e.writeMessage(4,$,r)}function Y(t,e){var r=t.feature,n=t.keys,i=t.values,a=t.keycache,o=t.valuecache;for(var s in r.properties){var l=a[s];void 0===l&amp;&amp;(n.push(s),l=n.length-1,a[s]=l),e.writeVarint(l);var c=r.properties[s],u=typeof c;&quot;string&quot;!==u&amp;&amp;&quot;boolean&quot;!==u&amp;&amp;&quot;number&quot;!==u&amp;&amp;(c=JSON.stringify(c));var f=u+&quot;:&quot;+c,h=o[f];void 0===h&amp;&amp;(i.push(c),h=i.length-1,o[f]=h),e.writeVarint(h)}}function X(t,e){return(e&lt;&lt;3)+(7&amp;t)}function Z(t){return t&lt;&lt;1^t&gt;&gt;31}function $(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s&lt;o;s++){var l=r[s],c=1;1===n&amp;&amp;(c=l.length),e.writeVarint(X(1,c));for(var u=3===n?l.length-1:l.length,f=0;f&lt;u;f++){1===f&amp;&amp;1!==n&amp;&amp;e.writeVarint(X(2,u-1));var h=l[f].x-i,p=l[f].y-a;e.writeVarint(Z(h)),e.writeVarint(Z(p)),i+=h,a+=p}3===n&amp;&amp;e.writeVarint(X(7,0))}}function J(t,e){var r=typeof t;&quot;string&quot;===r?e.writeStringField(1,t):&quot;boolean&quot;===r?e.writeBooleanField(7,t):&quot;number&quot;===r&amp;&amp;(t%1!=0?e.writeDoubleField(3,t):t&lt;0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}V.fromVectorTileJs=U,V.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new F(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return H({layers:r})},V.GeoJSONWrapper=q;var K=function t(e,r,n,i,a,o){if(!(a-i&lt;=n)){var s=Math.floor((i+a)/2);!function t(e,r,n,i,a,o){for(;a&gt;i;){if(a-i&gt;600){var s=a-i+1,l=n-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2&lt;0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*u/s+f)),Math.min(a,Math.floor(n+(s-l)*u/s+f)),o)}var h=r[2*n+o],p=i,d=a;for(Q(e,r,i,n),r[2*a+o]&gt;h&amp;&amp;Q(e,r,i,a);p&lt;d;){for(Q(e,r,p,d),p++,d--;r[2*p+o]&lt;h;)p++;for(;r[2*d+o]&gt;h;)d--}r[2*i+o]===h?Q(e,r,i,d):Q(e,r,++d,a),d&lt;=n&amp;&amp;(i=d+1),n&lt;=d&amp;&amp;(a=d-1)}}(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}};function Q(t,e,r,n){tt(t,r,n),tt(e,2*r,2*n),tt(e,2*r+1,2*n+1)}function tt(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function et(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}var rt=function(t,e,r,n,i){return new nt(t,e,r,n,i)};function nt(t,e,r,n,i){e=e||it,r=r||at,i=i||Array,this.nodeSize=n||64,this.points=t,this.ids=new i(t.length),this.coords=new i(2*t.length);for(var a=0;a&lt;t.length;a++)this.ids[a]=a,this.coords[2*a]=e(t[a]),this.coords[2*a+1]=r(t[a]);K(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function it(t){return t[0]}function at(t){return t[1]}nt.prototype={range:function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),p=c.pop();if(h-p&lt;=o)for(var d=p;d&lt;=h;d++)s=e[2*d],l=e[2*d+1],s&gt;=r&amp;&amp;s&lt;=i&amp;&amp;l&gt;=n&amp;&amp;l&lt;=a&amp;&amp;u.push(t[d]);else{var g=Math.floor((p+h)/2);s=e[2*g],l=e[2*g+1],s&gt;=r&amp;&amp;s&lt;=i&amp;&amp;l&gt;=n&amp;&amp;l&lt;=a&amp;&amp;u.push(t[g]);var m=(f+1)%2;(0===f?r&lt;=s:n&lt;=l)&amp;&amp;(c.push(p),c.push(g-1),c.push(m)),(0===f?i&gt;=s:a&gt;=l)&amp;&amp;(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},within:function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),f=o.pop();if(u-f&lt;=a)for(var h=f;h&lt;=u;h++)et(e[2*h],e[2*h+1],r,n)&lt;=l&amp;&amp;s.push(t[h]);else{var p=Math.floor((f+u)/2),d=e[2*p],g=e[2*p+1];et(d,g,r,n)&lt;=l&amp;&amp;s.push(t[p]);var m=(c+1)%2;(0===c?r-i&lt;=d:n-i&lt;=g)&amp;&amp;(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i&gt;=d:n+i&gt;=g)&amp;&amp;(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)}};function ot(t){this.options=pt(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function st(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function lt(t,e){var r=t.geometry.coordinates;return{x:ft(r[0]),y:ht(r[1]),zoom:1/0,id:e,parentId:-1}}function ct(t){return{type:&quot;Feature&quot;,properties:ut(t),geometry:{type:&quot;Point&quot;,coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function ut(t){var e=t.numPoints,r=e&gt;=1e4?Math.round(e/1e3)+&quot;k&quot;:e&gt;=1e3?Math.round(e/100)/10+&quot;k&quot;:e;return pt(pt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function ft(t){return t/360+.5}function ht(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r&lt;0?0:r&gt;1?1:r}function pt(t,e){for(var r in e)t[r]=e[r];return t}function dt(t){return t.x}function gt(t){return t.y}function mt(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l&gt;1?(r=i,n=a):l&gt;0&amp;&amp;(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function vt(t,e,r,n){var i={id:t||null,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if(&quot;Point&quot;===r||&quot;MultiPoint&quot;===r||&quot;LineString&quot;===r)yt(t,e);else if(&quot;Polygon&quot;===r||&quot;MultiLineString&quot;===r)for(var n=0;n&lt;e.length;n++)yt(t,e[n]);else if(&quot;MultiPolygon&quot;===r)for(n=0;n&lt;e.length;n++)for(var i=0;i&lt;e[n].length;i++)yt(t,e[n][i])}(i),i}function yt(t,e){for(var r=0;r&lt;e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function xt(t,e,r){if(e.geometry){var n=e.geometry.coordinates,i=e.geometry.type,a=Math.pow(r.tolerance/((1&lt;&lt;r.maxZoom)*r.extent),2),o=[];if(&quot;Point&quot;===i)bt(n,o);else if(&quot;MultiPoint&quot;===i)for(var s=0;s&lt;n.length;s++)bt(n[s],o);else if(&quot;LineString&quot;===i)_t(n,o,a,!1);else if(&quot;MultiLineString&quot;===i)if(r.lineMetrics)for(s=0;s&lt;n.length;s++)return o=[],_t(n[s],o,a,!1),void t.push(vt(e.id,&quot;LineString&quot;,o,e.properties));else wt(n,o,a,!1);else if(&quot;Polygon&quot;===i)wt(n,o,a,!0);else{if(&quot;MultiPolygon&quot;!==i){if(&quot;GeometryCollection&quot;===i){for(s=0;s&lt;e.geometry.geometries.length;s++)xt(t,{id:e.id,geometry:e.geometry.geometries[s],properties:e.properties},r);return}throw new Error(&quot;Input data is not a valid GeoJSON object.&quot;)}for(s=0;s&lt;n.length;s++){var l=[];wt(n[s],l,a,!0),o.push(l)}}t.push(vt(e.id,i,o,e.properties))}}function bt(t,e){e.push(kt(t[0])),e.push(Mt(t[1])),e.push(0)}function _t(t,e,r,n){for(var i,a,o=0,s=0;s&lt;t.length;s++){var l=kt(t[s][0]),c=Mt(t[s][1]);e.push(l),e.push(c),e.push(0),s&gt;0&amp;&amp;(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=e.length-3;e[2]=1,function t(e,r,n,i){for(var a,o=i,s=e[r],l=e[r+1],c=e[n],u=e[n+1],f=r+3;f&lt;n;f+=3){var h=mt(e[f],e[f+1],s,l,c,u);h&gt;o&amp;&amp;(a=f,o=h)}o&gt;i&amp;&amp;(a-r&gt;3&amp;&amp;t(e,r,a,i),e[a+2]=o,n-a&gt;3&amp;&amp;t(e,a,n,i))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function wt(t,e,r,n){for(var i=0;i&lt;t.length;i++){var a=[];_t(t[i],a,r,n),e.push(a)}}function kt(t){return t/360+.5}function Mt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r&lt;0?0:r&gt;1?1:r}function At(t,e,r,n,i,a,o,s){if(n/=e,a&gt;=(r/=e)&amp;&amp;o&lt;=n)return t;if(a&gt;n||o&lt;r)return null;for(var l=[],c=0;c&lt;t.length;c++){var u=t[c],f=u.geometry,h=u.type,p=0===i?u.minX:u.minY,d=0===i?u.maxX:u.maxY;if(p&gt;=r&amp;&amp;d&lt;=n)l.push(u);else if(!(p&gt;n||d&lt;r)){var g=[];if(&quot;Point&quot;===h||&quot;MultiPoint&quot;===h)Tt(f,g,r,n,i);else if(&quot;LineString&quot;===h)St(f,g,r,n,i,!1,s.lineMetrics);else if(&quot;MultiLineString&quot;===h)Ct(f,g,r,n,i,!1);else if(&quot;Polygon&quot;===h)Ct(f,g,r,n,i,!0);else if(&quot;MultiPolygon&quot;===h)for(var m=0;m&lt;f.length;m++){var v=[];Ct(f[m],v,r,n,i,!0),v.length&amp;&amp;g.push(v)}if(g.length){if(s.lineMetrics&amp;&amp;&quot;LineString&quot;===h){for(m=0;m&lt;g.length;m++)l.push(vt(u.id,h,g[m],u.tags));continue}&quot;LineString&quot;!==h&amp;&amp;&quot;MultiLineString&quot;!==h||(1===g.length?(h=&quot;LineString&quot;,g=g[0]):h=&quot;MultiLineString&quot;),&quot;Point&quot;!==h&amp;&amp;&quot;MultiPoint&quot;!==h||(h=3===g.length?&quot;Point&quot;:&quot;MultiPoint&quot;),l.push(vt(u.id,h,g,u.tags))}}}return l.length?l:null}function Tt(t,e,r,n,i){for(var a=0;a&lt;t.length;a+=3){var o=t[a+i];o&gt;=r&amp;&amp;o&lt;=n&amp;&amp;(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function St(t,e,r,n,i,a,o){for(var s,l,c=Et(t),u=0===i?zt:Pt,f=t.start,h=0;h&lt;t.length-3;h+=3){var p=t[h],d=t[h+1],g=t[h+2],m=t[h+3],v=t[h+4],y=0===i?p:d,x=0===i?m:v,b=!1;o&amp;&amp;(s=Math.sqrt(Math.pow(p-m,2)+Math.pow(d-v,2))),y&lt;r?x&gt;=r&amp;&amp;(l=u(c,p,d,m,v,r),o&amp;&amp;(c.start=f+s*l)):y&gt;n?x&lt;=n&amp;&amp;(l=u(c,p,d,m,v,n),o&amp;&amp;(c.start=f+s*l)):Lt(c,p,d,g),x&lt;r&amp;&amp;y&gt;=r&amp;&amp;(l=u(c,p,d,m,v,r),b=!0),x&gt;n&amp;&amp;y&lt;=n&amp;&amp;(l=u(c,p,d,m,v,n),b=!0),!a&amp;&amp;b&amp;&amp;(o&amp;&amp;(c.end=f+s*l),e.push(c),c=Et(t)),o&amp;&amp;(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)&gt;=r&amp;&amp;y&lt;=n&amp;&amp;Lt(c,p,d,g),_=c.length-3,a&amp;&amp;_&gt;=3&amp;&amp;(c[_]!==c[0]||c[_+1]!==c[1])&amp;&amp;Lt(c,c[0],c[1],c[2]),c.length&amp;&amp;e.push(c)}function Et(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Ct(t,e,r,n,i,a){for(var o=0;o&lt;t.length;o++)St(t[o],e,r,n,i,a,!1)}function Lt(t,e,r,n){t.push(e),t.push(r),t.push(n)}function zt(t,e,r,n,i,a){var o=(a-e)/(n-e);return t.push(a),t.push(r+(i-r)*o),t.push(1),o}function Pt(t,e,r,n,i,a){var o=(a-r)/(i-r);return t.push(e+(n-e)*o),t.push(a),t.push(1),o}function Ot(t,e){for(var r=[],n=0;n&lt;t.length;n++){var i,a=t[n],o=a.type;if(&quot;Point&quot;===o||&quot;MultiPoint&quot;===o||&quot;LineString&quot;===o)i=It(a.geometry,e);else if(&quot;MultiLineString&quot;===o||&quot;Polygon&quot;===o){i=[];for(var s=0;s&lt;a.geometry.length;s++)i.push(It(a.geometry[s],e))}else if(&quot;MultiPolygon&quot;===o)for(i=[],s=0;s&lt;a.geometry.length;s++){for(var l=[],c=0;c&lt;a.geometry[s].length;c++)l.push(It(a.geometry[s][c],e));i.push(l)}r.push(vt(a.id,o,i,a.tags))}return r}function It(t,e){var r=[];r.size=t.size,void 0!==t.start&amp;&amp;(r.start=t.start,r.end=t.end);for(var n=0;n&lt;t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function Dt(t,e){if(t.transformed)return t;var r,n,i,a=1&lt;&lt;t.z,o=t.x,s=t.y;for(r=0;r&lt;t.features.length;r++){var l=t.features[r],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(n=0;n&lt;c.length;n+=2)l.geometry.push(Rt(c[n],c[n+1],e,a,o,s));else for(n=0;n&lt;c.length;n++){var f=[];for(i=0;i&lt;c[n].length;i+=2)f.push(Rt(c[n][i],c[n][i+1],e,a,o,s));l.geometry.push(f)}}return t.transformed=!0,t}function Rt(t,e,r,n,i,a){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-a))]}function Bt(t,e,r,n,i){for(var a=e===i.maxZoom?0:i.tolerance/((1&lt;&lt;e)*i.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s&lt;t.length;s++){o.numFeatures++,Ft(o,t[s],a,i);var l=t[s].minX,c=t[s].minY,u=t[s].maxX,f=t[s].maxY;l&lt;o.minX&amp;&amp;(o.minX=l),c&lt;o.minY&amp;&amp;(o.minY=c),u&gt;o.maxX&amp;&amp;(o.maxX=u),f&gt;o.maxY&amp;&amp;(o.maxY=f)}return o}function Ft(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(&quot;Point&quot;===a||&quot;MultiPoint&quot;===a)for(var s=0;s&lt;i.length;s+=3)o.push(i[s]),o.push(i[s+1]),t.numPoints++,t.numSimplified++;else if(&quot;LineString&quot;===a)Nt(o,i,t,r,!1,!1);else if(&quot;MultiLineString&quot;===a||&quot;Polygon&quot;===a)for(s=0;s&lt;i.length;s++)Nt(o,i[s],t,r,&quot;Polygon&quot;===a,0===s);else if(&quot;MultiPolygon&quot;===a)for(var l=0;l&lt;i.length;l++){var c=i[l];for(s=0;s&lt;c.length;s++)Nt(o,c[s],t,r,!0,0===s)}if(o.length){var u=e.tags||null;if(&quot;LineString&quot;===a&amp;&amp;n.lineMetrics){for(var f in u={},e.tags)u[f]=e.tags[f];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var h={geometry:o,type:&quot;Polygon&quot;===a||&quot;MultiPolygon&quot;===a?3:&quot;LineString&quot;===a||&quot;MultiLineString&quot;===a?2:1,tags:u};null!==e.id&amp;&amp;(h.id=e.id),t.features.push(h)}}function Nt(t,e,r,n,i,a){var o=n*n;if(n&gt;0&amp;&amp;e.size&lt;(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;l&lt;e.length;l+=3)(0===n||e[l+2]&gt;o)&amp;&amp;(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&amp;&amp;function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n&lt;i;a=n,n+=2)r+=(t[n]-t[a])*(t[n+1]+t[a+1]);if(r&gt;0===e)for(n=0,i=t.length;n&lt;i/2;n+=2){var o=t[n],s=t[n+1];t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=o,t[i-1-n]=s}}(s,a),t.push(s)}}function jt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&amp;&amp;console.time(&quot;preprocess data&quot;),e.maxZoom&lt;0||e.maxZoom&gt;24)throw new Error(&quot;maxZoom should be in the 0-24 range&quot;);var n=function(t,e){var r=[];if(&quot;FeatureCollection&quot;===t.type)for(var n=0;n&lt;t.features.length;n++)xt(r,t.features[n],e);else&quot;Feature&quot;===t.type?xt(r,t,e):xt(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&amp;&amp;(console.timeEnd(&quot;preprocess data&quot;),console.log(&quot;index: maxZoom: %d, maxPoints: %d&quot;,e.indexMaxZoom,e.indexMaxPoints),console.time(&quot;generate tiles&quot;),this.stats={},this.total=0),(n=function(t,e){var r=e.buffer/e.extent,n=t,i=At(t,1,-1-r,r,0,-1,2,e),a=At(t,1,1-r,2+r,0,-1,2,e);return(i||a)&amp;&amp;(n=At(t,1,-r,1+r,0,-1,2,e)||[],i&amp;&amp;(n=Ot(i,1).concat(n)),a&amp;&amp;(n=n.concat(Ot(a,-1)))),n}(n,e)).length&amp;&amp;this.splitTile(n,0,0,0),r&amp;&amp;(n.length&amp;&amp;console.log(&quot;features: %d, points: %d&quot;,this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(&quot;generate tiles&quot;),console.log(&quot;tiles generated:&quot;,this.total,JSON.stringify(this.stats)))}function Vt(t,e,r){return 32*((1&lt;&lt;t)*r+e)+t}function Ut(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);var i=new R(n.features),a=V(i);0===a.byteOffset&amp;&amp;a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:i,rawData:a.buffer})}ot.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&amp;&amp;console.time(&quot;total time&quot;);var r=&quot;prepare &quot;+t.length+&quot; points&quot;;e&amp;&amp;console.time(r),this.points=t;var n=t.map(lt);e&amp;&amp;console.timeEnd(r);for(var i=this.options.maxZoom;i&gt;=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=rt(n,dt,gt,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&amp;&amp;console.log(&quot;z%d: %d clusters in %dms&quot;,i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=rt(n,dt,gt,this.options.nodeSize,Float32Array),e&amp;&amp;console.timeEnd(&quot;total time&quot;),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(ft(t[0]),ht(t[3]),ft(t[2]),ht(t[1])),i=[],a=0;a&lt;n.length;a++){var o=r.points[n[a]];i.push(o.numPoints?ct(o):this.points[o.id])}return i},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(r.x,r.y,n),a=[],o=0;o&lt;i.length;o++){var s=this.trees[e+1].points[i[o]];s.parentId===t&amp;&amp;a.push(s.numPoints?ct(s):this.points[s.id])}return a},getLeaves:function(t,e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,r,n,0),i},getTile:function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options.extent,o=this.options.radius/a,s=(r-o)/i,l=(r+1+o)/i,c={features:[]};return this._addTileFeatures(n.range((e-o)/i,s,(e+1+o)/i,l),n.points,e,r,i,c),0===e&amp;&amp;this._addTileFeatures(n.range(1-o/i,s,1,l),n.points,i,r,i,c),e===i-1&amp;&amp;this._addTileFeatures(n.range(0,s,o/i,l),n.points,-1,r,i,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e&lt;this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,n,i,a){for(var o=this.getChildren(e,r),s=0;s&lt;o.length;s++){var l=o[s].properties;if(l.cluster?a+l.point_count&lt;=i?a+=l.point_count:a=this._appendLeaves(t,l.cluster_id,r+1,n,i,a):a&lt;i?a++:t.push(o[s]),t.length===n)break}return a},_addTileFeatures:function(t,e,r,n,i,a){for(var o=0;o&lt;t.length;o++){var s=e[t[o]];a.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-r)),Math.round(this.options.extent*(s.y*i-n))]],tags:s.numPoints?ut(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i&lt;t.length;i++){var a=t[i];if(!(a.zoom&lt;=e)){a.zoom=e;var o=this.trees[e+1],s=o.within(a.x,a.y,n),l=a.numPoints||1,c=a.x*l,u=a.y*l,f=null;this.options.reduce&amp;&amp;(f=this.options.initial(),this._accumulate(f,a));for(var h=0;h&lt;s.length;h++){var p=o.points[s[h]];if(e&lt;p.zoom){var d=p.numPoints||1;p.zoom=e,c+=p.x*d,u+=p.y*d,l+=d,p.parentId=i,this.options.reduce&amp;&amp;this._accumulate(f,p)}}1===l?r.push(a):(a.parentId=i,r.push(st(c/l,u/l,l,i,f)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}},jt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,debug:0},jt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var u=1&lt;&lt;e,f=Vt(e,r,n),h=this.tiles[f];if(!h&amp;&amp;(c&gt;1&amp;&amp;console.time(&quot;creation&quot;),h=this.tiles[f]=Bt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),c)){c&gt;1&amp;&amp;(console.log(&quot;tile z%d-%d-%d (features: %d, points: %d, simplified: %d)&quot;,e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd(&quot;creation&quot;));var p=&quot;z&quot;+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1&lt;&lt;i-e;if(r!==Math.floor(a/d)||n!==Math.floor(o/d))continue}else if(e===l.indexMaxZoom||h.numPoints&lt;=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){c&gt;1&amp;&amp;console.time(&quot;clipping&quot;);var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,M=1+_;g=m=v=y=null,x=At(t,u,r-_,r+k,0,h.minX,h.maxX,l),b=At(t,u,r+w,r+M,0,h.minX,h.maxX,l),t=null,x&amp;&amp;(g=At(x,u,n-_,n+k,1,h.minY,h.maxY,l),m=At(x,u,n+w,n+M,1,h.minY,h.maxY,l),x=null),b&amp;&amp;(v=At(b,u,n-_,n+k,1,h.minY,h.maxY,l),y=At(b,u,n+w,n+M,1,h.minY,h.maxY,l),b=null),c&gt;1&amp;&amp;console.timeEnd(&quot;clipping&quot;),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},jt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t&lt;0||t&gt;24)return null;var o=1&lt;&lt;t,s=Vt(t,e=(e%o+o)%o,r);if(this.tiles[s])return Dt(this.tiles[s],i);a&gt;1&amp;&amp;console.log(&quot;drilling down to z%d-%d-%d&quot;,t,e,r);for(var l,c=t,u=e,f=r;!l&amp;&amp;c&gt;0;)c--,u=Math.floor(u/2),f=Math.floor(f/2),l=this.tiles[Vt(c,u,f)];return l&amp;&amp;l.source?(a&gt;1&amp;&amp;console.log(&quot;found parent tile z%d-%d-%d&quot;,c,u,f),a&gt;1&amp;&amp;console.time(&quot;drilling down&quot;),this.splitTile(l.source,c,u,f,t,e,r),a&gt;1&amp;&amp;console.timeEnd(&quot;drilling down&quot;),this.tiles[s]?Dt(this.tiles[s],i):null):null};var qt=function(e){function r(t,r,n){e.call(this,t,r,Ut),n&amp;&amp;(this.loadGeoJSON=n)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&amp;&amp;this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&amp;&amp;&quot;Idle&quot;!==this._state?this._state=&quot;NeedsLoadData&quot;:(this._state=&quot;Coalescing&quot;,this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&amp;&amp;this._pendingLoadDataParams){var e=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams,this.loadGeoJSON(r,function(n,i){if(n||!i)return e(n);if(&quot;object&quot;!=typeof i)return e(new Error(&quot;Input data is not a valid GeoJSON object.&quot;));!function t(e,r){switch(e&amp;&amp;e.type||null){case&quot;FeatureCollection&quot;:return e.features=e.features.map(z(t,r)),e;case&quot;Feature&quot;:return e.geometry=t(e.geometry,r),e;case&quot;Polygon&quot;:case&quot;MultiPolygon&quot;:return function(t,e){return&quot;Polygon&quot;===t.type?t.coordinates=P(t.coordinates,e):&quot;MultiPolygon&quot;===t.type&amp;&amp;(t.coordinates=t.coordinates.map(z(P,e))),t}(e,r);default:return e}}(i,!0);try{t._geoJSONIndex=r.cluster?function(t){return new ot(t)}(r.superclusterOptions).load(i.features):new jt(i,r.geojsonVtOptions)}catch(n){return e(n)}t.loaded={};var a={};if(r.request&amp;&amp;r.request.collectResourceTiming){var o=w(r.request.url);o&amp;&amp;(a.resourceTiming={},a.resourceTiming[r.source]=JSON.parse(JSON.stringify(o)))}e(null,a)})}},r.prototype.coalesce=function(){&quot;Coalescing&quot;===this._state?this._state=&quot;Idle&quot;:&quot;NeedsLoadData&quot;===this._state&amp;&amp;(this._state=&quot;Coalescing&quot;,this._loadData())},r.prototype.reloadTile=function(t,r){var n=this.loaded,i=t.uid;return n&amp;&amp;n[i]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if(&quot;string&quot;!=typeof e.data)return r(new Error(&quot;Input data is not a valid GeoJSON object.&quot;));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error(&quot;Input data is not a valid GeoJSON object.&quot;))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&amp;&amp;this._pendingCallback(null,{abandoned:!0}),e()},r}(M),Ht=function(e){var r=this;this.self=e,this.actor=new t.default$7(e,this),this.layerIndexes={},this.workerSourceTypes={vector:M,geojson:qt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name &quot;'+t+'&quot; already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error(&quot;RTL text plugin already registered.&quot;);t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText}};return Ht.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},Ht.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},Ht.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},Ht.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},Ht.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},Ht.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},Ht.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},Ht.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Ht.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&amp;&amp;this.workerSources[t][e.type]&amp;&amp;this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}},Ht.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},Ht.prototype.loadRTLTextPlugin=function(e,r,n){try{t.plugin.isLoaded()||(this.self.importScripts(r),n(t.plugin.isLoaded()?null:new Error(&quot;RTL Text Plugin failed to import scripts from &quot;+r)))}catch(t){n(t.toString())}},Ht.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},Ht.prototype.getWorkerSource=function(t,e,r){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var i={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e][r]},Ht.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new A),this.demWorkerSources[t][e]},&quot;undefined&quot;!=typeof WorkerGlobalScope&amp;&amp;&quot;undefined&quot;!=typeof self&amp;&amp;self instanceof WorkerGlobalScope&amp;&amp;new Ht(self),Ht}),i(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!!(&quot;undefined&quot;!=typeof window&amp;&amp;&quot;undefined&quot;!=typeof document&amp;&amp;Array.prototype&amp;&amp;Array.prototype.every&amp;&amp;Array.prototype.filter&amp;&amp;Array.prototype.forEach&amp;&amp;Array.prototype.indexOf&amp;&amp;Array.prototype.lastIndexOf&amp;&amp;Array.prototype.map&amp;&amp;Array.prototype.some&amp;&amp;Array.prototype.reduce&amp;&amp;Array.prototype.reduceRight&amp;&amp;Array.isArray&amp;&amp;Function.prototype&amp;&amp;Function.prototype.bind&amp;&amp;Object.keys&amp;&amp;Object.create&amp;&amp;Object.getPrototypeOf&amp;&amp;Object.getOwnPropertyNames&amp;&amp;Object.isSealed&amp;&amp;Object.isFrozen&amp;&amp;Object.isExtensible&amp;&amp;Object.getOwnPropertyDescriptor&amp;&amp;Object.defineProperty&amp;&amp;Object.defineProperties&amp;&amp;Object.seal&amp;&amp;Object.freeze&amp;&amp;Object.preventExtensions&amp;&amp;&quot;JSON&quot;in window&amp;&amp;&quot;parse&quot;in JSON&amp;&amp;&quot;stringify&quot;in JSON&amp;&amp;function(){if(!(&quot;Worker&quot;in window&amp;&amp;&quot;Blob&quot;in window&amp;&amp;&quot;URL&quot;in window))return!1;var t,e,r=new Blob([&quot;&quot;],{type:&quot;text/javascript&quot;}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&amp;&amp;e.terminate(),URL.revokeObjectURL(n),t}()&amp;&amp;&quot;Uint8ClampedArray&quot;in window&amp;&amp;function(t){return void 0===r[t]&amp;&amp;(r[t]=function(t){var r=document.createElement(&quot;canvas&quot;),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext(&quot;webgl&quot;,n)||r.probablySupportsContext(&quot;experimental-webgl&quot;,n):r.supportsContext?r.supportsContext(&quot;webgl&quot;,n)||r.supportsContext(&quot;experimental-webgl&quot;,n):r.getContext(&quot;webgl&quot;,n)||r.getContext(&quot;experimental-webgl&quot;,n)}(t)),r[t]}(t&amp;&amp;t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&amp;&amp;(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r=t.default.performance&amp;&amp;t.default.performance.now?t.default.performance.now.bind(t.default.performance):Date.now.bind(Date),n=t.default.requestAnimationFrame||t.default.mozRequestAnimationFrame||t.default.webkitRequestAnimationFrame||t.default.msRequestAnimationFrame,i=t.default.cancelAnimationFrame||t.default.mozCancelAnimationFrame||t.default.webkitCancelAnimationFrame||t.default.msCancelAnimationFrame,a={now:r,frame:function(t){return n(t)},cancelFrame:function(t){return i(t)},getImageData:function(e){var r=t.default.document.createElement(&quot;canvas&quot;),n=r.getContext(&quot;2d&quot;);if(!n)throw new Error(&quot;failed to create canvas 2d context&quot;);return r.width=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(0,0,e.width,e.height)},hardwareConcurrency:t.default.navigator.hardwareConcurrency||4,get devicePixelRatio(){return t.default.devicePixelRatio},supportsWebp:!1};if(t.default.document){var o=t.default.document.createElement(&quot;img&quot;);o.onload=function(){a.supportsWebp=!0},o.src=&quot;data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=&quot;}var s={create:function(e,r,n){var i=t.default.document.createElement(e);return r&amp;&amp;(i.className=r),n&amp;&amp;n.appendChild(i),i},createNS:function(e,r){return t.default.document.createElementNS(e,r)}},l=t.default.document?t.default.document.documentElement.style:null;function c(t){if(!l)return null;for(var e=0;e&lt;t.length;e++)if(t[e]in l)return t[e];return t[0]}var u,f=c([&quot;userSelect&quot;,&quot;MozUserSelect&quot;,&quot;WebkitUserSelect&quot;,&quot;msUserSelect&quot;]);s.disableDrag=function(){l&amp;&amp;f&amp;&amp;(u=l[f],l[f]=&quot;none&quot;)},s.enableDrag=function(){l&amp;&amp;f&amp;&amp;(l[f]=u)};var h=c([&quot;transform&quot;,&quot;WebkitTransform&quot;]);s.setTransform=function(t,e){t.style[h]=e};var p=!1;try{var d=Object.defineProperty({},&quot;passive&quot;,{get:function(){p=!0}});t.default.addEventListener(&quot;test&quot;,d,d),t.default.removeEventListener(&quot;test&quot;,d,d)}catch(t){p=!1}s.addEventListener=function(t,e,r,n){void 0===n&amp;&amp;(n={}),&quot;passive&quot;in n&amp;&amp;p?t.addEventListener(e,r,n):t.addEventListener(e,r,n.capture)},s.removeEventListener=function(t,e,r,n){void 0===n&amp;&amp;(n={}),&quot;passive&quot;in n&amp;&amp;p?t.removeEventListener(e,r,n):t.removeEventListener(e,r,n.capture)};var g=function(e){e.preventDefault(),e.stopPropagation(),t.default.removeEventListener(&quot;click&quot;,g,!0)};s.suppressClick=function(){t.default.addEventListener(&quot;click&quot;,g,!0),t.default.setTimeout(function(){t.default.removeEventListener(&quot;click&quot;,g,!0)},0)},s.mousePos=function(e,r){var n=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t.default$1(r.clientX-n.left-e.clientLeft,r.clientY-n.top-e.clientTop)},s.touchPos=function(e,r){for(var n=e.getBoundingClientRect(),i=[],a=&quot;touchend&quot;===r.type?r.changedTouches:r.touches,o=0;o&lt;a.length;o++)i.push(new t.default$1(a[o].clientX-n.left-e.clientLeft,a[o].clientY-n.top-e.clientTop));return i},s.mouseButton=function(e){return void 0!==t.default.InstallTrigger&amp;&amp;2===e.button&amp;&amp;e.ctrlKey&amp;&amp;t.default.navigator.platform.toUpperCase().indexOf(&quot;MAC&quot;)&gt;=0?0:e.button},s.remove=function(t){t.parentNode&amp;&amp;t.parentNode.removeChild(t)};var m={API_URL:&quot;https://api.mapbox.com&quot;,REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},v=&quot;See https://www.mapbox.com/api-documentation/#access-tokens&quot;;function y(t,e){var r=A(m.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,&quot;/&quot;!==r.path&amp;&amp;(t.path=&quot;&quot;+r.path+t.path),!m.REQUIRE_ACCESS_TOKEN)return T(t);if(!(e=e||m.ACCESS_TOKEN))throw new Error(&quot;An API access token is required to use Mapbox GL. &quot;+v);if(&quot;s&quot;===e[0])throw new Error(&quot;Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). &quot;+v);return t.params.push(&quot;access_token=&quot;+e),T(t)}function x(t){return 0===t.indexOf(&quot;mapbox:&quot;)}var b=function(t,e){if(!x(t))return t;var r=A(t);return r.path=&quot;/v4/&quot;+r.authority+&quot;.json&quot;,r.params.push(&quot;secure&quot;),y(r,e)},_=function(t,e,r,n){var i=A(t);return x(t)?(i.path=&quot;/styles/v1&quot;+i.path+&quot;/sprite&quot;+e+r,y(i,n)):(i.path+=&quot;&quot;+e+r,T(i))},w=/(\.(png|jpg)\d*)(?=$)/,k=function(t,e,r){if(!e||!x(e))return t;var n=A(t),i=a.devicePixelRatio&gt;=2||512===r?&quot;@2x&quot;:&quot;&quot;,o=a.supportsWebp?&quot;.webp&quot;:&quot;$1&quot;;return n.path=n.path.replace(w,&quot;&quot;+i+o),function(t){for(var e=0;e&lt;t.length;e++)0===t[e].indexOf(&quot;access_token=tk.&quot;)&amp;&amp;(t[e]=&quot;access_token=&quot;+(m.ACCESS_TOKEN||&quot;&quot;))}(n.params),T(n)},M=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/;function A(t){var e=t.match(M);if(!e)throw new Error(&quot;Unable to parse URL object&quot;);return{protocol:e[1],authority:e[2],path:e[3]||&quot;/&quot;,params:e[4]?e[4].split(&quot;&amp;&quot;):[]}}function T(t){var e=t.params.length?&quot;?&quot;+t.params.join(&quot;&amp;&quot;):&quot;&quot;;return t.protocol+&quot;://&quot;+t.authority+t.path+e}var S=t.default.HTMLImageElement,E=t.default.HTMLCanvasElement,C=t.default.HTMLVideoElement,L=t.default.ImageData,z=function(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)};z.prototype.update=function(t,e){var r=t.width,n=t.height,i=!this.size||this.size[0]!==r||this.size[1]!==n,a=this.context,o=a.gl;this.useMipmap=Boolean(e&amp;&amp;e.useMipmap),o.bindTexture(o.TEXTURE_2D,this.texture),i?(this.size=[r,n],a.pixelStoreUnpack.set(1),this.format!==o.RGBA||e&amp;&amp;!1===e.premultiply||a.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof S||t instanceof E||t instanceof C||t instanceof L?o.texImage2D(o.TEXTURE_2D,0,this.format,this.format,o.UNSIGNED_BYTE,t):o.texImage2D(o.TEXTURE_2D,0,this.format,r,n,0,this.format,o.UNSIGNED_BYTE,t.data)):t instanceof S||t instanceof E||t instanceof C||t instanceof L?o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t):o.texSubImage2D(o.TEXTURE_2D,0,0,0,r,n,o.RGBA,o.UNSIGNED_BYTE,t.data),this.useMipmap&amp;&amp;this.isSizePowerOfTwo()&amp;&amp;o.generateMipmap(o.TEXTURE_2D)},z.prototype.bind=function(t,e,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),t!==this.filter&amp;&amp;(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&amp;&amp;(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},z.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&amp;&amp;Math.log(this.size[0])/Math.LN2%1==0},z.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var P=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new t.default$2(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new t.RGBAImage({width:64,height:64}),this.dirty=!0};P.prototype.isLoaded=function(){return this.loaded},P.prototype.setLoaded=function(t){if(this.loaded!==t&amp;&amp;(this.loaded=t,t)){for(var e=0,r=this.requestors;e&lt;r.length;e+=1){var n=r[e],i=n.ids,a=n.callback;this._notify(i,a)}this.requestors=[]}},P.prototype.getImage=function(t){return this.images[t]},P.prototype.addImage=function(t,e){this.images[t]=e},P.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&amp;&amp;(this.shelfPack.unref(e.bin),delete this.patterns[t])},P.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var n=0,i=t;n&lt;i.length;n+=1){var a=i[n];this.images[a]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},P.prototype._notify=function(t,e){for(var r={},n=0,i=t;n&lt;i.length;n+=1){var a=i[n],o=this.images[a];o&amp;&amp;(r[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf})}e(null,r)},P.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},P.prototype.getPattern=function(e){var r=this.patterns[e];if(r)return r.position;var n=this.getImage(e);if(!n)return null;var i=n.data.width+2,a=n.data.height+2,o=this.shelfPack.packOne(i,a);if(!o)return null;this.atlasImage.resize(this.getPixelSize());var s=n.data,l=this.atlasImage,c=o.x+1,u=o.y+1,f=s.width,h=s.height;t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u},{width:f,height:h}),t.RGBAImage.copy(s,l,{x:0,y:h-1},{x:c,y:u-1},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u+h},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:f-1,y:0},{x:c-1,y:u},{width:1,height:h}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c+f,y:u},{width:1,height:h}),this.dirty=!0;var p=new t.ImagePosition(o,n);return this.patterns[e]={bin:o,position:p},p},P.prototype.bind=function(t){var e=t.gl;this.atlasTexture?this.dirty&amp;&amp;(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new z(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)};var O=D,I=1e20;function D(t,e,r,n,i,a){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||&quot;sans-serif&quot;,this.fontWeight=a||&quot;normal&quot;,this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement(&quot;canvas&quot;),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext(&quot;2d&quot;),this.ctx.font=this.fontWeight+&quot; &quot;+this.fontSize+&quot;px &quot;+this.fontFamily,this.ctx.textBaseline=&quot;middle&quot;,this.ctx.fillStyle=&quot;black&quot;,this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf(&quot;Gecko/&quot;)&gt;=0?1.2:1))}function R(t,e,r,n,i,a,o){for(var s=0;s&lt;e;s++){for(var l=0;l&lt;r;l++)n[l]=t[l*e+s];for(B(n,i,a,o,r),l=0;l&lt;r;l++)t[l*e+s]=i[l]}for(l=0;l&lt;r;l++){for(s=0;s&lt;e;s++)n[s]=t[l*e+s];for(B(n,i,a,o,e),s=0;s&lt;e;s++)t[l*e+s]=Math.sqrt(i[s])}}function B(t,e,r,n,i){r[0]=0,n[0]=-I,n[1]=+I;for(var a=1,o=0;a&lt;i;a++){for(var s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s&lt;=n[o];)o--,s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=+I}for(a=0,o=0;a&lt;i;a++){for(;n[o+1]&lt;a;)o++;e[a]=(a-r[o])*(a-r[o])+t[r[o]]}}D.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n&lt;this.size*this.size;n++){var i=e.data[4*n+3]/255;this.gridOuter[n]=1===i?0:0===i?I:Math.pow(Math.max(0,.5-i),2),this.gridInner[n]=1===i?I:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(R(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),R(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n&lt;this.size*this.size;n++){var a=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(a/this.radius+this.cutoff))))}return r};var F=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};F.prototype.setURL=function(t){this.url=t},F.prototype.getGlyphs=function(e,r){var n=this,i=[];for(var a in e)for(var o=0,s=e[a];o&lt;s.length;o+=1){var l=s[o];i.push({stack:a,id:l})}t.asyncAll(i,function(t,e){var r=t.stack,i=t.id,a=n.entries[r];a||(a=n.entries[r]={glyphs:{},requests:{}});var o=a.glyphs[i];if(void 0===o)if(o=n._tinySDF(a,r,i))e(null,{stack:r,id:i,glyph:o});else{var s=Math.floor(i/256);if(256*s&gt;65535)e(new Error(&quot;glyphs &gt; 65535 not supported&quot;));else{var l=a.requests[s];l||(l=a.requests[s]=[],F.loadGlyphRange(r,s,n.url,n.requestTransform,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var n=0,i=l;n&lt;i.length;n+=1)(0,i[n])(t,e);delete a.requests[s]})),l.push(function(t,n){t?e(t):n&amp;&amp;e(null,{stack:r,id:i,glyph:n[i]||null})})}}else e(null,{stack:r,id:i,glyph:o})},function(t,e){if(t)r(t);else if(e){for(var n={},i=0,a=e;i&lt;a.length;i+=1){var o=a[i],s=o.stack,l=o.id,c=o.glyph;(n[s]||(n[s]={}))[l]=c&amp;&amp;{id:c.id,bitmap:c.bitmap.clone(),metrics:c.metrics}}r(null,n)}})},F.prototype._tinySDF=function(e,r,n){var i=this.localIdeographFontFamily;if(i&amp;&amp;(t.default$4[&quot;CJK Unified Ideographs&quot;](n)||t.default$4[&quot;Hangul Syllables&quot;](n))){var a=e.tinySDF;if(!a){var o=&quot;400&quot;;/bold/i.test(r)?o=&quot;900&quot;:/medium/i.test(r)?o=&quot;500&quot;:/light/i.test(r)&amp;&amp;(o=&quot;200&quot;),a=e.tinySDF=new F.TinySDF(24,3,8,.25,i,o)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},a.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},F.loadGlyphRange=function(e,r,n,i,a){var o=256*r,s=o+255,l=i(function(t,e){if(!x(t))return t;var r=A(t);return r.path=&quot;/fonts/v1&quot;+r.path,y(r,e)}(n).replace(&quot;{fontstack}&quot;,e).replace(&quot;{range}&quot;,o+&quot;-&quot;+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,r){if(e)a(e);else if(r){for(var n={},i=0,o=t.default$3(r.data);i&lt;o.length;i+=1){var s=o[i];n[s.id]=s}a(null,n)}})},F.TinySDF=O;var N=function(){this.specification=t.default$5.light.position};N.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},N.prototype.interpolate=function(e,r,n){return{x:t.number(e.x,r.x,n),y:t.number(e.y,r.y,n),z:t.number(e.z,r.z,n)}};var j=new t.Properties({anchor:new t.DataConstantProperty(t.default$5.light.anchor),position:new N,color:new t.DataConstantProperty(t.default$5.light.color),intensity:new t.DataConstantProperty(t.default$5.light.intensity)}),V=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(j),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var r in e){var n=e[r];t.endsWith(r,&quot;-transition&quot;)?this._transitionable.setTransition(r.slice(0,-&quot;-transition&quot;.length),n):this._transitionable.setValue(r,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.default$5})))},r}(t.Evented),U=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};U.prototype.getDash=function(t,e){var r=t.join(&quot;,&quot;)+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},U.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i&gt;this.height)return t.warnOnce(&quot;LineAtlas out of space&quot;),null;for(var a=0,o=0;o&lt;e.length;o++)a+=e[o];for(var s=this.width/a,l=s/2,c=e.length%2==1,u=-n;u&lt;=n;u++)for(var f=this.nextRow+n+u,h=this.width*f,p=c?-e[e.length-1]:0,d=e[0],g=1,m=0;m&lt;this.width;m++){for(;d&lt;m/s;)p=d,d+=e[g],c&amp;&amp;g===e.length-1&amp;&amp;(d+=e[0]),g++;var v=Math.abs(m-p*s),y=Math.abs(m-d*s),x=Math.min(v,y),b=g%2==1,_=void 0;if(r){var w=n?u/n*(l+1):0;if(b){var k=l-Math.abs(w);_=Math.sqrt(x*x+k*k)}else _=l-Math.sqrt(x*x+w*w)}else _=(b?1:-1)*x;this.data[3+4*(h+m)]=Math.max(0,Math.min(255,_+128))}var M={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=i,this.dirty=!0,M},U.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&amp;&amp;(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var q=function e(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),a=0;a&lt;i.length;a++){var o=i[a],s=new e.Actor(o,n,this.id);s.name=&quot;Worker &quot;+a,this.actors.push(s)}};function H(e,r,n){var i=function(e,r){if(e)return n(e);if(r){var i=t.pick(r,[&quot;tiles&quot;,&quot;minzoom&quot;,&quot;maxzoom&quot;,&quot;attribution&quot;,&quot;mapbox_logo&quot;,&quot;bounds&quot;]);r.vector_layers&amp;&amp;(i.vectorLayers=r.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),n(null,i)}};e.url?t.getJSON(r(b(e.url),t.ResourceType.Source),i):a.frame(function(){return i(null,e)})}q.prototype.broadcast=function(e,r,n){n=n||function(){},t.asyncAll(this.actors,function(t,n){t.send(e,r,n)},n)},q.prototype.send=function(t,e,r,n){return(&quot;number&quot;!=typeof n||isNaN(n))&amp;&amp;(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r),n},q.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},q.Actor=t.default$7;var G=function(t,e){if(isNaN(t)||isNaN(e))throw new Error(&quot;Invalid LngLat object: (&quot;+t+&quot;, &quot;+e+&quot;)&quot;);if(this.lng=+t,this.lat=+e,this.lat&gt;90||this.lat&lt;-90)throw new Error(&quot;Invalid LngLat latitude value: must be between -90 and 90&quot;)};G.prototype.wrap=function(){return new G(t.wrap(this.lng,-180,180),this.lat)},G.prototype.toArray=function(){return[this.lng,this.lat]},G.prototype.toString=function(){return&quot;LngLat(&quot;+this.lng+&quot;, &quot;+this.lat+&quot;)&quot;},G.prototype.toBounds=function(t){var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new W(new G(this.lng-r,this.lat-e),new G(this.lng+r,this.lat+e))},G.convert=function(t){if(t instanceof G)return t;if(Array.isArray(t)&amp;&amp;(2===t.length||3===t.length))return new G(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;null!==t)return new G(Number(t.lng),Number(t.lat));throw new Error(&quot;`LngLatLike` argument must be specified as a LngLat instance, an object {lng: &lt;lng&gt;, lat: &lt;lat&gt;}, or an array of [&lt;lng&gt;, &lt;lat&gt;]&quot;)};var W=function(t,e){t&amp;&amp;(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};W.prototype.setNorthEast=function(t){return this._ne=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.setSouthWest=function(t){return this._sw=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof G)e=t,r=t;else{if(!(t instanceof W))return Array.isArray(t)?t.every(Array.isArray)?this.extend(W.convert(t)):this.extend(G.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new G(e.lng,e.lat),this._ne=new G(r.lng,r.lat)),this},W.prototype.getCenter=function(){return new G((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},W.prototype.getSouthWest=function(){return this._sw},W.prototype.getNorthEast=function(){return this._ne},W.prototype.getNorthWest=function(){return new G(this.getWest(),this.getNorth())},W.prototype.getSouthEast=function(){return new G(this.getEast(),this.getSouth())},W.prototype.getWest=function(){return this._sw.lng},W.prototype.getSouth=function(){return this._sw.lat},W.prototype.getEast=function(){return this._ne.lng},W.prototype.getNorth=function(){return this._ne.lat},W.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},W.prototype.toString=function(){return&quot;LngLatBounds(&quot;+this._sw.toString()+&quot;, &quot;+this._ne.toString()+&quot;)&quot;},W.prototype.isEmpty=function(){return!(this._sw&amp;&amp;this._ne)},W.convert=function(t){return!t||t instanceof W?t:new W(t)};var Y=function(t,e,r){this.bounds=W.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};Y.prototype.validateBounds=function(t){return Array.isArray(t)&amp;&amp;4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},Y.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),r=Math.floor(this.latY(this.bounds.getNorth(),t.z)),n=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),i=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x&gt;=e&amp;&amp;t.x&lt;n&amp;&amp;t.y&gt;=r&amp;&amp;t.y&lt;i},Y.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},Y.prototype.latY=function(e,r){var n=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),i=Math.pow(2,r)/(2*Math.PI);return Math.pow(2,r-1)+.5*Math.log((1+n)/(1-n))*-i};var X=function(e){function r(r,n,i,a){if(e.call(this),this.id=r,this.dispatcher=i,this.type=&quot;vector&quot;,this.minzoom=0,this.maxzoom=22,this.scheme=&quot;xyz&quot;,this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(n,[&quot;url&quot;,&quot;scheme&quot;,&quot;tileSize&quot;])),this._options=t.extend({type:&quot;vector&quot;},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error(&quot;vector tile sources must have a tileSize of 512&quot;);this.setEventedParent(a)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(t.extend(e,n),n.bounds&amp;&amp;(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;})),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;})))})},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url),i={request:this.map._transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,n){return e.aborted?r(null):t?r(t):(n&amp;&amp;n.resourceTiming&amp;&amp;(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&amp;&amp;e.setExpiryData(n),e.loadVectorData(n,this.map.painter),r(null),void(e.reloadCallback&amp;&amp;(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||&quot;expired&quot;===e.state?e.workerID=this.dispatcher.send(&quot;loadTile&quot;,i,o.bind(this)):&quot;loading&quot;===e.state?e.reloadCallback=r:this.dispatcher.send(&quot;reloadTile&quot;,i,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send(&quot;abortTile&quot;,{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(&quot;removeTile&quot;,{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),Z=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.setEventedParent(a),this.type=&quot;raster&quot;,this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=&quot;xyz&quot;,this.tileSize=512,this._loaded=!1,this._options=t.extend({},n),t.extend(this,t.pick(n,[&quot;url&quot;,&quot;scheme&quot;,&quot;tileSize&quot;]))}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(t.extend(e,n),n.bounds&amp;&amp;(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;})),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;})))})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var n=this,i=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(t,i){if(delete e.request,e.aborted)e.state=&quot;unloaded&quot;,r(null);else if(t)e.state=&quot;errored&quot;,r(t);else if(i){n.map._refreshExpiredTiles&amp;&amp;e.setExpiryData(i),delete i.cacheControl,delete i.expires;var a=n.map.painter.context,o=a.gl;e.texture=n.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new z(a,i,o.RGBA,{useMipmap:!0}),e.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&amp;&amp;o.texParameterf(o.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state=&quot;loaded&quot;,r(null)}})},r.prototype.abortTile=function(t,e){t.request&amp;&amp;(t.request.abort(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&amp;&amp;this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),$=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),this.type=&quot;raster-dem&quot;,this.maxzoom=22,this._options=t.extend({},n),this.encoding=n.encoding||&quot;mapbox&quot;}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:&quot;raster-dem&quot;,url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(t,n){if(delete e.request,e.aborted)e.state=&quot;unloaded&quot;,r(null);else if(t)e.state=&quot;errored&quot;,r(t);else if(n){this.map._refreshExpiredTiles&amp;&amp;e.setExpiryData(n),delete n.cacheControl,delete n.expires;var i=a.getImageData(n),o={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:i,encoding:this.encoding};e.workerID&amp;&amp;&quot;expired&quot;!==e.state||(e.workerID=this.dispatcher.send(&quot;loadDEMTile&quot;,o,function(t,n){t&amp;&amp;(e.state=&quot;errored&quot;,r(t)),n&amp;&amp;(e.dem=n,e.needsHillshadePrepare=!0,e.state=&quot;loaded&quot;,r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y&gt;0&amp;&amp;(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1&lt;n&amp;&amp;(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&amp;&amp;this.map.painter.saveTileTexture(t.demTexture),t.fbo&amp;&amp;(t.fbo.destroy(),delete t.fbo),t.dem&amp;&amp;delete t.dem,delete t.neighboringTiles,t.state=&quot;unloaded&quot;,this.dispatcher.send(&quot;removeDEMTile&quot;,{uid:t.uid,source:this.id},void 0,t.workerID)},r}(Z),J=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.type=&quot;geojson&quot;,this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=i,this.setEventedParent(a),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&amp;&amp;(this.maxzoom=n.maxzoom),n.type&amp;&amp;(this.type=n.type);var o=t.default$8/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.default$8,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.default$8,radius:(n.clusterRadius||50)*o,log:!1}},n.workerOptions)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var n={dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;};e._collectResourceTiming&amp;&amp;e._resourceTiming&amp;&amp;e._resourceTiming.length&gt;0&amp;&amp;(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event(&quot;data&quot;,n))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),this._updateWorkerData(function(e){if(e)return r.fire(new t.ErrorEvent(e));var n={dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;};r._collectResourceTiming&amp;&amp;r._resourceTiming&amp;&amp;r._resourceTiming.length&gt;0&amp;&amp;(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event(&quot;data&quot;,n))}),this},r.prototype._updateWorkerData=function(e){var r,n,i=this,a=t.extend({},this.workerOptions),o=this._data;&quot;string&quot;==typeof o?(a.request=this.map._transformRequest((r=o,(n=t.default.document.createElement(&quot;a&quot;)).href=r,n.href),t.ResourceType.Source),a.request.collectResourceTiming=this._collectResourceTiming):a.data=JSON.stringify(o),this.workerID=this.dispatcher.send(this.type+&quot;.&quot;+a.source+&quot;.loadData&quot;,a,function(t,r){i._removed||r&amp;&amp;r.abandoned||(i._loaded=!0,r&amp;&amp;r.resourceTiming&amp;&amp;r.resourceTiming[i.id]&amp;&amp;(i._resourceTiming=r.resourceTiming[i.id].slice(0)),i.dispatcher.send(i.type+&quot;.&quot;+a.source+&quot;.coalesce&quot;,null,null,i.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(t,e){var r=this,n=void 0===t.workerID?&quot;loadTile&quot;:&quot;reloadTile&quot;,i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(n,i,function(i,a){return t.unloadVectorData(),t.aborted?e(null):i?e(i):(t.loadVectorData(a,r.map.painter,&quot;reloadTile&quot;===n),e(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(&quot;removeTile&quot;,{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send(&quot;removeSource&quot;,{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),K=t.createLayout([{name:&quot;a_pos&quot;,type:&quot;Int16&quot;,components:2},{name:&quot;a_texture_pos&quot;,type:&quot;Int16&quot;,components:2}]),Q=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Q.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&amp;&amp;c&lt;n.length;c++)this.boundPaintVertexBuffers[c]!==n[c]&amp;&amp;(l=!0);var u=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==a||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||u?this.freshBind(e,r,n,i,a,o,s):(t.bindVertexArrayOES.set(this.vao),o&amp;&amp;o.bind(),i&amp;&amp;i.dynamicDraw&amp;&amp;i.bind(),s&amp;&amp;s.bind())},Q.prototype.freshBind=function(t,e,r,n,i,a,o){var s,l=t.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&amp;&amp;this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=o;else{s=c.currentNumAttributes||0;for(var f=l;f&lt;s;f++)u.disableVertexAttribArray(f)}e.enableAttributes(u,t);for(var h=0,p=r;h&lt;p.length;h+=1)p[h].enableAttributes(u,t);a&amp;&amp;a.enableAttributes(u,t),o&amp;&amp;o.enableAttributes(u,t),e.bind(),e.setVertexAttribPointers(u,t,i);for(var d=0,g=r;d&lt;g.length;d+=1){var m=g[d];m.bind(),m.setVertexAttribPointers(u,t,i)}a&amp;&amp;(a.bind(),a.setVertexAttribPointers(u,t,i)),n&amp;&amp;n.bind(),o&amp;&amp;(o.bind(),o.setVertexAttribPointers(u,t,i)),c.currentNumAttributes=l},Q.prototype.destroy=function(){this.vao&amp;&amp;(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var tt=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type=&quot;image&quot;,this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(e.image=a.getImageData(n),e._finishLoading())})},r.prototype._finishLoading=function(){this.map&amp;&amp;(this.setCoordinates(this.coordinates),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){this.coordinates=e;var r=this.map,n=e.map(function(t){return r.transform.locationCoordinate(G.convert(t)).zoomTo(0)}),i=this.centerCoord=t.getCoordinatesCenter(n);i.column=Math.floor(i.column),i.row=Math.floor(i.row),this.tileID=new t.CanonicalTileID(i.zoom,i.column,i.row),this.minzoom=this.maxzoom=i.zoom;var a=n.map(function(e){var r=e.zoomTo(i.zoom);return new t.default$1(Math.round((r.column-i.column)*t.default$8),Math.round((r.row-i.row)*t.default$8))});return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,t.default$8,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,t.default$8),this._boundsArray.emplaceBack(a[2].x,a[2].y,t.default$8,t.default$8),this.boundsBuffer&amp;&amp;(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&amp;&amp;this.image){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture||(this.texture=new z(t,this.image,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];&quot;loaded&quot;!==n.state&amp;&amp;(n.state=&quot;loaded&quot;,n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&amp;&amp;this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state=&quot;errored&quot;,e(null))},r.prototype.serialize=function(){return{type:&quot;image&quot;,url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),et=function(e){function r(t,r,n,i){e.call(this,t,r,n,i),this.roundZoom=!0,this.type=&quot;video&quot;,this.options=r}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var n=0,i=r.urls;n&lt;i.length;n+=1){var a=i[n];e.urls.push(e.map._transformRequest(a,t.ResourceType.Source).url)}t.getVideo(this.urls,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(e.video=n,e.video.loop=!0,e.video.addEventListener(&quot;playing&quot;,function(){e.map._rerender()}),e.map&amp;&amp;e.video.play(),e._finishLoading())})},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&amp;&amp;(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState&lt;2)){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new z(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];&quot;loaded&quot;!==n.state&amp;&amp;(n.state=&quot;loaded&quot;,n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:&quot;video&quot;,urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&amp;&amp;!this.video.paused},r}(tt),rt=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&amp;&amp;4===n.coordinates.length&amp;&amp;!n.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return&quot;number&quot;!=typeof t})})||this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'&quot;coordinates&quot; property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'missing required property &quot;coordinates&quot;'))),n.animate&amp;&amp;&quot;boolean&quot;!=typeof n.animate&amp;&amp;this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'optional &quot;animate&quot; property must be a boolean value'))),n.canvas?&quot;string&quot;==typeof n.canvas||n.canvas instanceof t.default.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'&quot;canvas&quot; must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'missing required property &quot;canvas&quot;'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.default.HTMLCanvasElement?this.options.canvas:t.default.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error(&quot;Canvas dimensions cannot be less than or equal to zero.&quot;))):(this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&amp;&amp;this.animate&amp;&amp;this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&amp;&amp;(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&amp;&amp;(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&amp;&amp;0!==Object.keys(this.tiles).length){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?t?this.texture.update(this.canvas):this._playing&amp;&amp;(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.canvas)):(this.texture=new z(e,this.canvas,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];&quot;loaded&quot;!==i.state&amp;&amp;(i.state=&quot;loaded&quot;,i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:&quot;canvas&quot;,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t&lt;e.length;t+=1){var r=e[t];if(isNaN(r)||r&lt;=0)return!0}return!1},r}(tt),nt={vector:X,raster:Z,&quot;raster-dem&quot;:$,geojson:J,video:et,image:tt,canvas:rt},it=function(e,r,n,i){var a=new nt[r.type](e,r,n,i);if(a.id!==e)throw new Error(&quot;Expected Source id to be &quot;+e+&quot; instead of &quot;+a.id);return t.bindAll([&quot;load&quot;,&quot;abort&quot;,&quot;unload&quot;,&quot;serialize&quot;,&quot;prepare&quot;],a),a};function at(t,e,r,n,i){var a=i.maxPitchScaleFactor(),o=t.tilesIn(r,a);o.sort(ot);for(var s=[],l=0,c=o;l&lt;c.length;l+=1){var u=c[l];s.push({wrappedTileID:u.tileID.wrapped().key,queryResults:u.tile.queryRenderedFeatures(e,u.queryGeometry,u.scale,n,i,a,t.transform.calculatePosMatrix(u.tileID.toUnwrapped()))})}return function(t){for(var e={},r={},n=0,i=t;n&lt;i.length;n+=1){var a=i[n],o=a.queryResults,s=a.wrappedTileID,l=r[s]=r[s]||{};for(var c in o)for(var u=o[c],f=l[c]=l[c]||{},h=e[c]=e[c]||[],p=0,d=u;p&lt;d.length;p+=1){var g=d[p];f[g.featureIndex]||(f[g.featureIndex]=!0,h.push(g.feature))}}return e}(s)}function ot(t,e){var r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var st=function(e,r){this.tileID=e,this.uid=t.uniqueId(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.expiredRequestCount=0,this.state=&quot;loading&quot;};st.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e&lt;a.now()||this.fadeEndTime&amp;&amp;e&lt;this.fadeEndTime||(this.fadeEndTime=e)},st.prototype.wasRequested=function(){return&quot;errored&quot;===this.state||&quot;loaded&quot;===this.state||&quot;reloading&quot;===this.state},st.prototype.loadVectorData=function(e,r,n){if(this.hasData()&amp;&amp;this.unloadVectorData(),this.state=&quot;loaded&quot;,e){if(e.featureIndex&amp;&amp;(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&amp;&amp;(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var n=0,i=t;n&lt;i.length;n+=1){var a=i[n],o=a.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==o.length){a.layers=o;for(var s=0,l=o;s&lt;l.length;s+=1)r[l[s].id]=a}}return r}(e.buckets,r.style),n)for(var i in this.buckets){var a=this.buckets[i];a instanceof t.default$14&amp;&amp;(a.justReloaded=!0)}for(var o in this.queryPadding=0,this.buckets){var s=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(s.layerIds[0]).queryRadius(s))}e.iconAtlasImage&amp;&amp;(this.iconAtlasImage=e.iconAtlasImage),e.glyphAtlasImage&amp;&amp;(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.CollisionBoxArray},st.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&amp;&amp;this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&amp;&amp;this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=&quot;unloaded&quot;},st.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state=&quot;unloaded&quot;},st.prototype.getBucket=function(t){return this.buckets[t.id]},st.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploaded||(r.upload(t),r.uploaded=!0)}var n=t.gl;this.iconAtlasImage&amp;&amp;(this.iconAtlasTexture=new z(t,this.iconAtlasImage,n.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&amp;&amp;(this.glyphAtlasTexture=new z(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},st.prototype.queryRenderedFeatures=function(t,e,r,n,i,a,o){return this.latestFeatureIndex&amp;&amp;this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:e,scale:r,tileSize:this.tileSize,posMatrix:o,transform:i,params:n,queryPadding:this.queryPadding*a},t):{}},st.prototype.querySourceFeatures=function(e,r){if(this.latestFeatureIndex&amp;&amp;this.latestFeatureIndex.rawTileData){var n=this.latestFeatureIndex.loadVTLayers(),i=r?r.sourceLayer:&quot;&quot;,a=n._geojsonTileLayer||n[i];if(a)for(var o=t.default$13(r&amp;&amp;r.filter),s={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},l=0;l&lt;a.length;l++){var c=a.feature(l);if(o(new t.default$16(this.tileID.overscaledZ),c)){var u=new t.default$12(c,s.z,s.x,s.y);u.tile=s,e.push(u)}}}},st.prototype.clearMask=function(){this.segments&amp;&amp;(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&amp;&amp;(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&amp;&amp;(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},st.prototype.setMask=function(e,r){if(!t.default$10(this.mask,e)&amp;&amp;(this.mask=e,this.clearMask(),!t.default$10(e,{0:!0}))){var n=new t.RasterBoundsArray,i=new t.TriangleIndexArray;this.segments=new t.default$15,this.segments.prepareSegment(0,n,i);for(var a=Object.keys(e),o=0;o&lt;a.length;o++){var s=e[a[o]],l=t.default$8&gt;&gt;s.z,c=new t.default$1(s.x*l,s.y*l),u=new t.default$1(c.x+l,c.y+l),f=this.segments.prepareSegment(4,n,i);n.emplaceBack(c.x,c.y,c.x,c.y),n.emplaceBack(u.x,c.y,u.x,c.y),n.emplaceBack(c.x,u.y,c.x,u.y),n.emplaceBack(u.x,u.y,u.x,u.y);var h=f.vertexLength;i.emplaceBack(h,h+1,h+2),i.emplaceBack(h+1,h+2,h+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=r.createVertexBuffer(n,K.members),this.maskedIndexBuffer=r.createIndexBuffer(i)}},st.prototype.hasData=function(){return&quot;loaded&quot;===this.state||&quot;reloading&quot;===this.state||&quot;expired&quot;===this.state},st.prototype.setExpiryData=function(e){var r=this.expirationTime;if(e.cacheControl){var n=t.parseCacheControl(e.cacheControl);n[&quot;max-age&quot;]&amp;&amp;(this.expirationTime=Date.now()+1e3*n[&quot;max-age&quot;])}else e.expires&amp;&amp;(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var i=Date.now(),a=!1;if(this.expirationTime&gt;i)a=!1;else if(r)if(this.expirationTime&lt;r)a=!0;else{var o=this.expirationTime-r;o?this.expirationTime=i+Math.max(o,3e4):a=!0}else a=!0;a?(this.expiredRequestCount++,this.state=&quot;expired&quot;):this.expiredRequestCount=0}},st.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1&lt;&lt;Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)};var lt=function(t,e){this.max=t,this.onRemove=e,this.reset()};lt.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e&lt;r.length;e+=1){var n=r[e];n.timeout&amp;&amp;clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},lt.prototype.add=function(t,e,r){var n=this,i=t.wrapped().key;void 0===this.data[i]&amp;&amp;(this.data[i]=[]);var a={value:e,timeout:void 0};if(void 0!==r&amp;&amp;(a.timeout=setTimeout(function(){n.remove(t,a)},r)),this.data[i].push(a),this.order.push(i),this.order.length&gt;this.max){var o=this._getAndRemoveByKey(this.order[0]);o&amp;&amp;this.onRemove(o)}return this},lt.prototype.has=function(t){return t.wrapped().key in this.data},lt.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},lt.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&amp;&amp;clearTimeout(e.timeout),0===this.data[t].length&amp;&amp;delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},lt.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},lt.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&amp;&amp;clearTimeout(i.timeout),0===this.data[r].length&amp;&amp;delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},lt.prototype.setMaxSize=function(t){for(this.max=t;this.order.length&gt;this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&amp;&amp;this.onRemove(e)}return this};var ct=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ct.prototype.unbindVAO=function(){this.context.extVertexArrayObject&amp;&amp;this.context.bindVertexArrayOES.set(null)},ct.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},ct.prototype.updateData=function(t){var e=this.context.gl;this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},ct.prototype.destroy=function(){var t=this.context.gl;this.buffer&amp;&amp;(t.deleteBuffer(this.buffer),delete this.buffer)};var ut={Int8:&quot;BYTE&quot;,Uint8:&quot;UNSIGNED_BYTE&quot;,Int16:&quot;SHORT&quot;,Uint16:&quot;UNSIGNED_SHORT&quot;,Int32:&quot;INT&quot;,Uint32:&quot;UNSIGNED_INT&quot;,Float32:&quot;FLOAT&quot;},ft=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ft.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ft.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},ft.prototype.enableAttributes=function(t,e){for(var r=0;r&lt;this.attributes.length;r++){var n=this.attributes[r],i=e.attributes[n.name];void 0!==i&amp;&amp;t.enableVertexAttribArray(i)}},ft.prototype.setVertexAttribPointers=function(t,e,r){for(var n=0;n&lt;this.attributes.length;n++){var i=this.attributes[n],a=e.attributes[i.name];void 0!==a&amp;&amp;t.vertexAttribPointer(a,i.components,t[ut[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}},ft.prototype.destroy=function(){var t=this.context.gl;this.buffer&amp;&amp;(t.deleteBuffer(this.buffer),delete this.buffer)};var ht=function(e){this.context=e,this.current=t.default$6.transparent};ht.prototype.get=function(){return this.current},ht.prototype.set=function(t){var e=this.current;t.r===e.r&amp;&amp;t.g===e.g&amp;&amp;t.b===e.b&amp;&amp;t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t)};var pt=function(t){this.context=t,this.current=1};pt.prototype.get=function(){return this.current},pt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.clearDepth(t),this.current=t)};var dt=function(t){this.context=t,this.current=0};dt.prototype.get=function(){return this.current},dt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.clearStencil(t),this.current=t)};var gt=function(t){this.context=t,this.current=[!0,!0,!0,!0]};gt.prototype.get=function(){return this.current},gt.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]&amp;&amp;t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t)};var mt=function(t){this.context=t,this.current=!0};mt.prototype.get=function(){return this.current},mt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.depthMask(t),this.current=t)};var vt=function(t){this.context=t,this.current=255};vt.prototype.get=function(){return this.current},vt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.stencilMask(t),this.current=t)};var yt=function(t){this.context=t,this.current={func:t.gl.ALWAYS,ref:0,mask:255}};yt.prototype.get=function(){return this.current},yt.prototype.set=function(t){var e=this.current;t.func===e.func&amp;&amp;t.ref===e.ref&amp;&amp;t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t)};var xt=function(t){this.context=t;var e=this.context.gl;this.current=[e.KEEP,e.KEEP,e.KEEP]};xt.prototype.get=function(){return this.current},xt.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t)};var bt=function(t){this.context=t,this.current=!1};bt.prototype.get=function(){return this.current},bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t}};var _t=function(t){this.context=t,this.current=[0,1]};_t.prototype.get=function(){return this.current},_t.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t)};var wt=function(t){this.context=t,this.current=!1};wt.prototype.get=function(){return this.current},wt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t}};var kt=function(t){this.context=t,this.current=t.gl.LESS};kt.prototype.get=function(){return this.current},kt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.depthFunc(t),this.current=t)};var Mt=function(t){this.context=t,this.current=!1};Mt.prototype.get=function(){return this.current},Mt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t}};var At=function(t){this.context=t;var e=this.context.gl;this.current=[e.ONE,e.ZERO]};At.prototype.get=function(){return this.current},At.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t)};var Tt=function(e){this.context=e,this.current=t.default$6.transparent};Tt.prototype.get=function(){return this.current},Tt.prototype.set=function(t){var e=this.current;t.r===e.r&amp;&amp;t.g===e.g&amp;&amp;t.b===e.b&amp;&amp;t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t)};var St=function(t){this.context=t,this.current=null};St.prototype.get=function(){return this.current},St.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.useProgram(t),this.current=t)};var Et=function(t){this.context=t,this.current=1};Et.prototype.get=function(){return this.current},Et.prototype.set=function(e){var r=this.context.lineWidthRange,n=t.clamp(e,r[0],r[1]);this.current!==n&amp;&amp;(this.context.gl.lineWidth(n),this.current=e)};var Ct=function(t){this.context=t,this.current=t.gl.TEXTURE0};Ct.prototype.get=function(){return this.current},Ct.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.activeTexture(t),this.current=t)};var Lt=function(t){this.context=t;var e=this.context.gl;this.current=[0,0,e.drawingBufferWidth,e.drawingBufferHeight]};Lt.prototype.get=function(){return this.current},Lt.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]&amp;&amp;t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t)};var zt=function(t){this.context=t,this.current=null};zt.prototype.get=function(){return this.current},zt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t}};var Pt=function(t){this.context=t,this.current=null};Pt.prototype.get=function(){return this.current},Pt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t}};var Ot=function(t){this.context=t,this.current=null};Ot.prototype.get=function(){return this.current},Ot.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t}};var It=function(t){this.context=t,this.current=null};It.prototype.get=function(){return this.current},It.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t}};var Dt=function(t){this.context=t,this.current=null};Dt.prototype.get=function(){return this.current},Dt.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t};var Rt=function(t){this.context=t,this.current=null};Rt.prototype.get=function(){return this.current},Rt.prototype.set=function(t){this.current!==t&amp;&amp;this.context.extVertexArrayObject&amp;&amp;(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t)};var Bt=function(t){this.context=t,this.current=4};Bt.prototype.get=function(){return this.current},Bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t}};var Ft=function(t){this.context=t,this.current=!1};Ft.prototype.get=function(){return this.current},Ft.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t}};var Nt=function(t,e){this.context=t,this.current=null,this.parent=e};Nt.prototype.get=function(){return this.current};var jt=function(t){function e(e,r){t.call(this,e,r),this.dirty=!1}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e.prototype.setDirty=function(){this.dirty=!0},e}(Nt),Vt=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t}},e}(Nt),Ut=function(t,e,r){this.context=t,this.width=e,this.height=r;var n=t.gl,i=this.framebuffer=n.createFramebuffer();this.colorAttachment=new jt(t,i),this.depthAttachment=new Vt(t,i)};Ut.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&amp;&amp;t.deleteTexture(e);var r=this.depthAttachment.get();r&amp;&amp;t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var qt=function(t,e,r){this.func=t,this.mask=e,this.range=r};qt.ReadOnly=!1,qt.ReadWrite=!0,qt.disabled=new qt(519,qt.ReadOnly,[0,1]);var Ht=function(t,e,r,n,i,a){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=a};Ht.disabled=new Ht({func:519,mask:0},0,0,7680,7680,7680);var Gt=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Gt.disabled=new Gt(Gt.Replace=[1,0],t.default$6.transparent,[!1,!1,!1,!1]),Gt.unblended=new Gt(Gt.Replace,t.default$6.transparent,[!0,!0,!0,!0]),Gt.alphaBlended=new Gt([1,771],t.default$6.transparent,[!0,!0,!0,!0]);var Wt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension(&quot;OES_vertex_array_object&quot;),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new ht(this),this.clearDepth=new pt(this),this.clearStencil=new dt(this),this.colorMask=new gt(this),this.depthMask=new mt(this),this.stencilMask=new vt(this),this.stencilFunc=new yt(this),this.stencilOp=new xt(this),this.stencilTest=new bt(this),this.depthRange=new _t(this),this.depthTest=new wt(this),this.depthFunc=new kt(this),this.blend=new Mt(this),this.blendFunc=new At(this),this.blendColor=new Tt(this),this.program=new St(this),this.lineWidth=new Et(this),this.activeTexture=new Ct(this),this.viewport=new Lt(this),this.bindFramebuffer=new zt(this),this.bindRenderbuffer=new Pt(this),this.bindTexture=new Ot(this),this.bindVertexBuffer=new It(this),this.bindElementBuffer=new Dt(this),this.bindVertexArrayOES=this.extVertexArrayObject&amp;&amp;new Rt(this),this.pixelStoreUnpack=new Bt(this),this.pixelStoreUnpackPremultiplyAlpha=new Ft(this),this.extTextureFilterAnisotropic=t.getExtension(&quot;EXT_texture_filter_anisotropic&quot;)||t.getExtension(&quot;MOZ_EXT_texture_filter_anisotropic&quot;)||t.getExtension(&quot;WEBKIT_EXT_texture_filter_anisotropic&quot;),this.extTextureFilterAnisotropic&amp;&amp;(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension(&quot;OES_texture_half_float&quot;),this.extTextureHalfFloat&amp;&amp;t.getExtension(&quot;OES_texture_half_float_linear&quot;)};Wt.prototype.createIndexBuffer=function(t,e){return new ct(this,t,e)},Wt.prototype.createVertexBuffer=function(t,e,r){return new ft(this,t,e,r)},Wt.prototype.createRenderbuffer=function(t,e,r){var n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i},Wt.prototype.createFramebuffer=function(t,e){return new Ut(this,t,e)},Wt.prototype.clear=function(t){var e=t.color,r=t.depth,n=this.gl,i=0;e&amp;&amp;(i|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&amp;&amp;(i|=n.DEPTH_BUFFER_BIT,this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(i)},Wt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Wt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Wt.prototype.setColorMode=function(e){t.default$10(e.blendFunction,Gt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)};var Yt=function(e){function r(t,r,n){var i=this;e.call(this),this.id=t,this.dispatcher=n,this.on(&quot;data&quot;,function(t){&quot;source&quot;===t.dataType&amp;&amp;&quot;metadata&quot;===t.sourceDataType&amp;&amp;(i._sourceLoaded=!0),i._sourceLoaded&amp;&amp;!i._paused&amp;&amp;&quot;source&quot;===t.dataType&amp;&amp;&quot;content&quot;===t.sourceDataType&amp;&amp;(i.reload(),i.transform&amp;&amp;i.update(i.transform))}),this.on(&quot;error&quot;,function(){i._sourceErrored=!0}),this._source=it(t,r,n,this),this._tiles={},this._cache=new lt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={}}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&amp;&amp;this._source.onAdd&amp;&amp;this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&amp;&amp;this._source.onRemove&amp;&amp;this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if(&quot;loaded&quot;!==e.state&amp;&amp;&quot;errored&quot;!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&amp;&amp;this.reload(),this.transform&amp;&amp;this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&amp;&amp;this._source.prepare(),this._tiles)this._tiles[e].upload(t)},r.prototype.getIds=function(){var e=this;return Object.keys(this._tiles).map(Number).sort(function(r,n){var i=e._tiles[r].tileID,a=e._tiles[n].tileID,o=new t.default$1(i.canonical.x,i.canonical.y).rotate(e.transform.angle),s=new t.default$1(a.canonical.x,a.canonical.y).rotate(e.transform.angle);return i.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x})},r.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&amp;&amp;this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t){return this._tiles[t]&amp;&amp;this._tiles[t].hasData()&amp;&amp;!this._coveredTiles[t]},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)this._reloadTile(t,&quot;reloading&quot;)},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&amp;&amp;(&quot;loading&quot;!==r.state&amp;&amp;(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,n,i){if(i)return e.state=&quot;errored&quot;,void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=a.now(),&quot;expired&quot;===n&amp;&amp;(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),&quot;raster-dem&quot;===this.getSource().type&amp;&amp;e.dem&amp;&amp;this._backfillDEM(e),this._source.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,tile:e,coord:e.tileID})),this.map&amp;&amp;(this.map.painter.tileExtentVAO.vao=null)},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r&lt;e.length;r++){var n=e[r];if(t.neighboringTiles&amp;&amp;t.neighboringTiles[n]){var i=this.getTileByID(n);a(t,i),a(i,t)}}function a(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===r&amp;&amp;0===n||Math.abs(n)&gt;1||(Math.abs(r)&gt;1&amp;&amp;(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&amp;&amp;(r-=i)),e.dem&amp;&amp;t.dem&amp;&amp;(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&amp;&amp;t.neighboringTiles[a]&amp;&amp;(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._findLoadedChildren=function(t,e,r){var n=!1;for(var i in this._tiles){var a=this._tiles[i];if(!(r[i]||!a.hasData()||a.tileID.overscaledZ&lt;=t.overscaledZ||a.tileID.overscaledZ&gt;e)){var o=Math.pow(2,a.tileID.canonical.z-t.canonical.z);if(Math.floor(a.tileID.canonical.x/o)===t.canonical.x&amp;&amp;Math.floor(a.tileID.canonical.y/o)===t.canonical.y)for(r[i]=a.tileID,n=!0;a&amp;&amp;a.tileID.overscaledZ-1&gt;t.overscaledZ;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);if(!s)break;(a=this._tiles[s.key])&amp;&amp;a.hasData()&amp;&amp;(delete r[i],r[s.key]=s)}}}return n},r.prototype.findLoadedParent=function(t,e,r){for(var n=t.overscaledZ-1;n&gt;=e;n--){var i=t.scaledTo(n);if(!i)return;var a=String(i.key),o=this._tiles[a];if(o&amp;&amp;o.hasData())return r[a]=i,o;if(this._cache.has(i))return r[a]=i,this._cache.get(i)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n=&quot;number&quot;==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&amp;&amp;!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&amp;&amp;(i=i.filter(function(t){return n._source.hasTile(t)}))):i=[];var o,s=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),l=Math.max(s-r.maxOverzooming,this._source.minzoom),c=Math.max(s+r.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(i,s),f={};if(Zt(this._source.type))for(var h=Object.keys(u),p=0;p&lt;h.length;p++){var d=h[p],g=u[d],m=n._tiles[d];if(m&amp;&amp;(void 0===m.fadeEndTime||m.fadeEndTime&gt;=a.now())){n._findLoadedChildren(g,c,u)&amp;&amp;(u[d]=g);var v=n.findLoadedParent(g,l,f);v&amp;&amp;n._addTile(v.tileID)}}for(o in f)u[o]||(n._coveredTiles[o]=!0);for(o in f)u[o]=f[o];for(var y=t.keysDifference(this._tiles,u),x=0;x&lt;y.length;x++)n._removeTile(y[x])}},r.prototype._updateRetainedTiles=function(t,e){for(var n={},i={},a=Math.max(e-r.maxOverzooming,this._source.minzoom),o=Math.max(e+r.maxUnderzooming,this._source.minzoom),s=0;s&lt;t.length;s++){var l=t[s],c=this._addTile(l),u=!1;if(c.hasData())n[l.key]=l;else{u=c.wasRequested(),n[l.key]=l;var f=!0;if(e+1&gt;this._source.maxzoom){var h=l.children(this._source.maxzoom)[0],p=this.getTile(h);p&amp;&amp;p.hasData()?n[h.key]=h:f=!1}else{this._findLoadedChildren(l,o,n);for(var d=l.children(this._source.maxzoom),g=0;g&lt;d.length;g++)if(!n[d[g].key]){f=!1;break}}if(!f)for(var m=l.overscaledZ-1;m&gt;=a;--m){var v=l.scaledTo(m);if(i[v.key])break;if(i[v.key]=!0,!(c=this.getTile(v))&amp;&amp;u&amp;&amp;(c=this._addTile(v)),c&amp;&amp;(n[v.key]=v,u=c.wasRequested(),c.hasData()))break}}}return n},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&amp;&amp;(this._setTileReloadTimer(e.key,r),r.tileID=e);var n=Boolean(r);return n||(r=new st(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event(&quot;dataloading&quot;,{tile:r,coord:r.tileID,dataType:&quot;source&quot;})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&amp;&amp;(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&amp;&amp;(this._timers[t]=setTimeout(function(){r._reloadTile(t,&quot;expired&quot;),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&amp;&amp;(e.uses--,delete this._tiles[t],this._timers[t]&amp;&amp;(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses&gt;0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r){for(var n=[],i=this.getIds(),a=1/0,o=1/0,s=-1/0,l=-1/0,c=e[0].zoom,u=0;u&lt;e.length;u++){var f=e[u];a=Math.min(a,f.column),o=Math.min(o,f.row),s=Math.max(s,f.column),l=Math.max(l,f.row)}for(var h=0;h&lt;i.length;h++){var p=this._tiles[i[h]],d=p.tileID,g=Math.pow(2,this.transform.zoom-p.tileID.overscaledZ),m=r*p.queryPadding*t.default$8/p.tileSize/g,v=[Xt(d,new t.default$17(a,o,c)),Xt(d,new t.default$17(s,l,c))];if(v[0].x-m&lt;t.default$8&amp;&amp;v[0].y-m&lt;t.default$8&amp;&amp;v[1].x+m&gt;=0&amp;&amp;v[1].y+m&gt;=0){for(var y=[],x=0;x&lt;e.length;x++)y.push(Xt(d,e[x]));n.push({tile:p,tileID:d,queryGeometry:[y],scale:g})}}return n},r.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(function(e){return t._tiles[e].tileID}),r=0,n=e;r&lt;n.length;r+=1){var i=n[r];i.posMatrix=t.transform.calculatePosMatrix(i.toUnwrapped())}return e},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Zt(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&amp;&amp;e.fadeEndTime&gt;=a.now())return!0}return!1},r}(t.Evented);function Xt(e,r){var n=r.zoomTo(e.canonical.z);return new t.default$1((n.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.default$8,(n.row-e.canonical.y)*t.default$8)}function Zt(t){return&quot;raster&quot;===t||&quot;image&quot;===t||&quot;video&quot;===t}function $t(){return new t.default.Worker(En.workerUrl)}Yt.maxOverzooming=10,Yt.maxUnderzooming=3;var Jt,Kt=function(){this.active={}};function Qt(e,r){var n={};for(var i in e)&quot;ref&quot;!==i&amp;&amp;(n[i]=e[i]);return t.default$18.forEach(function(t){t in r&amp;&amp;(n[t]=r[t])}),n}function te(t){t=t.slice();for(var e=Object.create(null),r=0;r&lt;t.length;r++)e[t[r].id]=t[r];for(var n=0;n&lt;t.length;n++)&quot;ref&quot;in t[n]&amp;&amp;(t[n]=Qt(t[n],e[t[n].ref]));return t}Kt.prototype.acquire=function(t){if(!this.workers){var e=En.workerCount;for(this.workers=[];this.workers.length&lt;e;)this.workers.push(new $t)}return this.active[t]=!0,this.workers.slice()},Kt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&amp;&amp;(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var ee={setStyle:&quot;setStyle&quot;,addLayer:&quot;addLayer&quot;,removeLayer:&quot;removeLayer&quot;,setPaintProperty:&quot;setPaintProperty&quot;,setLayoutProperty:&quot;setLayoutProperty&quot;,setFilter:&quot;setFilter&quot;,addSource:&quot;addSource&quot;,removeSource:&quot;removeSource&quot;,setGeoJSONSourceData:&quot;setGeoJSONSourceData&quot;,setLayerZoomRange:&quot;setLayerZoomRange&quot;,setLayerProperty:&quot;setLayerProperty&quot;,setCenter:&quot;setCenter&quot;,setZoom:&quot;setZoom&quot;,setBearing:&quot;setBearing&quot;,setPitch:&quot;setPitch&quot;,setSprite:&quot;setSprite&quot;,setGlyphs:&quot;setGlyphs&quot;,setTransition:&quot;setTransition&quot;,setLight:&quot;setLight&quot;};function re(t,e,r){r.push({command:ee.addSource,args:[t,e[t]]})}function ne(t,e,r){e.push({command:ee.removeSource,args:[t]}),r[t]=!0}function ie(t,e,r,n){ne(t,r,n),re(t,e,r)}function ae(e,r,n){var i;for(i in e[n])if(e[n].hasOwnProperty(i)&amp;&amp;&quot;data&quot;!==i&amp;&amp;!t.default$10(e[n][i],r[n][i]))return!1;for(i in r[n])if(r[n].hasOwnProperty(i)&amp;&amp;&quot;data&quot;!==i&amp;&amp;!t.default$10(e[n][i],r[n][i]))return!1;return!0}function oe(e,r,n,i,a,o){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&amp;&amp;(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}));for(s in r)r.hasOwnProperty(s)&amp;&amp;!e.hasOwnProperty(s)&amp;&amp;(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}))}function se(t){return t.id}function le(t,e){return t[e.id]=e,t}var ce=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a&lt;this.xCellCount*this.yCellCount;a++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};ce.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ce.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ce.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},ce.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},ce.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},ce.prototype._query=function(t,e,r,n,i){if(r&lt;0||t&gt;this.width||n&lt;0||e&gt;this.height)return!i&amp;&amp;[];var a=[];if(t&lt;=0&amp;&amp;e&lt;=0&amp;&amp;this.width&lt;=r&amp;&amp;this.height&lt;=n){if(i)return!0;for(var o=0;o&lt;this.boxKeys.length;o++)a.push({key:this.boxKeys[o],x1:this.bboxes[4*o],y1:this.bboxes[4*o+1],x2:this.bboxes[4*o+2],y2:this.bboxes[4*o+3]});for(var s=0;s&lt;this.circleKeys.length;s++){var l=this.circles[3*s],c=this.circles[3*s+1],u=this.circles[3*s+2];a.push({key:this.circleKeys[s],x1:l-u,y1:c-u,x2:l+u,y2:c+u})}}else{var f={hitTest:i,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,r,n,this._queryCell,a,f)}return i?a.length&gt;0:a},ce.prototype._queryCircle=function(t,e,r,n){var i=t-r,a=t+r,o=e-r,s=e+r;if(a&lt;0||i&gt;this.width||s&lt;0||o&gt;this.height)return!n&amp;&amp;[];var l=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(i,o,a,s,this._queryCellCircle,l,c),n?l.length&gt;0:l},ce.prototype.query=function(t,e,r,n){return this._query(t,e,r,n,!1)},ce.prototype.hitTest=function(t,e,r,n){return this._query(t,e,r,n,!0)},ce.prototype.hitTestCircle=function(t,e,r){return this._queryCircle(t,e,r,!0)},ce.prototype._queryCell=function(t,e,r,n,i,a,o){var s=o.seenUids,l=this.boxCells[i];if(null!==l)for(var c=this.bboxes,u=0,f=l;u&lt;f.length;u+=1){var h=f[u];if(!s.box[h]){s.box[h]=!0;var p=4*h;if(t&lt;=c[p+2]&amp;&amp;e&lt;=c[p+3]&amp;&amp;r&gt;=c[p+0]&amp;&amp;n&gt;=c[p+1]){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[h],x1:c[p],y1:c[p+1],x2:c[p+2],y2:c[p+3]})}}}var d=this.circleCells[i];if(null!==d)for(var g=this.circles,m=0,v=d;m&lt;v.length;m+=1){var y=v[m];if(!s.circle[y]){s.circle[y]=!0;var x=3*y;if(this._circleAndRectCollide(g[x],g[x+1],g[x+2],t,e,r,n)){if(o.hitTest)return a.push(!0),!0;var b=g[x],_=g[x+1],w=g[x+2];a.push({key:this.circleKeys[y],x1:b-w,y1:_-w,x2:b+w,y2:_+w})}}}},ce.prototype._queryCellCircle=function(t,e,r,n,i,a,o){var s=o.circle,l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f&lt;h.length;f+=1){var p=h[f];if(!l.box[p]){l.box[p]=!0;var d=4*p;if(this._circleAndRectCollide(s.x,s.y,s.radius,u[d+0],u[d+1],u[d+2],u[d+3]))return a.push(!0),!0}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;v&lt;y.length;v+=1){var x=y[v];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circlesCollide(m[b],m[b+1],m[b+2],s.x,s.y,s.radius))return a.push(!0),!0}}},ce.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),u=this._convertToYCellCoord(n),f=s;f&lt;=c;f++)for(var h=l;h&lt;=u;h++){var p=this.xCellCount*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ce.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},ce.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},ce.prototype._circlesCollide=function(t,e,r,n,i,a){var o=n-t,s=i-e,l=r+a;return l*l&gt;o*o+s*s},ce.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l&gt;s+r)return!1;var c=(o-i)/2,u=Math.abs(e-(i+c));if(u&gt;c+r)return!1;if(l&lt;=s||u&lt;=c)return!0;var f=l-s,h=u-c;return f*f+h*h&lt;=r*r};var ue=t.default$19.layout;function fe(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.identity(o),t.mat4.scale(o,o,[1/a,1/a,1]),n||t.mat4.rotateZ(o,o,i.angle)):(t.mat4.scale(o,o,[i.width/2,-i.height/2,1]),t.mat4.translate(o,o,[1,-1,0]),t.mat4.multiply(o,o,e)),o}function he(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.multiply(o,o,e),t.mat4.scale(o,o,[a,a,1]),n||t.mat4.rotateZ(o,o,-i.angle)):(t.mat4.scale(o,o,[1,-1,1]),t.mat4.translate(o,o,[-1,-1,0]),t.mat4.scale(o,o,[2/i.width,2/i.height,1])),o}function pe(e,r){var n=[e.x,e.y,0,1];ke(n,n,r);var i=n[3];return{point:new t.default$1(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function de(t,e){var r=t[0]/t[3],n=t[1]/t[3];return r&gt;=-e[0]&amp;&amp;r&lt;=e[0]&amp;&amp;n&gt;=-e[1]&amp;&amp;n&lt;=e[1]}function ge(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom,ue.properties[i?&quot;text-size&quot;:&quot;icon-size&quot;]),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,m=!1,v=0;v&lt;d.length;v++){var y=d.get(v);if(y.hidden||y.writingMode===t.WritingMode.vertical&amp;&amp;!m)we(y.numGlyphs,h);else{m=!1;var x=[y.anchorX,y.anchorY,0,1];if(t.vec4.transformMat4(x,x,r),de(x,f)){var b=.5+x[3]/n.transform.cameraToCenterDistance*.5,_=t.evaluateSizeForFeature(c,u,y),w=s?_*b:_/b,k=new t.default$1(y.anchorX,y.anchorY),M=pe(k,a).point,A={},T=ye(y,w,!1,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g);m=T.useVertical,(T.notEnoughRoom||m||T.needsFlipping&amp;&amp;ye(y,w,!0,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g).notEnoughRoom)&amp;&amp;we(y.numGlyphs,h)}else we(y.numGlyphs,h)}}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function me(t,e,r,n,i,a,o,s,l,c,u,f){var h=s.glyphStartIndex+s.numGlyphs,p=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,g=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(h-1),v=be(t*g,r,n,i,a,o,s.segment,p,d,l,c,u,f);if(!v)return null;var y=be(t*m,r,n,i,a,o,s.segment,p,d,l,c,u,f);return y?{first:v,last:y}:null}function ve(e,r,n,i){return e===t.WritingMode.horizontal&amp;&amp;Math.abs(n.y-r.y)&gt;Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.y&lt;n.y:r.x&gt;n.x)?{needsFlipping:!0}:null}function ye(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*r,y=e.lineOffsetY*r;if(e.numGlyphs&gt;1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=me(m,l,v,y,n,f,h,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=pe(w.first.point,s).point,M=pe(w.last.point,s).point;if(i&amp;&amp;!n){var A=ve(e.writingMode,k,M,d);if(A)return A}g=[w.first];for(var T=e.glyphStartIndex+1;T&lt;x-1;T++)g.push(be(m*l.getoffsetX(T),v,y,n,f,h,e.segment,b,_,c,o,p,!1));g.push(w.last)}else{if(i&amp;&amp;!n){var S=pe(h,a).point,E=e.lineStartIndex+e.segment+1,C=new t.default$1(c.getx(E),c.gety(E)),L=pe(C,a),z=L.signedDistanceFromCamera&gt;0?L.point:xe(h,C,S,1,a),P=ve(e.writingMode,S,z,d);if(P)return P}var O=be(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!O)return{notEnoughRoom:!0};g=[O]}for(var I=0,D=g;I&lt;D.length;I+=1){var R=D[I];t.addDynamicAttributes(u,R.point,R.angle)}return{}}function xe(t,e,r,n,i){var a=pe(t.add(t.sub(e)._unit()),i).point,o=r.sub(a);return r.add(o._mult(n/o.mag()))}function be(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=i?e-r:e+r,g=d&gt;0?1:-1,m=0;i&amp;&amp;(g*=-1,m=Math.PI),g&lt;0&amp;&amp;(m+=Math.PI);for(var v=g&gt;0?l+s:l+s+1,y=v,x=a,b=a,_=0,w=0,k=Math.abs(d);_+w&lt;=k;){if((v+=g)&lt;l||v&gt;=c)return null;if(b=x,void 0===(x=h[v])){var M=new t.default$1(u.getx(v),u.gety(v)),A=pe(M,f);if(A.signedDistanceFromCamera&gt;0)x=h[v]=A.point;else{var T=v-g;x=xe(0===_?o:new t.default$1(u.getx(T),u.gety(T)),M,b,k-_+1,f)}}_+=w,w=b.dist(x)}var S=(k-_)/w,E=x.sub(b),C=E.mult(S)._add(b);return C._add(E._unit()._perp()._mult(n*g)),{point:C,angle:m+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:v-g===y?0:u.gettileUnitDistanceFromAnchor(v-g),lastSegmentViewportDistance:k-_}:null}}var _e=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function we(t,e){for(var r=0;r&lt;t;r++){var n=e.length;e.resize(n+4),e.float32.set(_e,3*n)}}function ke(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}t.default$20.mat4;var Me=function(t,e,r){void 0===e&amp;&amp;(e=new ce(t.width+200,t.height+200,25)),void 0===r&amp;&amp;(r=new ce(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100};function Ae(t,e,r){t[e+4]=r?1:0}function Te(e,r,n){return r*(t.default$8/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}Me.prototype.placeCollisionBox=function(t,e,r,n){var i=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),a=r*i.perspectiveRatio,o=t.x1*a+i.point.x,s=t.y1*a+i.point.y,l=t.x2*a+i.point.x,c=t.y2*a+i.point.y;return!e&amp;&amp;this.grid.hitTest(o,s,l,c)?{box:[],offscreen:!1}:{box:[o,s,l,c],offscreen:this.isOffscreen(o,s,l,c)}},Me.prototype.approximateTileDistance=function(t,e,r,n,i){var a=i?1:n/this.pitchfactor,o=t.lastSegmentViewportDistance*r;return t.prevTileDistance+o+(a-1)*o*Math.abs(Math.sin(e))},Me.prototype.placeCollisionCircles=function(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=[],g=this.projectAnchor(u,o.anchorX,o.anchorY),m=c/24,v=o.lineOffsetX*c,y=o.lineOffsetY*c,x=new t.default$1(o.anchorX,o.anchorY),b=me(m,l,v,y,!1,pe(x,f).point,x,o,s,f,{},!0),_=!1,w=!0,k=g.perspectiveRatio*i,M=1/(i*n),A=0,T=0;b&amp;&amp;(A=this.approximateTileDistance(b.first.tileDistance,b.first.angle,M,g.cameraDistance,p),T=this.approximateTileDistance(b.last.tileDistance,b.last.angle,M,g.cameraDistance,p));for(var S=0;S&lt;e.length;S+=5){var E=e[S],C=e[S+1],L=e[S+2],z=e[S+3];if(!b||z&lt;-A||z&gt;T)Ae(e,S,!1);else{var P=this.projectPoint(u,E,C),O=L*k;if(d.length&gt;0){var I=P.x-d[d.length-4],D=P.y-d[d.length-3];if(O*O*2&gt;I*I+D*D&amp;&amp;S+8&lt;e.length){var R=e[S+8];if(R&gt;-A&amp;&amp;R&lt;T){Ae(e,S,!1);continue}}}var B=S/5;if(d.push(P.x,P.y,O,B),Ae(e,S,!0),w=w&amp;&amp;this.isOffscreen(P.x-O,P.y-O,P.x+O,P.y+O),!r&amp;&amp;this.grid.hitTestCircle(P.x,P.y,O)){if(!h)return{circles:[],offscreen:!1};_=!0}}}return{circles:_?[]:d,offscreen:w}},Me.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&amp;&amp;0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,i=1/0,a=-1/0,o=-1/0,s=0,l=e;s&lt;l.length;s+=1){var c=l[s],u=new t.default$1(c.x+100,c.y+100);n=Math.min(n,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),o=Math.max(o,u.y),r.push(u)}for(var f={},h={},p=0,d=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o));p&lt;d.length;p+=1){var g=d[p],m=g.key;if(void 0===f[m.bucketInstanceId]&amp;&amp;(f[m.bucketInstanceId]={}),!f[m.bucketInstanceId][m.featureIndex]){var v=[new t.default$1(g.x1,g.y1),new t.default$1(g.x2,g.y1),new t.default$1(g.x2,g.y2),new t.default$1(g.x1,g.y2)];t.polygonIntersectsPolygon(r,v)&amp;&amp;(f[m.bucketInstanceId][m.featureIndex]=!0,void 0===h[m.bucketInstanceId]&amp;&amp;(h[m.bucketInstanceId]=[]),h[m.bucketInstanceId].push(m.featureIndex))}}return h},Me.prototype.insertCollisionBox=function(t,e,r,n){var i={bucketInstanceId:r,featureIndex:n};(e?this.ignoredGrid:this.grid).insert(i,t[0],t[1],t[2],t[3])},Me.prototype.insertCollisionCircles=function(t,e,r,n){for(var i=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:n},o=0;o&lt;t.length;o+=4)i.insertCircle(a,t[o],t[o+1],t[o+2])},Me.prototype.projectAnchor=function(t,e,r){var n=[e,r,0,1];return ke(n,n,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},Me.prototype.projectPoint=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100)},Me.prototype.projectAndGetPerspectiveRatio=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),{point:new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},Me.prototype.isOffscreen=function(t,e,r,n){return r&lt;100||t&gt;=this.screenRightBoundary||n&lt;100||e&gt;this.screenBottomBoundary};var Se=t.default$19.layout,Ee=function(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&amp;&amp;r?1:0,this.placed=r};Ee.prototype.isHidden=function(){return 0===this.opacity&amp;&amp;!this.placed};var Ce=function(t,e,r,n,i){this.text=new Ee(t?t.text:null,e,r,i),this.icon=new Ee(t?t.icon:null,e,n,i)};Ce.prototype.isHidden=function(){return this.text.isHidden()&amp;&amp;this.icon.isHidden()};var Le=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},ze=function(t,e){this.transform=t.clone(),this.collisionIndex=new Me(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={}};function Pe(t,e,r){t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0)}ze.prototype.placeLayerTile=function(e,r,n,i){var a=r.getBucket(e),o=r.latestFeatureIndex;if(a&amp;&amp;o&amp;&amp;e.id===a.layerIds[0]){var s=r.collisionBoxArray,l=a.layers[0].layout,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/t.default$8,f=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=fe(f,&quot;map&quot;===l.get(&quot;text-pitch-alignment&quot;),&quot;map&quot;===l.get(&quot;text-rotation-alignment&quot;),this.transform,Te(r,1,this.transform.zoom)),p=fe(f,&quot;map&quot;===l.get(&quot;icon-pitch-alignment&quot;),&quot;map&quot;===l.get(&quot;icon-rotation-alignment&quot;),this.transform,Te(r,1,this.transform.zoom));this.retainedQueryData[a.bucketInstanceId]=new function(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,r.tileID),this.placeLayerBucket(a,f,h,p,c,u,n,i,s)}},ze.prototype.placeLayerBucket=function(e,r,n,i,a,o,s,l,c){for(var u=e.layers[0].layout,f=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,Se.properties[&quot;text-size&quot;]),h=!e.hasTextData()||u.get(&quot;text-optional&quot;),p=!e.hasIconData()||u.get(&quot;icon-optional&quot;),d=0,g=e.symbolInstances;d&lt;g.length;d+=1){var m=g[d];if(!l[m.crossTileID]){var v=void 0!==m.feature.text,y=void 0!==m.feature.icon,x=!0,b=null,_=null,w=null,k=0,M=0;m.collisionArrays||(m.collisionArrays=e.deserializeCollisionBoxes(c,m.textBoxStartIndex,m.textBoxEndIndex,m.iconBoxStartIndex,m.iconBoxEndIndex)),m.collisionArrays.textFeatureIndex&amp;&amp;(k=m.collisionArrays.textFeatureIndex),m.collisionArrays.textBox&amp;&amp;(v=(b=this.collisionIndex.placeCollisionBox(m.collisionArrays.textBox,u.get(&quot;text-allow-overlap&quot;),o,r)).box.length&gt;0,x=x&amp;&amp;b.offscreen);var A=m.collisionArrays.textCircles;if(A){var T=e.text.placedSymbolArray.get(m.placedTextSymbolIndices[0]),S=t.evaluateSizeForFeature(e.textSizeData,f,T);_=this.collisionIndex.placeCollisionCircles(A,u.get(&quot;text-allow-overlap&quot;),a,o,m.key,T,e.lineVertexArray,e.glyphOffsetArray,S,r,n,s,&quot;map&quot;===u.get(&quot;text-pitch-alignment&quot;)),v=u.get(&quot;text-allow-overlap&quot;)||_.circles.length&gt;0,x=x&amp;&amp;_.offscreen}m.collisionArrays.iconFeatureIndex&amp;&amp;(M=m.collisionArrays.iconFeatureIndex),m.collisionArrays.iconBox&amp;&amp;(y=(w=this.collisionIndex.placeCollisionBox(m.collisionArrays.iconBox,u.get(&quot;icon-allow-overlap&quot;),o,r)).box.length&gt;0,x=x&amp;&amp;w.offscreen),h||p?p?h||(y=y&amp;&amp;v):v=y&amp;&amp;v:y=v=y&amp;&amp;v,v&amp;&amp;b&amp;&amp;this.collisionIndex.insertCollisionBox(b.box,u.get(&quot;text-ignore-placement&quot;),e.bucketInstanceId,k),y&amp;&amp;w&amp;&amp;this.collisionIndex.insertCollisionBox(w.box,u.get(&quot;icon-ignore-placement&quot;),e.bucketInstanceId,M),v&amp;&amp;_&amp;&amp;this.collisionIndex.insertCollisionCircles(_.circles,u.get(&quot;text-ignore-placement&quot;),e.bucketInstanceId,k),this.placements[m.crossTileID]=new Le(v,y,x||e.justReloaded),l[m.crossTileID]=!0}}e.justReloaded=!1},ze.prototype.commit=function(t,e){this.commitTime=e;var r=!1,n=t&amp;&amp;0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,i=t?t.opacities:{};for(var a in this.placements){var o=this.placements[a],s=i[a];s?(this.opacities[a]=new Ce(s,n,o.text,o.icon),r=r||o.text!==s.text.placed||o.icon!==s.icon.placed):(this.opacities[a]=new Ce(null,n,o.text,o.icon,o.skipFade),r=r||o.text||o.icon)}for(var l in i){var c=i[l];if(!this.opacities[l]){var u=new Ce(c,n,!1,!1);u.isHidden()||(this.opacities[l]=u,r=r||c.text.placed||c.icon.placed)}}r?this.lastPlacementChangeTime=e:&quot;number&quot;!=typeof this.lastPlacementChangeTime&amp;&amp;(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},ze.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n&lt;i.length;n+=1){var a=i[n],o=a.getBucket(t);o&amp;&amp;a.latestFeatureIndex&amp;&amp;t.id===o.layerIds[0]&amp;&amp;this.updateBucketOpacities(o,r,a.collisionBoxArray)}},ze.prototype.updateBucketOpacities=function(t,e,r){t.hasTextData()&amp;&amp;t.text.opacityVertexArray.clear(),t.hasIconData()&amp;&amp;t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&amp;&amp;t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&amp;&amp;t.collisionCircle.collisionVertexArray.clear();for(var n=t.layers[0].layout,i=new Ce(null,0,!1,!1,!0),a=new Ce(null,0,n.get(&quot;text-allow-overlap&quot;),n.get(&quot;icon-allow-overlap&quot;),!0),o=0;o&lt;t.symbolInstances.length;o++){var s=t.symbolInstances[o],l=e[s.crossTileID],c=this.opacities[s.crossTileID];l?c=i:c||(c=a,this.opacities[s.crossTileID]=c),e[s.crossTileID]=!0;var u=s.numGlyphVertices&gt;0||s.numVerticalGlyphVertices&gt;0,f=s.numIconVertices&gt;0;if(u){for(var h=je(c.text),p=(s.numGlyphVertices+s.numVerticalGlyphVertices)/4,d=0;d&lt;p;d++)t.text.opacityVertexArray.emplaceBack(h);for(var g=0,m=s.placedTextSymbolIndices;g&lt;m.length;g+=1){var v=m[g];t.text.placedSymbolArray.get(v).hidden=c.text.isHidden()}}if(f){for(var y=je(c.icon),x=0;x&lt;s.numIconVertices/4;x++)t.icon.opacityVertexArray.emplaceBack(y);t.icon.placedSymbolArray.get(o).hidden=c.icon.isHidden()}s.collisionArrays||(s.collisionArrays=t.deserializeCollisionBoxes(r,s.textBoxStartIndex,s.textBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex));var b=s.collisionArrays;if(b){b.textBox&amp;&amp;t.hasCollisionBoxData()&amp;&amp;Pe(t.collisionBox.collisionVertexArray,c.text.placed,!1),b.iconBox&amp;&amp;t.hasCollisionBoxData()&amp;&amp;Pe(t.collisionBox.collisionVertexArray,c.icon.placed,!1);var _=b.textCircles;if(_&amp;&amp;t.hasCollisionCircleData())for(var w=0;w&lt;_.length;w+=5){var k=l||0===_[w+4];Pe(t.collisionCircle.collisionVertexArray,c.text.placed,k)}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&amp;&amp;(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&amp;&amp;t.text.opacityVertexBuffer&amp;&amp;t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&amp;&amp;t.icon.opacityVertexBuffer&amp;&amp;t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&amp;&amp;t.collisionBox.collisionVertexBuffer&amp;&amp;t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&amp;&amp;t.collisionCircle.collisionVertexBuffer&amp;&amp;t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},ze.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},ze.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime&lt;this.fadeDuration},ze.prototype.stillRecent=function(t){return&quot;undefined&quot;!==this.commitTime&amp;&amp;this.commitTime+this.fadeDuration&gt;t},ze.prototype.setStale=function(){this.stale=!0};var Oe=Math.pow(2,25),Ie=Math.pow(2,24),De=Math.pow(2,17),Re=Math.pow(2,16),Be=Math.pow(2,9),Fe=Math.pow(2,8),Ne=Math.pow(2,1);function je(t){if(0===t.opacity&amp;&amp;!t.placed)return 0;if(1===t.opacity&amp;&amp;t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Oe+e*Ie+r*De+e*Re+r*Be+e*Fe+r*Ne+e}var Ve=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ve.prototype.continuePlacement=function(t,e,r,n,i){for(;this._currentTileIndex&lt;t.length;){var a=t[this._currentTileIndex];if(e.placeLayerTile(n,a,r,this._seenCrossTileIDs),this._currentTileIndex++,i())return!0}};var Ue=function(t,e,r,n,i){this.placement=new ze(t,i),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};Ue.prototype.isDone=function(){return this._done},Ue.prototype.continuePlacement=function(t,e,r){for(var n=this,i=a.now(),o=function(){var t=a.now()-i;return!n._forceFullPlacement&amp;&amp;t&gt;2};this._currentPlacementIndex&gt;=0;){var s=e[t[n._currentPlacementIndex]],l=n.placement.collisionIndex.transform.zoom;if(&quot;symbol&quot;===s.type&amp;&amp;(!s.minzoom||s.minzoom&lt;=l)&amp;&amp;(!s.maxzoom||s.maxzoom&gt;l)){if(n._inProgressLayer||(n._inProgressLayer=new Ve),n._inProgressLayer.continuePlacement(r[s.source],n.placement,n._showCollisionBoxes,s,o))return;delete n._inProgressLayer}n._currentPlacementIndex--}this._done=!0},Ue.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var qe=512/t.default$8/2,He=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n],o=a.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:a.crossTileID,coord:this.getScaledCoordinates(a,t)})}};He.prototype.getScaledCoordinates=function(e,r){var n=r.canonical.z-this.tileID.canonical.z,i=qe/Math.pow(2,n),a=e.anchor;return{x:Math.floor((r.canonical.x*t.default$8+a.x)*i),y:Math.floor((r.canonical.y*t.default$8+a.y)*i)}},He.prototype.findMatches=function(t,e,r){for(var n=this.tileID.canonical.z&lt;e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0,a=t;i&lt;a.length;i+=1){var o=a[i];if(!o.crossTileID){var s=this.indexedSymbolInstances[o.key];if(s)for(var l=this.getScaledCoordinates(o,e),c=0,u=s;c&lt;u.length;c+=1){var f=u[c];if(Math.abs(f.coord.x-l.x)&lt;=n&amp;&amp;Math.abs(f.coord.y-l.y)&lt;=n&amp;&amp;!r[f.crossTileID]){r[f.crossTileID]=!0,o.crossTileID=f.crossTileID;break}}}}};var Ge=function(){this.maxCrossTileID=0};Ge.prototype.generate=function(){return++this.maxCrossTileID};var We=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};We.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var n=this.indexes[r],i={};for(var a in n){var o=n[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+e),i[o.tileID.key]=o}this.indexes[r]=i}this.lng=t},We.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&amp;&amp;this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var n=0,i=e.symbolInstances;n&lt;i.length;n+=1)i[n].crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var a=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var s=this.indexes[o];if(Number(o)&gt;t.overscaledZ)for(var l in s){var c=s[l];c.tileID.isChildOf(t)&amp;&amp;c.findMatches(e.symbolInstances,t,a)}else{var u=s[t.scaledTo(Number(o)).key];u&amp;&amp;u.findMatches(e.symbolInstances,t,a)}}for(var f=0,h=e.symbolInstances;f&lt;h.length;f+=1){var p=h[f];p.crossTileID||(p.crossTileID=r.generate(),a[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&amp;&amp;(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new He(t,e.symbolInstances,e.bucketInstanceId),!0},We.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var n=0,i=e.indexedSymbolInstances[r];n&lt;i.length;n+=1){var a=i[n];delete this.usedCrossTileIDs[t][a.crossTileID]}},We.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var n=this.indexes[r];for(var i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e};var Ye=function(){this.layerIndexes={},this.crossTileIDs=new Ge,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ye.prototype.addLayer=function(t,e,r){var n=this.layerIndexes[t.id];void 0===n&amp;&amp;(n=this.layerIndexes[t.id]=new We);var i=!1,a={};n.handleWrapJump(r);for(var o=0,s=e;o&lt;s.length;o+=1){var l=s[o],c=l.getBucket(t);c&amp;&amp;t.id===c.layerIds[0]&amp;&amp;(c.bucketInstanceId||(c.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,c,this.crossTileIDs)&amp;&amp;(i=!0),a[c.bucketInstanceId]=!0)}return n.removeStaleBuckets(a)&amp;&amp;(i=!0),i},Ye.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Xe=function(e,r){return t.emitValidationErrors(e,r&amp;&amp;r.filter(function(t){return&quot;source.canvas&quot;!==t.identifier}))},Ze=t.pick(ee,[&quot;addLayer&quot;,&quot;removeLayer&quot;,&quot;setPaintProperty&quot;,&quot;setLayoutProperty&quot;,&quot;setFilter&quot;,&quot;addSource&quot;,&quot;removeSource&quot;,&quot;setLayerZoomRange&quot;,&quot;setLight&quot;,&quot;setTransition&quot;,&quot;setGeoJSONSourceData&quot;]),$e=t.pick(ee,[&quot;setCenter&quot;,&quot;setZoom&quot;,&quot;setBearing&quot;,&quot;setPitch&quot;]),Je=function(e){function r(n,i){var a=this;void 0===i&amp;&amp;(i={}),e.call(this),this.map=n,this.dispatcher=new q((Jt||(Jt=new Kt),Jt),this),this.imageManager=new P,this.glyphManager=new F(n._transformRequest,i.localIdeographFontFamily),this.lineAtlas=new U(256,512),this.crossTileSymbolIndex=new Ye,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.default$23,this._loaded=!1,this._resetUpdates();var o=this;this._rtlTextPluginCallback=r.registerForPluginAvailability(function(t){for(var e in o.dispatcher.broadcast(&quot;loadRTLTextPlugin&quot;,t.pluginURL,t.completionCallback),o.sourceCaches)o.sourceCaches[e].reload()}),this.on(&quot;data&quot;,function(t){if(&quot;source&quot;===t.dataType&amp;&amp;&quot;metadata&quot;===t.sourceDataType){var e=a.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&amp;&amp;r.vectorLayerIds)for(var n in a._layers){var i=a._layers[n];i.source===r.id&amp;&amp;a._validateLayer(i)}}}})}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var n=this;void 0===r&amp;&amp;(r={}),this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;style&quot;}));var i=&quot;boolean&quot;==typeof r.validate?r.validate:!x(e);e=function(t,e){if(!x(t))return t;var r=A(t);return r.path=&quot;/styles/v1&quot;+r.path,y(r,e)}(e,r.accessToken);var a=this.map._transformRequest(e,t.ResourceType.Style);t.getJSON(a,function(e,r){e?n.fire(new t.ErrorEvent(e)):r&amp;&amp;n._load(r,i)})},r.prototype.loadJSON=function(e,r){var n=this;void 0===r&amp;&amp;(r={}),this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;style&quot;})),a.frame(function(){n._load(e,!1!==r.validate)})},r.prototype._load=function(e,r){var n=this;if(!r||!Xe(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)n.addSource(i,e.sources[i],{validate:!1});e.sprite?function(e,r,n){var i,o,s,l=a.devicePixelRatio&gt;1?&quot;@2x&quot;:&quot;&quot;;function c(){if(s)n(s);else if(i&amp;&amp;o){var e=a.getImageData(o),r={};for(var l in i){var c=i[l],u=c.width,f=c.height,h=c.x,p=c.y,d=c.sdf,g=c.pixelRatio,m=new t.RGBAImage({width:u,height:f});t.RGBAImage.copy(e,m,{x:h,y:p},{x:0,y:0},{width:u,height:f}),r[l]={data:m,pixelRatio:g,sdf:d}}n(null,r)}}t.getJSON(r(_(e,l,&quot;.json&quot;),t.ResourceType.SpriteJSON),function(t,e){s||(s=t,i=e,c())}),t.getImage(r(_(e,l,&quot;.png&quot;),t.ResourceType.SpriteImage),function(t,e){s||(s=t,o=e,c())})}(e.sprite,this.map._transformRequest,function(e,r){if(e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=te(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var s=0,l=o;s&lt;l.length;s+=1){var c=l[s];(c=t.default$22(c)).setEventedParent(n,{layer:{id:c.id}}),n._layers[c.id]=c}this.dispatcher.broadcast(&quot;setLayers&quot;,this._serializeLayers(this._order)),this.light=new V(this.stylesheet.light),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;})),this.fire(new t.Event(&quot;style.load&quot;))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();(&quot;geojson&quot;===i.type||i.vectorLayerIds&amp;&amp;-1===i.vectorLayerIds.indexOf(n))&amp;&amp;this.fire(new t.ErrorEvent(new Error('Source layer &quot;'+n+'&quot; does not exist on source &quot;'+i.id+'&quot; as specified by style layer &quot;'+e.id+'&quot;')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},r.prototype.hasTransitions=function(){if(this.light&amp;&amp;this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(&quot;Style is not done loading&quot;)},r.prototype.update=function(e){if(this._loaded){if(this._changed){var r=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var i in(r.length||n.length)&amp;&amp;this._updateWorkerLayers(r,n),this._updatedSources){var a=this._updatedSources[i];&quot;reload&quot;===a?this._reloadSource(i):&quot;clear&quot;===a&amp;&amp;this._clearSource(i)}for(var o in this._updatedPaintProps)this._layers[o].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var l=0,c=this._order;l&lt;c.length;l+=1){var u=c[l],f=this._layers[u];f.recalculate(e),!f.isHidden(e.zoom)&amp;&amp;f.source&amp;&amp;(this.sourceCaches[f.source].used=!0)}this.light.recalculate(e),this.z=e.zoom}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast(&quot;updateLayers&quot;,{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Xe(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=te(e.layers);var n=function(e,r){if(!e)return[{command:ee.setStyle,args:[r]}];var n=[];try{if(!t.default$10(e.version,r.version))return[{command:ee.setStyle,args:[r]}];t.default$10(e.center,r.center)||n.push({command:ee.setCenter,args:[r.center]}),t.default$10(e.zoom,r.zoom)||n.push({command:ee.setZoom,args:[r.zoom]}),t.default$10(e.bearing,r.bearing)||n.push({command:ee.setBearing,args:[r.bearing]}),t.default$10(e.pitch,r.pitch)||n.push({command:ee.setPitch,args:[r.pitch]}),t.default$10(e.sprite,r.sprite)||n.push({command:ee.setSprite,args:[r.sprite]}),t.default$10(e.glyphs,r.glyphs)||n.push({command:ee.setGlyphs,args:[r.glyphs]}),t.default$10(e.transition,r.transition)||n.push({command:ee.setTransition,args:[r.transition]}),t.default$10(e.light,r.light)||n.push({command:ee.setLight,args:[r.light]});var i={},a=[];!function(e,r,n,i){var a;for(a in r=r||{},e=e||{})e.hasOwnProperty(a)&amp;&amp;(r.hasOwnProperty(a)||ne(a,n,i));for(a in r)r.hasOwnProperty(a)&amp;&amp;(e.hasOwnProperty(a)?t.default$10(e[a],r[a])||(&quot;geojson&quot;===e[a].type&amp;&amp;&quot;geojson&quot;===r[a].type&amp;&amp;ae(e,r,a)?n.push({command:ee.setGeoJSONSourceData,args:[a,r[a].data]}):ie(a,r,n,i)):re(a,r,n))}(e.sources,r.sources,a,i);var o=[];e.layers&amp;&amp;e.layers.forEach(function(t){i[t.source]?n.push({command:ee.removeLayer,args:[t.id]}):o.push(t)}),n=n.concat(a),function(e,r,n){r=r||[];var i,a,o,s,l,c,u,f=(e=e||[]).map(se),h=r.map(se),p=e.reduce(le,{}),d=r.reduce(le,{}),g=f.slice(),m=Object.create(null);for(i=0,a=0;i&lt;f.length;i++)o=f[i],d.hasOwnProperty(o)?a++:(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.indexOf(o,a),1));for(i=0,a=0;i&lt;h.length;i++)o=h[h.length-1-i],g[g.length-1-i]!==o&amp;&amp;(p.hasOwnProperty(o)?(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.lastIndexOf(o,g.length-a),1)):a++,c=g[g.length-i],n.push({command:ee.addLayer,args:[d[o],c]}),g.splice(g.length-i,0,o),m[o]=!0);for(i=0;i&lt;h.length;i++)if(s=p[o=h[i]],l=d[o],!m[o]&amp;&amp;!t.default$10(s,l))if(t.default$10(s.source,l.source)&amp;&amp;t.default$10(s[&quot;source-layer&quot;],l[&quot;source-layer&quot;])&amp;&amp;t.default$10(s.type,l.type)){for(u in oe(s.layout,l.layout,n,o,null,ee.setLayoutProperty),oe(s.paint,l.paint,n,o,null,ee.setPaintProperty),t.default$10(s.filter,l.filter)||n.push({command:ee.setFilter,args:[o,l.filter]}),t.default$10(s.minzoom,l.minzoom)&amp;&amp;t.default$10(s.maxzoom,l.maxzoom)||n.push({command:ee.setLayerZoomRange,args:[o,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(u)&amp;&amp;&quot;layout&quot;!==u&amp;&amp;&quot;paint&quot;!==u&amp;&amp;&quot;filter&quot;!==u&amp;&amp;&quot;metadata&quot;!==u&amp;&amp;&quot;minzoom&quot;!==u&amp;&amp;&quot;maxzoom&quot;!==u&amp;&amp;(0===u.indexOf(&quot;paint.&quot;)?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}));for(u in l)l.hasOwnProperty(u)&amp;&amp;!s.hasOwnProperty(u)&amp;&amp;&quot;layout&quot;!==u&amp;&amp;&quot;paint&quot;!==u&amp;&amp;&quot;filter&quot;!==u&amp;&amp;&quot;metadata&quot;!==u&amp;&amp;&quot;minzoom&quot;!==u&amp;&amp;&quot;maxzoom&quot;!==u&amp;&amp;(0===u.indexOf(&quot;paint.&quot;)?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}))}else n.push({command:ee.removeLayer,args:[o]}),c=g[g.lastIndexOf(o)+1],n.push({command:ee.addLayer,args:[l,c]})}(o,r.layers,n)}catch(t){console.warn(&quot;Unable to compute style diff:&quot;,t),n=[{command:ee.setStyle,args:[r]}]}return n}(this.serialize(),e).filter(function(t){return!(t.command in $e)});if(0===n.length)return!1;var i=n.filter(function(t){return!(t.command in Ze)});if(i.length&gt;0)throw new Error(&quot;Unimplemented: &quot;+i.map(function(t){return t.command}).join(&quot;, &quot;)+&quot;.&quot;);return n.forEach(function(t){&quot;setTransition&quot;!==t.command&amp;&amp;r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(&quot;An image with this name already exists.&quot;)));this.imageManager.addImage(e,r),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(&quot;No image with this name exists.&quot;)));this.imageManager.removeImage(e),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))},r.prototype.addSource=function(e,r,n){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(&quot;There is already a source with this ID&quot;);if(!r.type)throw new Error(&quot;The type property must be defined, but the only the following properties were given: &quot;+Object.keys(r).join(&quot;, &quot;)+&quot;.&quot;);if(!([&quot;vector&quot;,&quot;raster&quot;,&quot;geojson&quot;,&quot;video&quot;,&quot;image&quot;].indexOf(r.type)&gt;=0&amp;&amp;this._validate(t.validateStyle.source,&quot;sources.&quot;+e,r,null,n))){this.map&amp;&amp;this.map._collectResourceTiming&amp;&amp;(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Yt(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(&quot;There is no source with this ID&quot;);for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source &quot;'+e+'&quot; cannot be removed while layer &quot;'+r+'&quot; is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event(&quot;data&quot;,{sourceDataType:&quot;metadata&quot;,dataType:&quot;source&quot;,sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&amp;&amp;n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&amp;&amp;this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id &quot;'+i+'&quot; already exists on this map')));else if(&quot;object&quot;==typeof e.source&amp;&amp;(this.addSource(i,e.source),e=t.clone(e),e=t.extend(e,{source:i})),!this._validate(t.validateStyle.layer,&quot;layers.&quot;+i,e,{arrayIndex:-1},n)){var a=t.default$22(e);this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}});var o=r?this._order.indexOf(r):this._order.length;if(r&amp;&amp;-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id &quot;'+r+'&quot; does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&amp;&amp;a.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]=&quot;clear&quot;:(this._updatedSources[a.source]=&quot;reload&quot;,this.sourceCaches[a.source].pause())}this._updateLayer(a)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&amp;&amp;-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id &quot;'+r+'&quot; does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be moved.&quot;)))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be removed.&quot;)))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&amp;&amp;i.maxzoom===n||(null!=r&amp;&amp;(i.minzoom=r),null!=n&amp;&amp;(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot have zoom extent.&quot;)))},r.prototype.setFilter=function(e,r){this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.default$10(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,&quot;layers.&quot;+n.id+&quot;.filter&quot;,r)||(n.filter=t.clone(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be filtered.&quot;)))},r.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?t.default$10(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be styled.&quot;)))},r.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},r.prototype.setPaintProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.default$10(i.getPaintProperty(r),n)){var a=i._transitionablePaint._values[r].value.isDataDriven();i.setPaintProperty(r,n),(i._transitionablePaint._values[r].value.isDataDriven()||a)&amp;&amp;this._updateLayer(i),this._changed=!0,this._updatedPaintProps[e]=!0}}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be styled.&quot;)))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&amp;&amp;this.stylesheet.transition)},r.prototype.serialize=function(){var e=this;return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&amp;&amp;!this._updatedSources[t.source]&amp;&amp;(this._updatedSources[t.source]=&quot;reload&quot;,this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenRenderedFeatures=function(t){for(var e=[],r=this._order.length-1;r&gt;=0;r--)for(var n=this._order[r],i=0,a=t;i&lt;a.length;i+=1){var o=a[i][n];if(o)for(var s=0,l=o;s&lt;l.length;s+=1){var c=l[s];e.push(c)}}return e},r.prototype.queryRenderedFeatures=function(e,r,n){r&amp;&amp;r.filter&amp;&amp;this._validate(t.validateStyle.filter,&quot;queryRenderedFeatures.filter&quot;,r.filter);var i={};if(r&amp;&amp;r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error(&quot;parameters.layers must be an Array.&quot;))),[];for(var a=0,o=r.layers;a&lt;o.length;a+=1){var s=o[a],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+s+&quot;' does not exist in the map's style and cannot be queried for features.&quot;))),[];i[l.source]=!0}}var c=[];for(var u in this.sourceCaches)r.layers&amp;&amp;!i[u]||c.push(at(this.sourceCaches[u],this._layers,e.worldCoordinate,r,n));return this.placement&amp;&amp;c.push(function(t,e,r,n,i){for(var a={},o=n.queryRenderedSymbols(e),s=[],l=0,c=Object.keys(o).map(Number);l&lt;c.length;l+=1){var u=c[l];s.push(i[u])}s.sort(ot);for(var f=function(){var e=p[h],n=e.featureIndex.lookupSymbolFeatures(o[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,r.filter,r.layers,t);for(var i in n){var s=a[i]=a[i]||[],l=n[i];l.sort(function(t,r){var n=e.featureSortOrder;if(n){var i=n.indexOf(t.featureIndex);return n.indexOf(r.featureIndex)-i}return r.featureIndex-t.featureIndex});for(var c=0,u=l;c&lt;u.length;c+=1){var f=u[c];s.push(f.feature)}}},h=0,p=s;h&lt;p.length;h+=1)f();return a}(this._layers,e.viewport,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(c)},r.prototype.querySourceFeatures=function(e,r){r&amp;&amp;r.filter&amp;&amp;this._validate(t.validateStyle.filter,&quot;querySourceFeatures.filter&quot;,r.filter);var n=this.sourceCaches[e];return n?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],i={},a=0;a&lt;r.length;a++){var o=r[a],s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(n,e))}return n}(n,r):[]},r.prototype.addSourceType=function(t,e,n){return r.getSourceType(t)?n(new Error('A source type called &quot;'+t+'&quot; already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(&quot;loadWorkerSource&quot;,{name:t,url:e.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e){this._checkLoaded();var r=this.light.getLight(),n=!1;for(var i in e)if(!t.default$10(e[i],r[i])){n=!0;break}if(n){var o={now:a.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(o)}},r.prototype._validate=function(e,r,n,i,a){return(!a||!1!==a.validate)&amp;&amp;Xe(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:n,styleSpec:t.default$5},i)))},r.prototype._remove=function(){for(var e in t.evented.off(&quot;pluginAvailable&quot;,this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(t,e,r){for(var n=!1,i=!1,o={},s=0,l=this._order;s&lt;l.length;s+=1){var c=l[s],u=this._layers[c];if(&quot;symbol&quot;===u.type){if(!o[u.source]){var f=this.sourceCaches[u.source];o[u.source]=f.getRenderableIds().map(function(t){return f.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var h=this.crossTileSymbolIndex.addLayer(u,o[u.source],t.center.lng);n=n||h}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var p=this._layerOrderChanged;if((p||!this.pauseablePlacement||this.pauseablePlacement.isDone()&amp;&amp;!this.placement.stillRecent(a.now()))&amp;&amp;(this.pauseablePlacement=new Ue(t,this._order,p,e,r),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&amp;&amp;(this.placement=this.pauseablePlacement.commit(this.placement,a.now()),i=!0),n&amp;&amp;this.pauseablePlacement.placement.setStale()),i||n)for(var d=0,g=this._order;d&lt;g.length;d+=1){var m=g[d],v=this._layers[m];&quot;symbol&quot;===v.type&amp;&amp;this.placement.updateLayerOpacities(v,o[v.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.now())},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r}(t.Evented);Je.getSourceType=function(t){return nt[t]},Je.setSourceType=function(t,e){nt[t]=e},Je.registerForPluginAvailability=t.registerForPluginAvailability;var Ke=t.createLayout([{name:&quot;a_pos&quot;,type:&quot;Int16&quot;,components:2}]),Qe={prelude:{fragmentSource:&quot;#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n&quot;,vertexSource:&quot;#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n    int packedIntValue = int(packedValue);\n    int v0 = packedIntValue / 256;\n    return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n    int intOpacity = int(packedOpacity) / 2;\n    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n//   floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n    return vec4(\n        unpack_float(encodedColor[0]) / 255.0,\n        unpack_float(encodedColor[1]) / 255.0\n    );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n    return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\n    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n    return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n    return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n&quot;},background:{fragmentSource:&quot;uniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n    gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},backgroundPattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n&quot;},circle:{fragmentSource:&quot;#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    vec2 extrude = v_data.xy;\n    float extrude_length = length(extrude);\n\n    lowp float antialiasblur = v_data.z;\n    float antialiased_blur = -max(blur, antialiasblur);\n\n    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n    float color_t = stroke_width &lt; 0.01 ? 0.0 : smoothstep(\n        antialiased_blur,\n        0.0,\n        extrude_length - radius / (radius + stroke_width)\n    );\n\n    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main(void) {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec2 circle_center = floor(a_pos * 0.5);\n    if (u_pitch_with_map) {\n        vec2 corner_position = circle_center;\n        if (u_scale_with_map) {\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n        } else {\n            // Pitching the circle with the map effectively scales it with the map\n            // To counteract the effect for pitch-scale: viewport, we rescale the\n            // whole circle based on the pitch scaling effect at its central point\n            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n        }\n\n        gl_Position = u_matrix * vec4(corner_position, 0, 1);\n    } else {\n        gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n        if (u_scale_with_map) {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n        } else {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n        }\n    }\n\n    // This is a minimum blur distance that serves as a faux-antialiasing for\n    // the circle. since blur is a ratio of the circle's size and the intent is\n    // to keep the blur at roughly 1px, the two are inversely related.\n    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n    v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n&quot;},clippingMask:{fragmentSource:&quot;void main() {\n    gl_FragColor = vec4(1.0);\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},heatmap:{fragmentSource:&quot;#pragma mapbox: define highp float weight\n\nuniform highp float u_intensity;\nvarying vec2 v_extrude;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n    #pragma mapbox: initialize highp float weight\n\n    // Kernel density estimation with a Gaussian kernel of size 5x5\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n    float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n// Effective \&quot;0\&quot; in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n    #pragma mapbox: initialize highp float weight\n    #pragma mapbox: initialize mediump float radius\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use\n    // it to produce the vertices of a square mesh framing the point feature\n    // we're adding to the kernel density texture.  We'll also pass it as\n    // a varying, so that the fragment shader can determine the distance of\n    // each fragment from the point feature.\n    // Before we do so, we need to scale it up sufficiently so that the\n    // kernel falls effectively to zero at the edge of the mesh.\n    // That is, we want to know S such that\n    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n    // Which solves to:\n    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n    // Pass the varying in units of radius\n    v_extrude = S * unscaled_extrude;\n\n    // Scale by radius and the zoom-based scale factor to produce actual\n    // mesh position\n    vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n    gl_Position = u_matrix * pos;\n}\n&quot;},heatmapTexture:{fragmentSource:&quot;uniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    float t = texture2D(u_image, v_pos).r;\n    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n    gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n&quot;},collisionBox:{fragmentSource:&quot;\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed &gt; 0.5) {\n        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed &gt; 0.5) {\n        // This box not used, fade it out\n        gl_FragColor *= .1;\n    }\n}&quot;,vertexSource:&quot;attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n}\n&quot;},collisionCircle:{fragmentSource:&quot;uniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed &gt; 0.5) {\n        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed &gt; 0.5) {\n        // This box not used, fade it out\n        color *= .2;\n    }\n\n    float extrude_scale_length = length(v_extrude_scale);\n    float extrude_length = length(v_extrude) * extrude_scale_length;\n    float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n    float radius = v_radius * extrude_scale_length;\n\n    float distance_to_edge = abs(extrude_length - radius);\n    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n    gl_FragColor = opacity_t * color;\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n    v_extrude = a_extrude * padding_factor;\n    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n&quot;},debug:{fragmentSource:&quot;uniform highp vec4 u_color;\n\nvoid main() {\n    gl_FragColor = u_color;\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},fill:{fragmentSource:&quot;#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},fillOutline:{fragmentSource:&quot;#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n    gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n&quot;},fillOutlinePattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    // find distance to outline for alpha interpolation\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n&quot;},fillPattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n&quot;},fillExtrusion:{fragmentSource:&quot;varying vec4 v_color;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    vec3 normal = a_normal_ed.xyz;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n\n    gl_Position = u_matrix * vec4(a_pos, t &gt; 0.0 ? height : base, 1);\n\n    // Relative luminance (how dark/bright is the surface color?)\n    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n    v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n    // Add slight ambient lighting so no extrusions are totally black\n    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n    color += ambientlight;\n\n    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n    // Adjust directional so that\n    // the range of values for highlight/shading is narrower\n    // with lower light intensity\n    // and with lighter/brighter surface colors\n    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n    // Add gradient along z axis of side surfaces\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n    // with lower bounds adjusted to hue of light\n    // so that shading is tinted with the complementary (opposite) color to the light color\n    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n&quot;},fillExtrusionPattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    vec4 mixedColor = mix(color1, color2, u_mix);\n\n    gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\nuniform float u_height_factor;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\nvarying float v_directional;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec3 normal = a_normal_ed.xyz;\n    float edgedistance = a_normal_ed.w;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n    float z = t &gt; 0.0 ? height : base;\n\n    gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n    vec2 pos = normal.x == 1.0 &amp;&amp; normal.y == 0.0 &amp;&amp; normal.z == 16384.0\n        ? a_pos // extrusion top\n        : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\n\n    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n&quot;},extrusionTexture:{fragmentSource:&quot;uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n&quot;},hillshadePrepare:{fragmentSource:&quot;#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nfloat getElevation(vec2 coord, float bias) {\n    // Convert encoded elevation value to meters\n    vec4 data = texture2D(u_image, coord) * 255.0;\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\n}\n\nvoid main() {\n    vec2 epsilon = 1.0 / u_dimension;\n\n    // queried pixels:\n    // +-----------+\n    // |   |   |   |\n    // | a | b | c |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | d | e | f |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | g | h | i |\n    // |   |   |   |\n    // +-----------+\n\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n    float e = getElevation(v_pos, 0.0);\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n    // here we divide the x and y slopes by 8 * pixel size\n    // where pixel size (aka meters/pixel) is:\n    // circumference of the world / (pixels per tile * number of tiles)\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n    // we want to vertically exaggerate the hillshading though, because otherwise\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\n    // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n    // Here we use a=0.3 which works out to the expression below. see \n    // nickidlugash's awesome breakdown for more info\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\n    float exaggeration = u_zoom &lt; 2.0 ? 0.4 : u_zoom &lt; 4.5 ? 0.35 : 0.3;\n\n    vec2 deriv = vec2(\n        (c + f + f + i) - (a + d + d + g),\n        (g + h + h + i) - (a + b + b + c)\n    ) /  pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n    gl_FragColor = clamp(vec4(\n        deriv.x / 2.0 + 0.5,\n        deriv.y / 2.0 + 0.5,\n        1.0,\n        1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\n}\n&quot;},hillshade:{fragmentSource:&quot;uniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n    vec4 pixel = texture2D(u_image, v_pos);\n\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n    // to account for mercator projection distortion. see #4807 for details\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n    // We also multiply the slope by an arbitrary z-factor of 1.25\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y &gt; 0.0 ? 1.0 : -1.0);\n\n    float intensity = u_light.x;\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n    float azimuth = u_light.y + PI;\n\n    // We scale the slope exponentially based on intensity, using a calculation similar to\n    // the exponential interpolation function in the style spec:\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\n    // so that higher intensity values create more opaque hillshading.\n    float base = 1.875 - intensity * 1.75;\n    float maxValue = 0.5 * PI;\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n    // so that the accent color's rate of change eases in while the shade color's eases out.\n    float accent = cos(scaledSlope);\n    // We multiply both the accent and shade color by a clamped intensity value\n    // so that intensities &gt;= 0.5 do not additionally affect the color values\n    // while intensity values &lt; 0.5 make the overall color more transparent.\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = a_texture_pos / 8192.0;\n}\n&quot;},line:{fragmentSource:&quot;#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n&quot;},lineGradient:{fragmentSource:&quot;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    // For gradient lines, v_lineprogress is the ratio along the entire line,\n    // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n    vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n&quot;},linePattern:{fragmentSource:&quot;uniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n    float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n\n    // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n    // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n    // to ensure we don't sample outside the designated symbol on the sprite sheet.\n    // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n    // the texture coordinate\n    float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);\n    float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);\n    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\n    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n    gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_linesofar = a_linesofar;\n    v_width2 = vec2(outset, inset);\n}\n&quot;},lineSDF:{fragmentSource:&quot;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float sdfdist_a = texture2D(u_image, v_tex_a).a;\n    float sdfdist_b = texture2D(u_image, v_tex_b).a;\n    float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n    alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist =outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n    v_width2 = vec2(outset, inset);\n}\n&quot;},raster:{fragmentSource:&quot;uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n    // read and cross-fade colors from the main and parent tiles\n    vec4 color0 = texture2D(u_image0, v_pos0);\n    vec4 color1 = texture2D(u_image1, v_pos1);\n    if (color0.a &gt; 0.0) {\n        color0.rgb = color0.rgb / color0.a;\n    }\n    if (color1.a &gt; 0.0) {\n        color1.rgb = color1.rgb / color1.a;\n    }\n    vec4 color = mix(color0, color1, u_fade_t);\n    color.a *= u_opacity;\n    vec3 rgb = color.rgb;\n\n    // spin\n    rgb = vec3(\n        dot(rgb, u_spin_weights.xyz),\n        dot(rgb, u_spin_weights.zxy),\n        dot(rgb, u_spin_weights.yzx));\n\n    // saturation\n    float average = (color.r + color.g + color.b) / 3.0;\n    rgb += (average - rgb) * u_saturation_factor;\n\n    // contrast\n    rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n    // brightness\n    vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n    vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n    gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    // We are using Int16 for texture position coordinates to give us enough precision for\n    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n    // as an arbitrarily high number to preserve adequate precision when rendering.\n    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n    // so math for modifying either is consistent.\n    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n&quot;},symbolIcon:{fragmentSource:&quot;uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    lowp float alpha = opacity * v_fade_opacity;\n    gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n\n    float size;\n    if (!u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant &amp;&amp; u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // See comments in symbol_sdf.vertex\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n            0.5 + 0.5 * distance_ratio,\n            0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n            4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // See comments in symbol_sdf.vertex\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n\n    v_tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] &gt; 0.5 ? u_fade_change : -u_fade_change;\n    v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n}\n&quot;},symbolSDF:{fragmentSource:&quot;#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 tex = v_data0.xy;\n    float gamma_scale = v_data1.x;\n    float size = v_data1.y;\n    float fade_opacity = v_data1[2];\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    lowp vec4 color = fill_color;\n    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n    lowp float buff = (256.0 - 64.0) / 256.0;\n    if (u_is_halo) {\n        color = halo_color;\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n        buff = (6.0 - halo_width / fontScale) / SDF_PX;\n    }\n\n    lowp float dist = texture2D(u_texture, tex).a;\n    highp float gamma_scaled = gamma * gamma_scale;\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n    gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n//   text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n    float size;\n\n    if (!u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant &amp;&amp; u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // If the label is pitched with the map, layout is done in pitched space,\n    // which makes labels in the distance smaller relative to viewport space.\n    // We counteract part of that effect by multiplying by the perspective ratio.\n    // If the label isn't pitched with the map, we do layout in viewport space,\n    // which makes labels in the distance larger relative to the features around\n    // them. We counteract part of that effect by dividing by the perspective ratio.\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n        0.5 + 0.5 * distance_ratio,\n        0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n        4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n        // To figure out that angle in projected space, we draw a short horizontal line in tile\n        // space, project it, and measure its angle in projected space.\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n    float gamma_scale = gl_Position.w;\n\n    vec2 tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] &gt; 0.5 ? u_fade_change : -u_fade_change;\n    float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n    v_data0 = vec2(tex.x, tex.y);\n    v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\n}\n&quot;}},tr=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,er=function(t){var e=Qe[t],r={};e.fragmentSource=e.fragmentSource.replace(tr,function(t,e,n,i,a){return r[a]=!0,&quot;define&quot;===e?&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\nvarying &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot;;\n#else\nuniform &quot;+n+&quot; &quot;+i+&quot; u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;\n#ifdef HAS_UNIFORM_u_&quot;+a+&quot;\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = u_&quot;+a+&quot;;\n#endif\n&quot;}),e.vertexSource=e.vertexSource.replace(tr,function(t,e,n,i,a){var o=&quot;float&quot;===i?&quot;vec2&quot;:&quot;vec4&quot;;return r[a]?&quot;define&quot;===e?&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\nuniform lowp float a_&quot;+a+&quot;_t;\nattribute &quot;+n+&quot; &quot;+o+&quot; a_&quot;+a+&quot;;\nvarying &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot;;\n#else\nuniform &quot;+n+&quot; &quot;+i+&quot; u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\n    &quot;+a+&quot; = unpack_mix_&quot;+o+&quot;(a_&quot;+a+&quot;, a_&quot;+a+&quot;_t);\n#else\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;define&quot;===e?&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\nuniform lowp float a_&quot;+a+&quot;_t;\nattribute &quot;+n+&quot; &quot;+o+&quot; a_&quot;+a+&quot;;\n#else\nuniform &quot;+n+&quot; &quot;+i+&quot; u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = unpack_mix_&quot;+o+&quot;(a_&quot;+a+&quot;, a_&quot;+a+&quot;_t);\n#else\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = u_&quot;+a+&quot;;\n#endif\n&quot;})};for(var rr in Qe)er(rr);var nr=Qe,ir=function(t,e,r,n){var i=t.gl;this.program=i.createProgram();var o=r.defines().concat(&quot;#define DEVICE_PIXEL_RATIO &quot;+a.devicePixelRatio.toFixed(1));n&amp;&amp;o.push(&quot;#define OVERDRAW_INSPECTOR;&quot;);var s=o.concat(nr.prelude.fragmentSource,e.fragmentSource).join(&quot;\n&quot;),l=o.concat(nr.prelude.vertexSource,e.vertexSource).join(&quot;\n&quot;),c=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(c,s),i.compileShader(c),i.attachShader(this.program,c);var u=i.createShader(i.VERTEX_SHADER);i.shaderSource(u,l),i.compileShader(u),i.attachShader(this.program,u);for(var f=r.layoutAttributes||[],h=0;h&lt;f.length;h++)i.bindAttribLocation(this.program,h,f[h].name);i.linkProgram(this.program),this.numAttributes=i.getProgramParameter(this.program,i.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var p=0;p&lt;this.numAttributes;p++){var d=i.getActiveAttrib(this.program,p);d&amp;&amp;(this.attributes[d.name]=i.getAttribLocation(this.program,d.name))}for(var g=i.getProgramParameter(this.program,i.ACTIVE_UNIFORMS),m=0;m&lt;g;m++){var v=i.getActiveUniform(this.program,m);v&amp;&amp;(this.uniforms[v.name]=i.getUniformLocation(this.program,v.name))}};function ar(e,r,n,i,a){for(var o=0;o&lt;n.length;o++){var s=n[o];if(i.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var l=r.children(1/0),c=0;c&lt;l.length;c++)ar(e,l[c],n.slice(o),i,a);return}}var u=r.overscaledZ-e.overscaledZ,f=new t.CanonicalTileID(u,r.canonical.x-(e.canonical.x&lt;&lt;u),r.canonical.y-(e.canonical.y&lt;&lt;u));a[f.key]=a[f.key]||f}function or(t,e,r,n,i){var a=t.context,o=a.gl,s=i?t.useProgram(&quot;collisionCircle&quot;):t.useProgram(&quot;collisionBox&quot;);a.setDepthMode(qt.disabled),a.setStencilMode(Ht.disabled),a.setColorMode(t.colorModeForRenderPass());for(var l=0;l&lt;n.length;l++){var c=n[l],u=e.getTile(c),f=u.getBucket(r);if(f){var h=i?f.collisionCircle:f.collisionBox;if(h){o.uniformMatrix4fv(s.uniforms.u_matrix,!1,c.posMatrix),i||a.lineWidth.set(1),o.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var p=Te(u,1,t.transform.zoom),d=Math.pow(2,t.transform.zoom-u.tileID.overscaledZ);o.uniform1f(s.uniforms.u_pixels_to_tile_units,p),o.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(p*d),t.transform.pixelsToGLUnits[1]/(p*d)),o.uniform1f(s.uniforms.u_overscale_factor,u.tileID.overscaleFactor()),s.draw(a,i?o.TRIANGLES:o.LINES,r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,h.collisionVertexBuffer,null)}}}}ir.prototype.draw=function(t,e,r,n,i,a,o,s,l){for(var c,u=t.gl,f=(c={},c[u.LINES]=2,c[u.TRIANGLES]=3,c)[e],h=0,p=a.get();h&lt;p.length;h+=1){var d=p[h],g=d.vaos||(d.vaos={});(g[r]||(g[r]=new Q)).bind(t,this,n,o?o.getPaintVertexBuffers():[],i,d.vertexOffset,s,l),u.drawElements(e,d.primitiveLength*f,u.UNSIGNED_SHORT,d.primitiveOffset*f*2)}};var sr=t.mat4.identity(new Float32Array(16)),lr=t.default$19.layout;function cr(t,e,r,n,i,a,o,s,l,c){var u,f=t.context,h=f.gl,p=t.transform,d=&quot;map&quot;===s,g=&quot;map&quot;===l,m=d&amp;&amp;&quot;line&quot;===r.layout.get(&quot;symbol-placement&quot;),v=d&amp;&amp;!g&amp;&amp;!m,y=g;f.setDepthMode(y?t.depthModeForSublayer(0,qt.ReadOnly):qt.disabled);for(var x=0,b=n;x&lt;b.length;x+=1){var _=b[x],w=e.getTile(_),k=w.getBucket(r);if(k){var M=i?k.text:k.icon;if(M&amp;&amp;M.segments.get().length){var A=M.programConfigurations.get(r.id),T=i||k.sdfIcons,S=i?k.textSizeData:k.iconSizeData;if(u||(u=t.useProgram(T?&quot;symbolSDF&quot;:&quot;symbolIcon&quot;,A),A.setUniforms(t.context,u,r.paint,{zoom:t.transform.zoom}),ur(u,t,r,i,v,g,S)),f.activeTexture.set(h.TEXTURE0),h.uniform1i(u.uniforms.u_texture,0),i)w.glyphAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.glyphAtlasTexture.size);else{var E=1!==r.layout.get(&quot;icon-size&quot;).constantOr(0)||k.iconsNeedLinear,C=g||0!==p.pitch;w.iconAtlasTexture.bind(T||t.options.rotating||t.options.zooming||E||C?h.LINEAR:h.NEAREST,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.iconAtlasTexture.size)}h.uniformMatrix4fv(u.uniforms.u_matrix,!1,t.translatePosMatrix(_.posMatrix,w,a,o));var L=Te(w,1,t.transform.zoom),z=fe(_.posMatrix,g,d,t.transform,L),P=he(_.posMatrix,g,d,t.transform,L);h.uniformMatrix4fv(u.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(P,w,a,o,!0)),m?(h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,sr),ge(k,_.posMatrix,t,i,z,P,g,c)):h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,z),h.uniform1f(u.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),fr(u,A,t,r,w,M,i,T,g)}}}}function ur(e,r,n,i,a,o,s){var l=r.context.gl,c=r.transform;l.uniform1i(e.uniforms.u_pitch_with_map,o?1:0),l.uniform1f(e.uniforms.u_is_text,i?1:0),l.uniform1f(e.uniforms.u_pitch,c.pitch/360*2*Math.PI);var u=&quot;constant&quot;===s.functionType||&quot;source&quot;===s.functionType,f=&quot;constant&quot;===s.functionType||&quot;camera&quot;===s.functionType;l.uniform1i(e.uniforms.u_is_size_zoom_constant,u?1:0),l.uniform1i(e.uniforms.u_is_size_feature_constant,f?1:0),l.uniform1f(e.uniforms.u_camera_to_center_distance,c.cameraToCenterDistance);var h=t.evaluateSizeForZoom(s,c.zoom,lr.properties[i?&quot;text-size&quot;:&quot;icon-size&quot;]);void 0!==h.uSizeT&amp;&amp;l.uniform1f(e.uniforms.u_size_t,h.uSizeT),void 0!==h.uSize&amp;&amp;l.uniform1f(e.uniforms.u_size,h.uSize),l.uniform1f(e.uniforms.u_aspect_ratio,c.width/c.height),l.uniform1i(e.uniforms.u_rotate_symbol,a?1:0)}function fr(t,e,r,n,i,a,o,s,l){var c=r.context,u=c.gl,f=r.transform;if(s){var h=0!==n.paint.get(o?&quot;text-halo-width&quot;:&quot;icon-halo-width&quot;).constantOr(1),p=l?Math.cos(f._pitch)*f.cameraToCenterDistance:1;u.uniform1f(t.uniforms.u_gamma_scale,p),h&amp;&amp;(u.uniform1f(t.uniforms.u_is_halo,1),hr(a,n,c,t)),u.uniform1f(t.uniforms.u_is_halo,0)}hr(a,n,c,t)}function hr(t,e,r,n){n.draw(r,r.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function pr(t,e,r,n,i,o,s,l,c){var u,f,h,p,d=e.context,g=d.gl,m=i.paint.get(&quot;line-dasharray&quot;),v=i.paint.get(&quot;line-pattern&quot;);if(l||c){var y=1/Te(r,1,e.transform.tileZoom);if(m){u=e.lineAtlas.getDash(m.from,&quot;round&quot;===i.layout.get(&quot;line-cap&quot;)),f=e.lineAtlas.getDash(m.to,&quot;round&quot;===i.layout.get(&quot;line-cap&quot;));var x=u.width*m.fromScale,b=f.width*m.toScale;g.uniform2f(t.uniforms.u_patternscale_a,y/x,-u.height/2),g.uniform2f(t.uniforms.u_patternscale_b,y/b,-f.height/2),g.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(x,b)*a.devicePixelRatio)/2)}else if(v){if(h=e.imageManager.getPattern(v.from),p=e.imageManager.getPattern(v.to),!h||!p)return;g.uniform2f(t.uniforms.u_pattern_size_a,h.displaySize[0]*v.fromScale/y,h.displaySize[1]),g.uniform2f(t.uniforms.u_pattern_size_b,p.displaySize[0]*v.toScale/y,p.displaySize[1]);var _=e.imageManager.getPixelSize(),w=_.width,k=_.height;g.uniform2fv(t.uniforms.u_texsize,[w,k])}g.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}l&amp;&amp;(m?(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.lineAtlas.bind(d),g.uniform1f(t.uniforms.u_tex_y_a,u.y),g.uniform1f(t.uniforms.u_tex_y_b,f.y),g.uniform1f(t.uniforms.u_mix,m.t)):v&amp;&amp;(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.imageManager.bind(d),g.uniform2fv(t.uniforms.u_pattern_tl_a,h.tl),g.uniform2fv(t.uniforms.u_pattern_br_a,h.br),g.uniform2fv(t.uniforms.u_pattern_tl_b,p.tl),g.uniform2fv(t.uniforms.u_pattern_br_b,p.br),g.uniform1f(t.uniforms.u_fade,v.t))),d.setStencilMode(e.stencilModeForClipping(o));var M=e.translatePosMatrix(o.posMatrix,r,i.paint.get(&quot;line-translate&quot;),i.paint.get(&quot;line-translate-anchor&quot;));if(g.uniformMatrix4fv(t.uniforms.u_matrix,!1,M),g.uniform1f(t.uniforms.u_ratio,1/Te(r,1,e.transform.zoom)),i.paint.get(&quot;line-gradient&quot;)){d.activeTexture.set(g.TEXTURE0);var A=i.gradientTexture;if(!i.gradient)return;A||(A=i.gradientTexture=new z(d,i.gradient,g.RGBA)),A.bind(g.LINEAR,g.CLAMP_TO_EDGE),g.uniform1i(t.uniforms.u_image,0)}t.draw(d,g.TRIANGLES,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,s)}var dr=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),n=e.imageManager.getPattern(t.to);return!r||!n},gr=function(t,e,r){var n=e.context,i=n.gl,a=e.imageManager.getPattern(t.from),o=e.imageManager.getPattern(t.to);i.uniform1i(r.uniforms.u_image,0),i.uniform2fv(r.uniforms.u_pattern_tl_a,a.tl),i.uniform2fv(r.uniforms.u_pattern_br_a,a.br),i.uniform2fv(r.uniforms.u_pattern_tl_b,o.tl),i.uniform2fv(r.uniforms.u_pattern_br_b,o.br);var s=e.imageManager.getPixelSize(),l=s.width,c=s.height;i.uniform2fv(r.uniforms.u_texsize,[l,c]),i.uniform1f(r.uniforms.u_mix,t.t),i.uniform2fv(r.uniforms.u_pattern_size_a,a.displaySize),i.uniform2fv(r.uniforms.u_pattern_size_b,o.displaySize),i.uniform1f(r.uniforms.u_scale_a,t.fromScale),i.uniform1f(r.uniforms.u_scale_b,t.toScale),n.activeTexture.set(i.TEXTURE0),e.imageManager.bind(e.context)},mr=function(t,e,r){var n=e.context.gl;n.uniform1f(r.uniforms.u_tile_units_to_pixels,1/Te(t,1,e.transform.tileZoom));var i=Math.pow(2,t.tileID.overscaledZ),a=t.tileSize*Math.pow(2,e.transform.tileZoom)/i,o=a*(t.tileID.canonical.x+t.tileID.wrap*i),s=a*t.tileID.canonical.y;n.uniform2f(r.uniforms.u_pixel_coord_upper,o&gt;&gt;16,s&gt;&gt;16),n.uniform2f(r.uniforms.u_pixel_coord_lower,65535&amp;o,65535&amp;s)};function vr(t,e,r,n,i){if(!dr(r.paint.get(&quot;fill-pattern&quot;),t))for(var a=!0,o=0,s=n;o&lt;s.length;o+=1){var l=s[o],c=e.getTile(l),u=c.getBucket(r);u&amp;&amp;(t.context.setStencilMode(t.stencilModeForClipping(l)),i(t,e,r,c,l,u,a),a=!1)}}function yr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id);br(&quot;fill&quot;,r.paint.get(&quot;fill-pattern&quot;),t,l,r,n,i,o).draw(t.context,s.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,l)}function xr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id),c=br(&quot;fillOutline&quot;,r.getPaintProperty(&quot;fill-outline-color&quot;)?null:r.paint.get(&quot;fill-pattern&quot;),t,l,r,n,i,o);s.uniform2f(c.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),c.draw(t.context,s.LINES,r.id,a.layoutVertexBuffer,a.indexBuffer2,a.segments2,l)}function br(t,e,r,n,i,a,o,s){var l,c=r.context.program.get();return e?(l=r.useProgram(t+&quot;Pattern&quot;,n),(s||l.program!==c)&amp;&amp;(n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom}),gr(e,r,l)),mr(a,r,l)):(l=r.useProgram(t,n),(s||l.program!==c)&amp;&amp;n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom})),r.context.gl.uniformMatrix4fv(l.uniforms.u_matrix,!1,r.translatePosMatrix(o.posMatrix,a,i.paint.get(&quot;fill-translate&quot;),i.paint.get(&quot;fill-translate-anchor&quot;))),l}var _r=t.default$20.mat3,wr=t.default$20.mat4,kr=t.default$20.vec3;function Mr(t,e,r,n,i,a,o){var s=t.context,l=s.gl,c=r.paint.get(&quot;fill-extrusion-pattern&quot;),u=t.context.program.get(),f=a.programConfigurations.get(r.id),h=t.useProgram(c?&quot;fillExtrusionPattern&quot;:&quot;fillExtrusion&quot;,f);if((o||h.program!==u)&amp;&amp;f.setUniforms(s,h,r.paint,{zoom:t.transform.zoom}),c){if(dr(c,t))return;gr(c,t,h),mr(n,t,h),l.uniform1f(h.uniforms.u_height_factor,-Math.pow(2,i.overscaledZ)/n.tileSize/8)}t.context.gl.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.translatePosMatrix(i.posMatrix,n,r.paint.get(&quot;fill-extrusion-translate&quot;),r.paint.get(&quot;fill-extrusion-translate-anchor&quot;))),function(t,e){var r=e.context.gl,n=e.style.light,i=n.properties.get(&quot;position&quot;),a=[i.x,i.y,i.z],o=_r.create();&quot;viewport&quot;===n.properties.get(&quot;anchor&quot;)&amp;&amp;_r.fromRotation(o,-e.transform.angle),kr.transformMat3(a,a,o);var s=n.properties.get(&quot;color&quot;);r.uniform3fv(t.uniforms.u_lightpos,a),r.uniform1f(t.uniforms.u_lightintensity,n.properties.get(&quot;intensity&quot;)),r.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b)}(h,t),h.draw(s,l.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,f)}function Ar(e,r,n){var i=e.context,a=i.gl,o=r.fbo;if(o){var s=e.useProgram(&quot;hillshade&quot;),l=e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),!0);!function(t,e,r){var n=r.paint.get(&quot;hillshade-illumination-direction&quot;)*(Math.PI/180);&quot;viewport&quot;===r.paint.get(&quot;hillshade-illumination-anchor&quot;)&amp;&amp;(n-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,r.paint.get(&quot;hillshade-exaggeration&quot;),n)}(s,e,n);var c=function(e,r){var n=r.toCoordinate(),i=new t.default$17(n.column,n.row+1,n.zoom);return[e.transform.coordinateLocation(n).lat,e.transform.coordinateLocation(i).lat]}(e,r.tileID);i.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),a.uniformMatrix4fv(s.uniforms.u_matrix,!1,l),a.uniform2fv(s.uniforms.u_latrange,c),a.uniform1i(s.uniforms.u_image,0);var u=n.paint.get(&quot;hillshade-shadow-color&quot;);a.uniform4f(s.uniforms.u_shadow,u.r,u.g,u.b,u.a);var f=n.paint.get(&quot;hillshade-highlight-color&quot;);a.uniform4f(s.uniforms.u_highlight,f.r,f.g,f.b,f.a);var h=n.paint.get(&quot;hillshade-accent-color&quot;);if(a.uniform4f(s.uniforms.u_accent,h.r,h.g,h.b,h.a),r.maskedBoundsBuffer&amp;&amp;r.maskedIndexBuffer&amp;&amp;r.segments)s.draw(i,a.TRIANGLES,n.id,r.maskedBoundsBuffer,r.maskedIndexBuffer,r.segments);else{var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,s,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length)}}}function Tr(e,r,n){var i=e.context,a=i.gl;if(r.dem&amp;&amp;r.dem.level){var o=r.dem.level.dim,s=r.dem.getPixels();if(i.activeTexture.set(a.TEXTURE1),i.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(r.tileSize),r.demTexture){var l=r.demTexture;l.update(s,{premultiply:!1}),l.bind(a.NEAREST,a.CLAMP_TO_EDGE)}else r.demTexture=new z(i,s,a.RGBA,{premultiply:!1}),r.demTexture.bind(a.NEAREST,a.CLAMP_TO_EDGE);i.activeTexture.set(a.TEXTURE0);var c=r.fbo;if(!c){var u=new z(i,{width:o,height:o,data:null},a.RGBA);u.bind(a.LINEAR,a.CLAMP_TO_EDGE),(c=r.fbo=i.createFramebuffer(o,o)).colorAttachment.set(u.texture)}i.bindFramebuffer.set(c.framebuffer),i.viewport.set([0,0,o,o]);var f=t.mat4.create();t.mat4.ortho(f,0,t.default$8,-t.default$8,0,0,1),t.mat4.translate(f,f,[0,-t.default$8,0]);var h=e.useProgram(&quot;hillshadePrepare&quot;);a.uniformMatrix4fv(h.uniforms.u_matrix,!1,f),a.uniform1f(h.uniforms.u_zoom,r.tileID.overscaledZ),a.uniform2fv(h.uniforms.u_dimension,[2*o,2*o]),a.uniform1i(h.uniforms.u_image,1),a.uniform1f(h.uniforms.u_maxzoom,n);var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,h,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length),r.needsHillshadePrepare=!1}}function Sr(e,r,n,i,o){var s=i.paint.get(&quot;raster-fade-duration&quot;);if(s&gt;0){var l=a.now(),c=(l-e.timeAdded)/s,u=r?(l-r.timeAdded)/s:-1,f=n.getSource(),h=o.coveringZoomLevel({tileSize:f.tileSize,roundZoom:f.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-h)&gt;Math.abs(e.tileID.overscaledZ-h),d=p&amp;&amp;e.refreshedUponExpiration?1:t.clamp(p?c:1-u,0,1);return e.refreshedUponExpiration&amp;&amp;c&gt;=1&amp;&amp;(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}function Er(e,r,n){var i=e.context,o=i.gl;i.lineWidth.set(1*a.devicePixelRatio);var s=n.posMatrix,l=e.useProgram(&quot;debug&quot;);i.setDepthMode(qt.disabled),i.setStencilMode(Ht.disabled),i.setColorMode(e.colorModeForRenderPass()),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.uniform4f(l.uniforms.u_color,1,0,0,1),e.debugVAO.bind(i,l,e.debugBuffer,[]),o.drawArrays(o.LINE_STRIP,0,e.debugBuffer.length);for(var c=function(t,e,r,n){n=n||1;var i,a,o,s,l,c,u,f,h=[];for(i=0,a=t.length;i&lt;a;i++)if(l=Cr[t[i]]){for(f=null,o=0,s=l[1].length;o&lt;s;o+=2)-1===l[1][o]&amp;&amp;-1===l[1][o+1]?f=null:(c=e+l[1][o]*n,u=200-l[1][o+1]*n,f&amp;&amp;h.push(f.x,f.y,c,u),f={x:c,y:u});e+=l[0]*n}return h}(n.toString(),50,0,5),u=new t.PosArray,f=0;f&lt;c.length;f+=2)u.emplaceBack(c[f],c[f+1]);var h=i.createVertexBuffer(u,Ke.members);(new Q).bind(i,l,h,[]),o.uniform4f(l.uniforms.u_color,1,1,1,1);for(var p=r.getTile(n).tileSize,d=t.default$8/(Math.pow(2,e.transform.zoom-n.overscaledZ)*p),g=[[-1,-1],[-1,1],[1,-1],[1,1]],m=0;m&lt;g.length;m++){var v=g[m];o.uniformMatrix4fv(l.uniforms.u_matrix,!1,t.mat4.translate([],s,[d*v[0],d*v[1],0])),o.drawArrays(o.LINES,0,h.length)}o.uniform4f(l.uniforms.u_color,0,0,0,1),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.drawArrays(o.LINES,0,h.length)}var Cr={&quot; &quot;:[16,[]],&quot;!&quot;:[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'&quot;':[16,[4,21,4,14,-1,-1,12,21,12,14]],&quot;#&quot;:[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],&quot;%&quot;:[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],&quot;&amp;&quot;:[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],&quot;'&quot;:[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],&quot;(&quot;:[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],&quot;)&quot;:[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],&quot;*&quot;:[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],&quot;+&quot;:[26,[13,18,13,0,-1,-1,4,9,22,9]],&quot;,&quot;:[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],&quot;-&quot;:[26,[4,9,22,9]],&quot;.&quot;:[10,[5,2,4,1,5,0,6,1,5,2]],&quot;/&quot;:[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],&quot;:&quot;:[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],&quot;;&quot;:[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],&quot;&lt;&quot;:[24,[20,18,4,9,20,0]],&quot;=&quot;:[26,[4,12,22,12,-1,-1,4,6,22,6]],&quot;&gt;&quot;:[24,[4,18,20,9,4,0]],&quot;?&quot;:[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],&quot;@&quot;:[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],&quot;[&quot;:[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],&quot;\\&quot;:[14,[0,21,14,-3]],&quot;]&quot;:[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],&quot;^&quot;:[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],&quot;`&quot;:[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],&quot;{&quot;:[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],&quot;|&quot;:[8,[4,25,4,-7]],&quot;}&quot;:[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],&quot;~&quot;:[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},Lr={symbol:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass){var i=t.context;i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass()),0!==r.paint.get(&quot;icon-opacity&quot;).constantOr(1)&amp;&amp;cr(t,e,r,n,!1,r.paint.get(&quot;icon-translate&quot;),r.paint.get(&quot;icon-translate-anchor&quot;),r.layout.get(&quot;icon-rotation-alignment&quot;),r.layout.get(&quot;icon-pitch-alignment&quot;),r.layout.get(&quot;icon-keep-upright&quot;)),0!==r.paint.get(&quot;text-opacity&quot;).constantOr(1)&amp;&amp;cr(t,e,r,n,!0,r.paint.get(&quot;text-translate&quot;),r.paint.get(&quot;text-translate-anchor&quot;),r.layout.get(&quot;text-rotation-alignment&quot;),r.layout.get(&quot;text-pitch-alignment&quot;),r.layout.get(&quot;text-keep-upright&quot;)),e.map.showCollisionBoxes&amp;&amp;function(t,e,r,n){or(t,e,r,n,!1),or(t,e,r,n,!0)}(t,e,r,n)}},circle:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass){var i=r.paint.get(&quot;circle-opacity&quot;),a=r.paint.get(&quot;circle-stroke-width&quot;),o=r.paint.get(&quot;circle-stroke-opacity&quot;);if(0!==i.constantOr(1)||0!==a.constantOr(1)&amp;&amp;0!==o.constantOr(1)){var s=t.context,l=s.gl;s.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),s.setStencilMode(Ht.disabled),s.setColorMode(t.colorModeForRenderPass());for(var c=!0,u=0;u&lt;n.length;u++){var f=n[u],h=e.getTile(f),p=h.getBucket(r);if(p){var d=t.context.program.get(),g=p.programConfigurations.get(r.id),m=t.useProgram(&quot;circle&quot;,g);if((c||m.program!==d)&amp;&amp;(g.setUniforms(s,m,r.paint,{zoom:t.transform.zoom}),c=!1),l.uniform1f(m.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),l.uniform1i(m.uniforms.u_scale_with_map,&quot;map&quot;===r.paint.get(&quot;circle-pitch-scale&quot;)?1:0),&quot;map&quot;===r.paint.get(&quot;circle-pitch-alignment&quot;)){l.uniform1i(m.uniforms.u_pitch_with_map,1);var v=Te(h,1,t.transform.zoom);l.uniform2f(m.uniforms.u_extrude_scale,v,v)}else l.uniform1i(m.uniforms.u_pitch_with_map,0),l.uniform2fv(m.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);l.uniformMatrix4fv(m.uniforms.u_matrix,!1,t.translatePosMatrix(f.posMatrix,h,r.paint.get(&quot;circle-translate&quot;),r.paint.get(&quot;circle-translate-anchor&quot;))),m.draw(s,l.TRIANGLES,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,g)}}}}},heatmap:function(e,r,n,i){if(0!==n.paint.get(&quot;heatmap-opacity&quot;))if(&quot;offscreen&quot;===e.renderPass){var a=e.context,o=a.gl;a.setDepthMode(e.depthModeForSublayer(0,qt.ReadOnly)),a.setStencilMode(Ht.disabled),function(t,e,r){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=r.heatmapFbo;if(i)n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var a=n.createTexture();n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),i=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,r,n,i){var a=e.gl;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r.width/4,r.height/4,0,a.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),i.colorAttachment.set(n),e.extTextureHalfFloat&amp;&amp;a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE&amp;&amp;(e.extTextureHalfFloat=null,i.colorAttachment.setDirty(),t(e,r,n,i))}(t,e,a,i)}}(a,e,n),a.clear({color:t.default$6.transparent}),a.setColorMode(new Gt([o.ONE,o.ONE],t.default$6.transparent,[!0,!0,!0,!0]));for(var s=!0,l=0;l&lt;i.length;l++){var c=i[l];if(!r.hasRenderableParent(c)){var u=r.getTile(c),f=u.getBucket(n);if(f){var h=e.context.program.get(),p=f.programConfigurations.get(n.id),d=e.useProgram(&quot;heatmap&quot;,p),g=e.transform.zoom;(s||d.program!==h)&amp;&amp;(p.setUniforms(e.context,d,n.paint,{zoom:g}),s=!1),o.uniform1f(d.uniforms.u_extrude_scale,Te(u,1,g)),o.uniform1f(d.uniforms.u_intensity,n.paint.get(&quot;heatmap-intensity&quot;)),o.uniformMatrix4fv(d.uniforms.u_matrix,!1,c.posMatrix),d.draw(a,o.TRIANGLES,n.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,p)}}}a.viewport.set([0,0,e.width,e.height])}else&quot;translucent&quot;===e.renderPass&amp;&amp;(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var n=e.context,i=n.gl,a=r.heatmapFbo;if(a){n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1);var o=r.colorRampTexture;o||(o=r.colorRampTexture=new z(n,r.colorRamp,i.RGBA)),o.bind(i.LINEAR,i.CLAMP_TO_EDGE),n.setDepthMode(qt.disabled);var s=e.useProgram(&quot;heatmapTexture&quot;),l=r.paint.get(&quot;heatmap-opacity&quot;);i.uniform1f(s.uniforms.u_opacity,l),i.uniform1i(s.uniforms.u_image,0),i.uniform1i(s.uniforms.u_color_ramp,1);var c=t.mat4.create();t.mat4.ortho(c,0,e.width,e.height,0,0,1),i.uniformMatrix4fv(s.uniforms.u_matrix,!1,c),i.uniform2f(s.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),e.viewportVAO.bind(e.context,s,e.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n))},line:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass&amp;&amp;0!==r.paint.get(&quot;line-opacity&quot;).constantOr(1)){var i=t.context;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setColorMode(t.colorModeForRenderPass());for(var a,o=r.paint.get(&quot;line-dasharray&quot;)?&quot;lineSDF&quot;:r.paint.get(&quot;line-pattern&quot;)?&quot;linePattern&quot;:r.paint.get(&quot;line-gradient&quot;)?&quot;lineGradient&quot;:&quot;line&quot;,s=!0,l=0,c=n;l&lt;c.length;l+=1){var u=c[l],f=e.getTile(u),h=f.getBucket(r);if(h){var p=h.programConfigurations.get(r.id),d=t.context.program.get(),g=t.useProgram(o,p),m=s||g.program!==d,v=a!==f.tileID.overscaledZ;m&amp;&amp;p.setUniforms(t.context,g,r.paint,{zoom:t.transform.zoom}),pr(g,t,f,h,r,u,p,m,v),a=f.tileID.overscaledZ,s=!1}}}},fill:function(e,r,n,i){var a=n.paint.get(&quot;fill-color&quot;),o=n.paint.get(&quot;fill-opacity&quot;);if(0!==o.constantOr(1)){var s=e.context;s.setColorMode(e.colorModeForRenderPass());var l=n.paint.get(&quot;fill-pattern&quot;)||1!==a.constantOr(t.default$6.transparent).a||1!==o.constantOr(0)?&quot;translucent&quot;:&quot;opaque&quot;;e.renderPass===l&amp;&amp;(s.setDepthMode(e.depthModeForSublayer(1,&quot;opaque&quot;===e.renderPass?qt.ReadWrite:qt.ReadOnly)),vr(e,r,n,i,yr)),&quot;translucent&quot;===e.renderPass&amp;&amp;n.paint.get(&quot;fill-antialias&quot;)&amp;&amp;(s.lineWidth.set(2),s.setDepthMode(e.depthModeForSublayer(n.getPaintProperty(&quot;fill-outline-color&quot;)?2:0,qt.ReadOnly)),vr(e,r,n,i,xr))}},&quot;fill-extrusion&quot;:function(e,r,n,i){if(0!==n.paint.get(&quot;fill-extrusion-opacity&quot;))if(&quot;offscreen&quot;===e.renderPass){!function(e,r){var n=e.context,i=n.gl,a=r.viewportFrame;if(e.depthRboNeedsClear&amp;&amp;e.setupOffscreenDepthRenderbuffer(),!a){var o=new z(n,{width:e.width,height:e.height,data:null},i.RGBA);o.bind(i.LINEAR,i.CLAMP_TO_EDGE),(a=r.viewportFrame=n.createFramebuffer(e.width,e.height)).colorAttachment.set(o.texture)}n.bindFramebuffer.set(a.framebuffer),a.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&amp;&amp;(n.clear({depth:1}),e.depthRboNeedsClear=!1),n.clear({color:t.default$6.transparent}),n.setStencilMode(Ht.disabled),n.setDepthMode(new qt(i.LEQUAL,qt.ReadWrite,[0,1])),n.setColorMode(e.colorModeForRenderPass())}(e,n);for(var a=!0,o=0,s=i;o&lt;s.length;o+=1){var l=s[o],c=r.getTile(l),u=c.getBucket(n);u&amp;&amp;(Mr(e,0,n,c,l,u,a),a=!1)}}else&quot;translucent&quot;===e.renderPass&amp;&amp;function(t,e){var r=e.viewportFrame;if(r){var n=t.context,i=n.gl,a=t.useProgram(&quot;extrusionTexture&quot;);n.setStencilMode(Ht.disabled),n.setDepthMode(qt.disabled),n.setColorMode(t.colorModeForRenderPass()),n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.colorAttachment.get()),i.uniform1f(a.uniforms.u_opacity,e.paint.get(&quot;fill-extrusion-opacity&quot;)),i.uniform1i(a.uniforms.u_image,0);var o=wr.create();wr.ortho(o,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(a.uniforms.u_matrix,!1,o),i.uniform2f(a.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),t.viewportVAO.bind(n,a,t.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n)},hillshade:function(t,e,r,n){if(&quot;offscreen&quot;===t.renderPass||&quot;translucent&quot;===t.renderPass){var i=t.context,a=e.getSource().maxzoom;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass());for(var o=0,s=n;o&lt;s.length;o+=1){var l=s[o],c=e.getTile(l);c.needsHillshadePrepare&amp;&amp;&quot;offscreen&quot;===t.renderPass?Tr(t,c,a):&quot;translucent&quot;===t.renderPass&amp;&amp;Ar(t,c,r)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass&amp;&amp;0!==r.paint.get(&quot;raster-opacity&quot;)){var i,a,o=t.context,s=o.gl,l=e.getSource(),c=t.useProgram(&quot;raster&quot;);o.setStencilMode(Ht.disabled),o.setColorMode(t.colorModeForRenderPass()),s.uniform1f(c.uniforms.u_brightness_low,r.paint.get(&quot;raster-brightness-min&quot;)),s.uniform1f(c.uniforms.u_brightness_high,r.paint.get(&quot;raster-brightness-max&quot;)),s.uniform1f(c.uniforms.u_saturation_factor,(i=r.paint.get(&quot;raster-saturation&quot;))&gt;0?1-1/(1.001-i):-i),s.uniform1f(c.uniforms.u_contrast_factor,(a=r.paint.get(&quot;raster-contrast&quot;))&gt;0?1/(1-a):1+a),s.uniform3fv(c.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(r.paint.get(&quot;raster-hue-rotate&quot;))),s.uniform1f(c.uniforms.u_buffer_scale,1),s.uniform1i(c.uniforms.u_image0,0),s.uniform1i(c.uniforms.u_image1,1);for(var u=n.length&amp;&amp;n[0].overscaledZ,f=0,h=n;f&lt;h.length;f+=1){var p=h[f];o.setDepthMode(t.depthModeForSublayer(p.overscaledZ-u,1===r.paint.get(&quot;raster-opacity&quot;)?qt.ReadWrite:qt.ReadOnly,s.LESS));var d=e.getTile(p),g=t.transform.calculatePosMatrix(p.toUnwrapped(),!0);d.registerFadeDuration(r.paint.get(&quot;raster-fade-duration&quot;)),s.uniformMatrix4fv(c.uniforms.u_matrix,!1,g);var m=e.findLoadedParent(p,0,{}),v=Sr(d,m,e,r,t.transform),y=void 0,x=void 0;if(o.activeTexture.set(s.TEXTURE0),d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),o.activeTexture.set(s.TEXTURE1),m?(m.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),y=Math.pow(2,m.tileID.overscaledZ-d.tileID.overscaledZ),x=[d.tileID.canonical.x*y%1,d.tileID.canonical.y*y%1]):d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),s.uniform2fv(c.uniforms.u_tl_parent,x||[0,0]),s.uniform1f(c.uniforms.u_scale_parent,y||1),s.uniform1f(c.uniforms.u_fade_t,v.mix),s.uniform1f(c.uniforms.u_opacity,v.opacity*r.paint.get(&quot;raster-opacity&quot;)),l instanceof tt){var b=l.boundsBuffer;l.boundsVAO.bind(o,c,b,[]),s.drawArrays(s.TRIANGLE_STRIP,0,b.length)}else if(d.maskedBoundsBuffer&amp;&amp;d.maskedIndexBuffer&amp;&amp;d.segments)c.draw(o,s.TRIANGLES,r.id,d.maskedBoundsBuffer,d.maskedIndexBuffer,d.segments);else{var _=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(o,c,_,[]),s.drawArrays(s.TRIANGLE_STRIP,0,_.length)}}}},background:function(t,e,r){var n=r.paint.get(&quot;background-color&quot;),i=r.paint.get(&quot;background-opacity&quot;);if(0!==i){var a=t.context,o=a.gl,s=t.transform,l=s.tileSize,c=r.paint.get(&quot;background-pattern&quot;),u=c||1!==n.a||1!==i?&quot;translucent&quot;:&quot;opaque&quot;;if(t.renderPass===u){var f;if(a.setStencilMode(Ht.disabled),a.setDepthMode(t.depthModeForSublayer(0,&quot;opaque&quot;===u?qt.ReadWrite:qt.ReadOnly)),a.setColorMode(t.colorModeForRenderPass()),c){if(dr(c,t))return;f=t.useProgram(&quot;backgroundPattern&quot;),gr(c,t,f),t.tileExtentPatternVAO.bind(a,f,t.tileExtentBuffer,[])}else f=t.useProgram(&quot;background&quot;),o.uniform4fv(f.uniforms.u_color,[n.r,n.g,n.b,n.a]),t.tileExtentVAO.bind(a,f,t.tileExtentBuffer,[]);o.uniform1f(f.uniforms.u_opacity,i);for(var h=0,p=s.coveringTiles({tileSize:l});h&lt;p.length;h+=1){var d=p[h];c&amp;&amp;mr({tileID:d,tileSize:l},t,f),o.uniformMatrix4fv(f.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(d.toUnwrapped())),o.drawArrays(o.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}},debug:function(t,e,r){for(var n=0;n&lt;r.length;n++)Er(t,e,r[n])}},zr=function(e,r){this.context=new Wt(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=Yt.maxUnderzooming+Yt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.default$24,this.crossTileSymbolIndex=new Ye};function Pr(t,e){if(t.row&gt;e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function Or(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&amp;&amp;t.y0===e.y0?t.x0+e.dy/t.dy*t.dx&lt;e.x1:t.x1-e.dy/t.dy*t.dx&lt;e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,c=e.dx/e.dy,u=t.dx&gt;0,f=e.dx&lt;0,h=a;h&lt;o;h++){var p=l*Math.max(0,Math.min(t.dy,h+u-t.y0))+t.x0,d=c*Math.max(0,Math.min(e.dy,h+f-e.y0))+e.x0;i(Math.floor(d),Math.ceil(p),h)}}function Ir(t,e,r,n,i,a){var o,s=Pr(t,e),l=Pr(e,r),c=Pr(r,t);s.dy&gt;l.dy&amp;&amp;(o=s,s=l,l=o),s.dy&gt;c.dy&amp;&amp;(o=s,s=c,c=o),l.dy&gt;c.dy&amp;&amp;(o=l,l=c,c=o),s.dy&amp;&amp;Or(c,s,n,i,a),l.dy&amp;&amp;Or(c,l,n,i,a)}zr.prototype.resize=function(t,e){var r=this.context.gl;if(this.width=t*a.devicePixelRatio,this.height=e*a.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n&lt;i.length;n+=1){var o=i[n];this.style._layers[o].resize()}this.depthRbo&amp;&amp;(r.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},zr.prototype.setup=function(){var e=this.context,r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(t.default$8,0),r.emplaceBack(0,t.default$8),r.emplaceBack(t.default$8,t.default$8),this.tileExtentBuffer=e.createVertexBuffer(r,Ke.members),this.tileExtentVAO=new Q,this.tileExtentPatternVAO=new Q;var n=new t.PosArray;n.emplaceBack(0,0),n.emplaceBack(t.default$8,0),n.emplaceBack(t.default$8,t.default$8),n.emplaceBack(0,t.default$8),n.emplaceBack(0,0),this.debugBuffer=e.createVertexBuffer(n,Ke.members),this.debugVAO=new Q;var i=new t.RasterBoundsArray;i.emplaceBack(0,0,0,0),i.emplaceBack(t.default$8,0,t.default$8,0),i.emplaceBack(0,t.default$8,0,t.default$8),i.emplaceBack(t.default$8,t.default$8,t.default$8,t.default$8),this.rasterBoundsBuffer=e.createVertexBuffer(i,K.members),this.rasterBoundsVAO=new Q;var a=new t.PosArray;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,Ke.members),this.viewportVAO=new Q},zr.prototype.clearStencil=function(){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled),e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},0,255,r.ZERO,r.ZERO,r.ZERO));var n=t.mat4.create();t.mat4.ortho(n,0,this.width,this.height,0,0,1),t.mat4.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]);var i=this.useProgram(&quot;clippingMask&quot;);r.uniformMatrix4fv(i.uniforms.u_matrix,!1,n),this.viewportVAO.bind(e,i,this.viewportBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,4)},zr.prototype._renderTileClippingMasks=function(t){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled);var n=1;this._tileClippingMaskIDs={};for(var i=0,a=t;i&lt;a.length;i+=1){var o=a[i],s=this._tileClippingMaskIDs[o.key]=n++;e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},s,255,r.KEEP,r.KEEP,r.REPLACE));var l=this.useProgram(&quot;clippingMask&quot;);r.uniformMatrix4fv(l.uniforms.u_matrix,!1,o.posMatrix),this.tileExtentVAO.bind(this.context,l,this.tileExtentBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}},zr.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Ht({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},zr.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Gt([e.CONSTANT_COLOR,e.ONE],new t.default$6(1/8,1/8,1/8,0),[!0,!0,!0,!0]):&quot;opaque&quot;===this.renderPass?Gt.unblended:Gt.alphaBlended},zr.prototype.depthModeForSublayer=function(t,e,r){var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,i=n-1+this.depthRange;return new qt(r||this.context.gl.LEQUAL,e,[i,n])},zr.prototype.render=function(e,r){var n=this;for(var i in this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(a.now()),e.sourceCaches){var o=n.style.sourceCaches[i];o.used&amp;&amp;o.prepare(n.context)}var s=this.style._order,l=t.filterObject(this.style.sourceCaches,function(t){return&quot;raster&quot;===t.getSource().type||&quot;raster-dem&quot;===t.getSource().type}),c=function(e){var r=l[e];!function(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i&lt;n.length;i++){var a={},o=n[i],s=n.slice(i+1);ar(o.tileID.wrapped(),o.tileID,s,new t.OverscaledTileID(0,o.tileID.wrap+1,0,0,0),a),o.setMask(a,r)}}(r.getVisibleCoordinates().map(function(t){return r.getTile(t)}),n.context)};for(var u in l)c(u);this.renderPass=&quot;offscreen&quot;;var f,h=[];this.depthRboNeedsClear=!0;for(var p=0;p&lt;s.length;p++){var d=n.style._layers[s[p]];d.hasOffscreenPass()&amp;&amp;!d.isHidden(n.transform.zoom)&amp;&amp;(d.source!==(f&amp;&amp;f.id)&amp;&amp;(h=[],(f=n.style.sourceCaches[d.source])&amp;&amp;(h=f.getVisibleCoordinates()).reverse()),h.length&amp;&amp;n.renderLayer(n,f,d,h))}this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.default$6.black:t.default$6.transparent,depth:1}),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass=&quot;opaque&quot;;var g,m=[];for(this.currentLayer=s.length-1,this.currentLayer;this.currentLayer&gt;=0;this.currentLayer--){var v=n.style._layers[s[n.currentLayer]];v.source!==(g&amp;&amp;g.id)&amp;&amp;(m=[],(g=n.style.sourceCaches[v.source])&amp;&amp;(n.clearStencil(),m=g.getVisibleCoordinates(),g.getSource().isTileClipped&amp;&amp;n._renderTileClippingMasks(m))),n.renderLayer(n,g,v,m)}this.renderPass=&quot;translucent&quot;;var y,x=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer&lt;s.length;this.currentLayer++){var b=n.style._layers[s[n.currentLayer]];b.source!==(y&amp;&amp;y.id)&amp;&amp;(x=[],(y=n.style.sourceCaches[b.source])&amp;&amp;(n.clearStencil(),x=y.getVisibleCoordinates(),y.getSource().isTileClipped&amp;&amp;n._renderTileClippingMasks(x)),x.reverse()),n.renderLayer(n,y,b,x)}if(this.options.showTileBoundaries){var _=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];_&amp;&amp;Lr.debug(this,_,_.getVisibleCoordinates())}},zr.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},zr.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||(&quot;background&quot;===r.type||n.length)&amp;&amp;(this.id=r.id,Lr[r.type](t,e,r,n))},zr.prototype.translatePosMatrix=function(e,r,n,i,a){if(!n[0]&amp;&amp;!n[1])return e;var o=a?&quot;map&quot;===i?this.transform.angle:0:&quot;viewport&quot;===i?-this.transform.angle:0;if(o){var s=Math.sin(o),l=Math.cos(o);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var c=[a?n[0]:Te(r,n[0],this.transform.zoom),a?n[1]:Te(r,n[1],this.transform.zoom),0],u=new Float32Array(16);return t.mat4.translate(u,e,c),u},zr.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},zr.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&amp;&amp;e.length&gt;0?e.pop():null},zr.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=&quot;&quot;+t+(e.cacheKey||&quot;&quot;)+(this._showOverdrawInspector?&quot;/overdraw&quot;:&quot;&quot;);return this.cache[r]||(this.cache[r]=new ir(this.context,nr[t],e,this._showOverdrawInspector)),this.cache[r]},zr.prototype.useProgram=function(t,e){var r=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(r.program),r};var Dr=t.default$20.vec4,Rr=t.default$20.mat4,Br=t.default$20.mat2,Fr=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new G(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},Nr={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};Fr.prototype.clone=function(){var t=new Fr(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Nr.minZoom.get=function(){return this._minZoom},Nr.minZoom.set=function(t){this._minZoom!==t&amp;&amp;(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Nr.maxZoom.get=function(){return this._maxZoom},Nr.maxZoom.set=function(t){this._maxZoom!==t&amp;&amp;(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Nr.renderWorldCopies.get=function(){return this._renderWorldCopies},Nr.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&amp;&amp;(t=!1),this._renderWorldCopies=t},Nr.worldSize.get=function(){return this.tileSize*this.scale},Nr.centerPoint.get=function(){return this.size._div(2)},Nr.size.get=function(){return new t.default$1(this.width,this.height)},Nr.bearing.get=function(){return-this.angle/Math.PI*180},Nr.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&amp;&amp;(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=Br.create(),Br.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Nr.pitch.get=function(){return this._pitch/Math.PI*180},Nr.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&amp;&amp;(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Nr.fov.get=function(){return this._fov/Math.PI*180},Nr.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&amp;&amp;(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Nr.zoom.get=function(){return this._zoom},Nr.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&amp;&amp;(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Nr.center.get=function(){return this._center},Nr.center.set=function(t){t.lat===this._center.lat&amp;&amp;t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Fr.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Fr.prototype.getVisibleUnwrappedCoordinates=function(e){var r=this.pointCoordinate(new t.default$1(0,0),0),n=this.pointCoordinate(new t.default$1(this.width,0),0),i=Math.floor(r.column),a=Math.floor(n.column),o=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var s=i;s&lt;=a;s++)0!==s&amp;&amp;o.push(new t.UnwrappedTileID(s,e));return o},Fr.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&amp;&amp;r&lt;e.minzoom)return[];void 0!==e.maxzoom&amp;&amp;r&gt;e.maxzoom&amp;&amp;(r=e.maxzoom);var i=this.pointCoordinate(this.centerPoint,r),a=new t.default$1(i.column-.5,i.row-.5);return function(e,r,n,i){void 0===i&amp;&amp;(i=!0);var a=1&lt;&lt;e,o={};function s(r,s,l){var c,u,f,h;if(l&gt;=0&amp;&amp;l&lt;=a)for(c=r;c&lt;s;c++)u=Math.floor(c/a),f=(c%a+a)%a,0!==u&amp;&amp;!0!==i||(h=new t.OverscaledTileID(n,u,e,f,l),o[h.key]=h)}return Ir(r[0],r[1],r[2],0,a,s),Ir(r[2],r[3],r[0],0,a,s),Object.keys(o).map(function(t){return o[t]})}(r,[this.pointCoordinate(new t.default$1(0,0),r),this.pointCoordinate(new t.default$1(this.width,0),r),this.pointCoordinate(new t.default$1(this.width,this.height),r),this.pointCoordinate(new t.default$1(0,this.height),r)],e.reparseOverscaled?n:r,this._renderWorldCopies).sort(function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)})},Fr.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Nr.unmodified.get=function(){return this._unmodified},Fr.prototype.zoomScale=function(t){return Math.pow(2,t)},Fr.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Fr.prototype.project=function(e){return new t.default$1(this.lngX(e.lng),this.latY(e.lat))},Fr.prototype.unproject=function(t){return new G(this.xLng(t.x),this.yLat(t.y))},Nr.x.get=function(){return this.lngX(this.center.lng)},Nr.y.get=function(){return this.latY(this.center.lat)},Nr.point.get=function(){return new t.default$1(this.x,this.y)},Fr.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Fr.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},Fr.prototype.xLng=function(t){return 360*t/this.worldSize-180},Fr.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},Fr.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&amp;&amp;(this.center=this.center.wrap())},Fr.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Fr.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Fr.prototype.locationCoordinate=function(e){return new t.default$17(this.lngX(e.lng)/this.tileSize,this.latY(e.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Fr.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new G(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},Fr.prototype.pointCoordinate=function(e,r){void 0===r&amp;&amp;(r=this.tileZoom);var n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];Dr.transformMat4(n,n,this.pixelMatrixInverse),Dr.transformMat4(i,i,this.pixelMatrixInverse);var a=n[3],o=i[3],s=n[0]/a,l=i[0]/o,c=n[1]/a,u=i[1]/o,f=n[2]/a,h=i[2]/o,p=f===h?0:(0-f)/(h-f);return new t.default$17(t.number(s,l,p)/this.tileSize,t.number(c,u,p)/this.tileSize,this.zoom)._zoomTo(r)},Fr.prototype.coordinatePoint=function(e){var r=e.zoomTo(this.zoom),n=[r.column*this.tileSize,r.row*this.tileSize,0,1];return Dr.transformMat4(n,n,this.pixelMatrix),new t.default$1(n[0]/n[3],n[1]/n[3])},Fr.prototype.calculatePosMatrix=function(e,r){void 0===r&amp;&amp;(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=Rr.identity(new Float64Array(16));return Rr.translate(l,l,[s*o,a.y*o,0]),Rr.scale(l,l,[o/t.default$8,o/t.default$8,1]),Rr.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},Fr.prototype._constrain=function(){if(this.center&amp;&amp;this.width&amp;&amp;this.height&amp;&amp;!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var f=this.latRange;a=this.latY(f[1]),e=(o=this.latY(f[0]))-a&lt;c.y?c.y/(o-a):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),r=(l=this.lngX(h[1]))-s&lt;c.x?c.x/(l-s):0}var p=Math.max(r||0,e||0);if(p)return this.center=this.unproject(new t.default$1(r?(l+s)/2:this.x,e?(o+a)/2:this.y)),this.zoom+=this.scaleZoom(p),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var d=this.y,g=c.y/2;d-g&lt;a&amp;&amp;(i=a+g),d+g&gt;o&amp;&amp;(i=o-g)}if(this.lngRange){var m=this.x,v=c.x/2;m-v&lt;s&amp;&amp;(n=s+v),m+v&gt;l&amp;&amp;(n=l-v)}void 0===n&amp;&amp;void 0===i||(this.center=this.unproject(new t.default$1(void 0!==n?n:this.x,void 0!==i?i:this.y))),this._unmodified=u,this._constraining=!1}},Fr.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),n=this.x,i=this.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),o=new Float64Array(16);Rr.perspective(o,this._fov,this.width/this.height,1,a),Rr.scale(o,o,[1,-1,1]),Rr.translate(o,o,[0,0,-this.cameraToCenterDistance]),Rr.rotateX(o,o,this._pitch),Rr.rotateZ(o,o,this.angle),Rr.translate(o,o,[-n,-i,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));Rr.scale(o,o,[1,1,s,1]),this.projMatrix=o;var l=this.width%2/2,c=this.height%2/2,u=Math.cos(this.angle),f=Math.sin(this.angle),h=n-Math.round(n)+u*l+f*c,p=i-Math.round(i)+u*c+f*l,d=new Float64Array(o);if(Rr.translate(d,d,[h&gt;.5?h-1:h,p&gt;.5?p-1:p,0]),this.alignedProjMatrix=d,o=Rr.create(),Rr.scale(o,o,[this.width/2,-this.height/2,1]),Rr.translate(o,o,[1,-1,0]),this.pixelMatrix=Rr.multiply(new Float64Array(16),o,this.projMatrix),!(o=Rr.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(&quot;failed to invert matrix&quot;);this.pixelMatrixInverse=o,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Fr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.default$1(0,0)).zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return Dr.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(Fr.prototype,Nr);var jr=function(){var e,r,n,i;t.bindAll([&quot;_onHashChange&quot;,&quot;_updateHash&quot;],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),300,r=!1,n=0,i=function(){n=0,r&amp;&amp;(e(),n=setTimeout(i,300),r=!1)},function(){return r=!0,n||i(),n})};jr.prototype.addTo=function(e){return this._map=e,t.default.addEventListener(&quot;hashchange&quot;,this._onHashChange,!1),this._map.on(&quot;moveend&quot;,this._updateHash),this},jr.prototype.remove=function(){return t.default.removeEventListener(&quot;hashchange&quot;,this._onHashChange,!1),this._map.off(&quot;moveend&quot;,this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},jr.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),a=Math.round(e.lng*i)/i,o=Math.round(e.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch(),c=&quot;&quot;;return c+=t?&quot;#/&quot;+a+&quot;/&quot;+o+&quot;/&quot;+r:&quot;#&quot;+r+&quot;/&quot;+o+&quot;/&quot;+a,(s||l)&amp;&amp;(c+=&quot;/&quot;+Math.round(10*s)/10),l&amp;&amp;(c+=&quot;/&quot;+Math.round(l)),c},jr.prototype._onHashChange=function(){var e=t.default.location.hash.replace(&quot;#&quot;,&quot;&quot;).split(&quot;/&quot;);return e.length&gt;=3&amp;&amp;(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},jr.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.default.history.replaceState(t.default.history.state,&quot;&quot;,e)};var Vr=function(e){function r(r,n,i,a){void 0===a&amp;&amp;(a={});var o=s.mousePos(n.getCanvasContainer(),i),l=n.unproject(o);e.call(this,r,t.extend({point:o,lngLat:l,originalEvent:i},a)),this._defaultPrevented=!1,this.target=n}e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),Ur=function(e){function r(r,n,i){var a=s.touchPos(n.getCanvasContainer(),i),o=a.map(function(t){return n.unproject(t)}),l=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.default$1(0,0)),c=n.unproject(l);e.call(this,r,{points:a,point:l,lngLats:o,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),qr=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Hr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll([&quot;_onWheel&quot;,&quot;_onTimeout&quot;,&quot;_onScrollFrame&quot;,&quot;_onScrollFinished&quot;],this)};Hr.prototype.isEnabled=function(){return!!this._enabled},Hr.prototype.isActive=function(){return!!this._active},Hr.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&amp;&amp;&quot;center&quot;===t.around)},Hr.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._enabled=!1)},Hr.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.default.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=a.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&amp;&amp;r%4.000244140625==0?this._type=&quot;wheel&quot;:0!==r&amp;&amp;Math.abs(r)&lt;4?this._type=&quot;trackpad&quot;:i&gt;400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)&lt;200?&quot;trackpad&quot;:&quot;wheel&quot;,this._timeout&amp;&amp;(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&amp;&amp;r&amp;&amp;(r/=4),this._type&amp;&amp;(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},Hr.prototype._onTimeout=function(t){this._type=&quot;wheel&quot;,this._delta-=this._lastValue,this.isActive()||this._start(t)},Hr.prototype._start=function(e){if(this._delta){this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event(&quot;movestart&quot;,{originalEvent:e})),this._map.fire(new t.Event(&quot;zoomstart&quot;,{originalEvent:e})),this._finishTimeout&amp;&amp;clearTimeout(this._finishTimeout);var r=s.mousePos(this._el,e);this._around=G.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},Hr.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n=&quot;wheel&quot;===this._type&amp;&amp;Math.abs(this._delta)&gt;4.000244140625?1/450:.01,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta&lt;0&amp;&amp;0!==i&amp;&amp;(i=1/i);var o=&quot;number&quot;==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),&quot;wheel&quot;===this._type&amp;&amp;(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var s=!1;if(&quot;wheel&quot;===this._type){var l=Math.min((a.now()-this._lastWheelEventTime)/200,1),c=this._easing(l);r.zoom=t.number(this._startZoom,this._targetZoom,c),l&lt;1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):s=!0}else r.zoom=this._targetZoom,s=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event(&quot;move&quot;,{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event(&quot;zoom&quot;,{originalEvent:this._lastWheelEvent})),s&amp;&amp;(this._active=!1,this._finishTimeout=setTimeout(function(){e._map.fire(new t.Event(&quot;zoomend&quot;,{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event(&quot;moveend&quot;,{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},Hr.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(a.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),s=.27/Math.sqrt(o*o+1e-4)*.01,l=Math.sqrt(.0729-s*s);r=t.bezier(s,l,.25,1)}return this._prevEase={start:a.now(),duration:e,easing:r},r};var Gr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),t.bindAll([&quot;_onMouseMove&quot;,&quot;_onMouseUp&quot;,&quot;_onKeyDown&quot;],this)};Gr.prototype.isEnabled=function(){return!!this._enabled},Gr.prototype.isActive=function(){return!!this._active},Gr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Gr.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._enabled=!1)},Gr.prototype.onMouseDown=function(e){this.isEnabled()&amp;&amp;e.shiftKey&amp;&amp;0===e.button&amp;&amp;(t.default.document.addEventListener(&quot;mousemove&quot;,this._onMouseMove,!1),t.default.document.addEventListener(&quot;keydown&quot;,this._onKeyDown,!1),t.default.document.addEventListener(&quot;mouseup&quot;,this._onMouseUp,!1),s.disableDrag(),this._startPos=s.mousePos(this._el,e),this._active=!0)},Gr.prototype._onMouseMove=function(t){var e=this._startPos,r=s.mousePos(this._el,t);this._box||(this._box=s.create(&quot;div&quot;,&quot;mapboxgl-boxzoom&quot;,this._container),this._container.classList.add(&quot;mapboxgl-crosshair&quot;),this._fireEvent(&quot;boxzoomstart&quot;,t));var n=Math.min(e.x,r.x),i=Math.max(e.x,r.x),a=Math.min(e.y,r.y),o=Math.max(e.y,r.y);s.setTransform(this._box,&quot;translate(&quot;+n+&quot;px,&quot;+a+&quot;px)&quot;),this._box.style.width=i-n+&quot;px&quot;,this._box.style.height=o-a+&quot;px&quot;},Gr.prototype._onMouseUp=function(e){if(0===e.button){var r=this._startPos,n=s.mousePos(this._el,e),i=(new W).extend(this._map.unproject(r)).extend(this._map.unproject(n));this._finish(),s.suppressClick(),r.x===n.x&amp;&amp;r.y===n.y?this._fireEvent(&quot;boxzoomcancel&quot;,e):this._map.fitBounds(i,{linear:!0}).fire(new t.Event(&quot;boxzoomend&quot;,{originalEvent:e,boxZoomBounds:i}))}},Gr.prototype._onKeyDown=function(t){27===t.keyCode&amp;&amp;(this._finish(),this._fireEvent(&quot;boxzoomcancel&quot;,t))},Gr.prototype._finish=function(){this._active=!1,t.default.document.removeEventListener(&quot;mousemove&quot;,this._onMouseMove,!1),t.default.document.removeEventListener(&quot;keydown&quot;,this._onKeyDown,!1),t.default.document.removeEventListener(&quot;mouseup&quot;,this._onMouseUp,!1),this._container.classList.remove(&quot;mapboxgl-crosshair&quot;),this._box&amp;&amp;(s.remove(this._box),this._box=null),s.enableDrag()},Gr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Wr=t.bezier(0,0,.25,1),Yr=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state=&quot;disabled&quot;,this._button=r.button||&quot;right&quot;,this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll([&quot;_onMouseMove&quot;,&quot;_onMouseUp&quot;,&quot;_onBlur&quot;,&quot;_onDragFrame&quot;],this)};Yr.prototype.isEnabled=function(){return&quot;disabled&quot;!==this._state},Yr.prototype.isActive=function(){return&quot;active&quot;===this._state},Yr.prototype.enable=function(){this.isEnabled()||(this._state=&quot;enabled&quot;)},Yr.prototype.disable=function(){if(this.isEnabled())switch(this._state){case&quot;active&quot;:this._state=&quot;disabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;rotateend&quot;),this._pitchWithRotate&amp;&amp;this._fireEvent(&quot;pitchend&quot;),this._fireEvent(&quot;moveend&quot;);break;case&quot;pending&quot;:this._state=&quot;disabled&quot;,this._unbind();break;default:this._state=&quot;disabled&quot;}},Yr.prototype.onMouseDown=function(e){if(&quot;enabled&quot;===this._state){if(&quot;right&quot;===this._button){if(this._eventButton=s.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==s.mouseButton(e))return;this._eventButton=0}s.disableDrag(),t.default.document.addEventListener(&quot;mousemove&quot;,this._onMouseMove,{capture:!0}),t.default.document.addEventListener(&quot;mouseup&quot;,this._onMouseUp),t.default.addEventListener(&quot;blur&quot;,this._onBlur),this._state=&quot;pending&quot;,this._inertia=[[a.now(),this._map.getBearing()]],this._previousPos=s.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},Yr.prototype._onMouseMove=function(t){this._lastMoveEvent=t,this._pos=s.mousePos(this._el,t),&quot;pending&quot;===this._state&amp;&amp;(this._state=&quot;active&quot;,this._fireEvent(&quot;rotatestart&quot;,t),this._fireEvent(&quot;movestart&quot;,t),this._pitchWithRotate&amp;&amp;this._fireEvent(&quot;pitchstart&quot;,t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Yr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform,r=this._previousPos,n=this._pos,i=.8*(r.x-n.x),o=-.5*(r.y-n.y),s=e.bearing-i,l=e.pitch-o,c=this._inertia,u=c[c.length-1];this._drainInertiaBuffer(),c.push([a.now(),this._map._normalizeBearing(s,u[1])]),e.bearing=s,this._pitchWithRotate&amp;&amp;(this._fireEvent(&quot;pitch&quot;,t),e.pitch=l),this._fireEvent(&quot;rotate&quot;,t),this._fireEvent(&quot;move&quot;,t),delete this._lastMoveEvent,this._previousPos=this._pos}},Yr.prototype._onMouseUp=function(t){if(s.mouseButton(t)===this._eventButton)switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,s.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Yr.prototype._onBlur=function(t){switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;rotateend&quot;,t),this._pitchWithRotate&amp;&amp;this._fireEvent(&quot;pitchend&quot;,t),this._fireEvent(&quot;moveend&quot;,t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Yr.prototype._unbind=function(){t.default.document.removeEventListener(&quot;mousemove&quot;,this._onMouseMove,{capture:!0}),t.default.document.removeEventListener(&quot;mouseup&quot;,this._onMouseUp),t.default.removeEventListener(&quot;blur&quot;,this._onBlur),s.enableDrag()},Yr.prototype._deactivate=function(){this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos},Yr.prototype._inertialRotate=function(t){var e=this;this._fireEvent(&quot;rotateend&quot;,t),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),i=this._inertia,a=function(){Math.abs(n)&lt;e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent(&quot;moveend&quot;,t),e._pitchWithRotate&amp;&amp;e._fireEvent(&quot;pitchend&quot;,t)};if(i.length&lt;2)a();else{var o=i[0],s=i[i.length-1],l=i[i.length-2],c=r._normalizeBearing(n,l[1]),u=s[1]-o[1],f=u&lt;0?-1:1,h=(s[0]-o[0])/1e3;if(0!==u&amp;&amp;0!==h){var p=Math.abs(u*(.25/h));p&gt;180&amp;&amp;(p=180);var d=p/180;c+=f*p*(d/2),Math.abs(r._normalizeBearing(c,0))&lt;this._bearingSnap&amp;&amp;(c=r._normalizeBearing(0,c)),r.rotateTo(c,{duration:1e3*d,easing:Wr,noMoveStart:!0},{originalEvent:t})}else a()}},Yr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Yr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length&gt;0&amp;&amp;e-t[0][0]&gt;160;)t.shift()};var Xr=t.bezier(0,0,.3,1),Zr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._state=&quot;disabled&quot;,t.bindAll([&quot;_onMove&quot;,&quot;_onMouseUp&quot;,&quot;_onTouchEnd&quot;,&quot;_onBlur&quot;,&quot;_onDragFrame&quot;],this)};Zr.prototype.isEnabled=function(){return&quot;disabled&quot;!==this._state},Zr.prototype.isActive=function(){return&quot;active&quot;===this._state},Zr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add(&quot;mapboxgl-touch-drag-pan&quot;),this._state=&quot;enabled&quot;)},Zr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove(&quot;mapboxgl-touch-drag-pan&quot;),this._state){case&quot;active&quot;:this._state=&quot;disabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;dragend&quot;),this._fireEvent(&quot;moveend&quot;);break;case&quot;pending&quot;:this._state=&quot;disabled&quot;,this._unbind();break;default:this._state=&quot;disabled&quot;}},Zr.prototype.onMouseDown=function(e){&quot;enabled&quot;===this._state&amp;&amp;(e.ctrlKey||0!==s.mouseButton(e)||(s.addEventListener(t.default.document,&quot;mousemove&quot;,this._onMove,{capture:!0}),s.addEventListener(t.default.document,&quot;mouseup&quot;,this._onMouseUp),this._start(e)))},Zr.prototype.onTouchStart=function(e){&quot;enabled&quot;===this._state&amp;&amp;(e.touches.length&gt;1||(s.addEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{capture:!0,passive:!1}),s.addEventListener(t.default.document,&quot;touchend&quot;,this._onTouchEnd),this._start(e)))},Zr.prototype._start=function(e){t.default.addEventListener(&quot;blur&quot;,this._onBlur),this._state=&quot;pending&quot;,this._previousPos=s.mousePos(this._el,e),this._inertia=[[a.now(),this._previousPos]]},Zr.prototype._onMove=function(t){this._lastMoveEvent=t,t.preventDefault(),this._pos=s.mousePos(this._el,t),this._drainInertiaBuffer(),this._inertia.push([a.now(),this._pos]),&quot;pending&quot;===this._state&amp;&amp;(this._state=&quot;active&quot;,this._fireEvent(&quot;dragstart&quot;,t),this._fireEvent(&quot;movestart&quot;,t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Zr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._previousPos),this._pos),this._fireEvent(&quot;drag&quot;,t),this._fireEvent(&quot;move&quot;,t),this._previousPos=this._pos,delete this._lastMoveEvent}},Zr.prototype._onMouseUp=function(t){if(0===s.mouseButton(t))switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,s.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Zr.prototype._onTouchEnd=function(t){switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,this._unbind(),this._deactivate(),this._inertialPan(t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Zr.prototype._onBlur=function(t){switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;dragend&quot;,t),this._fireEvent(&quot;moveend&quot;,t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Zr.prototype._unbind=function(){s.removeEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{capture:!0,passive:!1}),s.removeEventListener(t.default.document,&quot;touchend&quot;,this._onTouchEnd),s.removeEventListener(t.default.document,&quot;mousemove&quot;,this._onMove,{capture:!0}),s.removeEventListener(t.default.document,&quot;mouseup&quot;,this._onMouseUp),s.removeEventListener(t.default,&quot;blur&quot;,this._onBlur)},Zr.prototype._deactivate=function(){this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos,delete this._pos},Zr.prototype._inertialPan=function(t){this._fireEvent(&quot;dragend&quot;,t),this._drainInertiaBuffer();var e=this._inertia;if(e.length&lt;2)this._fireEvent(&quot;moveend&quot;,t);else{var r=e[e.length-1],n=e[0],i=r[1].sub(n[1]),a=(r[0]-n[0])/1e3;if(0===a||r[1].equals(n[1]))this._fireEvent(&quot;moveend&quot;,t);else{var o=i.mult(.3/a),s=o.mag();s&gt;1400&amp;&amp;(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:Xr,noMoveStart:!0},{originalEvent:t})}}},Zr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Zr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length&gt;0&amp;&amp;e-t[0][0]&gt;160;)t.shift()};var $r=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([&quot;_onKeyDown&quot;],this)};function Jr(t){return t*(2-t)}$r.prototype.isEnabled=function(){return!!this._enabled},$r.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(&quot;keydown&quot;,this._onKeyDown,!1),this._enabled=!0)},$r.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._el.removeEventListener(&quot;keydown&quot;,this._onKeyDown),this._enabled=!1)},$r.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,i=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:Jr,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-i,100*-a],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var Kr=function(e){this._map=e,t.bindAll([&quot;_onDblClick&quot;,&quot;_onZoomEnd&quot;],this)};Kr.prototype.isEnabled=function(){return!!this._enabled},Kr.prototype.isActive=function(){return!!this._active},Kr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Kr.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._enabled=!1)},Kr.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&amp;&amp;(t.points.length&gt;1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},Kr.prototype.onDblClick=function(t){this.isEnabled()&amp;&amp;(t.originalEvent.preventDefault(),this._zoom(t))},Kr.prototype._zoom=function(t){this._active=!0,this._map.on(&quot;zoomend&quot;,this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},Kr.prototype._onZoomEnd=function(){this._active=!1,this._map.off(&quot;zoomend&quot;,this._onZoomEnd)};var Qr=t.bezier(0,0,.15,1),tn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([&quot;_onMove&quot;,&quot;_onEnd&quot;,&quot;_onTouchFrame&quot;],this)};tn.prototype.isEnabled=function(){return!!this._enabled},tn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add(&quot;mapboxgl-touch-zoom-rotate&quot;),this._enabled=!0,this._aroundCenter=!!t&amp;&amp;&quot;center&quot;===t.around)},tn.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._el.classList.remove(&quot;mapboxgl-touch-zoom-rotate&quot;),this._enabled=!1)},tn.prototype.disableRotation=function(){this._rotationDisabled=!0},tn.prototype.enableRotation=function(){this._rotationDisabled=!1},tn.prototype.onStart=function(e){if(this.isEnabled()&amp;&amp;2===e.touches.length){var r=s.mousePos(this._el,e.touches[0]),n=s.mousePos(this._el,e.touches[1]);this._startVec=r.sub(n),this._gestureIntent=void 0,this._inertia=[],s.addEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{passive:!1}),s.addEventListener(t.default.document,&quot;touchend&quot;,this._onEnd)}},tn.prototype._getTouchEventData=function(t){var e=s.mousePos(this._el,t.touches[0]),r=s.mousePos(this._el,t.touches[1]),n=e.sub(r);return{vec:n,center:e.add(r).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},tn.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,i=r.scale,a=r.bearing;if(!this._gestureIntent){var o=Math.abs(1-i)&gt;.15;Math.abs(a)&gt;10?this._gestureIntent=&quot;rotate&quot;:o&amp;&amp;(this._gestureIntent=&quot;zoom&quot;),this._gestureIntent&amp;&amp;(this._map.fire(new t.Event(this._gestureIntent+&quot;start&quot;,{originalEvent:e})),this._map.fire(new t.Event(&quot;movestart&quot;,{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},tn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),i=n.center,o=n.bearing,s=n.scale,l=r.pointLocation(i),c=r.locationPoint(l);&quot;rotate&quot;===e&amp;&amp;(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*s),r.setLocationAtPoint(l,c),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event(&quot;move&quot;,{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([a.now(),s,i])}},tn.prototype._onEnd=function(e){s.removeEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{passive:!1}),s.removeEventListener(t.default.document,&quot;touchend&quot;,this._onEnd);var r=this._gestureIntent,n=this._startScale;if(this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,r){this._map.fire(new t.Event(r+&quot;end&quot;,{originalEvent:e})),this._drainInertiaBuffer();var i=this._inertia,a=this._map;if(i.length&lt;2)a.snapToNorth({},{originalEvent:e});else{var o=i[i.length-1],l=i[0],c=a.transform.scaleZoom(n*o[1]),u=a.transform.scaleZoom(n*l[1]),f=c-u,h=(o[0]-l[0])/1e3,p=o[2];if(0!==h&amp;&amp;c!==u){var d=.15*f/h;Math.abs(d)&gt;2.5&amp;&amp;(d=d&gt;0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),m=c+d*g/2e3;m&lt;0&amp;&amp;(m=0),a.easeTo({zoom:m,duration:g,easing:Qr,around:this._aroundCenter?a.getCenter():a.unproject(p),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},tn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length&gt;2&amp;&amp;e-t[0][0]&gt;160;)t.shift()};var en={scrollZoom:Hr,boxZoom:Gr,dragRotate:Yr,dragPan:Zr,keyboard:$r,doubleClickZoom:Kr,touchZoomRotate:tn},rn=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll([&quot;_renderFrameCallback&quot;],this)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return this.transform.center},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.default$1.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())&lt;this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.fitBounds=function(e,r,n){if(&quot;number&quot;==typeof(r=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){var i=r.padding;r.padding={top:i,bottom:i,right:i,left:i}}if(!t.default$10(Object.keys(r.padding).sort(function(t,e){return t&lt;e?-1:t&gt;e?1:0}),[&quot;bottom&quot;,&quot;left&quot;,&quot;right&quot;,&quot;top&quot;]))return t.warnOnce(&quot;options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'&quot;),this;e=W.convert(e);var a=[(r.padding.left-r.padding.right)/2,(r.padding.top-r.padding.bottom)/2],o=Math.min(r.padding.right,r.padding.left),s=Math.min(r.padding.top,r.padding.bottom);r.offset=[r.offset[0]+a[0],r.offset[1]+a[1]];var l=t.default$1.convert(r.offset),c=this.transform,u=c.project(e.getNorthWest()),f=c.project(e.getSouthEast()),h=f.sub(u),p=(c.width-2*o-2*Math.abs(l.x))/h.x,d=(c.height-2*s-2*Math.abs(l.y))/h.y;return d&lt;0||p&lt;0?(t.warnOnce(&quot;Map cannot fit within canvas with the given bounds, padding, and/or offset.&quot;),this):(r.center=c.unproject(u.add(f).div(2)),r.zoom=Math.min(c.scaleZoom(c.scale*Math.min(p,d)),r.maxZoom),r.bearing=0,r.linear?this.easeTo(r,n):this.flyTo(r,n))},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return&quot;zoom&quot;in e&amp;&amp;n.zoom!==+e.zoom&amp;&amp;(i=!0,n.zoom=+e.zoom),void 0!==e.center&amp;&amp;(n.center=G.convert(e.center)),&quot;bearing&quot;in e&amp;&amp;n.bearing!==+e.bearing&amp;&amp;(a=!0,n.bearing=+e.bearing),&quot;pitch&quot;in e&amp;&amp;n.pitch!==+e.pitch&amp;&amp;(o=!0,n.pitch=+e.pitch),this.fire(new t.Event(&quot;movestart&quot;,r)).fire(new t.Event(&quot;move&quot;,r)),i&amp;&amp;this.fire(new t.Event(&quot;zoomstart&quot;,r)).fire(new t.Event(&quot;zoom&quot;,r)).fire(new t.Event(&quot;zoomend&quot;,r)),a&amp;&amp;this.fire(new t.Event(&quot;rotatestart&quot;,r)).fire(new t.Event(&quot;rotate&quot;,r)).fire(new t.Event(&quot;rotateend&quot;,r)),o&amp;&amp;this.fire(new t.Event(&quot;pitchstart&quot;,r)).fire(new t.Event(&quot;pitch&quot;,r)).fire(new t.Event(&quot;pitchend&quot;,r)),this.fire(new t.Event(&quot;moveend&quot;,r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&amp;&amp;(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=&quot;zoom&quot;in e?+e.zoom:a,c=&quot;bearing&quot;in e?this._normalizeBearing(e.bearing,o):o,u=&quot;pitch&quot;in e?+e.pitch:s,f=i.centerPoint.add(t.default$1.convert(e.offset)),h=i.pointLocation(f),p=G.convert(e.center||h);this._normalizeCenter(p);var d,g,m=i.project(h),v=i.project(p).sub(m),y=i.zoomScale(l-a);return e.around&amp;&amp;(d=G.convert(e.around),g=i.locationPoint(d)),this._zooming=l!==a,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&amp;&amp;(i.zoom=t.number(a,l,e)),n._rotating&amp;&amp;(i.bearing=t.number(o,c,e)),n._pitching&amp;&amp;(i.pitch=t.number(s,u,e)),d)i.setLocationAtPoint(d,g);else{var h=i.zoomScale(i.zoom-a),p=l&gt;a?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=i.unproject(m.add(v.mult(e*x)).mult(h));i.setLocationAtPoint(i.renderWorldCopies?b.wrap():b,f)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event(&quot;movestart&quot;,e)),this._zooming&amp;&amp;this.fire(new t.Event(&quot;zoomstart&quot;,e)),this._rotating&amp;&amp;this.fire(new t.Event(&quot;rotatestart&quot;,e)),this._pitching&amp;&amp;this.fire(new t.Event(&quot;pitchstart&quot;,e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event(&quot;move&quot;,e)),this._zooming&amp;&amp;this.fire(new t.Event(&quot;zoom&quot;,e)),this._rotating&amp;&amp;this.fire(new t.Event(&quot;rotate&quot;,e)),this._pitching&amp;&amp;this.fire(new t.Event(&quot;pitch&quot;,e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&amp;&amp;this.fire(new t.Event(&quot;zoomend&quot;,e)),n&amp;&amp;this.fire(new t.Event(&quot;rotateend&quot;,e)),i&amp;&amp;this.fire(new t.Event(&quot;pitchend&quot;,e)),this.fire(new t.Event(&quot;moveend&quot;,e))},r.prototype.flyTo=function(e,r){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=&quot;zoom&quot;in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):a,c=&quot;bearing&quot;in e?this._normalizeBearing(e.bearing,o):o,u=&quot;pitch&quot;in e?+e.pitch:s,f=i.zoomScale(l-a),h=i.centerPoint.add(t.default$1.convert(e.offset)),p=i.pointLocation(h),d=G.convert(e.center||p);this._normalizeCenter(d);var g=i.project(p),m=i.project(d).sub(g),v=e.curve,y=Math.max(i.width,i.height),x=y/f,b=m.mag();if(&quot;minZoom&quot;in e){var _=t.clamp(Math.min(e.minZoom,a,l),i.minZoom,i.maxZoom),w=y/i.zoomScale(_-a);v=Math.sqrt(w/b*2)}var k=v*v;function M(t){var e=(x*x-y*y+(t?-1:1)*k*k*b*b)/(2*(t?x:y)*k*b);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function T(t){return(Math.exp(t)+Math.exp(-t))/2}var S=M(0),E=function(t){return T(S)/T(S+v*t)},C=function(t){return y*((T(S)*(A(e=S+v*t)/T(e))-A(S))/k)/b;var e},L=(M(1)-S)/v;if(Math.abs(b)&lt;1e-6||!isFinite(L)){if(Math.abs(y-x)&lt;1e-6)return this.easeTo(e,r);var z=x&lt;y?-1:1;L=Math.abs(Math.log(x/y))/v,C=function(){return 0},E=function(t){return Math.exp(z*v*t)}}if(&quot;duration&quot;in e)e.duration=+e.duration;else{var P=&quot;screenSpeed&quot;in e?+e.screenSpeed/v:+e.speed;e.duration=1e3*L/P}return e.maxDuration&amp;&amp;e.duration&gt;e.maxDuration&amp;&amp;(e.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,!1),this._ease(function(e){var l=e*L,f=1/E(l);i.zoom=a+i.scaleZoom(f),n._rotating&amp;&amp;(i.bearing=t.number(o,c,e)),n._pitching&amp;&amp;(i.pitch=t.number(s,u,e));var p=i.unproject(g.add(m.mult(C(l))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?p.wrap():p,h),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&amp;&amp;(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(t,e,r){!1===r.animate||0===r.duration?(t(1),e()):(this._easeStart=a.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((a.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t&lt;1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)&lt;n&amp;&amp;(e-=360),Math.abs(e+360-r)&lt;n&amp;&amp;(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&amp;&amp;!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r&gt;180?-360:r&lt;-180?360:0}},r}(t.Evented),nn=function(e){void 0===e&amp;&amp;(e={}),this.options=e,t.bindAll([&quot;_updateEditLink&quot;,&quot;_updateData&quot;,&quot;_updateCompact&quot;],this)};nn.prototype.getDefaultPosition=function(){return&quot;bottom-right&quot;},nn.prototype.onAdd=function(t){var e=this.options&amp;&amp;this.options.compact;return this._map=t,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-attrib&quot;),e&amp;&amp;this._container.classList.add(&quot;mapboxgl-compact&quot;),this._updateAttributions(),this._updateEditLink(),this._map.on(&quot;sourcedata&quot;,this._updateData),this._map.on(&quot;moveend&quot;,this._updateEditLink),void 0===e&amp;&amp;(this._map.on(&quot;resize&quot;,this._updateCompact),this._updateCompact()),this._container},nn.prototype.onRemove=function(){s.remove(this._container),this._map.off(&quot;sourcedata&quot;,this._updateData),this._map.off(&quot;moveend&quot;,this._updateEditLink),this._map.off(&quot;resize&quot;,this._updateCompact),this._map=void 0},nn.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(&quot;.mapbox-improve-map&quot;));var e=[{key:&quot;owner&quot;,value:this.styleOwner},{key:&quot;id&quot;,value:this.styleId},{key:&quot;access_token&quot;,value:m.ACCESS_TOKEN}];if(t){var r=e.reduce(function(t,r,n){return r.value&amp;&amp;(t+=r.key+&quot;=&quot;+r.value+(n&lt;e.length-1?&quot;&amp;&quot;:&quot;&quot;)),t},&quot;?&quot;);t.href=&quot;https://www.mapbox.com/feedback/&quot;+r+(this._map._hash?this._map._hash.getHashString(!0):&quot;&quot;)}},nn.prototype._updateData=function(t){t&amp;&amp;&quot;metadata&quot;===t.sourceDataType&amp;&amp;(this._updateAttributions(),this._updateEditLink())},nn.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n].getSource();i.attribution&amp;&amp;t.indexOf(i.attribution)&lt;0&amp;&amp;t.push(i.attribution)}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,r){for(var n=r+1;n&lt;t.length;n++)if(t[n].indexOf(e)&gt;=0)return!1;return!0})).length?(this._container.innerHTML=t.join(&quot; | &quot;),this._container.classList.remove(&quot;mapboxgl-attrib-empty&quot;)):this._container.classList.add(&quot;mapboxgl-attrib-empty&quot;),this._editLink=null}},nn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth&lt;=640?this._container.classList.add(&quot;mapboxgl-compact&quot;):this._container.classList.remove(&quot;mapboxgl-compact&quot;)};var an=function(){t.bindAll([&quot;_updateLogo&quot;],this)};an.prototype.onAdd=function(t){this._map=t,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl&quot;);var e=s.create(&quot;a&quot;,&quot;mapboxgl-ctrl-logo&quot;);return e.target=&quot;_blank&quot;,e.href=&quot;https://www.mapbox.com/&quot;,e.setAttribute(&quot;aria-label&quot;,&quot;Mapbox logo&quot;),this._container.appendChild(e),this._container.style.display=&quot;none&quot;,this._map.on(&quot;sourcedata&quot;,this._updateLogo),this._updateLogo(),this._container},an.prototype.onRemove=function(){s.remove(this._container),this._map.off(&quot;sourcedata&quot;,this._updateLogo)},an.prototype.getDefaultPosition=function(){return&quot;bottom-left&quot;},an.prototype._updateLogo=function(t){t&amp;&amp;&quot;metadata&quot;!==t.sourceDataType||(this._container.style.display=this._logoRequired()?&quot;block&quot;:&quot;none&quot;)},an.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}};var on=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};on.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},on.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;r&lt;n.length;r+=1){var i=n[r];if(i.id===t)return void(i.cancelled=!0)}},on.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e&lt;r.length;e+=1){var n=r[e];if(!n.cancelled&amp;&amp;(n.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},on.prototype.clear=function(){this._currentlyRunning&amp;&amp;(this._cleared=!0),this._queue=[]};var sn=t.default.HTMLImageElement,ln=t.default.HTMLElement,cn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300},un=function(r){function n(e){if(null!=(e=t.extend({},cn,e)).minZoom&amp;&amp;null!=e.maxZoom&amp;&amp;e.minZoom&gt;e.maxZoom)throw new Error(&quot;maxZoom must be greater than minZoom&quot;);var n=new Fr(e.minZoom,e.maxZoom,e.renderWorldCopies);r.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new on;var i=e.transformRequest;if(this._transformRequest=i?function(t,e){return i(t,e)||{url:t}}:function(t){return{url:t}},&quot;string&quot;==typeof e.container){var a=t.default.document.getElementById(e.container);if(!a)throw new Error(&quot;Container '&quot;+e.container+&quot;' not found.&quot;);this._container=a}else{if(!(e.container instanceof ln))throw new Error(&quot;Invalid type: 'container' must be a String or HTMLElement.&quot;);this._container=e.container}e.maxBounds&amp;&amp;this.setMaxBounds(e.maxBounds),t.bindAll([&quot;_onWindowOnline&quot;,&quot;_onWindowResize&quot;,&quot;_contextLost&quot;,&quot;_contextRestored&quot;,&quot;_update&quot;,&quot;_render&quot;,&quot;_onData&quot;,&quot;_onDataLoading&quot;],this),this._setupContainer(),this._setupPainter(),this.on(&quot;move&quot;,this._update.bind(this,!1)),this.on(&quot;zoom&quot;,this._update.bind(this,!0)),void 0!==t.default&amp;&amp;(t.default.addEventListener(&quot;online&quot;,this._onWindowOnline,!1),t.default.addEventListener(&quot;resize&quot;,this._onWindowResize,!1)),function(t,e){var r=t.getCanvasContainer(),n=null,i=!1;for(var a in en)t[a]=new en[a](t,e),e.interactive&amp;&amp;e[a]&amp;&amp;t[a].enable(e[a]);s.addEventListener(r,&quot;mouseout&quot;,function(e){t.fire(new Vr(&quot;mouseout&quot;,t,e))}),s.addEventListener(r,&quot;mousedown&quot;,function(r){i=!0;var n=new Vr(&quot;mousedown&quot;,t,r);t.fire(n),n.defaultPrevented||(e.interactive&amp;&amp;!t.doubleClickZoom.isActive()&amp;&amp;t.stop(),t.boxZoom.onMouseDown(r),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(r),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(r))}),s.addEventListener(r,&quot;mouseup&quot;,function(e){var r=t.dragRotate.isActive();n&amp;&amp;!r&amp;&amp;t.fire(new Vr(&quot;contextmenu&quot;,t,n)),n=null,i=!1,t.fire(new Vr(&quot;mouseup&quot;,t,e))}),s.addEventListener(r,&quot;mousemove&quot;,function(e){if(!t.dragPan.isActive()&amp;&amp;!t.dragRotate.isActive()){for(var n=e.toElement||e.target;n&amp;&amp;n!==r;)n=n.parentNode;n===r&amp;&amp;t.fire(new Vr(&quot;mousemove&quot;,t,e))}}),s.addEventListener(r,&quot;mouseover&quot;,function(e){for(var n=e.toElement||e.target;n&amp;&amp;n!==r;)n=n.parentNode;n===r&amp;&amp;t.fire(new Vr(&quot;mouseover&quot;,t,e))}),s.addEventListener(r,&quot;touchstart&quot;,function(r){var n=new Ur(&quot;touchstart&quot;,t,r);t.fire(n),n.defaultPrevented||(e.interactive&amp;&amp;t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),s.addEventListener(r,&quot;touchmove&quot;,function(e){t.fire(new Ur(&quot;touchmove&quot;,t,e))},{passive:!1}),s.addEventListener(r,&quot;touchend&quot;,function(e){t.fire(new Ur(&quot;touchend&quot;,t,e))}),s.addEventListener(r,&quot;touchcancel&quot;,function(e){t.fire(new Ur(&quot;touchcancel&quot;,t,e))}),s.addEventListener(r,&quot;click&quot;,function(e){t.fire(new Vr(&quot;click&quot;,t,e))}),s.addEventListener(r,&quot;dblclick&quot;,function(e){var r=new Vr(&quot;dblclick&quot;,t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)}),s.addEventListener(r,&quot;contextmenu&quot;,function(e){var r=t.dragRotate.isActive();i||r?i&amp;&amp;(n=e):t.fire(new Vr(&quot;contextmenu&quot;,t,e)),e.preventDefault()}),s.addEventListener(r,&quot;wheel&quot;,function(e){var r=new qr(&quot;wheel&quot;,t,e);t.fire(r),r.defaultPrevented||t.scrollZoom.onWheel(e)},{passive:!1})}(this,e),this._hash=e.hash&amp;&amp;(new jr).addTo(this),this._hash&amp;&amp;this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this.resize(),e.style&amp;&amp;this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&amp;&amp;this.addControl(new nn),this.addControl(new an,e.logoPosition),this.on(&quot;style.load&quot;,function(){this.transform.unmodified&amp;&amp;this.jumpTo(this.style.stylesheet)}),this.on(&quot;data&quot;,this._onData),this.on(&quot;dataloading&quot;,this._onDataLoading)}r&amp;&amp;(n.__proto__=r),n.prototype=Object.create(r&amp;&amp;r.prototype),n.prototype.constructor=n;var i={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype.addControl=function(t,e){void 0===e&amp;&amp;t.getDefaultPosition&amp;&amp;(e=t.getDefaultPosition()),void 0===e&amp;&amp;(e=&quot;top-right&quot;);var r=t.onAdd(this),n=this._controlPositions[e];return-1!==e.indexOf(&quot;bottom&quot;)?n.insertBefore(r,n.firstChild):n.appendChild(r),this},n.prototype.removeControl=function(t){return t.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];return this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i),this.fire(new t.Event(&quot;movestart&quot;,e)).fire(new t.Event(&quot;move&quot;,e)).fire(new t.Event(&quot;resize&quot;,e)).fire(new t.Event(&quot;moveend&quot;,e))},n.prototype.getBounds=function(){var e=new W(this.transform.pointLocation(new t.default$1(0,this.transform.height)),this.transform.pointLocation(new t.default$1(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&amp;&amp;(e.extend(this.transform.pointLocation(new t.default$1(this.transform.size.x,0))),e.extend(this.transform.pointLocation(new t.default$1(0,this.transform.size.y)))),e},n.prototype.getMaxBounds=function(){return this.transform.latRange&amp;&amp;2===this.transform.latRange.length&amp;&amp;this.transform.lngRange&amp;&amp;2===this.transform.lngRange.length?new W([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},n.prototype.setMaxBounds=function(t){if(t){var e=W.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null==t&amp;&amp;(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)&gt;=0&amp;&amp;t&lt;=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()&lt;t&amp;&amp;this.setZoom(t),this;throw new Error(&quot;minZoom must be between 0 and the current maxZoom, inclusive&quot;)},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)&gt;=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()&gt;t&amp;&amp;this.setZoom(t),this;throw new Error(&quot;maxZoom must be greater than the current minZoom&quot;)},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update(),this},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(t){return this.transform.locationPoint(G.convert(t))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.default$1.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,n){var i,a=this;if(void 0===n)return r.prototype.on.call(this,t,e);var o=function(){if(&quot;mouseenter&quot;===t||&quot;mouseover&quot;===t){var r=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){var o=a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[];o.length?r||(r=!0,n.call(a,new Vr(t,a,i.originalEvent,{features:o}))):r=!1},mouseout:function(){r=!1}}}}if(&quot;mouseleave&quot;===t||&quot;mouseout&quot;===t){var o=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){(a.getLayer(e)?a.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?o=!0:o&amp;&amp;(o=!1,n.call(a,new Vr(t,a,r.originalEvent)))},mouseout:function(e){o&amp;&amp;(o=!1,n.call(a,new Vr(t,a,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(i={},i[t]=function(t){var r=a.getLayer(e)?a.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&amp;&amp;(t.features=r,n.call(a,t),delete t.features)},i)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)a.on(s,o.delegates[s]);return this},n.prototype.off=function(t,e,n){if(void 0===n)return r.prototype.off.call(this,t,e);if(this._delegatedListeners&amp;&amp;this._delegatedListeners[t])for(var i=this._delegatedListeners[t],a=0;a&lt;i.length;a++){var o=i[a];if(o.layer===e&amp;&amp;o.listener===n){for(var s in o.delegates)this.off(s,o.delegates[s]);return i.splice(a,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,r){var n;return 2===arguments.length?(e=arguments[0],r=arguments[1]):1===arguments.length&amp;&amp;((n=arguments[0])instanceof t.default$1||Array.isArray(n))?(e=arguments[0],r={}):1===arguments.length?(e=void 0,r=arguments[0]):(e=void 0,r={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(e),r,this.transform):[]},n.prototype._makeQueryGeometry=function(e){var r,n=this;if(void 0===e&amp;&amp;(e=[t.default$1.convert([0,0]),t.default$1.convert([this.transform.width,this.transform.height])]),e instanceof t.default$1||&quot;number&quot;==typeof e[0])r=[t.default$1.convert(e)];else{var i=[t.default$1.convert(e[0]),t.default$1.convert(e[1])];r=[i[0],new t.default$1(i[1].x,i[0].y),i[1],new t.default$1(i[0].x,i[1].y),i[0]]}return{viewport:r,worldCoordinate:r.map(function(t){return n.transform.pointCoordinate(t)})}},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){if((!r||!1!==r.diff&amp;&amp;!r.localIdeographFontFamily)&amp;&amp;this.style&amp;&amp;e&amp;&amp;&quot;object&quot;==typeof e)try{return this.style.setState(e)&amp;&amp;this._update(!0),this}catch(e){t.warnOnce(&quot;Unable to perform style diff: &quot;+(e.message||e.error||e)+&quot;.  Rebuilding the style from scratch.&quot;)}return this.style&amp;&amp;(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Je(this,r||{}),this.style.setEventedParent(this,{style:this.style}),&quot;string&quot;==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce(&quot;There is no style added to the map.&quot;)},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},n.prototype.isSourceLoaded=function(e){var r=this.style&amp;&amp;this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error(&quot;There is no source with ID '&quot;+e+&quot;'&quot;)))},n.prototype.areTilesLoaded=function(){var t=this.style&amp;&amp;this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var n in r){var i=r[n];if(&quot;loaded&quot;!==i.state&amp;&amp;&quot;errored&quot;!==i.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,n){void 0===n&amp;&amp;(n={});var i=n.pixelRatio;void 0===i&amp;&amp;(i=1);var o=n.sdf;if(void 0===o&amp;&amp;(o=!1),r instanceof sn){var s=a.getImageData(r),l=s.width,c=s.height,u=s.data;this.style.addImage(e,{data:new t.RGBAImage({width:l,height:c},u),pixelRatio:i,sdf:o})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error(&quot;Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`&quot;)));var f=r.width,h=r.height,p=r.data;this.style.addImage(e,{data:new t.RGBAImage({width:f,height:h},p.slice(0)),pixelRatio:i,sdf:o})}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error(&quot;Missing required image id&quot;))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r){return this.style.setPaintProperty(t,e,r),this._update(!0),this},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&amp;&amp;(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},n.prototype._setupContainer=function(){var t=this._container;t.classList.add(&quot;mapboxgl-map&quot;),(this._missingCSSContainer=s.create(&quot;div&quot;,&quot;mapboxgl-missing-css&quot;,t)).innerHTML=&quot;Missing Mapbox GL JS CSS&quot;;var e=this._canvasContainer=s.create(&quot;div&quot;,&quot;mapboxgl-canvas-container&quot;,t);this._interactive&amp;&amp;e.classList.add(&quot;mapboxgl-interactive&quot;),this._canvas=s.create(&quot;canvas&quot;,&quot;mapboxgl-canvas&quot;,e),this._canvas.style.position=&quot;absolute&quot;,this._canvas.addEventListener(&quot;webglcontextlost&quot;,this._contextLost,!1),this._canvas.addEventListener(&quot;webglcontextrestored&quot;,this._contextRestored,!1),this._canvas.setAttribute(&quot;tabindex&quot;,&quot;0&quot;),this._canvas.setAttribute(&quot;aria-label&quot;,&quot;Map&quot;);var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var n=this._controlContainer=s.create(&quot;div&quot;,&quot;mapboxgl-control-container&quot;,t),i=this._controlPositions={};[&quot;top-left&quot;,&quot;top-right&quot;,&quot;bottom-left&quot;,&quot;bottom-right&quot;].forEach(function(t){i[t]=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl-&quot;+t,n)})},n.prototype._resizeCanvas=function(e,r){var n=t.default.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*r,this._canvas.style.width=e+&quot;px&quot;,this._canvas.style.height=r+&quot;px&quot;},n.prototype._setupPainter=function(){var r=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),n=this._canvas.getContext(&quot;webgl&quot;,r)||this._canvas.getContext(&quot;experimental-webgl&quot;,r);n?this.painter=new zr(n,this.transform):this.fire(new t.ErrorEvent(new Error(&quot;Failed to initialize WebGL&quot;)))},n.prototype._contextLost=function(e){e.preventDefault(),this._frameId&amp;&amp;(a.cancelFrame(this._frameId),this._frameId=null),this.fire(new t.Event(&quot;webglcontextlost&quot;,{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event(&quot;webglcontextrestored&quot;,{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&amp;&amp;!this._sourcesDirty&amp;&amp;!(!this.style||!this.style.loaded())},n.prototype._update=function(t){this.style&amp;&amp;(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender())},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this._renderTaskQueue.run();var e=!1;if(this.style&amp;&amp;this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,n=a.now();this.style.zoomHistory.update(r,n);var i=new t.default$16(r,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=i.crossFadingFactor();1===o&amp;&amp;o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(i)}return this.style&amp;&amp;this._sourcesDirty&amp;&amp;(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&amp;&amp;this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),fadeDuration:this._fadeDuration}),this.fire(new t.Event(&quot;render&quot;)),this.loaded()&amp;&amp;!this._loaded&amp;&amp;(this._loaded=!0,this.fire(new t.Event(&quot;load&quot;))),this.style&amp;&amp;(this.style.hasTransitions()||e)&amp;&amp;(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&amp;&amp;this._rerender(),this},n.prototype.remove=function(){this._hash&amp;&amp;this._hash.remove(),a.cancelFrame(this._frameId),this._renderTaskQueue.clear(),this._frameId=null,this.setStyle(null),void 0!==t.default&amp;&amp;(t.default.removeEventListener(&quot;resize&quot;,this._onWindowResize,!1),t.default.removeEventListener(&quot;online&quot;,this._onWindowOnline,!1));var e=this.painter.context.gl.getExtension(&quot;WEBGL_lose_context&quot;);e&amp;&amp;e.loseContext(),fn(this._canvasContainer),fn(this._controlContainer),fn(this._missingCSSContainer),this._container.classList.remove(&quot;mapboxgl-map&quot;),this.fire(new t.Event(&quot;remove&quot;))},n.prototype._rerender=function(){var t=this;this.style&amp;&amp;!this._frameId&amp;&amp;(this._frameId=a.frame(function(){t._frameId=null,t._render()}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&amp;&amp;this.stop().resize()._update()},i.showTileBoundaries.get=function(){return!!this._showTileBoundaries},i.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&amp;&amp;(this._showTileBoundaries=t,this._update())},i.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},i.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&amp;&amp;(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},i.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},i.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&amp;&amp;(this._showOverdrawInspector=t,this._update())},i.repaint.get=function(){return!!this._repaint},i.repaint.set=function(t){this._repaint=t,this._update()},i.vertices.get=function(){return!!this._vertices},i.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._onData=function(e){this._update(&quot;style&quot;===e.dataType),this.fire(new t.Event(e.dataType+&quot;data&quot;,e))},n.prototype._onDataLoading=function(e){this.fire(new t.Event(e.dataType+&quot;dataloading&quot;,e))},Object.defineProperties(n.prototype,i),n}(rn);function fn(t){t.parentNode&amp;&amp;t.parentNode.removeChild(t)}var hn={showCompass:!0,showZoom:!0},pn=function(e){var r=this;this.options=t.extend({},hn,e),this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-group&quot;),this._container.addEventListener(&quot;contextmenu&quot;,function(t){return t.preventDefault()}),this.options.showZoom&amp;&amp;(this._zoomInButton=this._createButton(&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in&quot;,&quot;Zoom In&quot;,function(){return r._map.zoomIn()}),this._zoomOutButton=this._createButton(&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out&quot;,&quot;Zoom Out&quot;,function(){return r._map.zoomOut()})),this.options.showCompass&amp;&amp;(t.bindAll([&quot;_rotateCompassArrow&quot;],this),this._compass=this._createButton(&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-compass&quot;,&quot;Reset North&quot;,function(){return r._map.resetNorth()}),this._compassArrow=s.create(&quot;span&quot;,&quot;mapboxgl-ctrl-compass-arrow&quot;,this._compass))};function dn(t,e,r){if(t=new G(t.lng,t.lat),e){var n=new G(t.lng-360,t.lat),i=new G(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(e);r.locationPoint(n).distSqr(e)&lt;a?t=n:r.locationPoint(i).distSqr(e)&lt;a&amp;&amp;(t=i)}for(;Math.abs(t.lng-r.center.lng)&gt;180;){var o=r.locationPoint(t);if(o.x&gt;=0&amp;&amp;o.y&gt;=0&amp;&amp;o.x&lt;=r.width&amp;&amp;o.y&lt;=r.height)break;t.lng&gt;r.center.lng?t.lng-=360:t.lng+=360}return t}pn.prototype._rotateCompassArrow=function(){var t=&quot;rotate(&quot;+this._map.transform.angle*(180/Math.PI)+&quot;deg)&quot;;this._compassArrow.style.transform=t},pn.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&amp;&amp;(this._map.on(&quot;rotate&quot;,this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Yr(t,{button:&quot;left&quot;,element:this._compass}),this._handler.enable()),this._container},pn.prototype.onRemove=function(){s.remove(this._container),this.options.showCompass&amp;&amp;(this._map.off(&quot;rotate&quot;,this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map},pn.prototype._createButton=function(t,e,r){var n=s.create(&quot;button&quot;,t,this._container);return n.type=&quot;button&quot;,n.setAttribute(&quot;aria-label&quot;,e),n.addEventListener(&quot;click&quot;,r),n};var gn={center:&quot;translate(-50%,-50%)&quot;,top:&quot;translate(-50%,0)&quot;,&quot;top-left&quot;:&quot;translate(0,0)&quot;,&quot;top-right&quot;:&quot;translate(-100%,0)&quot;,bottom:&quot;translate(-50%,-100%)&quot;,&quot;bottom-left&quot;:&quot;translate(0,-100%)&quot;,&quot;bottom-right&quot;:&quot;translate(-100%,-100%)&quot;,left:&quot;translate(0,-50%)&quot;,right:&quot;translate(-100%,-50%)&quot;};function mn(t,e,r){var n=t.classList;for(var i in gn)n.remove(&quot;mapboxgl-&quot;+r+&quot;-anchor-&quot;+i);n.add(&quot;mapboxgl-&quot;+r+&quot;-anchor-&quot;+e)}var vn=function(e){if((arguments[0]instanceof t.default.HTMLElement||2===arguments.length)&amp;&amp;(e=t.extend({element:e},arguments[1])),t.bindAll([&quot;_update&quot;,&quot;_onMapClick&quot;],this),this._anchor=e&amp;&amp;e.anchor||&quot;center&quot;,this._color=e&amp;&amp;e.color||&quot;#3FB1CE&quot;,e&amp;&amp;e.element)this._element=e.element,this._offset=t.default$1.convert(e&amp;&amp;e.offset||[0,0]);else{this._defaultMarker=!0,this._element=s.create(&quot;div&quot;);var r=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;svg&quot;);r.setAttributeNS(null,&quot;height&quot;,&quot;41px&quot;),r.setAttributeNS(null,&quot;width&quot;,&quot;27px&quot;),r.setAttributeNS(null,&quot;viewBox&quot;,&quot;0 0 27 41&quot;);var n=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);n.setAttributeNS(null,&quot;stroke&quot;,&quot;none&quot;),n.setAttributeNS(null,&quot;stroke-width&quot;,&quot;1&quot;),n.setAttributeNS(null,&quot;fill&quot;,&quot;none&quot;),n.setAttributeNS(null,&quot;fill-rule&quot;,&quot;evenodd&quot;);var i=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);i.setAttributeNS(null,&quot;fill-rule&quot;,&quot;nonzero&quot;);var a=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);a.setAttributeNS(null,&quot;transform&quot;,&quot;translate(3.0, 29.0)&quot;),a.setAttributeNS(null,&quot;fill&quot;,&quot;#000000&quot;);for(var o=0,l=[{rx:&quot;10.5&quot;,ry:&quot;5.25002273&quot;},{rx:&quot;10.5&quot;,ry:&quot;5.25002273&quot;},{rx:&quot;9.5&quot;,ry:&quot;4.77275007&quot;},{rx:&quot;8.5&quot;,ry:&quot;4.29549936&quot;},{rx:&quot;7.5&quot;,ry:&quot;3.81822308&quot;},{rx:&quot;6.5&quot;,ry:&quot;3.34094679&quot;},{rx:&quot;5.5&quot;,ry:&quot;2.86367051&quot;},{rx:&quot;4.5&quot;,ry:&quot;2.38636864&quot;}];o&lt;l.length;o+=1){var c=l[o],u=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;ellipse&quot;);u.setAttributeNS(null,&quot;opacity&quot;,&quot;0.04&quot;),u.setAttributeNS(null,&quot;cx&quot;,&quot;10.5&quot;),u.setAttributeNS(null,&quot;cy&quot;,&quot;5.80029008&quot;),u.setAttributeNS(null,&quot;rx&quot;,c.rx),u.setAttributeNS(null,&quot;ry&quot;,c.ry),a.appendChild(u)}var f=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);f.setAttributeNS(null,&quot;fill&quot;,this._color);var h=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;path&quot;);h.setAttributeNS(null,&quot;d&quot;,&quot;M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z&quot;),f.appendChild(h);var p=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);p.setAttributeNS(null,&quot;opacity&quot;,&quot;0.25&quot;),p.setAttributeNS(null,&quot;fill&quot;,&quot;#000000&quot;);var d=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;path&quot;);d.setAttributeNS(null,&quot;d&quot;,&quot;M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z&quot;),p.appendChild(d);var g=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);g.setAttributeNS(null,&quot;transform&quot;,&quot;translate(6.0, 7.0)&quot;),g.setAttributeNS(null,&quot;fill&quot;,&quot;#FFFFFF&quot;);var m=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);m.setAttributeNS(null,&quot;transform&quot;,&quot;translate(8.0, 8.0)&quot;);var v=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;circle&quot;);v.setAttributeNS(null,&quot;fill&quot;,&quot;#000000&quot;),v.setAttributeNS(null,&quot;opacity&quot;,&quot;0.25&quot;),v.setAttributeNS(null,&quot;cx&quot;,&quot;5.5&quot;),v.setAttributeNS(null,&quot;cy&quot;,&quot;5.5&quot;),v.setAttributeNS(null,&quot;r&quot;,&quot;5.4999962&quot;);var y=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;circle&quot;);y.setAttributeNS(null,&quot;fill&quot;,&quot;#FFFFFF&quot;),y.setAttributeNS(null,&quot;cx&quot;,&quot;5.5&quot;),y.setAttributeNS(null,&quot;cy&quot;,&quot;5.5&quot;),y.setAttributeNS(null,&quot;r&quot;,&quot;5.4999962&quot;),m.appendChild(v),m.appendChild(y),i.appendChild(a),i.appendChild(f),i.appendChild(p),i.appendChild(g),i.appendChild(m),r.appendChild(i),this._element.appendChild(r),this._offset=t.default$1.convert(e&amp;&amp;e.offset||[0,-14])}this._element.classList.add(&quot;mapboxgl-marker&quot;),this._popup=null};vn.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(&quot;move&quot;,this._update),t.on(&quot;moveend&quot;,this._update),this._update(),this._map.on(&quot;click&quot;,this._onMapClick),this},vn.prototype.remove=function(){return this._map&amp;&amp;(this._map.off(&quot;click&quot;,this._onMapClick),this._map.off(&quot;move&quot;,this._update),this._map.off(&quot;moveend&quot;,this._update),delete this._map),s.remove(this._element),this._popup&amp;&amp;this._popup.remove(),this},vn.prototype.getLngLat=function(){return this._lngLat},vn.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._popup&amp;&amp;this._popup.setLngLat(this._lngLat),this._update(),this},vn.prototype.getElement=function(){return this._element},vn.prototype.setPopup=function(t){if(this._popup&amp;&amp;(this._popup.remove(),this._popup=null),t){if(!(&quot;offset&quot;in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],&quot;top-left&quot;:[0,0],&quot;top-right&quot;:[0,0],bottom:[0,-38.1],&quot;bottom-left&quot;:[e,-1*(24.6+e)],&quot;bottom-right&quot;:[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&amp;&amp;this._popup.setLngLat(this._lngLat)}return this},vn.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&amp;&amp;(e===r||r.contains(e))&amp;&amp;this.togglePopup()},vn.prototype.getPopup=function(){return this._popup},vn.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},vn.prototype._update=function(t){this._map&amp;&amp;(this._map.transform.renderWorldCopies&amp;&amp;(this._lngLat=dn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&amp;&amp;&quot;moveend&quot;!==t.type||(this._pos=this._pos.round()),s.setTransform(this._element,gn[this._anchor]+&quot; translate(&quot;+this._pos.x+&quot;px, &quot;+this._pos.y+&quot;px)&quot;),mn(this._element,this._anchor,&quot;marker&quot;))},vn.prototype.getOffset=function(){return this._offset},vn.prototype.setOffset=function(e){return this._offset=t.default$1.convert(e),this._update(),this};var yn,xn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},bn=function(e){function r(r){e.call(this),this.options=t.extend({},xn,r),t.bindAll([&quot;_onSuccess&quot;,&quot;_onError&quot;,&quot;_finish&quot;,&quot;_setupUI&quot;,&quot;_updateCamera&quot;,&quot;_updateMarker&quot;],this)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(e){var r;return this._map=e,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-group&quot;),r=this._setupUI,void 0!==yn?r(yn):void 0!==t.default.navigator.permissions?t.default.navigator.permissions.query({name:&quot;geolocation&quot;}).then(function(t){yn=&quot;denied&quot;!==t.state,r(yn)}):(yn=!!t.default.navigator.geolocation,r(yn)),this._container},r.prototype.onRemove=function(){void 0!==this._geolocationWatchID&amp;&amp;(t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&amp;&amp;this._userLocationDotMarker.remove(),s.remove(this._container),this._map=void 0},r.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case&quot;WAITING_ACTIVE&quot;:case&quot;ACTIVE_LOCK&quot;:case&quot;ACTIVE_ERROR&quot;:this._watchState=&quot;ACTIVE_LOCK&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active&quot;);break;case&quot;BACKGROUND&quot;:case&quot;BACKGROUND_ERROR&quot;:this._watchState=&quot;BACKGROUND&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background&quot;)}this.options.showUserLocation&amp;&amp;&quot;OFF&quot;!==this._watchState&amp;&amp;this._updateMarker(e),this.options.trackUserLocation&amp;&amp;&quot;ACTIVE_LOCK&quot;!==this._watchState||this._updateCamera(e),this.options.showUserLocation&amp;&amp;this._dotElement.classList.remove(&quot;mapboxgl-user-location-dot-stale&quot;),this.fire(new t.Event(&quot;geolocate&quot;,e)),this._finish()},r.prototype._updateCamera=function(t){var e=new G(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},r.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},r.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState=&quot;OFF&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),void 0!==this._geolocationWatchID&amp;&amp;this._clearWatch();else switch(this._watchState){case&quot;WAITING_ACTIVE&quot;:this._watchState=&quot;ACTIVE_ERROR&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active-error&quot;);break;case&quot;ACTIVE_LOCK&quot;:this._watchState=&quot;ACTIVE_ERROR&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;);break;case&quot;BACKGROUND&quot;:this._watchState=&quot;BACKGROUND_ERROR&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;)}&quot;OFF&quot;!==this._watchState&amp;&amp;this.options.showUserLocation&amp;&amp;this._dotElement.classList.add(&quot;mapboxgl-user-location-dot-stale&quot;),this.fire(new t.Event(&quot;error&quot;,e)),this._finish()},r.prototype._finish=function(){this._timeoutId&amp;&amp;clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(e){var r=this;!1!==e&amp;&amp;(this._container.addEventListener(&quot;contextmenu&quot;,function(t){return t.preventDefault()}),this._geolocateButton=s.create(&quot;button&quot;,&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate&quot;,this._container),this._geolocateButton.type=&quot;button&quot;,this._geolocateButton.setAttribute(&quot;aria-label&quot;,&quot;Geolocate&quot;),this.options.trackUserLocation&amp;&amp;(this._geolocateButton.setAttribute(&quot;aria-pressed&quot;,&quot;false&quot;),this._watchState=&quot;OFF&quot;),this.options.showUserLocation&amp;&amp;(this._dotElement=s.create(&quot;div&quot;,&quot;mapboxgl-user-location-dot&quot;),this._userLocationDotMarker=new vn(this._dotElement),this.options.trackUserLocation&amp;&amp;(this._watchState=&quot;OFF&quot;)),this._geolocateButton.addEventListener(&quot;click&quot;,this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&amp;&amp;this._map.on(&quot;movestart&quot;,function(e){e.geolocateSource||&quot;ACTIVE_LOCK&quot;!==r._watchState||(r._watchState=&quot;BACKGROUND&quot;,r._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background&quot;),r._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),r.fire(new t.Event(&quot;trackuserlocationend&quot;)))}))},r.prototype.trigger=function(){if(!this._setup)return t.warnOnce(&quot;Geolocate control triggered before added to a map&quot;),!1;if(this.options.trackUserLocation){switch(this._watchState){case&quot;OFF&quot;:this._watchState=&quot;WAITING_ACTIVE&quot;,this.fire(new t.Event(&quot;trackuserlocationstart&quot;));break;case&quot;WAITING_ACTIVE&quot;:case&quot;ACTIVE_LOCK&quot;:case&quot;ACTIVE_ERROR&quot;:case&quot;BACKGROUND_ERROR&quot;:this._watchState=&quot;OFF&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),this.fire(new t.Event(&quot;trackuserlocationend&quot;));break;case&quot;BACKGROUND&quot;:this._watchState=&quot;ACTIVE_LOCK&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._lastKnownPosition&amp;&amp;this._updateCamera(this._lastKnownPosition),this.fire(new t.Event(&quot;trackuserlocationstart&quot;))}switch(this._watchState){case&quot;WAITING_ACTIVE&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active&quot;);break;case&quot;ACTIVE_LOCK&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active&quot;);break;case&quot;ACTIVE_ERROR&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active-error&quot;);break;case&quot;BACKGROUND&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background&quot;);break;case&quot;BACKGROUND_ERROR&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background-error&quot;)}&quot;OFF&quot;===this._watchState&amp;&amp;void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&amp;&amp;(this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.setAttribute(&quot;aria-pressed&quot;,&quot;true&quot;),this._geolocationWatchID=t.default.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.default.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.setAttribute(&quot;aria-pressed&quot;,&quot;false&quot;),this.options.showUserLocation&amp;&amp;this._updateMarker(null)},r}(t.Evented),_n={maxWidth:100,unit:&quot;metric&quot;},wn=function(e){this.options=t.extend({},_n,e),t.bindAll([&quot;_onMove&quot;,&quot;setUnit&quot;],this)};function kn(t,e,r){var n,i,a,o,s,l,c=r&amp;&amp;r.maxWidth||100,u=t._container.clientHeight/2,f=(n=t.unproject([0,u]),i=t.unproject([c,u]),a=Math.PI/180,o=n.lat*a,s=i.lat*a,l=Math.sin(o)*Math.sin(s)+Math.cos(o)*Math.cos(s)*Math.cos((i.lng-n.lng)*a),6371e3*Math.acos(Math.min(l,1)));if(r&amp;&amp;&quot;imperial&quot;===r.unit){var h=3.2808*f;h&gt;5280?Mn(e,c,h/5280,&quot;mi&quot;):Mn(e,c,h,&quot;ft&quot;)}else r&amp;&amp;&quot;nautical&quot;===r.unit?Mn(e,c,f/1852,&quot;nm&quot;):Mn(e,c,f,&quot;m&quot;)}function Mn(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(&quot;&quot;+Math.floor(i)).length-1))*(o=(o=i/a)&gt;=10?10:o&gt;=5?5:o&gt;=3?3:o&gt;=2?2:1)),l=s/r;&quot;m&quot;===n&amp;&amp;s&gt;=1e3&amp;&amp;(s/=1e3,n=&quot;km&quot;),t.style.width=e*l+&quot;px&quot;,t.innerHTML=s+n}wn.prototype.getDefaultPosition=function(){return&quot;bottom-left&quot;},wn.prototype._onMove=function(){kn(this._map,this._container,this.options)},wn.prototype.onAdd=function(t){return this._map=t,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-scale&quot;,t.getContainer()),this._map.on(&quot;move&quot;,this._onMove),this._onMove(),this._container},wn.prototype.onRemove=function(){s.remove(this._container),this._map.off(&quot;move&quot;,this._onMove),this._map=void 0},wn.prototype.setUnit=function(t){this.options.unit=t,kn(this._map,this._container,this.options)};var An=function(){this._fullscreen=!1,t.bindAll([&quot;_onClickFullscreen&quot;,&quot;_changeIcon&quot;],this),&quot;onfullscreenchange&quot;in t.default.document?this._fullscreenchange=&quot;fullscreenchange&quot;:&quot;onmozfullscreenchange&quot;in t.default.document?this._fullscreenchange=&quot;mozfullscreenchange&quot;:&quot;onwebkitfullscreenchange&quot;in t.default.document?this._fullscreenchange=&quot;webkitfullscreenchange&quot;:&quot;onmsfullscreenchange&quot;in t.default.document&amp;&amp;(this._fullscreenchange=&quot;MSFullscreenChange&quot;),this._className=&quot;mapboxgl-ctrl&quot;};An.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=s.create(&quot;div&quot;,this._className+&quot; mapboxgl-ctrl-group&quot;),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display=&quot;none&quot;,t.warnOnce(&quot;This device does not support fullscreen mode.&quot;)),this._container},An.prototype.onRemove=function(){s.remove(this._container),this._map=null,t.default.document.removeEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._checkFullscreenSupport=function(){return!!(t.default.document.fullscreenEnabled||t.default.document.mozFullScreenEnabled||t.default.document.msFullscreenEnabled||t.default.document.webkitFullscreenEnabled)},An.prototype._setupUI=function(){var e=this._fullscreenButton=s.create(&quot;button&quot;,this._className+&quot;-icon &quot;+this._className+&quot;-fullscreen&quot;,this._container);e.setAttribute(&quot;aria-label&quot;,&quot;Toggle fullscreen&quot;),e.type=&quot;button&quot;,this._fullscreenButton.addEventListener(&quot;click&quot;,this._onClickFullscreen),t.default.document.addEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._isFullscreen=function(){return this._fullscreen},An.prototype._changeIcon=function(){(t.default.document.fullscreenElement||t.default.document.mozFullScreenElement||t.default.document.webkitFullscreenElement||t.default.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&amp;&amp;(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+&quot;-shrink&quot;),this._fullscreenButton.classList.toggle(this._className+&quot;-fullscreen&quot;))},An.prototype._onClickFullscreen=function(){this._isFullscreen()?t.default.document.exitFullscreen?t.default.document.exitFullscreen():t.default.document.mozCancelFullScreen?t.default.document.mozCancelFullScreen():t.default.document.msExitFullscreen?t.default.document.msExitFullscreen():t.default.document.webkitCancelFullScreen&amp;&amp;t.default.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&amp;&amp;this._mapContainer.webkitRequestFullscreen()};var Tn={closeButton:!0,closeOnClick:!0},Sn=function(e){function r(r){e.call(this),this.options=t.extend(Object.create(Tn),r),t.bindAll([&quot;_update&quot;,&quot;_onClickClose&quot;],this)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.addTo=function(e){return this._map=e,this._map.on(&quot;move&quot;,this._update),this.options.closeOnClick&amp;&amp;this._map.on(&quot;click&quot;,this._onClickClose),this._update(),this.fire(new t.Event(&quot;open&quot;)),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&amp;&amp;s.remove(this._content),this._container&amp;&amp;(s.remove(this._container),delete this._container),this._map&amp;&amp;(this._map.off(&quot;move&quot;,this._update),this._map.off(&quot;click&quot;,this._onClickClose),delete this._map),this.fire(new t.Event(&quot;close&quot;)),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._update(),this},r.prototype.setText=function(e){return this.setDOMContent(t.default.document.createTextNode(e))},r.prototype.setHTML=function(e){var r,n=t.default.document.createDocumentFragment(),i=t.default.document.createElement(&quot;body&quot;);for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},r.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},r.prototype._createContent=function(){this._content&amp;&amp;s.remove(this._content),this._content=s.create(&quot;div&quot;,&quot;mapboxgl-popup-content&quot;,this._container),this.options.closeButton&amp;&amp;(this._closeButton=s.create(&quot;button&quot;,&quot;mapboxgl-popup-close-button&quot;,this._content),this._closeButton.type=&quot;button&quot;,this._closeButton.setAttribute(&quot;aria-label&quot;,&quot;Close popup&quot;),this._closeButton.innerHTML=&quot;&amp;#215;&quot;,this._closeButton.addEventListener(&quot;click&quot;,this._onClickClose))},r.prototype._update=function(){if(this._map&amp;&amp;this._lngLat&amp;&amp;this._content){this._container||(this._container=s.create(&quot;div&quot;,&quot;mapboxgl-popup&quot;,this._map.getContainer()),this._tip=s.create(&quot;div&quot;,&quot;mapboxgl-popup-tip&quot;,this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&amp;&amp;(this._lngLat=dn(this._lngLat,this._pos,this._map.transform));var e=this._pos=this._map.project(this._lngLat),r=this.options.anchor,n=function e(r){if(r){if(&quot;number&quot;==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.default$1(0,0),top:new t.default$1(0,r),&quot;top-left&quot;:new t.default$1(n,n),&quot;top-right&quot;:new t.default$1(-n,n),bottom:new t.default$1(0,-r),&quot;bottom-left&quot;:new t.default$1(n,-n),&quot;bottom-right&quot;:new t.default$1(-n,-n),left:new t.default$1(r,0),right:new t.default$1(-r,0)}}if(r instanceof t.default$1||Array.isArray(r)){var i=t.default$1.convert(r);return{center:i,top:i,&quot;top-left&quot;:i,&quot;top-right&quot;:i,bottom:i,&quot;bottom-left&quot;:i,&quot;bottom-right&quot;:i,left:i,right:i}}return{center:t.default$1.convert(r.center||[0,0]),top:t.default$1.convert(r.top||[0,0]),&quot;top-left&quot;:t.default$1.convert(r[&quot;top-left&quot;]||[0,0]),&quot;top-right&quot;:t.default$1.convert(r[&quot;top-right&quot;]||[0,0]),bottom:t.default$1.convert(r.bottom||[0,0]),&quot;bottom-left&quot;:t.default$1.convert(r[&quot;bottom-left&quot;]||[0,0]),&quot;bottom-right&quot;:t.default$1.convert(r[&quot;bottom-right&quot;]||[0,0]),left:t.default$1.convert(r.left||[0,0]),right:t.default$1.convert(r.right||[0,0])}}return e(new t.default$1(0,0))}(this.options.offset);if(!r){var i,a=this._container.offsetWidth,o=this._container.offsetHeight;i=e.y+n.bottom.y&lt;o?[&quot;top&quot;]:e.y&gt;this._map.transform.height-o?[&quot;bottom&quot;]:[],e.x&lt;a/2?i.push(&quot;left&quot;):e.x&gt;this._map.transform.width-a/2&amp;&amp;i.push(&quot;right&quot;),r=0===i.length?&quot;bottom&quot;:i.join(&quot;-&quot;)}var l=e.add(n[r]).round();s.setTransform(this._container,gn[r]+&quot; translate(&quot;+l.x+&quot;px,&quot;+l.y+&quot;px)&quot;),mn(this._container,r,&quot;popup&quot;)}},r.prototype._onClickClose=function(){this.remove()},r}(t.Evented),En={version:&quot;0.45.0&quot;,supported:e,workerCount:Math.max(Math.floor(a.hardwareConcurrency/2),1),setRTLTextPlugin:t.setRTLTextPlugin,Map:un,NavigationControl:pn,GeolocateControl:bn,AttributionControl:nn,ScaleControl:wn,FullscreenControl:An,Popup:Sn,Marker:vn,Style:Je,LngLat:G,LngLatBounds:W,Point:t.default$1,Evented:t.Evented,config:m,get accessToken(){return m.ACCESS_TOKEN},set accessToken(t){m.ACCESS_TOKEN=t},workerUrl:&quot;&quot;};return En}),n})}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{}],407:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=1&lt;&lt;t+1,r=new Array(e),n=0;n&lt;e;++n)r[n]=a(t,n);return r};var n=t(&quot;convex-hull&quot;);function i(t,e,r){for(var n=new Array(t),i=0;i&lt;t;++i)n[i]=0,i===e&amp;&amp;(n[i]+=.5),i===r&amp;&amp;(n[i]+=.5);return n}function a(t,e){if(0===e||e===(1&lt;&lt;t+1)-1)return[];for(var r=[],a=[],o=0;o&lt;=t;++o)if(e&amp;1&lt;&lt;o){r.push(i(t,o-1,o-1)),a.push(null);for(var s=0;s&lt;=t;++s)~e&amp;1&lt;&lt;s&amp;&amp;(r.push(i(t,o-1,s-1)),a.push([o,s]))}var l=n(r),c=[];t:for(o=0;o&lt;l.length;++o){var u=l[o],f=[];for(s=0;s&lt;u.length;++s){if(!a[u[s]])continue t;f.push(a[u[s]].slice())}c.push(f)}return c}},{&quot;convex-hull&quot;:117}],408:[function(t,e,r){var n=t(&quot;./normalize&quot;),i=t(&quot;gl-mat4/create&quot;),a=t(&quot;gl-mat4/clone&quot;),o=t(&quot;gl-mat4/determinant&quot;),s=t(&quot;gl-mat4/invert&quot;),l=t(&quot;gl-mat4/transpose&quot;),c={length:t(&quot;gl-vec3/length&quot;),normalize:t(&quot;gl-vec3/normalize&quot;),dot:t(&quot;gl-vec3/dot&quot;),cross:t(&quot;gl-vec3/cross&quot;)},u=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function g(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}e.exports=function(t,e,r,i,m,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),m||(m=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,t))return!1;if(a(f,u),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)&lt;1e-8))return!1;var y,x,b,_,w,k,M,A=u[3],T=u[7],S=u[11],E=u[12],C=u[13],L=u[14],z=u[15];if(0!==A||0!==T||0!==S){if(h[0]=A,h[1]=T,h[2]=S,h[3]=z,!s(f,f))return!1;l(f,f),y=m,b=f,_=(x=h)[0],w=x[1],k=x[2],M=x[3],y[0]=b[0]*_+b[4]*w+b[8]*k+b[12]*M,y[1]=b[1]*_+b[5]*w+b[9]*k+b[13]*M,y[2]=b[2]*_+b[6]*w+b[10]*k+b[14]*M,y[3]=b[3]*_+b[7]*w+b[11]*k+b[15]*M}else m[0]=m[1]=m[2]=0,m[3]=1;if(e[0]=E,e[1]=C,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,u),r[0]=c.length(p[0]),c.normalize(p[0],p[0]),i[0]=c.dot(p[0],p[1]),g(p[1],p[1],p[0],1,-i[0]),r[1]=c.length(p[1]),c.normalize(p[1],p[1]),i[0]/=r[1],i[1]=c.dot(p[0],p[2]),g(p[2],p[2],p[0],1,-i[1]),i[2]=c.dot(p[1],p[2]),g(p[2],p[2],p[1],1,-i[2]),r[2]=c.length(p[2]),c.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],c.cross(d,p[1],p[2]),c.dot(p[0],d)&lt;0)for(var P=0;P&lt;3;P++)r[P]*=-1,p[P][0]*=-1,p[P][1]*=-1,p[P][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]&gt;p[1][2]&amp;&amp;(v[0]=-v[0]),p[0][2]&gt;p[2][0]&amp;&amp;(v[1]=-v[1]),p[1][0]&gt;p[0][1]&amp;&amp;(v[2]=-v[2]),!0}},{&quot;./normalize&quot;:409,&quot;gl-mat4/clone&quot;:247,&quot;gl-mat4/create&quot;:248,&quot;gl-mat4/determinant&quot;:249,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/transpose&quot;:263,&quot;gl-vec3/cross&quot;:315,&quot;gl-vec3/dot&quot;:320,&quot;gl-vec3/length&quot;:330,&quot;gl-vec3/normalize&quot;:337}],409:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i&lt;16;i++)t[i]=e[i]*n;return!0}},{}],410:[function(t,e,r){var n=t(&quot;gl-vec3/lerp&quot;),i=t(&quot;mat4-recompose&quot;),a=t(&quot;mat4-decompose&quot;),o=t(&quot;gl-mat4/determinant&quot;),s=t(&quot;quat-slerp&quot;),l=f(),c=f(),u=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!p||(n(u.translate,l.translate,c.translate,f),n(u.skew,l.skew,c.skew,f),n(u.scale,l.scale,c.scale,f),n(u.perspective,l.perspective,c.perspective,f),s(u.quaternion,l.quaternion,c.quaternion,f),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{&quot;gl-mat4/determinant&quot;:249,&quot;gl-vec3/lerp&quot;:331,&quot;mat4-decompose&quot;:408,&quot;mat4-recompose&quot;:411,&quot;quat-slerp&quot;:463}],411:[function(t,e,r){var n={identity:t(&quot;gl-mat4/identity&quot;),translate:t(&quot;gl-mat4/translate&quot;),multiply:t(&quot;gl-mat4/multiply&quot;),create:t(&quot;gl-mat4/create&quot;),scale:t(&quot;gl-mat4/scale&quot;),fromRotationTranslation:t(&quot;gl-mat4/fromRotationTranslation&quot;)},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&amp;&amp;(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&amp;&amp;(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&amp;&amp;(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{&quot;gl-mat4/create&quot;:248,&quot;gl-mat4/fromRotationTranslation&quot;:251,&quot;gl-mat4/identity&quot;:252,&quot;gl-mat4/multiply&quot;:255,&quot;gl-mat4/scale&quot;:261,&quot;gl-mat4/translate&quot;:262}],412:[function(t,e,r){&quot;use strict&quot;;e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],413:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;mat4-interpolate&quot;),a=t(&quot;gl-mat4/invert&quot;),o=t(&quot;gl-mat4/rotateX&quot;),s=t(&quot;gl-mat4/rotateY&quot;),l=t(&quot;gl-mat4/rotateZ&quot;),c=t(&quot;gl-mat4/lookAt&quot;),u=t(&quot;gl-mat4/translate&quot;),f=(t(&quot;gl-mat4/scale&quot;),t(&quot;gl-vec3/normalize&quot;)),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r&lt;0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c&lt;16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(c=0;c&lt;16;++c)h[c]=s[l++];var d=this.nextMatrix;for(c=0;c&lt;16;++c)d[c]=s[l++],p=p&amp;&amp;h[c]===d[c];if(u&lt;1e-6||p)for(c=0;c&lt;16;++c)o[c]=h[c];else i(o,h,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],f(g,g);var m=this.computedInverse;a(m,o);var v=this.computedEye,y=m[15];v[0]=m[12]/y,v[1]=m[13]/y,v[2]=m[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c&lt;3;++c)x[c]=v[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t&lt;this.lastT())){for(var e=this._components,r=e.length-16,n=0;n&lt;16;++n)e.push(e[r++]);this._time.push(t)}},d.flush=function(t){var e=n.gt(this._time,t)-2;e&lt;0||(this._time.splice(0,e),this._components.splice(0,16*e))},d.lastT=function(){return this._time[this._time.length-1]},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||h,n=n||this.computedUp,this.setMatrix(t,c(this.computedMatrix,e,r,n));for(var i=0,a=0;a&lt;3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},d.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&amp;&amp;s(i,i,e),r&amp;&amp;o(i,i,r),n&amp;&amp;l(i,i,n),this.setMatrix(t,a(this.computedMatrix,i))};var g=[0,0,0];d.pan=function(t,e,r,n){g[0]=-(e||0),g[1]=-(r||0),g[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;u(i,i,g),this.setMatrix(t,a(i,i))},d.translate=function(t,e,r,n){g[0]=e||0,g[1]=r||0,g[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;u(i,i,g),this.setMatrix(t,i)},d.setMatrix=function(t,e){if(!(t&lt;this.lastT())){this._time.push(t);for(var r=0;r&lt;16;++r)this._components.push(e[r])}},d.setDistance=function(t,e){this.computedRadius[0]=e},d.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},d.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},{&quot;binary-search-bounds&quot;:78,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/lookAt&quot;:254,&quot;gl-mat4/rotateX&quot;:258,&quot;gl-mat4/rotateY&quot;:259,&quot;gl-mat4/rotateZ&quot;:260,&quot;gl-mat4/scale&quot;:261,&quot;gl-mat4/translate&quot;:262,&quot;gl-vec3/normalize&quot;:337,&quot;mat4-interpolate&quot;:410}],414:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.length;if(e&lt;3){for(var r=new Array(e),i=0;i&lt;e;++i)r[i]=i;return 2===e&amp;&amp;t[0][0]===t[1][0]&amp;&amp;t[0][1]===t[1][1]?[0]:r}for(var a=new Array(e),i=0;i&lt;e;++i)a[i]=i;a.sort(function(e,r){var n=t[e][0]-t[r][0];return n||t[e][1]-t[r][1]});for(var o=[a[0],a[1]],s=[a[0],a[1]],i=2;i&lt;e;++i){for(var l=a[i],c=t[l],u=o.length;u&gt;1&amp;&amp;n(t[o[u-2]],t[o[u-1]],c)&lt;=0;)u-=1,o.pop();for(o.push(l),u=s.length;u&gt;1&amp;&amp;n(t[s[u-2]],t[s[u-1]],c)&gt;=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),f=0,i=0,h=o.length;i&lt;h;++i)r[f++]=o[i];for(var p=s.length-2;p&gt;0;--p)r[f++]=s[p];return r};var n=t(&quot;robust-orientation&quot;)[3]},{&quot;robust-orientation&quot;:483}],415:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return&quot;altKey&quot;in t&amp;&amp;(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),&quot;shiftKey&quot;in t&amp;&amp;(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),&quot;ctrlKey&quot;in t&amp;&amp;(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),&quot;metaKey&quot;in t&amp;&amp;(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);&quot;buttons&quot;in s&amp;&amp;(t=0|s.buttons),(t!==r||c!==i||u!==a||l(s))&amp;&amp;(r=0|t,i=c||0,a=u||0,e&amp;&amp;e(r,i,a,o))}function u(t){c(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&amp;&amp;(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&amp;&amp;e(0,0,0,o))}function h(t){l(t)&amp;&amp;e&amp;&amp;e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&amp;~n.buttons(t),t)}function m(){s||(s=!0,t.addEventListener(&quot;mousemove&quot;,p),t.addEventListener(&quot;mousedown&quot;,d),t.addEventListener(&quot;mouseup&quot;,g),t.addEventListener(&quot;mouseleave&quot;,u),t.addEventListener(&quot;mouseenter&quot;,u),t.addEventListener(&quot;mouseout&quot;,u),t.addEventListener(&quot;mouseover&quot;,u),t.addEventListener(&quot;blur&quot;,f),t.addEventListener(&quot;keyup&quot;,h),t.addEventListener(&quot;keydown&quot;,h),t.addEventListener(&quot;keypress&quot;,h),t!==window&amp;&amp;(window.addEventListener(&quot;blur&quot;,f),window.addEventListener(&quot;keyup&quot;,h),window.addEventListener(&quot;keydown&quot;,h),window.addEventListener(&quot;keypress&quot;,h)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():s&amp;&amp;(s=!1,t.removeEventListener(&quot;mousemove&quot;,p),t.removeEventListener(&quot;mousedown&quot;,d),t.removeEventListener(&quot;mouseup&quot;,g),t.removeEventListener(&quot;mouseleave&quot;,u),t.removeEventListener(&quot;mouseenter&quot;,u),t.removeEventListener(&quot;mouseout&quot;,u),t.removeEventListener(&quot;mouseover&quot;,u),t.removeEventListener(&quot;blur&quot;,f),t.removeEventListener(&quot;keyup&quot;,h),t.removeEventListener(&quot;keydown&quot;,h),t.removeEventListener(&quot;keypress&quot;,h),t!==window&amp;&amp;(window.removeEventListener(&quot;blur&quot;,f),window.removeEventListener(&quot;keyup&quot;,h),window.removeEventListener(&quot;keydown&quot;,h),window.removeEventListener(&quot;keypress&quot;,h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var n=t(&quot;mouse-event&quot;)},{&quot;mouse-event&quot;:417}],416:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},{}],417:[function(t,e,r){&quot;use strict&quot;;function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(&quot;object&quot;==typeof t){if(&quot;buttons&quot;in t)return t.buttons;if(&quot;which&quot;in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e&gt;0)return 1&lt;&lt;e-1}else if(&quot;button&quot;in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e&gt;=0)return 1&lt;&lt;e}}return 0},r.element=n,r.x=function(t){if(&quot;object&quot;==typeof t){if(&quot;offsetX&quot;in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(&quot;object&quot;==typeof t){if(&quot;offsetY&quot;in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],418:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;to-px&quot;);e.exports=function(t,e,r){&quot;function&quot;==typeof t&amp;&amp;(r=!!e,e=t,t=window);var i=n(&quot;ex&quot;,t),a=function(t){r&amp;&amp;t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=t.deltaMode,l=1;switch(s){case 1:l=i;break;case 2:l=window.innerHeight}if(a*=l,o*=l,(n*=l)||a||o)return e(n,a,o,t)};return t.addEventListener(&quot;wheel&quot;,a),a}},{&quot;to-px&quot;:513}],419:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;);function i(t){return&quot;a&quot;+t}function a(t){return&quot;d&quot;+t}function o(t,e){return&quot;c&quot;+t+&quot;_&quot;+e}function s(t){return&quot;s&quot;+t}function l(t,e){return&quot;t&quot;+t+&quot;_&quot;+e}function c(t){return&quot;o&quot;+t}function u(t){return&quot;x&quot;+t}function f(t){return&quot;p&quot;+t}function h(t,e){return&quot;d&quot;+t+&quot;_&quot;+e}function p(t){return&quot;i&quot;+t}function d(t,e){return&quot;u&quot;+t+&quot;_&quot;+e}function g(t){return&quot;b&quot;+t}function m(t){return&quot;y&quot;+t}function v(t){return&quot;e&quot;+t}function y(t){return&quot;v&quot;+t}e.exports=function(t){function e(t){throw new Error(&quot;ndarray-extract-contour: &quot;+t)}&quot;object&quot;!=typeof t&amp;&amp;e(&quot;Must specify arguments&quot;);var r=t.order;Array.isArray(r)||e(&quot;Must specify order&quot;);var T=t.arrayArguments||1;T&lt;1&amp;&amp;e(&quot;Must have at least one array argument&quot;);var S=t.scalarArguments||0;S&lt;0&amp;&amp;e(&quot;Scalar arg count must be &gt; 0&quot;);&quot;function&quot;!=typeof t.vertex&amp;&amp;e(&quot;Must specify vertex creation function&quot;);&quot;function&quot;!=typeof t.cell&amp;&amp;e(&quot;Must specify cell creation function&quot;);&quot;function&quot;!=typeof t.phase&amp;&amp;e(&quot;Must specify phase function&quot;);for(var E=t.getters||[],C=new Array(T),L=0;L&lt;T;++L)E.indexOf(L)&gt;=0?C[L]=!0:C[L]=!1;return function(t,e,r,T,S,E){var C=E.length,L=S.length;if(L&lt;2)throw new Error(&quot;ndarray-extract-contour: Dimension must be at least 2&quot;);for(var z=&quot;extractContour&quot;+S.join(&quot;_&quot;),P=[],O=[],I=[],D=0;D&lt;C;++D)I.push(i(D));for(var D=0;D&lt;T;++D)I.push(u(D));for(var D=0;D&lt;L;++D)O.push(s(D)+&quot;=&quot;+i(0)+&quot;.shape[&quot;+D+&quot;]|0&quot;);for(var D=0;D&lt;C;++D){O.push(a(D)+&quot;=&quot;+i(D)+&quot;.data&quot;,c(D)+&quot;=&quot;+i(D)+&quot;.offset|0&quot;);for(var R=0;R&lt;L;++R)O.push(l(D,R)+&quot;=&quot;+i(D)+&quot;.stride[&quot;+R+&quot;]|0&quot;)}for(var D=0;D&lt;C;++D){O.push(f(D)+&quot;=&quot;+c(D)),O.push(o(D,0));for(var R=1;R&lt;1&lt;&lt;L;++R){for(var B=[],F=0;F&lt;L;++F)R&amp;1&lt;&lt;F&amp;&amp;B.push(&quot;-&quot;+l(D,F));O.push(h(D,R)+&quot;=(&quot;+B.join(&quot;&quot;)+&quot;)|0&quot;),O.push(o(D,R)+&quot;=0&quot;)}}for(var D=0;D&lt;C;++D)for(var R=0;R&lt;L;++R){var N=[l(D,S[R])];R&gt;0&amp;&amp;N.push(l(D,S[R-1])+&quot;*&quot;+s(S[R-1])),O.push(d(D,S[R])+&quot;=(&quot;+N.join(&quot;-&quot;)+&quot;)|0&quot;)}for(var D=0;D&lt;L;++D)O.push(p(D)+&quot;=0&quot;);O.push(_+&quot;=0&quot;);for(var j=[&quot;2&quot;],D=L-2;D&gt;=0;--D)j.push(s(S[D]));O.push(w+&quot;=(&quot;+j.join(&quot;*&quot;)+&quot;)|0&quot;,b+&quot;=mallocUint32(&quot;+w+&quot;)&quot;,x+&quot;=mallocUint32(&quot;+w+&quot;)&quot;,k+&quot;=0&quot;),O.push(g(0)+&quot;=0&quot;);for(var R=1;R&lt;1&lt;&lt;L;++R){for(var V=[],U=[],F=0;F&lt;L;++F)R&amp;1&lt;&lt;F&amp;&amp;(0===U.length?V.push(&quot;1&quot;):V.unshift(U.join(&quot;*&quot;))),U.push(s(S[F]));var q=&quot;&quot;;V[0].indexOf(s(S[L-2]))&lt;0&amp;&amp;(q=&quot;-&quot;);var H=A(L,R,S);O.push(v(H)+&quot;=(-&quot;+V.join(&quot;-&quot;)+&quot;)|0&quot;,m(H)+&quot;=(&quot;+q+V.join(&quot;-&quot;)+&quot;)|0&quot;,g(H)+&quot;=0&quot;)}function G(t,e){P.push(&quot;for(&quot;,p(S[t]),&quot;=&quot;,e,&quot;;&quot;,p(S[t]),&quot;&lt;&quot;,s(S[t]),&quot;;&quot;,&quot;++&quot;,p(S[t]),&quot;){&quot;)}function W(t){for(var e=0;e&lt;C;++e)P.push(f(e),&quot;+=&quot;,d(e,S[t]),&quot;;&quot;);P.push(&quot;}&quot;)}function Y(){for(var t=1;t&lt;1&lt;&lt;L;++t)P.push(M,&quot;=&quot;,v(t),&quot;;&quot;,v(t),&quot;=&quot;,m(t),&quot;;&quot;,m(t),&quot;=&quot;,M,&quot;;&quot;)}O.push(y(0)+&quot;=0&quot;,M+&quot;=0&quot;),function t(e,r){if(e&lt;0)return void function(t){for(var e=0;e&lt;C;++e)E[e]?P.push(o(e,0),&quot;=&quot;,a(e),&quot;.get(&quot;,f(e),&quot;);&quot;):P.push(o(e,0),&quot;=&quot;,a(e),&quot;[&quot;,f(e),&quot;];&quot;);for(var r=[],e=0;e&lt;C;++e)r.push(o(e,0));for(var e=0;e&lt;T;++e)r.push(u(e));P.push(g(0),&quot;=&quot;,b,&quot;[&quot;,k,&quot;]=phase(&quot;,r.join(),&quot;);&quot;);for(var n=1;n&lt;1&lt;&lt;L;++n)P.push(g(n),&quot;=&quot;,b,&quot;[&quot;,k,&quot;+&quot;,v(n),&quot;];&quot;);for(var i=[],n=1;n&lt;1&lt;&lt;L;++n)i.push(&quot;(&quot;+g(0)+&quot;!==&quot;+g(n)+&quot;)&quot;);P.push(&quot;if(&quot;,i.join(&quot;||&quot;),&quot;){&quot;);for(var s=[],e=0;e&lt;L;++e)s.push(p(e));for(var e=0;e&lt;C;++e){s.push(o(e,0));for(var n=1;n&lt;1&lt;&lt;L;++n)E[e]?P.push(o(e,n),&quot;=&quot;,a(e),&quot;.get(&quot;,f(e),&quot;+&quot;,h(e,n),&quot;);&quot;):P.push(o(e,n),&quot;=&quot;,a(e),&quot;[&quot;,f(e),&quot;+&quot;,h(e,n),&quot;];&quot;),s.push(o(e,n))}for(var e=0;e&lt;1&lt;&lt;L;++e)s.push(g(e));for(var e=0;e&lt;T;++e)s.push(u(e));P.push(&quot;vertex(&quot;,s.join(),&quot;);&quot;,y(0),&quot;=&quot;,x,&quot;[&quot;,k,&quot;]=&quot;,_,&quot;++;&quot;);for(var l=(1&lt;&lt;L)-1,c=g(l),n=0;n&lt;L;++n)if(0==(t&amp;~(1&lt;&lt;n))){for(var d=l^1&lt;&lt;n,m=g(d),w=[],M=d;M&gt;0;M=M-1&amp;d)w.push(x+&quot;[&quot;+k+&quot;+&quot;+v(M)+&quot;]&quot;);w.push(y(0));for(var M=0;M&lt;C;++M)1&amp;n?w.push(o(M,l),o(M,d)):w.push(o(M,d),o(M,l));1&amp;n?w.push(c,m):w.push(m,c);for(var M=0;M&lt;T;++M)w.push(u(M));P.push(&quot;if(&quot;,c,&quot;!==&quot;,m,&quot;){&quot;,&quot;face(&quot;,w.join(),&quot;)}&quot;)}P.push(&quot;}&quot;,k,&quot;+=1;&quot;)}(r);!function(t){for(var e=t-1;e&gt;=0;--e)G(e,0);for(var r=[],e=0;e&lt;C;++e)E[e]?r.push(a(e)+&quot;.get(&quot;+f(e)+&quot;)&quot;):r.push(a(e)+&quot;[&quot;+f(e)+&quot;]&quot;);for(var e=0;e&lt;T;++e)r.push(u(e));P.push(b,&quot;[&quot;,k,&quot;++]=phase(&quot;,r.join(),&quot;);&quot;);for(var e=0;e&lt;t;++e)W(e);for(var n=0;n&lt;C;++n)P.push(f(n),&quot;+=&quot;,d(n,S[t]),&quot;;&quot;)}(e);P.push(&quot;if(&quot;,s(S[e]),&quot;&gt;0){&quot;,p(S[e]),&quot;=1;&quot;);t(e-1,r|1&lt;&lt;S[e]);for(var n=0;n&lt;C;++n)P.push(f(n),&quot;+=&quot;,d(n,S[e]),&quot;;&quot;);e===L-1&amp;&amp;(P.push(k,&quot;=0;&quot;),Y());G(e,2);t(e-1,r);e===L-1&amp;&amp;(P.push(&quot;if(&quot;,p(S[L-1]),&quot;&amp;1){&quot;,k,&quot;=0;}&quot;),Y());W(e);P.push(&quot;}&quot;)}(L-1,0),P.push(&quot;freeUint32(&quot;,x,&quot;);freeUint32(&quot;,b,&quot;);&quot;);var X=[&quot;'use strict';&quot;,&quot;function &quot;,z,&quot;(&quot;,I.join(),&quot;){&quot;,&quot;var &quot;,O.join(),&quot;;&quot;,P.join(&quot;&quot;),&quot;}&quot;,&quot;return &quot;,z].join(&quot;&quot;);return new Function(&quot;vertex&quot;,&quot;face&quot;,&quot;phase&quot;,&quot;mallocUint32&quot;,&quot;freeUint32&quot;,X)(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,S,r,C)};var x=&quot;V&quot;,b=&quot;P&quot;,_=&quot;N&quot;,w=&quot;Q&quot;,k=&quot;X&quot;,M=&quot;T&quot;;function A(t,e,r){for(var n=0,i=0;i&lt;t;++i)e&amp;1&lt;&lt;i&amp;&amp;(n|=1&lt;&lt;r[i]);return n}},{&quot;typedarray-pool&quot;:519}],420:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;],pre:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},body:{body:&quot;{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_1_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_1_arg2_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;cwise&quot;,blockSize:64});e.exports=function(t,e){return n(t,e),t}},{&quot;cwise/lib/wrapper&quot;:136}],421:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error(&quot;ndarray-gradient: invalid boundary conditions&quot;)}else r=n(e.dimension,&quot;string&quot;==typeof r?r:&quot;clamp&quot;);if(t.dimension!==e.dimension+1)throw new Error(&quot;ndarray-gradient: output dimension must be +1 input dimension&quot;);if(t.shape[e.dimension]!==e.dimension)throw new Error(&quot;ndarray-gradient: output shape must match input shape&quot;);for(var i=0;i&lt;e.dimension;++i)if(t.shape[i]!==e.shape[i])throw new Error(&quot;ndarray-gradient: shape mismatch&quot;);if(0===e.size)return t;if(e.dimension&lt;=0)return t.set(0),t;return function(t){var e=t.join();if(v=o[e])return v;var r=t.length,n=[&quot;function gradient(dst,src){var s=src.shape.slice();&quot;];function i(e){for(var i=r-e.length,a=[],o=[],s=[],l=0;l&lt;r;++l)e.indexOf(l+1)&gt;=0?s.push(&quot;0&quot;):e.indexOf(-(l+1))&gt;=0?s.push(&quot;s[&quot;+l+&quot;]-1&quot;):(s.push(&quot;-1&quot;),a.push(&quot;1&quot;),o.push(&quot;s[&quot;+l+&quot;]-2&quot;));var c=&quot;.lo(&quot;+a.join()+&quot;).hi(&quot;+o.join()+&quot;)&quot;;if(0===a.length&amp;&amp;(c=&quot;&quot;),i&gt;0){n.push(&quot;if(1&quot;);for(var l=0;l&lt;r;++l)e.indexOf(l+1)&gt;=0||e.indexOf(-(l+1))&gt;=0||n.push(&quot;&amp;&amp;s[&quot;,l,&quot;]&gt;2&quot;);n.push(&quot;){grad&quot;,i,&quot;(src.pick(&quot;,s.join(),&quot;)&quot;,c);for(var l=0;l&lt;r;++l)e.indexOf(l+1)&gt;=0||e.indexOf(-(l+1))&gt;=0||n.push(&quot;,dst.pick(&quot;,s.join(),&quot;,&quot;,l,&quot;)&quot;,c);n.push(&quot;);&quot;)}for(var l=0;l&lt;e.length;++l){var u=Math.abs(e[l])-1,f=&quot;dst.pick(&quot;+s.join()+&quot;,&quot;+u+&quot;)&quot;+c;switch(t[u]){case&quot;clamp&quot;:var h=s.slice(),p=s.slice();e[l]&lt;0?h[u]=&quot;s[&quot;+u+&quot;]-2&quot;:p[u]=&quot;1&quot;,0===i?n.push(&quot;if(s[&quot;,u,&quot;]&gt;1){dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0.5*(src.get(&quot;,h.join(),&quot;)-src.get(&quot;,p.join(),&quot;)))}else{dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0)};&quot;):n.push(&quot;if(s[&quot;,u,&quot;]&gt;1){diff(&quot;,f,&quot;,src.pick(&quot;,h.join(),&quot;)&quot;,c,&quot;,src.pick(&quot;,p.join(),&quot;)&quot;,c,&quot;);}else{zero(&quot;,f,&quot;);};&quot;);break;case&quot;mirror&quot;:0===i?n.push(&quot;dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0);&quot;):n.push(&quot;zero(&quot;,f,&quot;);&quot;);break;case&quot;wrap&quot;:var d=s.slice(),g=s.slice();e[l]&lt;0?(d[u]=&quot;s[&quot;+u+&quot;]-2&quot;,g[u]=&quot;0&quot;):(d[u]=&quot;s[&quot;+u+&quot;]-1&quot;,g[u]=&quot;1&quot;),0===i?n.push(&quot;if(s[&quot;,u,&quot;]&gt;2){dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0.5*(src.get(&quot;,d.join(),&quot;)-src.get(&quot;,g.join(),&quot;)))}else{dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0)};&quot;):n.push(&quot;if(s[&quot;,u,&quot;]&gt;2){diff(&quot;,f,&quot;,src.pick(&quot;,d.join(),&quot;)&quot;,c,&quot;,src.pick(&quot;,g.join(),&quot;)&quot;,c,&quot;);}else{zero(&quot;,f,&quot;);};&quot;);break;default:throw new Error(&quot;ndarray-gradient: Invalid boundary condition&quot;)}}i&gt;0&amp;&amp;n.push(&quot;};&quot;)}for(var s=0;s&lt;1&lt;&lt;r;++s){for(var f=[],h=0;h&lt;r;++h)s&amp;1&lt;&lt;h&amp;&amp;f.push(h+1);for(var p=0;p&lt;1&lt;&lt;f.length;++p){for(var d=f.slice(),h=0;h&lt;f.length;++h)p&amp;1&lt;&lt;h&amp;&amp;(d[h]=-d[h]);i(d)}}n.push(&quot;return dst;};return gradient&quot;);for(var g=[&quot;diff&quot;,&quot;zero&quot;],m=[l,c],s=1;s&lt;=r;++s)g.push(&quot;grad&quot;+s),m.push(u(s));g.push(n.join(&quot;&quot;));var v=Function.apply(void 0,g).apply(void 0,m);return a[e]=v,v}(r)(t,e)};var n=t(&quot;dup&quot;),i=t(&quot;cwise-compiler&quot;),a={},o={},s={body:&quot;&quot;,args:[],thisVars:[],localVars:[]},l=i({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],pre:s,post:s,body:{args:[{name:&quot;out&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;left&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;right&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;out=0.5*(left-right)&quot;,thisVars:[],localVars:[]},funcName:&quot;cdiff&quot;}),c=i({args:[&quot;array&quot;],pre:s,post:s,body:{args:[{name:&quot;out&quot;,lvalue:!0,rvalue:!1,count:1}],body:&quot;out=0&quot;,thisVars:[],localVars:[]},funcName:&quot;zero&quot;});function u(t){if(t in a)return a[t];for(var e=[],r=0;r&lt;t;++r)e.push(&quot;out&quot;,r,&quot;s=0.5*(inp&quot;,r,&quot;l-inp&quot;,r,&quot;r);&quot;);var o=[&quot;array&quot;],l=[&quot;junk&quot;];for(r=0;r&lt;t;++r){o.push(&quot;array&quot;),l.push(&quot;out&quot;+r+&quot;s&quot;);var c=n(t);c[r]=-1,o.push({array:0,offset:c.slice()}),c[r]=1,o.push({array:0,offset:c.slice()}),l.push(&quot;inp&quot;+r+&quot;l&quot;,&quot;inp&quot;+r+&quot;r&quot;)}return a[t]=i({args:o,pre:s,post:s,body:{body:e.join(&quot;&quot;),args:l.map(function(t){return{name:t,lvalue:0===t.indexOf(&quot;out&quot;),rvalue:0===t.indexOf(&quot;inp&quot;),count:&quot;junk&quot;!==t|0}}),thisVars:[],localVars:[]},funcName:&quot;fdTemplate&quot;+t})}},{&quot;cwise-compiler&quot;:133,dup:154}],422:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray-warp&quot;),i=t(&quot;gl-matrix-invert&quot;);e.exports=function(t,e,r){var a=e.dimension,o=i([],r);return n(t,e,function(t,e){for(var r=0;r&lt;a;++r){t[r]=o[(a+1)*a+r];for(var n=0;n&lt;a;++n)t[r]+=o[(a+1)*n+r]*e[n]}var i=o[(a+1)*(a+1)-1];for(n=0;n&lt;a;++n)i+=o[(a+1)*n+a]*e[n];var s=1/i;for(r=0;r&lt;a;++r)t[r]*=s;return t}),t}},{&quot;gl-matrix-invert&quot;:264,&quot;ndarray-warp&quot;:429}],423:[function(t,e,r){&quot;use strict&quot;;function n(t,e){var r=Math.floor(e),n=e-r,i=0&lt;=r&amp;&amp;r&lt;t.shape[0],a=0&lt;=r+1&amp;&amp;r+1&lt;t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function i(t,e,r){var n=Math.floor(e),i=e-n,a=0&lt;=n&amp;&amp;n&lt;t.shape[0],o=0&lt;=n+1&amp;&amp;n+1&lt;t.shape[0],s=Math.floor(r),l=r-s,c=0&lt;=s&amp;&amp;s&lt;t.shape[1],u=0&lt;=s+1&amp;&amp;s+1&lt;t.shape[1],f=a&amp;&amp;c?t.get(n,s):0,h=a&amp;&amp;u?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&amp;&amp;c?t.get(n+1,s):0))+l*((1-i)*h+i*(o&amp;&amp;u?t.get(n+1,s+1):0))}function a(t,e,r,n){var i=Math.floor(e),a=e-i,o=0&lt;=i&amp;&amp;i&lt;t.shape[0],s=0&lt;=i+1&amp;&amp;i+1&lt;t.shape[0],l=Math.floor(r),c=r-l,u=0&lt;=l&amp;&amp;l&lt;t.shape[1],f=0&lt;=l+1&amp;&amp;l+1&lt;t.shape[1],h=Math.floor(n),p=n-h,d=0&lt;=h&amp;&amp;h&lt;t.shape[2],g=0&lt;=h+1&amp;&amp;h+1&lt;t.shape[2],m=o&amp;&amp;u&amp;&amp;d?t.get(i,l,h):0,v=o&amp;&amp;f&amp;&amp;d?t.get(i,l+1,h):0,y=s&amp;&amp;u&amp;&amp;d?t.get(i+1,l,h):0,x=s&amp;&amp;f&amp;&amp;d?t.get(i+1,l+1,h):0,b=o&amp;&amp;u&amp;&amp;g?t.get(i,l,h+1):0,_=o&amp;&amp;f&amp;&amp;g?t.get(i,l+1,h+1):0;return(1-p)*((1-c)*((1-a)*m+a*y)+c*((1-a)*v+a*x))+p*((1-c)*((1-a)*b+a*(s&amp;&amp;u&amp;&amp;g?t.get(i+1,l,h+1):0))+c*((1-a)*_+a*(s&amp;&amp;f&amp;&amp;g?t.get(i+1,l+1,h+1):0)))}e.exports=function(t,e,r,o){switch(t.shape.length){case 0:return 0;case 1:return n(t,e);case 2:return i(t,e,r);case 3:return a(t,e,r,o);default:return function(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e&lt;n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0&lt;=i[e]&amp;&amp;i[e]&lt;t.shape[e],s[e]=0&lt;=i[e]+1&amp;&amp;i[e]+1&lt;t.shape[e];var l,c,u,f=0;t:for(e=0;e&lt;1&lt;&lt;n;++e){for(c=1,u=t.offset,l=0;l&lt;n;++l)if(e&amp;1&lt;&lt;l){if(!s[l])continue t;c*=a[l],u+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;c*=1-a[l],u+=t.stride[l]*i[l]}f+=c*t.data[u]}return f}.apply(void 0,arguments)}},e.exports.d1=n,e.exports.d2=i,e.exports.d3=a},{}],424:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;cwise-compiler&quot;),i={body:&quot;&quot;,args:[],thisVars:[],localVars:[]};function a(t){if(!t)return i;for(var e=0;e&lt;t.args.length;++e){var r=t.args[e];t.args[e]=0===e?{name:r,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function o(t){for(var e=[],r=0;r&lt;t.args.length;++r)e.push(&quot;a&quot;+r);return new Function(&quot;P&quot;,[&quot;return function &quot;,t.funcName,&quot;_ndarrayops(&quot;,e.join(&quot;,&quot;),&quot;) {P(&quot;,e.join(&quot;,&quot;),&quot;);return a0}&quot;].join(&quot;&quot;))(function(t){return n({args:t.args,pre:a(t.pre),body:a(t.body),post:a(t.proc),funcName:t.funcName})}(t))}var s={add:&quot;+&quot;,sub:&quot;-&quot;,mul:&quot;*&quot;,div:&quot;/&quot;,mod:&quot;%&quot;,band:&quot;&amp;&quot;,bor:&quot;|&quot;,bxor:&quot;^&quot;,lshift:&quot;&lt;&lt;&quot;,rshift:&quot;&gt;&gt;&quot;,rrshift:&quot;&gt;&gt;&gt;&quot;};!function(){for(var t in s){var e=s[t];r[t]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=b&quot;+e+&quot;c&quot;},funcName:t}),r[t+&quot;eq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a&quot;+e+&quot;=b&quot;},rvalue:!0,funcName:t+&quot;eq&quot;}),r[t+&quot;s&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;s&quot;],body:&quot;a=b&quot;+e+&quot;s&quot;},funcName:t+&quot;s&quot;}),r[t+&quot;seq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;s&quot;],body:&quot;a&quot;+e+&quot;=s&quot;},rvalue:!0,funcName:t+&quot;seq&quot;})}}();var l={not:&quot;!&quot;,bnot:&quot;~&quot;,neg:&quot;-&quot;,recip:&quot;1.0/&quot;};!function(){for(var t in l){var e=l[t];r[t]=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=&quot;+e+&quot;b&quot;},funcName:t}),r[t+&quot;eq&quot;]=o({args:[&quot;array&quot;],body:{args:[&quot;a&quot;],body:&quot;a=&quot;+e+&quot;a&quot;},rvalue:!0,count:2,funcName:t+&quot;eq&quot;})}}();var c={and:&quot;&amp;&amp;&quot;,or:&quot;||&quot;,eq:&quot;===&quot;,neq:&quot;!==&quot;,lt:&quot;&lt;&quot;,gt:&quot;&gt;&quot;,leq:&quot;&lt;=&quot;,geq:&quot;&gt;=&quot;};!function(){for(var t in c){var e=c[t];r[t]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=b&quot;+e+&quot;c&quot;},funcName:t}),r[t+&quot;s&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;s&quot;],body:&quot;a=b&quot;+e+&quot;s&quot;},funcName:t+&quot;s&quot;}),r[t+&quot;eq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=a&quot;+e+&quot;b&quot;},rvalue:!0,count:2,funcName:t+&quot;eq&quot;}),r[t+&quot;seq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;s&quot;],body:&quot;a=a&quot;+e+&quot;s&quot;},rvalue:!0,count:2,funcName:t+&quot;seq&quot;})}}();var u=[&quot;abs&quot;,&quot;acos&quot;,&quot;asin&quot;,&quot;atan&quot;,&quot;ceil&quot;,&quot;cos&quot;,&quot;exp&quot;,&quot;floor&quot;,&quot;log&quot;,&quot;round&quot;,&quot;sin&quot;,&quot;sqrt&quot;,&quot;tan&quot;];!function(){for(var t=0;t&lt;u.length;++t){var e=u[t];r[e]=o({args:[&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(b)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e}),r[e+&quot;eq&quot;]=o({args:[&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;],body:&quot;a=this_f(a)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;eq&quot;})}}();var f=[&quot;max&quot;,&quot;min&quot;,&quot;atan2&quot;,&quot;pow&quot;];!function(){for(var t=0;t&lt;f.length;++t){var e=f[t];r[e]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(b,c)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e}),r[e+&quot;s&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(b,c)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e+&quot;s&quot;}),r[e+&quot;eq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(a,b)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;eq&quot;}),r[e+&quot;seq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(a,b)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;seq&quot;})}}();var h=[&quot;atan2&quot;,&quot;pow&quot;];!function(){for(var t=0;t&lt;h.length;++t){var e=h[t];r[e+&quot;op&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(c,b)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e+&quot;op&quot;}),r[e+&quot;ops&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(c,b)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e+&quot;ops&quot;}),r[e+&quot;opeq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(b,a)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;opeq&quot;}),r[e+&quot;opseq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(b,a)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;opseq&quot;})}}(),r.any=n({args:[&quot;array&quot;],pre:i,body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;if(a){return true}&quot;,localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:&quot;return false&quot;},funcName:&quot;any&quot;}),r.all=n({args:[&quot;array&quot;],pre:i,body:{args:[{name:&quot;x&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;if(!x){return false}&quot;,localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:&quot;return true&quot;},funcName:&quot;all&quot;}),r.sum=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;this_s+=a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;sum&quot;}),r.prod=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=1&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;this_s*=a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;prod&quot;}),r.norm2squared=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:2}],body:&quot;this_s+=a*a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;norm2squared&quot;}),r.norm2=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:2}],body:&quot;this_s+=a*a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return Math.sqrt(this_s)&quot;},funcName:&quot;norm2&quot;}),r.norminf=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:4}],body:&quot;if(-a&gt;this_s){this_s=-a}else if(a&gt;this_s){this_s=a}&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;norminf&quot;}),r.norm1=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:3}],body:&quot;this_s+=a&lt;0?-a:a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;norm1&quot;}),r.sup=n({args:[&quot;array&quot;],pre:{body:&quot;this_h=-Infinity&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]},body:{body:&quot;if(_inline_1_arg0_&gt;this_h)this_h=_inline_1_arg0_&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_h&quot;],localVars:[]},post:{body:&quot;return this_h&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]}}),r.inf=n({args:[&quot;array&quot;],pre:{body:&quot;this_h=Infinity&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]},body:{body:&quot;if(_inline_1_arg0_&lt;this_h)this_h=_inline_1_arg0_&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_h&quot;],localVars:[]},post:{body:&quot;return this_h&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]}}),r.argmin=n({args:[&quot;index&quot;,&quot;array&quot;,&quot;shape&quot;],pre:{body:&quot;{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}&quot;,args:[{name:&quot;_inline_0_arg0_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg1_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg2_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[]},body:{body:&quot;{if(_inline_1_arg1_&lt;this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k&lt;_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2},{name:&quot;_inline_1_arg1_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[&quot;_inline_1_k&quot;]},post:{body:&quot;{return this_i}&quot;,args:[],thisVars:[&quot;this_i&quot;],localVars:[]}}),r.argmax=n({args:[&quot;index&quot;,&quot;array&quot;,&quot;shape&quot;],pre:{body:&quot;{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}&quot;,args:[{name:&quot;_inline_0_arg0_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg1_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg2_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[]},body:{body:&quot;{if(_inline_1_arg1_&gt;this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k&lt;_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2},{name:&quot;_inline_1_arg1_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[&quot;_inline_1_k&quot;]},post:{body:&quot;{return this_i}&quot;,args:[],thisVars:[&quot;this_i&quot;],localVars:[]}}),r.random=o({args:[&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.random&quot;,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;],body:&quot;a=this_f()&quot;,thisVars:[&quot;this_f&quot;]},funcName:&quot;random&quot;}),r.assign=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=b&quot;},funcName:&quot;assign&quot;}),r.assigns=o({args:[&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=b&quot;},funcName:&quot;assigns&quot;}),r.equals=n({args:[&quot;array&quot;,&quot;array&quot;],pre:i,body:{args:[{name:&quot;x&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;y&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;if(x!==y){return false}&quot;,localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:&quot;return true&quot;},funcName:&quot;equals&quot;})},{&quot;cwise-compiler&quot;:133}],425:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray&quot;),i=t(&quot;./doConvert.js&quot;);e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{&quot;./doConvert.js&quot;:426,ndarray:430}],426:[function(t,e,r){e.exports=t(&quot;cwise-compiler&quot;)({args:[&quot;array&quot;,&quot;scalar&quot;,&quot;index&quot;],pre:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},body:{body:&quot;{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i&lt;_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_1_arg1_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_1_arg2_&quot;,lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:[&quot;_inline_1_i&quot;,&quot;_inline_1_v&quot;]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},funcName:&quot;convert&quot;,blockSize:64})},{&quot;cwise-compiler&quot;:133}],427:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;),i=32;function a(t){switch(t){case&quot;uint8&quot;:return[n.mallocUint8,n.freeUint8];case&quot;uint16&quot;:return[n.mallocUint16,n.freeUint16];case&quot;uint32&quot;:return[n.mallocUint32,n.freeUint32];case&quot;int8&quot;:return[n.mallocInt8,n.freeInt8];case&quot;int16&quot;:return[n.mallocInt16,n.freeInt16];case&quot;int32&quot;:return[n.mallocInt32,n.freeInt32];case&quot;float32&quot;:return[n.mallocFloat,n.freeFloat];case&quot;float64&quot;:return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r&lt;t;++r)e.push(&quot;s&quot;+r);for(r=0;r&lt;t;++r)e.push(&quot;n&quot;+r);for(r=1;r&lt;t;++r)e.push(&quot;d&quot;+r);for(r=1;r&lt;t;++r)e.push(&quot;e&quot;+r);for(r=1;r&lt;t;++r)e.push(&quot;f&quot;+r);return e}e.exports=function(t,e){var r=[&quot;'use strict'&quot;],n=[&quot;ndarraySortWrapper&quot;,t.join(&quot;d&quot;),e].join(&quot;&quot;);r.push([&quot;function &quot;,n,&quot;(&quot;,[&quot;array&quot;].join(&quot;,&quot;),&quot;){&quot;].join(&quot;&quot;));for(var s=[&quot;data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride&quot;],l=0;l&lt;t.length;++l)s.push([&quot;s&quot;,l,&quot;=stride[&quot;,l,&quot;]|0,n&quot;,l,&quot;=shape[&quot;,l,&quot;]|0&quot;].join(&quot;&quot;));var c=new Array(t.length),u=[];for(l=0;l&lt;t.length;++l)0!==(p=t[l])&amp;&amp;(0===u.length?c[p]=&quot;1&quot;:c[p]=u.join(&quot;*&quot;),u.push(&quot;n&quot;+p));var f=-1,h=-1;for(l=0;l&lt;t.length;++l){var p,d=t[l];0!==d&amp;&amp;(f&gt;0?s.push([&quot;d&quot;,d,&quot;=s&quot;,d,&quot;-d&quot;,f,&quot;*n&quot;,f].join(&quot;&quot;)):s.push([&quot;d&quot;,d,&quot;=s&quot;,d].join(&quot;&quot;)),f=d),0!=(p=t.length-1-l)&amp;&amp;(h&gt;0?s.push([&quot;e&quot;,p,&quot;=s&quot;,p,&quot;-e&quot;,h,&quot;*n&quot;,h,&quot;,f&quot;,p,&quot;=&quot;,c[p],&quot;-f&quot;,h,&quot;*n&quot;,h].join(&quot;&quot;)):s.push([&quot;e&quot;,p,&quot;=s&quot;,p,&quot;,f&quot;,p,&quot;=&quot;,c[p]].join(&quot;&quot;)),h=p)}r.push(&quot;var &quot;+s.join(&quot;,&quot;));var g=[&quot;0&quot;,&quot;n0-1&quot;,&quot;data&quot;,&quot;offset&quot;].concat(o(t.length));r.push([&quot;if(n0&lt;=&quot;,i,&quot;){&quot;,&quot;insertionSort(&quot;,g.join(&quot;,&quot;),&quot;)}else{&quot;,&quot;quickSort(&quot;,g.join(&quot;,&quot;),&quot;)}&quot;].join(&quot;&quot;)),r.push(&quot;}return &quot;+n);var m=new Function(&quot;insertionSort&quot;,&quot;quickSort&quot;,r.join(&quot;\n&quot;)),v=function(t,e){var r=[&quot;'use strict'&quot;],n=[&quot;ndarrayInsertionSort&quot;,t.join(&quot;d&quot;),e].join(&quot;&quot;),i=[&quot;left&quot;,&quot;right&quot;,&quot;data&quot;,&quot;offset&quot;].concat(o(t.length)),s=a(e),l=[&quot;i,j,cptr,ptr=left*s0+offset&quot;];if(t.length&gt;1){for(var c=[],u=1;u&lt;t.length;++u)l.push(&quot;i&quot;+u),c.push(&quot;n&quot;+u);s?l.push(&quot;scratch=malloc(&quot;+c.join(&quot;*&quot;)+&quot;)&quot;):l.push(&quot;scratch=new Array(&quot;+c.join(&quot;*&quot;)+&quot;)&quot;),l.push(&quot;dptr&quot;,&quot;sptr&quot;,&quot;a&quot;,&quot;b&quot;)}else l.push(&quot;scratch&quot;);function f(t){return&quot;generic&quot;===e?[&quot;data.get(&quot;,t,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]&quot;].join(&quot;&quot;)}function h(t,r){return&quot;generic&quot;===e?[&quot;data.set(&quot;,t,&quot;,&quot;,r,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]=&quot;,r].join(&quot;&quot;)}if(r.push([&quot;function &quot;,n,&quot;(&quot;,i.join(&quot;,&quot;),&quot;){var &quot;,l.join(&quot;,&quot;)].join(&quot;&quot;),&quot;for(i=left+1;i&lt;=right;++i){&quot;,&quot;j=i;ptr+=s0&quot;,&quot;cptr=ptr&quot;),t.length&gt;1){for(r.push(&quot;dptr=0;sptr=ptr&quot;),u=t.length-1;u&gt;=0;--u)0!==(p=t[u])&amp;&amp;r.push([&quot;for(i&quot;,p,&quot;=0;i&quot;,p,&quot;&lt;n&quot;,p,&quot;;++i&quot;,p,&quot;){&quot;].join(&quot;&quot;));for(r.push(&quot;scratch[dptr++]=&quot;,f(&quot;sptr&quot;)),u=0;u&lt;t.length;++u)0!==(p=t[u])&amp;&amp;r.push(&quot;sptr+=d&quot;+p,&quot;}&quot;);for(r.push(&quot;__g:while(j--\x3eleft){&quot;,&quot;dptr=0&quot;,&quot;sptr=cptr-s0&quot;),u=1;u&lt;t.length;++u)1===u&amp;&amp;r.push(&quot;__l:&quot;),r.push([&quot;for(i&quot;,u,&quot;=0;i&quot;,u,&quot;&lt;n&quot;,u,&quot;;++i&quot;,u,&quot;){&quot;].join(&quot;&quot;));for(r.push([&quot;a=&quot;,f(&quot;sptr&quot;),&quot;\nb=scratch[dptr]\nif(a&lt;b){break __g}\nif(a&gt;b){break __l}&quot;].join(&quot;&quot;)),u=t.length-1;u&gt;=1;--u)r.push(&quot;sptr+=e&quot;+u,&quot;dptr+=f&quot;+u,&quot;}&quot;);for(r.push(&quot;dptr=cptr;sptr=cptr-s0&quot;),u=t.length-1;u&gt;=0;--u)0!==(p=t[u])&amp;&amp;r.push([&quot;for(i&quot;,p,&quot;=0;i&quot;,p,&quot;&lt;n&quot;,p,&quot;;++i&quot;,p,&quot;){&quot;].join(&quot;&quot;));for(r.push(h(&quot;dptr&quot;,f(&quot;sptr&quot;))),u=0;u&lt;t.length;++u)0!==(p=t[u])&amp;&amp;r.push([&quot;dptr+=d&quot;,p,&quot;;sptr+=d&quot;,p].join(&quot;&quot;),&quot;}&quot;);for(r.push(&quot;cptr-=s0\n}&quot;),r.push(&quot;dptr=cptr;sptr=0&quot;),u=t.length-1;u&gt;=0;--u)0!==(p=t[u])&amp;&amp;r.push([&quot;for(i&quot;,p,&quot;=0;i&quot;,p,&quot;&lt;n&quot;,p,&quot;;++i&quot;,p,&quot;){&quot;].join(&quot;&quot;));for(r.push(h(&quot;dptr&quot;,&quot;scratch[sptr++]&quot;)),u=0;u&lt;t.length;++u){var p;0!==(p=t[u])&amp;&amp;r.push(&quot;dptr+=d&quot;+p,&quot;}&quot;)}}else r.push(&quot;scratch=&quot;+f(&quot;ptr&quot;),&quot;while((j--\x3eleft)&amp;&amp;(&quot;+f(&quot;cptr-s0&quot;)+&quot;&gt;scratch)){&quot;,h(&quot;cptr&quot;,f(&quot;cptr-s0&quot;)),&quot;cptr-=s0&quot;,&quot;}&quot;,h(&quot;cptr&quot;,&quot;scratch&quot;));return r.push(&quot;}&quot;),t.length&gt;1&amp;&amp;s&amp;&amp;r.push(&quot;free(scratch)&quot;),r.push(&quot;} return &quot;+n),s?new Function(&quot;malloc&quot;,&quot;free&quot;,r.join(&quot;\n&quot;))(s[0],s[1]):new Function(r.join(&quot;\n&quot;))()}(t,e),y=function(t,e,r){var n=[&quot;'use strict'&quot;],s=[&quot;ndarrayQuickSort&quot;,t.join(&quot;d&quot;),e].join(&quot;&quot;),l=[&quot;left&quot;,&quot;right&quot;,&quot;data&quot;,&quot;offset&quot;].concat(o(t.length)),c=a(e),u=0;n.push([&quot;function &quot;,s,&quot;(&quot;,l.join(&quot;,&quot;),&quot;){&quot;].join(&quot;&quot;));var f=[&quot;sixth=((right-left+1)/6)|0&quot;,&quot;index1=left+sixth&quot;,&quot;index5=right-sixth&quot;,&quot;index3=(left+right)&gt;&gt;1&quot;,&quot;index2=index3-sixth&quot;,&quot;index4=index3+sixth&quot;,&quot;el1=index1&quot;,&quot;el2=index2&quot;,&quot;el3=index3&quot;,&quot;el4=index4&quot;,&quot;el5=index5&quot;,&quot;less=left+1&quot;,&quot;great=right-1&quot;,&quot;pivots_are_equal=true&quot;,&quot;tmp&quot;,&quot;tmp0&quot;,&quot;x&quot;,&quot;y&quot;,&quot;z&quot;,&quot;k&quot;,&quot;ptr0&quot;,&quot;ptr1&quot;,&quot;ptr2&quot;,&quot;comp_pivot1=0&quot;,&quot;comp_pivot2=0&quot;,&quot;comp=0&quot;];if(t.length&gt;1){for(var h=[],p=1;p&lt;t.length;++p)h.push(&quot;n&quot;+p),f.push(&quot;i&quot;+p);for(p=0;p&lt;8;++p)f.push(&quot;b_ptr&quot;+p);f.push(&quot;ptr3&quot;,&quot;ptr4&quot;,&quot;ptr5&quot;,&quot;ptr6&quot;,&quot;ptr7&quot;,&quot;pivot_ptr&quot;,&quot;ptr_shift&quot;,&quot;elementSize=&quot;+h.join(&quot;*&quot;)),c?f.push(&quot;pivot1=malloc(elementSize)&quot;,&quot;pivot2=malloc(elementSize)&quot;):f.push(&quot;pivot1=new Array(elementSize),pivot2=new Array(elementSize)&quot;)}else f.push(&quot;pivot1&quot;,&quot;pivot2&quot;);function d(t){return[&quot;(offset+&quot;,t,&quot;*s0)&quot;].join(&quot;&quot;)}function g(t){return&quot;generic&quot;===e?[&quot;data.get(&quot;,t,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]&quot;].join(&quot;&quot;)}function m(t,r){return&quot;generic&quot;===e?[&quot;data.set(&quot;,t,&quot;,&quot;,r,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]=&quot;,r].join(&quot;&quot;)}function v(e,r,i){if(1===e.length)n.push(&quot;ptr0=&quot;+d(e[0]));else for(var a=0;a&lt;e.length;++a)n.push([&quot;b_ptr&quot;,a,&quot;=s0*&quot;,e[a]].join(&quot;&quot;));for(r&amp;&amp;n.push(&quot;pivot_ptr=0&quot;),n.push(&quot;ptr_shift=offset&quot;),a=t.length-1;a&gt;=0;--a)0!==(o=t[a])&amp;&amp;n.push([&quot;for(i&quot;,o,&quot;=0;i&quot;,o,&quot;&lt;n&quot;,o,&quot;;++i&quot;,o,&quot;){&quot;].join(&quot;&quot;));if(e.length&gt;1)for(a=0;a&lt;e.length;++a)n.push([&quot;ptr&quot;,a,&quot;=b_ptr&quot;,a,&quot;+ptr_shift&quot;].join(&quot;&quot;));for(n.push(i),r&amp;&amp;n.push(&quot;++pivot_ptr&quot;),a=0;a&lt;t.length;++a){var o;0!==(o=t[a])&amp;&amp;(e.length&gt;1?n.push(&quot;ptr_shift+=d&quot;+o):n.push(&quot;ptr0+=d&quot;+o),n.push(&quot;}&quot;))}}function y(e,r,i,a){if(1===r.length)n.push(&quot;ptr0=&quot;+d(r[0]));else{for(var o=0;o&lt;r.length;++o)n.push([&quot;b_ptr&quot;,o,&quot;=s0*&quot;,r[o]].join(&quot;&quot;));n.push(&quot;ptr_shift=offset&quot;)}for(i&amp;&amp;n.push(&quot;pivot_ptr=0&quot;),e&amp;&amp;n.push(e+&quot;:&quot;),o=1;o&lt;t.length;++o)n.push([&quot;for(i&quot;,o,&quot;=0;i&quot;,o,&quot;&lt;n&quot;,o,&quot;;++i&quot;,o,&quot;){&quot;].join(&quot;&quot;));if(r.length&gt;1)for(o=0;o&lt;r.length;++o)n.push([&quot;ptr&quot;,o,&quot;=b_ptr&quot;,o,&quot;+ptr_shift&quot;].join(&quot;&quot;));for(n.push(a),o=t.length-1;o&gt;=1;--o)i&amp;&amp;n.push(&quot;pivot_ptr+=f&quot;+o),r.length&gt;1?n.push(&quot;ptr_shift+=e&quot;+o):n.push(&quot;ptr0+=e&quot;+o),n.push(&quot;}&quot;)}function x(){t.length&gt;1&amp;&amp;c&amp;&amp;n.push(&quot;free(pivot1)&quot;,&quot;free(pivot2)&quot;)}function b(e,r){var i=&quot;el&quot;+e,a=&quot;el&quot;+r;if(t.length&gt;1){var o=&quot;__l&quot;+ ++u;y(o,[i,a],!1,[&quot;comp=&quot;,g(&quot;ptr0&quot;),&quot;-&quot;,g(&quot;ptr1&quot;),&quot;\n&quot;,&quot;if(comp&gt;0){tmp0=&quot;,i,&quot;;&quot;,i,&quot;=&quot;,a,&quot;;&quot;,a,&quot;=tmp0;break &quot;,o,&quot;}\n&quot;,&quot;if(comp&lt;0){break &quot;,o,&quot;}&quot;].join(&quot;&quot;))}else n.push([&quot;if(&quot;,g(d(i)),&quot;&gt;&quot;,g(d(a)),&quot;){tmp0=&quot;,i,&quot;;&quot;,i,&quot;=&quot;,a,&quot;;&quot;,a,&quot;=tmp0}&quot;].join(&quot;&quot;))}function _(e,r){t.length&gt;1?v([e,r],!1,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;))):n.push(m(d(e),g(d(r))))}function w(e,r,i){if(t.length&gt;1){var a=&quot;__l&quot;+ ++u;y(a,[r],!0,[e,&quot;=&quot;,g(&quot;ptr0&quot;),&quot;-pivot&quot;,i,&quot;[pivot_ptr]\n&quot;,&quot;if(&quot;,e,&quot;!==0){break &quot;,a,&quot;}&quot;].join(&quot;&quot;))}else n.push([e,&quot;=&quot;,g(d(r)),&quot;-pivot&quot;,i].join(&quot;&quot;))}function k(e,r){t.length&gt;1?v([e,r],!1,[&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,&quot;tmp&quot;)].join(&quot;&quot;)):n.push([&quot;ptr0=&quot;,d(e),&quot;\n&quot;,&quot;ptr1=&quot;,d(r),&quot;\n&quot;,&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,&quot;tmp&quot;)].join(&quot;&quot;))}function M(e,r,i){t.length&gt;1?(v([e,r,i],!1,[&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,g(&quot;ptr2&quot;)),&quot;\n&quot;,m(&quot;ptr2&quot;,&quot;tmp&quot;)].join(&quot;&quot;)),n.push(&quot;++&quot;+r,&quot;--&quot;+i)):n.push([&quot;ptr0=&quot;,d(e),&quot;\n&quot;,&quot;ptr1=&quot;,d(r),&quot;\n&quot;,&quot;ptr2=&quot;,d(i),&quot;\n&quot;,&quot;++&quot;,r,&quot;\n&quot;,&quot;--&quot;,i,&quot;\n&quot;,&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,g(&quot;ptr2&quot;)),&quot;\n&quot;,m(&quot;ptr2&quot;,&quot;tmp&quot;)].join(&quot;&quot;))}function A(t,e){k(t,e),n.push(&quot;--&quot;+e)}function T(e,r,i){t.length&gt;1?v([e,r],!0,[m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,[&quot;pivot&quot;,i,&quot;[pivot_ptr]&quot;].join(&quot;&quot;))].join(&quot;&quot;)):n.push(m(d(e),g(d(r))),m(d(r),&quot;pivot&quot;+i))}function S(e,r){n.push([&quot;if((&quot;,r,&quot;-&quot;,e,&quot;)&lt;=&quot;,i,&quot;){\n&quot;,&quot;insertionSort(&quot;,e,&quot;,&quot;,r,&quot;,data,offset,&quot;,o(t.length).join(&quot;,&quot;),&quot;)\n&quot;,&quot;}else{\n&quot;,s,&quot;(&quot;,e,&quot;,&quot;,r,&quot;,data,offset,&quot;,o(t.length).join(&quot;,&quot;),&quot;)\n&quot;,&quot;}&quot;].join(&quot;&quot;))}function E(e,r,i){t.length&gt;1?(n.push([&quot;__l&quot;,++u,&quot;:while(true){&quot;].join(&quot;&quot;)),v([e],!0,[&quot;if(&quot;,g(&quot;ptr0&quot;),&quot;!==pivot&quot;,r,&quot;[pivot_ptr]){break __l&quot;,u,&quot;}&quot;].join(&quot;&quot;)),n.push(i,&quot;}&quot;)):n.push([&quot;while(&quot;,g(d(e)),&quot;===pivot&quot;,r,&quot;){&quot;,i,&quot;}&quot;].join(&quot;&quot;))}return n.push(&quot;var &quot;+f.join(&quot;,&quot;)),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length&gt;1?v([&quot;el1&quot;,&quot;el2&quot;,&quot;el3&quot;,&quot;el4&quot;,&quot;el5&quot;,&quot;index1&quot;,&quot;index3&quot;,&quot;index5&quot;],!0,[&quot;pivot1[pivot_ptr]=&quot;,g(&quot;ptr1&quot;),&quot;\n&quot;,&quot;pivot2[pivot_ptr]=&quot;,g(&quot;ptr3&quot;),&quot;\n&quot;,&quot;pivots_are_equal=pivots_are_equal&amp;&amp;(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n&quot;,&quot;x=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,&quot;y=&quot;,g(&quot;ptr2&quot;),&quot;\n&quot;,&quot;z=&quot;,g(&quot;ptr4&quot;),&quot;\n&quot;,m(&quot;ptr5&quot;,&quot;x&quot;),&quot;\n&quot;,m(&quot;ptr6&quot;,&quot;y&quot;),&quot;\n&quot;,m(&quot;ptr7&quot;,&quot;z&quot;)].join(&quot;&quot;)):n.push([&quot;pivot1=&quot;,g(d(&quot;el2&quot;)),&quot;\n&quot;,&quot;pivot2=&quot;,g(d(&quot;el4&quot;)),&quot;\n&quot;,&quot;pivots_are_equal=pivot1===pivot2\n&quot;,&quot;x=&quot;,g(d(&quot;el1&quot;)),&quot;\n&quot;,&quot;y=&quot;,g(d(&quot;el3&quot;)),&quot;\n&quot;,&quot;z=&quot;,g(d(&quot;el5&quot;)),&quot;\n&quot;,m(d(&quot;index1&quot;),&quot;x&quot;),&quot;\n&quot;,m(d(&quot;index3&quot;),&quot;y&quot;),&quot;\n&quot;,m(d(&quot;index5&quot;),&quot;z&quot;)].join(&quot;&quot;)),_(&quot;index2&quot;,&quot;left&quot;),_(&quot;index4&quot;,&quot;right&quot;),n.push(&quot;if(pivots_are_equal){&quot;),n.push(&quot;for(k=less;k&lt;=great;++k){&quot;),w(&quot;comp&quot;,&quot;k&quot;,1),n.push(&quot;if(comp===0){continue}&quot;),n.push(&quot;if(comp&lt;0){&quot;),n.push(&quot;if(k!==less){&quot;),k(&quot;k&quot;,&quot;less&quot;),n.push(&quot;}&quot;),n.push(&quot;++less&quot;),n.push(&quot;}else{&quot;),n.push(&quot;while(true){&quot;),w(&quot;comp&quot;,&quot;great&quot;,1),n.push(&quot;if(comp&gt;0){&quot;),n.push(&quot;great--&quot;),n.push(&quot;}else if(comp&lt;0){&quot;),M(&quot;k&quot;,&quot;less&quot;,&quot;great&quot;),n.push(&quot;break&quot;),n.push(&quot;}else{&quot;),A(&quot;k&quot;,&quot;great&quot;),n.push(&quot;break&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}else{&quot;),n.push(&quot;for(k=less;k&lt;=great;++k){&quot;),w(&quot;comp_pivot1&quot;,&quot;k&quot;,1),n.push(&quot;if(comp_pivot1&lt;0){&quot;),n.push(&quot;if(k!==less){&quot;),k(&quot;k&quot;,&quot;less&quot;),n.push(&quot;}&quot;),n.push(&quot;++less&quot;),n.push(&quot;}else{&quot;),w(&quot;comp_pivot2&quot;,&quot;k&quot;,2),n.push(&quot;if(comp_pivot2&gt;0){&quot;),n.push(&quot;while(true){&quot;),w(&quot;comp&quot;,&quot;great&quot;,2),n.push(&quot;if(comp&gt;0){&quot;),n.push(&quot;if(--great&lt;k){break}&quot;),n.push(&quot;continue&quot;),n.push(&quot;}else{&quot;),w(&quot;comp&quot;,&quot;great&quot;,1),n.push(&quot;if(comp&lt;0){&quot;),M(&quot;k&quot;,&quot;less&quot;,&quot;great&quot;),n.push(&quot;}else{&quot;),A(&quot;k&quot;,&quot;great&quot;),n.push(&quot;}&quot;),n.push(&quot;break&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),T(&quot;left&quot;,&quot;(less-1)&quot;,1),T(&quot;right&quot;,&quot;(great+1)&quot;,2),S(&quot;left&quot;,&quot;(less-2)&quot;),S(&quot;(great+2)&quot;,&quot;right&quot;),n.push(&quot;if(pivots_are_equal){&quot;),x(),n.push(&quot;return&quot;),n.push(&quot;}&quot;),n.push(&quot;if(less&lt;index1&amp;&amp;great&gt;index5){&quot;),E(&quot;less&quot;,1,&quot;++less&quot;),E(&quot;great&quot;,2,&quot;--great&quot;),n.push(&quot;for(k=less;k&lt;=great;++k){&quot;),w(&quot;comp_pivot1&quot;,&quot;k&quot;,1),n.push(&quot;if(comp_pivot1===0){&quot;),n.push(&quot;if(k!==less){&quot;),k(&quot;k&quot;,&quot;less&quot;),n.push(&quot;}&quot;),n.push(&quot;++less&quot;),n.push(&quot;}else{&quot;),w(&quot;comp_pivot2&quot;,&quot;k&quot;,2),n.push(&quot;if(comp_pivot2===0){&quot;),n.push(&quot;while(true){&quot;),w(&quot;comp&quot;,&quot;great&quot;,2),n.push(&quot;if(comp===0){&quot;),n.push(&quot;if(--great&lt;k){break}&quot;),n.push(&quot;continue&quot;),n.push(&quot;}else{&quot;),w(&quot;comp&quot;,&quot;great&quot;,1),n.push(&quot;if(comp&lt;0){&quot;),M(&quot;k&quot;,&quot;less&quot;,&quot;great&quot;),n.push(&quot;}else{&quot;),A(&quot;k&quot;,&quot;great&quot;),n.push(&quot;}&quot;),n.push(&quot;break&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),x(),S(&quot;less&quot;,&quot;great&quot;),n.push(&quot;}return &quot;+s),t.length&gt;1&amp;&amp;c?new Function(&quot;insertionSort&quot;,&quot;malloc&quot;,&quot;free&quot;,n.join(&quot;\n&quot;))(r,c[0],c[1]):new Function(&quot;insertionSort&quot;,n.join(&quot;\n&quot;))(r)}(t,e,v);return m(v,y)}},{&quot;typedarray-pool&quot;:519}],428:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/compile_sort.js&quot;),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(&quot;:&quot;),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{&quot;./lib/compile_sort.js&quot;:427}],429:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray-linear-interpolate&quot;),i=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=new Array(_inline_3_arg4_)}&quot;,args:[{name:&quot;_inline_3_arg0_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg1_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg2_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg3_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}&quot;,args:[{name:&quot;_inline_4_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_4_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_4_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_4_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_4_arg4_&quot;,lvalue:!1,rvalue:!1,count:0}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warpND&quot;,blockSize:64}),a=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=[0]}&quot;,args:[],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}&quot;,args:[{name:&quot;_inline_7_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_7_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_7_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_7_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_7_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warp1D&quot;,blockSize:64}),o=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=[0,0]}&quot;,args:[],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}&quot;,args:[{name:&quot;_inline_10_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_10_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_10_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_10_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_10_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warp2D&quot;,blockSize:64}),s=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=[0,0,0]}&quot;,args:[],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}&quot;,args:[{name:&quot;_inline_13_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_13_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_13_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_13_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_13_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warp3D&quot;,blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{&quot;cwise/lib/wrapper&quot;:136,&quot;ndarray-linear-interpolate&quot;:423}],430:[function(t,e,r){var n=t(&quot;iota-array&quot;),i=t(&quot;is-buffer&quot;),a=&quot;undefined&quot;!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;t&lt;r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(o);var n=new Array(r.length);for(t=0;t&lt;n.length;++t)n[t]=r[t][1];return n}function l(t,e){var r=[&quot;View&quot;,e,&quot;d&quot;,t].join(&quot;&quot;);e&lt;0&amp;&amp;(r=&quot;View_Nil&quot;+t);var i=&quot;generic&quot;===t;if(-1===e){var a=&quot;function &quot;+r+&quot;(a){this.data=a;};var proto=&quot;+r+&quot;.prototype;proto.dtype='&quot;+t+&quot;';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new &quot;+r+&quot;(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_&quot;+r+&quot;(a){return new &quot;+r+&quot;(a);}&quot;;return new Function(a)()}if(0===e){a=&quot;function &quot;+r+&quot;(a,d) {this.data = a;this.offset = d};var proto=&quot;+r+&quot;.prototype;proto.dtype='&quot;+t+&quot;';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function &quot;+r+&quot;_copy() {return new &quot;+r+&quot;(this.data,this.offset)};proto.pick=function &quot;+r+&quot;_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function &quot;+r+&quot;_get(){return &quot;+(i?&quot;this.data.get(this.offset)&quot;:&quot;this.data[this.offset]&quot;)+&quot;};proto.set=function &quot;+r+&quot;_set(v){return &quot;+(i?&quot;this.data.set(this.offset,v)&quot;:&quot;this.data[this.offset]=v&quot;)+&quot;};return function construct_&quot;+r+&quot;(a,b,c,d){return new &quot;+r+&quot;(a,d)}&quot;;return new Function(&quot;TrivialArray&quot;,a)(c[t][0])}a=[&quot;'use strict'&quot;];var o=n(e),l=o.map(function(t){return&quot;i&quot;+t}),u=&quot;this.offset+&quot;+o.map(function(t){return&quot;this.stride[&quot;+t+&quot;]*i&quot;+t}).join(&quot;+&quot;),f=o.map(function(t){return&quot;b&quot;+t}).join(&quot;,&quot;),h=o.map(function(t){return&quot;c&quot;+t}).join(&quot;,&quot;);a.push(&quot;function &quot;+r+&quot;(a,&quot;+f+&quot;,&quot;+h+&quot;,d){this.data=a&quot;,&quot;this.shape=[&quot;+f+&quot;]&quot;,&quot;this.stride=[&quot;+h+&quot;]&quot;,&quot;this.offset=d|0}&quot;,&quot;var proto=&quot;+r+&quot;.prototype&quot;,&quot;proto.dtype='&quot;+t+&quot;'&quot;,&quot;proto.dimension=&quot;+e),a.push(&quot;Object.defineProperty(proto,'size',{get:function &quot;+r+&quot;_size(){return &quot;+o.map(function(t){return&quot;this.shape[&quot;+t+&quot;]&quot;}).join(&quot;*&quot;),&quot;}})&quot;),1===e?a.push(&quot;proto.order=[0]&quot;):(a.push(&quot;Object.defineProperty(proto,'order',{get:&quot;),e&lt;4?(a.push(&quot;function &quot;+r+&quot;_order(){&quot;),2===e?a.push(&quot;return (Math.abs(this.stride[0])&gt;Math.abs(this.stride[1]))?[1,0]:[0,1]}})&quot;):3===e&amp;&amp;a.push(&quot;var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0&gt;s1){if(s1&gt;s2){return [2,1,0];}else if(s0&gt;s2){return [1,2,0];}else{return [1,0,2];}}else if(s0&gt;s2){return [2,0,1];}else if(s2&gt;s1){return [0,1,2];}else{return [0,2,1];}}})&quot;)):a.push(&quot;ORDER})&quot;)),a.push(&quot;proto.set=function &quot;+r+&quot;_set(&quot;+l.join(&quot;,&quot;)+&quot;,v){&quot;),i?a.push(&quot;return this.data.set(&quot;+u+&quot;,v)}&quot;):a.push(&quot;return this.data[&quot;+u+&quot;]=v}&quot;),a.push(&quot;proto.get=function &quot;+r+&quot;_get(&quot;+l.join(&quot;,&quot;)+&quot;){&quot;),i?a.push(&quot;return this.data.get(&quot;+u+&quot;)}&quot;):a.push(&quot;return this.data[&quot;+u+&quot;]}&quot;),a.push(&quot;proto.index=function &quot;+r+&quot;_index(&quot;,l.join(),&quot;){return &quot;+u+&quot;}&quot;),a.push(&quot;proto.hi=function &quot;+r+&quot;_hi(&quot;+l.join(&quot;,&quot;)+&quot;){return new &quot;+r+&quot;(this.data,&quot;+o.map(function(t){return[&quot;(typeof i&quot;,t,&quot;!=='number'||i&quot;,t,&quot;&lt;0)?this.shape[&quot;,t,&quot;]:i&quot;,t,&quot;|0&quot;].join(&quot;&quot;)}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;this.stride[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,this.offset)}&quot;);var p=o.map(function(t){return&quot;a&quot;+t+&quot;=this.shape[&quot;+t+&quot;]&quot;}),d=o.map(function(t){return&quot;c&quot;+t+&quot;=this.stride[&quot;+t+&quot;]&quot;});a.push(&quot;proto.lo=function &quot;+r+&quot;_lo(&quot;+l.join(&quot;,&quot;)+&quot;){var b=this.offset,d=0,&quot;+p.join(&quot;,&quot;)+&quot;,&quot;+d.join(&quot;,&quot;));for(var g=0;g&lt;e;++g)a.push(&quot;if(typeof i&quot;+g+&quot;==='number'&amp;&amp;i&quot;+g+&quot;&gt;=0){d=i&quot;+g+&quot;|0;b+=c&quot;+g+&quot;*d;a&quot;+g+&quot;-=d}&quot;);a.push(&quot;return new &quot;+r+&quot;(this.data,&quot;+o.map(function(t){return&quot;a&quot;+t}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;c&quot;+t}).join(&quot;,&quot;)+&quot;,b)}&quot;),a.push(&quot;proto.step=function &quot;+r+&quot;_step(&quot;+l.join(&quot;,&quot;)+&quot;){var &quot;+o.map(function(t){return&quot;a&quot;+t+&quot;=this.shape[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;b&quot;+t+&quot;=this.stride[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,c=this.offset,d=0,ceil=Math.ceil&quot;);for(g=0;g&lt;e;++g)a.push(&quot;if(typeof i&quot;+g+&quot;==='number'){d=i&quot;+g+&quot;|0;if(d&lt;0){c+=b&quot;+g+&quot;*(a&quot;+g+&quot;-1);a&quot;+g+&quot;=ceil(-a&quot;+g+&quot;/d)}else{a&quot;+g+&quot;=ceil(a&quot;+g+&quot;/d)}b&quot;+g+&quot;*=d}&quot;);a.push(&quot;return new &quot;+r+&quot;(this.data,&quot;+o.map(function(t){return&quot;a&quot;+t}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;b&quot;+t}).join(&quot;,&quot;)+&quot;,c)}&quot;);var m=new Array(e),v=new Array(e);for(g=0;g&lt;e;++g)m[g]=&quot;a[i&quot;+g+&quot;]&quot;,v[g]=&quot;b[i&quot;+g+&quot;]&quot;;a.push(&quot;proto.transpose=function &quot;+r+&quot;_transpose(&quot;+l+&quot;){&quot;+l.map(function(t,e){return t+&quot;=(&quot;+t+&quot;===undefined?&quot;+e+&quot;:&quot;+t+&quot;|0)&quot;}).join(&quot;;&quot;),&quot;var a=this.shape,b=this.stride;return new &quot;+r+&quot;(this.data,&quot;+m.join(&quot;,&quot;)+&quot;,&quot;+v.join(&quot;,&quot;)+&quot;,this.offset)}&quot;),a.push(&quot;proto.pick=function &quot;+r+&quot;_pick(&quot;+l+&quot;){var a=[],b=[],c=this.offset&quot;);for(g=0;g&lt;e;++g)a.push(&quot;if(typeof i&quot;+g+&quot;==='number'&amp;&amp;i&quot;+g+&quot;&gt;=0){c=(c+this.stride[&quot;+g+&quot;]*i&quot;+g+&quot;)|0}else{a.push(this.shape[&quot;+g+&quot;]);b.push(this.stride[&quot;+g+&quot;])}&quot;);return a.push(&quot;var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}&quot;),a.push(&quot;return function construct_&quot;+r+&quot;(data,shape,stride,offset){return new &quot;+r+&quot;(data,&quot;+o.map(function(t){return&quot;shape[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;stride[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,offset)}&quot;),new Function(&quot;CTOR_LIST&quot;,&quot;ORDER&quot;,a.join(&quot;\n&quot;))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);&quot;number&quot;==typeof t&amp;&amp;(t=[t]),void 0===e&amp;&amp;(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s&gt;=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s&lt;o;++s)r[s]&lt;0&amp;&amp;(n-=(e[s]-1)*r[s]);for(var f=function(t){if(i(t))return&quot;buffer&quot;;if(a)switch(Object.prototype.toString.call(t)){case&quot;[object Float64Array]&quot;:return&quot;float64&quot;;case&quot;[object Float32Array]&quot;:return&quot;float32&quot;;case&quot;[object Int8Array]&quot;:return&quot;int8&quot;;case&quot;[object Int16Array]&quot;:return&quot;int16&quot;;case&quot;[object Int32Array]&quot;:return&quot;int32&quot;;case&quot;[object Uint8Array]&quot;:return&quot;uint8&quot;;case&quot;[object Uint16Array]&quot;:return&quot;uint16&quot;;case&quot;[object Uint32Array]&quot;:return&quot;uint32&quot;;case&quot;[object Uint8ClampedArray]&quot;:return&quot;uint8_clamped&quot;}return Array.isArray(t)?&quot;array&quot;:&quot;generic&quot;}(t),h=c[f];h.length&lt;=o+1;)h.push(l(f,h.length-1));return(0,h[o+1])(t,e,r,n)}},{&quot;iota-array&quot;:397,&quot;is-buffer&quot;:399}],431:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;double-bits&quot;),i=Math.pow(2,-1074),a=-1&gt;&gt;&gt;0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e&lt;0?-i:i;var r=n.hi(t),o=n.lo(t);e&gt;t==t&gt;0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1;return n.pack(o,r)}},{&quot;double-bits&quot;:151}],432:[function(t,e,r){var n=Math.PI,i=c(120);function a(t,e,r,n){return[&quot;C&quot;,t,e,r,n,r,n]}function o(t,e,r,n,i,a){return[&quot;C&quot;,t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,c,u,f,h,p){if(p)k=p[0],M=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(f=(d=l(f,h,-o)).x))/2,m=(e-(h=d.y))/2,v=g*g/(r*r)+m*m/(a*a);v&gt;1&amp;&amp;(r*=v=Math.sqrt(v),a*=v);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*m*m-x*g*g)/(y*m*m+x*g*g)));b==1/0&amp;&amp;(b=1);var _=b*r*m/a+(t+f)/2,w=b*-a*g/r+(e+h)/2,k=Math.asin(((e-w)/a).toFixed(9)),M=Math.asin(((h-w)/a).toFixed(9));(k=t&lt;_?n-k:k)&lt;0&amp;&amp;(k=2*n+k),(M=f&lt;_?n-M:M)&lt;0&amp;&amp;(M=2*n+M),u&amp;&amp;k&gt;M&amp;&amp;(k-=2*n),!u&amp;&amp;M&gt;k&amp;&amp;(M-=2*n)}if(Math.abs(M-k)&gt;i){var A=M,T=f,S=h;M=k+i*(u&amp;&amp;M&gt;k?1:-1);var E=s(f=_+r*Math.cos(M),h=w+a*Math.sin(M),r,a,o,0,u,T,S,[M,A,_,w])}var C=Math.tan((M-k)/4),L=4/3*r*C,z=4/3*a*C,P=[2*t-(t+L*Math.sin(k)),2*e-(e-z*Math.cos(k)),f+L*Math.sin(M),h-z*Math.cos(M),f,h];if(p)return P;E&amp;&amp;(P=P.concat(E));for(var O=0;O&lt;P.length;){var I=l(P[O],P[O+1],o);P[O++]=I.x,P[O++]=I.y}return P}function l(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function c(t){return t*(n/180)}e.exports=function(t){for(var e,r=[],n=0,i=0,l=0,u=0,f=null,h=null,p=0,d=0,g=0,m=t.length;g&lt;m;g++){var v=t[g],y=v[0];switch(y){case&quot;M&quot;:l=v[1],u=v[2];break;case&quot;A&quot;:(v=s(p,d,v[1],v[2],c(v[3]),v[4],v[5],v[6],v[7])).unshift(&quot;C&quot;),v.length&gt;7&amp;&amp;(r.push(v.splice(0,7)),v.unshift(&quot;C&quot;));break;case&quot;S&quot;:var x=p,b=d;&quot;C&quot;!=e&amp;&amp;&quot;S&quot;!=e||(x+=x-n,b+=b-i),v=[&quot;C&quot;,x,b,v[1],v[2],v[3],v[4]];break;case&quot;T&quot;:&quot;Q&quot;==e||&quot;T&quot;==e?(f=2*p-f,h=2*d-h):(f=p,h=d),v=o(p,d,f,h,v[1],v[2]);break;case&quot;Q&quot;:f=v[1],h=v[2],v=o(p,d,v[1],v[2],v[3],v[4]);break;case&quot;L&quot;:v=a(p,d,v[1],v[2]);break;case&quot;H&quot;:v=a(p,d,v[1],d);break;case&quot;V&quot;:v=a(p,d,p,v[1]);break;case&quot;Z&quot;:v=a(p,d,l,u)}e=y,p=v[v.length-2],d=v[v.length-1],v.length&gt;4?(n=v[v.length-4],i=v[v.length-3]):(n=p,i=d),r.push(v)}return r}},{}],433:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o&lt;n;++o)i[o]=[0,0,0];for(o=0;o&lt;t.length;++o)for(var s=t[o],l=0,c=s[s.length-1],u=s[0],f=0;f&lt;s.length;++f){l=c,c=u,u=s[(f+1)%s.length];for(var h=e[l],p=e[c],d=e[u],g=new Array(3),m=0,v=new Array(3),y=0,x=0;x&lt;3;++x)g[x]=h[x]-p[x],m+=g[x]*g[x],v[x]=d[x]-p[x],y+=v[x]*v[x];if(m*y&gt;a){var b=i[c],_=1/Math.sqrt(m*y);for(x=0;x&lt;3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(v[w]*g[k]-v[k]*g[w])}}}for(o=0;o&lt;n;++o){b=i[o];var M=0;for(x=0;x&lt;3;++x)M+=b[x]*b[x];if(M&gt;a)for(_=1/Math.sqrt(M),x=0;x&lt;3;++x)b[x]*=_;else for(x=0;x&lt;3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o&lt;n;++o){for(var s=t[o],l=new Array(3),c=0;c&lt;3;++c)l[c]=e[s[c]];var u=new Array(3),f=new Array(3);for(c=0;c&lt;3;++c)u[c]=l[1][c]-l[0][c],f[c]=l[2][c]-l[0][c];var h=new Array(3),p=0;for(c=0;c&lt;3;++c){var d=(c+1)%3,g=(c+2)%3;h[c]=u[d]*f[g]-u[g]*f[d],p+=h[c]*h[c]}p=p&gt;a?1/Math.sqrt(p):0;for(c=0;c&lt;3;++c)h[c]*=p;i[o]=h}return i}},{}],434:[function(t,e,r){&quot;use strict&quot;;var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String(&quot;abc&quot;);if(t[5]=&quot;de&quot;,&quot;5&quot;===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r&lt;10;r++)e[&quot;_&quot;+String.fromCharCode(r)]=r;if(&quot;0123456789&quot;!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(&quot;&quot;))return!1;var n={};return&quot;abcdefghijklmnopqrst&quot;.split(&quot;&quot;).forEach(function(t){n[t]=t}),&quot;abcdefghijklmnopqrst&quot;===Object.keys(Object.assign({},n)).join(&quot;&quot;)}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError(&quot;Object.assign cannot be called with null or undefined&quot;);return Object(t)}(t),l=1;l&lt;arguments.length;l++){for(var c in r=Object(arguments[l]))i.call(r,c)&amp;&amp;(s[c]=r[c]);if(n){o=n(r);for(var u=0;u&lt;o.length;u++)a.call(r,o[u])&amp;&amp;(s[o[u]]=r[o[u]])}}return s}},{}],435:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i,a,o,s,l,c){var u=e+a+c;if(f&gt;0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c),f=Math.sqrt(2*h-u+1);e&gt;=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a&gt;=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],436:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),(&quot;eye&quot;in t||&quot;up&quot;in t)&amp;&amp;i.lookAt(0,t.eye,t.center,t.up);return i};var n=t(&quot;filtered-vector&quot;),i=t(&quot;gl-mat4/lookAt&quot;),a=t(&quot;gl-mat4/fromQuat&quot;),o=t(&quot;gl-mat4/invert&quot;),s=t(&quot;./lib/quatFromFrame&quot;);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o&gt;1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l&lt;3;++l){for(var c=0,f=0;f&lt;3;++f)c+=r[l+4*f]*i[f];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n&lt;16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=l(u-=a*p,f-=o*p,h-=s*p);u/=d,f/=d,h/=d;var g=i[2],m=i[6],v=i[10],y=g*a+m*o+v*s,x=g*u+m*f+v*h,b=l(g-=y*a+x*u,m-=y*o+x*f,v-=y*s+x*h);g/=b,m/=b,v/=b;var _=u*e+a*r,w=f*e+o*r,k=h*e+s*r;this.center.move(t,_,w,k);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+n),this.radius.set(t,Math.log(M))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],f=i[5],h=i[9],p=i[2],d=i[6],g=i[10],m=e*a+r*u,v=e*o+r*f,y=e*s+r*h,x=-(d*y-g*v),b=-(g*m-p*y),_=-(p*v-d*m),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k&gt;1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var M=this.computedRotation,A=M[0],T=M[1],S=M[2],E=M[3],C=A*w+E*x+T*_-S*b,L=T*w+E*b+S*x-A*_,z=S*w+E*_+A*b-T*x,P=E*w-A*x-T*b-S*_;if(n){x=p,b=d,_=g;var O=Math.sin(n)/l(x,b,_);x*=O,b*=O,_*=O,P=P*(w=Math.cos(e))-(C=C*w+P*x+L*_-z*b)*x-(L=L*w+P*b+z*x-C*_)*b-(z=z*w+P*_+C*b-L*x)*_}var I=c(C,L,z,P);I&gt;1e-6?(C/=I,L/=I,z/=I,P/=I):(C=L=z=0,P=1),this.rotation.set(t,C,L,z,P)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c&lt;3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)&gt;1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,c-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e&gt;0&amp;&amp;this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t&gt;0?Math.log(t):-1/0,e=e&gt;0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&amp;&amp;this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&amp;&amp;this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&amp;&amp;i&gt;0&amp;&amp;this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{&quot;./lib/quatFromFrame&quot;:435,&quot;filtered-vector&quot;:214,&quot;gl-mat4/fromQuat&quot;:250,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/lookAt&quot;:254}],437:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;repeat-string&quot;);e.exports=function(t,e,r){return n(r=&quot;undefined&quot;!=typeof r?r+&quot;&quot;:&quot; &quot;,e)+t}},{&quot;repeat-string&quot;:476}],438:[function(t,e,r){&quot;use strict&quot;;function n(t,e){if(&quot;string&quot;!=typeof t)return[t];var r=[t];&quot;string&quot;==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:[&quot;{}&quot;,&quot;[]&quot;,&quot;()&quot;],i=e.escape||&quot;___&quot;,a=!!e.flat;n.forEach(function(t){var e=new RegExp([&quot;\\&quot;,t[0],&quot;[^\\&quot;,t[0],&quot;\\&quot;,t[1],&quot;]*\\&quot;,t[1]].join(&quot;&quot;)),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s}r.forEach(function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++&gt;1e4)throw Error(&quot;References have circular dependency. Please, check them.&quot;);r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp(&quot;(\\&quot;+i+r+&quot;(?![0-9]))&quot;,&quot;g&quot;),t[0]+&quot;$1&quot;+t[1])}),e})});var o=new RegExp(&quot;\\&quot;+i+&quot;([0-9]+)&quot;);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++&gt;1e4)throw Error(&quot;Circular references in parenthesis&quot;);a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&amp;&amp;e.flat){var r,n=e&amp;&amp;e.escape||&quot;___&quot;,i=t[0];if(!i)return&quot;&quot;;for(var a=new RegExp(&quot;\\&quot;+n+&quot;([0-9]+)&quot;),o=0;i!=r;){if(o++&gt;1e4)throw Error(&quot;Circular references in &quot;+t);r=i,i=i.replace(a,s)}return i}return t.reduce(function t(e,r){return Array.isArray(r)&amp;&amp;(r=r.reduce(t,&quot;&quot;)),e+r},&quot;&quot;);function s(e,r){if(null==t[r])throw Error(&quot;Reference &quot;+r+&quot;is undefined&quot;);return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],439:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;pick-by-alias&quot;);e.exports=function(t){var e;arguments.length&gt;1&amp;&amp;(t=arguments);&quot;string&quot;==typeof t?t=t.split(/\s/).map(parseFloat):&quot;number&quot;==typeof t&amp;&amp;(t=[t]);t.length&amp;&amp;&quot;number&quot;==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&amp;&amp;(t=n(t,{left:&quot;x l left Left&quot;,top:&quot;y t top Top&quot;,width:&quot;w width W Width&quot;,height:&quot;h height W Width&quot;,bottom:&quot;b bottom Bottom&quot;,right:&quot;r right Right&quot;}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{&quot;pick-by-alias&quot;:445}],440:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),&quot;m&quot;==o&amp;&amp;i.length&gt;2&amp;&amp;(e.push([r].concat(i.splice(0,2))),o=&quot;l&quot;,r=&quot;m&quot;==r?&quot;l&quot;:&quot;L&quot;);;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length&lt;n[o])throw new Error(&quot;malformed path data&quot;);e.push([r].concat(i.splice(0,n[o])))}}),e};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi;var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},{}],441:[function(t,e,r){e.exports=function(t,e){e||(e=[0,&quot;&quot;]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||&quot;&quot;,e}},{}],442:[function(t,e,r){(function(t){(function(){var r,n,i,a,o,s;&quot;undefined&quot;!=typeof performance&amp;&amp;null!==performance&amp;&amp;performance.now?e.exports=function(){return performance.now()}:&quot;undefined&quot;!=typeof t&amp;&amp;null!==t&amp;&amp;t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,a=(r=function(){var t;return 1e9*(t=n())[0]+t[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,t(&quot;_process&quot;))},{_process:462}],443:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.length;if(e&lt;n){for(var r=1,a=0;a&lt;e;++a)for(var o=0;o&lt;a;++o)if(t[a]&lt;t[o])r=-r;else if(t[a]===t[o])return 0;return r}for(var s=i.mallocUint8(e),a=0;a&lt;e;++a)s[a]=0;for(var r=1,a=0;a&lt;e;++a)if(!s[a]){var l=1;s[a]=1;for(var o=t[a];o!==a;o=t[o]){if(s[o])return i.freeUint8(s),0;l+=1,s[o]=1}1&amp;l||(r=-r)}return i.freeUint8(s),r};var n=32,i=t(&quot;typedarray-pool&quot;)},{&quot;typedarray-pool&quot;:519}],444:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;),i=t(&quot;invert-permutation&quot;);r.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var r,a,o,s=n.mallocUint32(e),l=n.mallocUint32(e),c=0;for(i(t,l),o=0;o&lt;e;++o)s[o]=t[o];for(o=e-1;o&gt;0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a&lt;t;++a)r[a]=a,o=o*a|0;for(a=t-1;a&gt;0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{&quot;invert-permutation&quot;:396,&quot;typedarray-pool&quot;:519}],445:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n,a,o={};if(&quot;string&quot;==typeof e&amp;&amp;(e=i(e)),Array.isArray(e)){var s={};for(a=0;a&lt;e.length;a++)s[e[a]]=!0;e=s}for(n in e)e[n]=i(e[n]);var l={};for(n in e){var c=e[n];if(Array.isArray(c))for(a=0;a&lt;c.length;a++){var u=c[a];if(r&amp;&amp;(l[u]=!0),u in t){if(o[n]=t[u],r)for(var f=a;f&lt;c.length;f++)l[c[f]]=!0;break}}else n in t&amp;&amp;(e[n]&amp;&amp;(o[n]=t[n]),r&amp;&amp;(l[n]=!0))}if(r)for(n in t)l[n]||(o[n]=t[n]);return o};var n={};function i(t){return n[t]?n[t]:(&quot;string&quot;==typeof t&amp;&amp;(t=n[t]=t.split(/\s*,\s*|\s+/)),t)}},{}],446:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o&lt;r;++o)a[0][o]=[],a[1][o]=[];for(var o=0;o&lt;i;++o){var s=t[o];a[0][s[0]].push(s),a[1][s[1]].push(s)}for(var l=[],o=0;o&lt;r;++o)a[0][o].length+a[1][o].length===0&amp;&amp;l.push([o]);function c(t,e){var r=a[e][t[e]];r.splice(r.indexOf(t),1)}function u(t,r,i){for(var o,s,l,u=0;u&lt;2;++u)if(a[u][r].length&gt;0){o=a[u][r][0],l=u;break}s=o[1^l];for(var f=0;f&lt;2;++f)for(var h=a[f][r],p=0;p&lt;h.length;++p){var d=h[p],g=d[1^f],m=n(e[t],e[r],e[s],e[g]);m&gt;0&amp;&amp;(o=d,s=g,l=f)}return i?s:(o&amp;&amp;c(o,l),s)}function f(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=u(l,f,!0);if(n(e[l],e[f],e[h],e[p])&lt;0)break;o.push(t),s=u(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(var o=0;o&lt;r;++o)for(var p=0;p&lt;2;++p){for(var d=[];a[p][o].length&gt;0;){a[0][o].length;var g=f(o,p);h(d,g)?d.push.apply(d,g):(d.length&gt;0&amp;&amp;l.push(d),d=g)}d.length&gt;0&amp;&amp;l.push(d)}return l};var n=t(&quot;compare-angle&quot;)},{&quot;compare-angle&quot;:114}],447:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s&lt;e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l&lt;=1&amp;&amp;o.push(s)}for(;o.length&gt;0;){var c=o.pop();i[c]=!1;for(var u=r[c],s=0;s&lt;u.length;++s){var f=u[s];0==--a[f]&amp;&amp;o.push(f)}}for(var h=new Array(e.length),p=[],s=0;s&lt;e.length;++s)if(i[s]){var c=p.length;h[s]=c,p.push(e[s])}else h[s]=-1;for(var d=[],s=0;s&lt;t.length;++s){var g=t[s];i[g[0]]&amp;&amp;i[g[1]]&amp;&amp;d.push([h[g[0]],h[g[1]]])}return[d,p]};var n=t(&quot;edges-to-adjacency-list&quot;)},{&quot;edges-to-adjacency-list&quot;:156}],448:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=c(t,e);t=r[0];for(var f=(e=r[1]).length,h=(t.length,n(t,e.length)),p=0;p&lt;f;++p)if(h[p].length%2==1)throw new Error(&quot;planar-graph-to-polyline: graph must be manifold&quot;);var d=i(t,e);for(var g=(d=d.filter(function(t){for(var r=t.length,n=[0],i=0;i&lt;r;++i){var a=e[t[i]],l=e[t[(i+1)%r]],c=o(-a[0],a[1]),u=o(-a[0],l[1]),f=o(l[0],a[1]),h=o(l[0],l[1]);n=s(n,s(s(c,u),s(f,h)))}return n[n.length-1]&gt;0})).length,m=new Array(g),v=new Array(g),p=0;p&lt;g;++p){m[p]=p;var y=new Array(g),x=d[p].map(function(t){return e[t]}),b=a([x]),_=0;t:for(var w=0;w&lt;g;++w)if(y[w]=0,p!==w){for(var k=d[w],M=k.length,A=0;A&lt;M;++A){var T=b(e[k[A]]);if(0!==T){T&lt;0&amp;&amp;(y[w]=1,_+=1);continue t}}y[w]=1,_+=1}v[p]=[_,p,y]}v.sort(function(t,e){return e[0]-t[0]});for(var p=0;p&lt;g;++p)for(var y=v[p],S=y[1],E=y[2],w=0;w&lt;g;++w)E[w]&amp;&amp;(m[w]=S);for(var C=function(t){for(var e=new Array(t),r=0;r&lt;t;++r)e[r]=[];return e}(g),p=0;p&lt;g;++p)C[p].push(m[p]),C[m[p]].push(p);for(var L={},z=u(f,!1),p=0;p&lt;g;++p)for(var k=d[p],M=k.length,w=0;w&lt;M;++w){var P=k[w],O=k[(w+1)%M],I=Math.min(P,O)+&quot;:&quot;+Math.max(P,O);if(I in L){var D=L[I];C[D].push(p),C[p].push(D),z[P]=z[O]=!0}else L[I]=p}function R(t){for(var e=t.length,r=0;r&lt;e;++r)if(!z[t[r]])return!1;return!0}for(var B=[],F=u(g,-1),p=0;p&lt;g;++p)m[p]!==p||R(d[p])?F[p]=-1:(B.push(p),F[p]=0);var r=[];for(;B.length&gt;0;){var N=B.pop(),j=C[N];l(j,function(t,e){return t-e});var V,U=j.length,q=F[N];if(0===q){var k=d[N];V=[k]}for(var p=0;p&lt;U;++p){var H=j[p];if(!(F[H]&gt;=0)&amp;&amp;(F[H]=1^q,B.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),V.push(k))}}0===q&amp;&amp;r.push(V)}return r};var n=t(&quot;edges-to-adjacency-list&quot;),i=t(&quot;planar-dual&quot;),a=t(&quot;point-in-big-polygon&quot;),o=t(&quot;two-product&quot;),s=t(&quot;robust-sum&quot;),l=t(&quot;uniq&quot;),c=t(&quot;./lib/trim-leaves&quot;);function u(t,e){for(var r=new Array(t),n=0;n&lt;t;++n)r[n]=e;return r}},{&quot;./lib/trim-leaves&quot;:447,&quot;edges-to-adjacency-list&quot;:156,&quot;planar-dual&quot;:446,&quot;point-in-big-polygon&quot;:452,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517,uniq:521}],449:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./quad&quot;)},{&quot;./quad&quot;:451}],450:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{dup:98}],451:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;clamp&quot;),a=t(&quot;parse-rect&quot;),o=t(&quot;array-bounds&quot;),s=t(&quot;pick-by-alias&quot;),l=t(&quot;defined&quot;),c=t(&quot;flatten-vertex-data&quot;),u=t(&quot;is-obj&quot;),f=t(&quot;dtype&quot;),h=t(&quot;math-log2&quot;);function p(t,e){for(var r=e[0],n=e[1],a=1/(e[2]-r),o=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l&lt;c;l++)s[2*l]=i((t[2*l]-r)*a,0,1),s[2*l+1]=i((t[2*l+1]-n)*o,0,1);return s}e.exports=function(t,e){e||(e={}),t=c(t,&quot;float64&quot;),e=s(e,{bounds:&quot;range bounds dataBox databox&quot;,maxDepth:&quot;depth maxDepth maxdepth level maxLevel maxlevel levels&quot;,dtype:&quot;type dtype format out dst output destination&quot;});var r=l(e.maxDepth,255),i=l(e.bounds,o(t,2));i[0]===i[2]&amp;&amp;i[2]++,i[1]===i[3]&amp;&amp;i[3]++;var d,g=p(t,i),m=t.length&gt;&gt;&gt;1;e.dtype||(e.dtype=&quot;array&quot;),&quot;string&quot;==typeof e.dtype?d=new(f(e.dtype))(m):e.dtype&amp;&amp;(d=e.dtype,Array.isArray(d)&amp;&amp;(d.length=m));for(var v=0;v&lt;m;++v)d[v]=v;var y=[],x=[],b=[],_=[];!function t(e,n,i,a,o,s){if(!a.length)return null;var l=y[o]||(y[o]=[]);var c=b[o]||(b[o]=[]);var u=x[o]||(x[o]=[]);var f=l.length;o++;if(o&gt;r){for(var h=0;h&lt;a.length;h++)l.push(a[h]),c.push(s),u.push(null,null,null,null);return f}l.push(a[0]);c.push(s);if(a.length&lt;=1)return u.push(null,null,null,null),f;var p=.5*i;var d=e+p,m=n+p;var v=[],_=[],w=[],k=[];for(var M=1,A=a.length;M&lt;A;M++){var T=a[M],S=g[2*T],E=g[2*T+1];S&lt;d?E&lt;m?v.push(T):_.push(T):E&lt;m?w.push(T):k.push(T)}s&lt;&lt;=2;u.push(t(e,n,p,v,o,s),t(e,m,p,_,o,s+1),t(d,n,p,w,o,s+2),t(d,m,p,k,o,s+3));return f}(0,0,1,d,0,1);for(var w=0,k=0;k&lt;y.length;k++){var M=y[k];if(d.set)d.set(M,w);else for(var A=0,T=M.length;A&lt;T;A++)d[A+w]=M[A];var S=w+y[k].length;_[k]=[w,S],w=S}return d.range=function(){var e,r=[],o=arguments.length;for(;o--;)r[o]=arguments[o];if(u(r[r.length-1])){var c=r.pop();r.length||null==c.x&amp;&amp;null==c.l&amp;&amp;null==c.left||(r=[c],e={}),e=s(c,{level:&quot;level maxLevel&quot;,d:&quot;d diam diameter r radius px pxSize pixel pixelSize maxD size minSize&quot;,lod:&quot;lod details ranges offsets&quot;})}else e={};r.length||(r=i);var f=a.apply(void 0,r),d=[Math.min(f.x,f.x+f.width),Math.min(f.y,f.y+f.height),Math.max(f.x,f.x+f.width),Math.max(f.y,f.y+f.height)],g=d[0],m=d[1],v=d[2],w=d[3],k=p([g,m,v,w],i),M=k[0],A=k[1],T=k[2],S=k[3],C=l(e.level,y.length);if(null!=e.d){var L;&quot;number&quot;==typeof e.d?L=[e.d,e.d]:e.d.length&amp;&amp;(L=e.d),C=Math.min(Math.max(Math.ceil(-h(Math.abs(L[0])/(i[2]-i[0]))),Math.ceil(-h(Math.abs(L[1])/(i[3]-i[1])))),C)}if(C=Math.min(C,y.length),e.lod)return function(t,e,r,i,a){for(var o=[],s=0;s&lt;a;s++){var l=b[s],c=_[s][0],u=E(t,e,s),f=E(r,i,s),h=n.ge(l,u),p=n.gt(l,f,h,l.length-1);o[s]=[h+c,p+c]}return o}(M,A,T,S,C);var z=[];return function e(r,n,i,a,o,s){if(null!==o&amp;&amp;null!==s){var l=r+i,c=n+i;if(!(M&gt;l||A&gt;c||T&lt;r||S&lt;n||a&gt;=C||o===s)){var u=y[a];void 0===s&amp;&amp;(s=u.length);for(var f=o;f&lt;s;f++){var h=u[f],p=t[2*h],d=t[2*h+1];p&gt;=g&amp;&amp;p&lt;=v&amp;&amp;d&gt;=m&amp;&amp;d&lt;=w&amp;&amp;z.push(h)}var b=x[a],_=b[4*o+0],k=b[4*o+1],E=b[4*o+2],L=b[4*o+3],P=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n&gt;t.length)return null;return r}(b,o+1),O=.5*i,I=a+1;e(r,n,O,I,_,k||E||L||P),e(r,n+O,O,I,k,E||L||P),e(r+O,n,O,I,E,L||P),e(r+O,n+O,O,I,L,P)}}}(0,0,1,0,0,1),z},d;function E(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s&lt;r;s++)n&lt;&lt;=2,n+=t&lt;i?e&lt;a?0:1:e&lt;a?2:3,o*=.5,i+=t&lt;i?-o:o,a+=e&lt;a?-o:o;return n}}},{&quot;array-bounds&quot;:52,&quot;binary-search-bounds&quot;:450,clamp:102,defined:148,dtype:153,&quot;flatten-vertex-data&quot;:215,&quot;is-obj&quot;:402,&quot;math-log2&quot;:412,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445}],452:[function(t,e,r){e.exports=function(t){for(var e=t.length,r=[],a=[],s=0;s&lt;e;++s)for(var u=t[s],f=u.length,h=f-1,p=0;p&lt;f;h=p++){var d=u[h],g=u[p];d[0]===g[0]?a.push([d,g]):r.push([d,g])}if(0===r.length)return 0===a.length?c:(m=l(a),function(t){return m(t[0],t[1])?0:1});var m;var v=i(r),y=function(t,e){return function(r){var i=o.le(e,r[0]);if(i&lt;0)return 1;var a=t[i];if(!a){if(!(i&gt;0&amp;&amp;e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]&lt;l[1][0])if(c&lt;0)a=a.left;else{if(!(c&gt;0))return 0;s=-1,a=a.right}else if(c&gt;0)a=a.left;else{if(!(c&lt;0))return 0;s=1,a=a.right}}return s}}(v.slabs,v.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t(&quot;robust-orientation&quot;)[3],i=t(&quot;slab-decomposition&quot;),a=t(&quot;interval-tree-1d&quot;),o=t(&quot;binary-search-bounds&quot;);function s(){return!0}function l(t){for(var e={},r=0;r&lt;t.length;++r){var n=t[r],i=n[0][0],o=n[0][1],l=n[1][1],c=[Math.min(o,l),Math.max(o,l)];i in e?e[i].push(c):e[i]=[c]}var u={},f=Object.keys(e);for(r=0;r&lt;f.length;++r){var h=e[f[r]];u[f[r]]=a(h)}return function(t){return function(e,r){var n=t[e];return!!n&amp;&amp;!!n.queryPoint(r,s)}}(u)}function c(t){return 1}},{&quot;binary-search-bounds&quot;:78,&quot;interval-tree-1d&quot;:395,&quot;robust-orientation&quot;:483,&quot;slab-decomposition&quot;:499}],453:[function(t,e,r){var n,i=t(&quot;./lib/build-log&quot;),a=t(&quot;./lib/epsilon&quot;),o=t(&quot;./lib/intersecter&quot;),s=t(&quot;./lib/segment-chainer&quot;),l=t(&quot;./lib/segment-selector&quot;),c=t(&quot;./lib/geojson&quot;),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?u=i():!1===t&amp;&amp;(u=!1),!1!==u&amp;&amp;u.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,u);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,u).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,u),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,u),inverted:t.inverted1&amp;&amp;t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,u),inverted:t.inverted1&amp;&amp;!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,u),inverted:!t.inverted1&amp;&amp;t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,u),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,u),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},&quot;object&quot;==typeof window&amp;&amp;(window.PolyBool=n),e.exports=n},{&quot;./lib/build-log&quot;:454,&quot;./lib/epsilon&quot;:455,&quot;./lib/geojson&quot;:456,&quot;./lib/intersecter&quot;:457,&quot;./lib/segment-chainer&quot;:459,&quot;./lib/segment-selector&quot;:460}],454:[function(t,e,r){e.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n(&quot;check&quot;,{seg1:t,seg2:e})},segmentChop:function(t,e){return n(&quot;div_seg&quot;,{seg:t,pt:e}),n(&quot;chop&quot;,{seg:t,pt:e})},statusRemove:function(t){return n(&quot;pop_seg&quot;,{seg:t})},segmentUpdate:function(t){return n(&quot;seg_update&quot;,{seg:t})},segmentNew:function(t,e){return n(&quot;new_seg&quot;,{seg:t,primary:e})},segmentRemove:function(t){return n(&quot;rem_seg&quot;,{seg:t})},tempStatus:function(t,e,r){return n(&quot;temp_status&quot;,{seg:t,above:e,below:r})},rewind:function(t){return n(&quot;rewind&quot;,{seg:t})},status:function(t,e,r){return n(&quot;status&quot;,{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n(&quot;vert&quot;,{x:e}))},log:function(t){return&quot;string&quot;!=typeof t&amp;&amp;(t=JSON.stringify(t,!1,&quot;  &quot;)),n(&quot;log&quot;,{txt:t})},reset:function(){return n(&quot;reset&quot;)},selected:function(t){return n(&quot;selected&quot;,{segs:t})},chainStart:function(t){return n(&quot;chain_start&quot;,{seg:t})},chainRemoveHead:function(t,e){return n(&quot;chain_rem_head&quot;,{index:t,pt:e})},chainRemoveTail:function(t,e){return n(&quot;chain_rem_tail&quot;,{index:t,pt:e})},chainNew:function(t,e){return n(&quot;chain_new&quot;,{pt1:t,pt2:e})},chainMatch:function(t){return n(&quot;chain_match&quot;,{index:t})},chainClose:function(t){return n(&quot;chain_close&quot;,{index:t})},chainAddHead:function(t,e){return n(&quot;chain_add_head&quot;,{index:t,pt:e})},chainAddTail:function(t,e){return n(&quot;chain_add_tail&quot;,{index:t,pt:e})},chainConnect:function(t,e){return n(&quot;chain_con&quot;,{index1:t,index2:e})},chainReverse:function(t){return n(&quot;chain_rev&quot;,{index:t})},chainJoin:function(t,e){return n(&quot;chain_join&quot;,{index1:t,index2:e})},done:function(){return n(&quot;done&quot;)}}}},{}],455:[function(t,e,r){e.exports=function(t){&quot;number&quot;!=typeof t&amp;&amp;(t=1e-10);var e={epsilon:function(e){return&quot;number&quot;==typeof e&amp;&amp;(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)&gt;=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l&lt;t||l-(a*a+s*s)&gt;-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])&lt;t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])&lt;t},pointsSame:function(t,r){return e.pointsSameX(t,r)&amp;&amp;e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]&lt;r[1]?-1:1:t[0]&lt;r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)&lt;t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],c=a*l-o*s;if(Math.abs(c)&lt;t)return!1;var u=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*u)/c,p=(a*f-o*u)/c,d={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return d.alongA=h&lt;=-t?-2:h&lt;t?-1:h-1&lt;=-t?0:h-1&lt;t?1:2,d.alongB=p&lt;=-t?-2:p&lt;t?-1:p-1&lt;=-t?0:p-1&lt;t?1:2,d},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l&lt;r.length;l++){var c=r[l][0],u=r[l][1];u-i&gt;t!=o-i&gt;t&amp;&amp;(a-c)*(i-u)/(o-u)+c-n&gt;t&amp;&amp;(s=!s),a=c,o=u}return s}};return e}},{}],456:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){if(e.length&lt;=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i&lt;e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if(&quot;Polygon&quot;===e.type)return t.polygon(r(e.coordinates));if(&quot;MultiPolygon&quot;===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i&lt;e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error(&quot;PolyBool: Cannot convert GeoJSON object to PolyBool polygon&quot;)},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}r=t.polygon(t.segments(r));var a=i(null);function o(t,e){for(var r=0;r&lt;t.children.length;r++){if(n(e,(s=t.children[r]).region))return void o(s,e)}var a=i(e);for(r=0;r&lt;t.children.length;r++){var s;n((s=t.children[r]).region,e)&amp;&amp;(a.children.push(s),t.children.splice(r,1),r--)}t.children.push(a)}for(var s=0;s&lt;r.regions.length;s++){var l=r.regions[s];l.length&lt;3||o(a,l)}function c(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o&lt;t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r&lt;0!==e&amp;&amp;a.reverse(),a.push([a[0][0],a[0][1]]),a}var u=[];function f(t){var e=[c(t.region,!1)];u.push(e);for(var r=0;r&lt;t.children.length;r++)e.push(h(t.children[r]))}function h(t){for(var e=0;e&lt;t.children.length;e++)f(t.children[e]);return c(t.region,!0)}for(s=0;s&lt;a.children.length;s++)f(a.children[s]);return u.length&lt;=0?{type:&quot;Polygon&quot;,coordinates:[]}:1==u.length?{type:&quot;Polygon&quot;,coordinates:u[0]}:{type:&quot;MultiPolygon&quot;,coordinates:u}}};e.exports=n},{}],457:[function(t,e,r){var n=t(&quot;./linked-list&quot;);e.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(t,r){a.insertBefore(t,function(n){return function(t,r,n,i,a,o){var s=e.pointsCompare(r,a);return 0!==s?s:e.pointsSame(n,o)?0:t!==i?t?1:-1:e.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(t.isStart,t.pt,r,n.isStart,n.pt,n.other.pt)&lt;0})}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&amp;&amp;r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,o){var s=n.create();function c(t){return s.findTransition(function(r){var n,i,a,o,s,l;return n=t,i=r.ev,a=n.seg.start,o=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(a,s,l)?e.pointsCollinear(o,s,l)?1:e.pointAboveOrOnLine(o,s,l)?1:-1:e.pointAboveOrOnLine(a,s,l)?1:-1)&gt;0})}function u(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&amp;&amp;r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),p=e.pointsSame(s,u);if(h&amp;&amp;p)return n;var d=!h&amp;&amp;e.pointBetween(o,c,u),g=!p&amp;&amp;e.pointBetween(s,c,u);if(h)return g?l(n,s):l(t,u),n;d&amp;&amp;(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&amp;&amp;(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&amp;&amp;l(t,u)),0===f.alongB&amp;&amp;(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&amp;&amp;l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&amp;&amp;r.vert(h.pt[0]),h.isStart){r&amp;&amp;r.segmentNew(h.seg,h.primary);var p=c(h),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function m(){if(d){var t=u(h,d);if(t)return t}return!!g&amp;&amp;u(h,g)}r&amp;&amp;r.tempStatus(h.seg,!!d&amp;&amp;d.seg,!!g&amp;&amp;g.seg);var v,y,x=m();if(x)t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&amp;&amp;(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=h.seg.myFill,r&amp;&amp;r.segmentUpdate(x.seg),h.other.remove(),h.remove();if(a.getHead()!==h){r&amp;&amp;r.rewind(h.seg);continue}t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=g?g.seg.myFill.above:i,h.seg.myFill.above=y?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&amp;&amp;(v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v}),r&amp;&amp;r.status(h.seg,!!d&amp;&amp;d.seg,!!g&amp;&amp;g.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error(&quot;PolyBool: Zero-length segment detected; your epsilon is probably too small or too large&quot;);if(s.exists(b.prev)&amp;&amp;s.exists(b.next)&amp;&amp;u(b.prev.ev,b.next.ev),r&amp;&amp;r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&amp;&amp;r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l&lt;t.length;l++){n=o,o=t[l];var c=e.pointsCompare(n,o);0!==c&amp;&amp;s((i=c&lt;0?n:o,a=c&lt;0?o:n,{id:r?r.segmentId():-1,start:i,end:a,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(t){return c(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach(function(t){s(i(t.start,t.end,t),!0)}),r.forEach(function(t){s(i(t.start,t.end,t),!1)}),c(e,n)}}}},{&quot;./linked-list&quot;:458}],458:[function(t,e,r){e.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&amp;&amp;e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&amp;&amp;!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&amp;&amp;(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&amp;&amp;(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},{}],459:[function(t,e,r){e.exports=function(t,e,r){var n=[],i=[];return t.forEach(function(t){var a=t.start,o=t.end;if(e.pointsSame(a,o))console.warn(&quot;PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large&quot;);else{r&amp;&amp;r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u&lt;n.length;u++){var f=(m=n[u])[0],h=(m[1],m[m.length-1]);if(m[m.length-2],e.pointsSame(f,a)){if(M(u,!0,!0))break}else if(e.pointsSame(f,o)){if(M(u,!0,!1))break}else if(e.pointsSame(h,a)){if(M(u,!1,!0))break}else if(e.pointsSame(h,o)&amp;&amp;M(u,!1,!1))break}if(c===s)return n.push([a,o]),void(r&amp;&amp;r.chainNew(a,o));if(c===l){r&amp;&amp;r.chainMatch(s.index);var p=s.index,d=s.matches_pt1?o:a,g=s.matches_head,m=n[p],v=g?m[0]:m[m.length-1],y=g?m[1]:m[m.length-2],x=g?m[m.length-1]:m[0],b=g?m[m.length-2]:m[1];return e.pointsCollinear(y,v,d)&amp;&amp;(g?(r&amp;&amp;r.chainRemoveHead(s.index,d),m.shift()):(r&amp;&amp;r.chainRemoveTail(s.index,d),m.pop()),v=y),e.pointsSame(x,d)?(n.splice(p,1),e.pointsCollinear(b,x,v)&amp;&amp;(g?(r&amp;&amp;r.chainRemoveTail(s.index,v),m.pop()):(r&amp;&amp;r.chainRemoveHead(s.index,v),m.shift())),r&amp;&amp;r.chainClose(s.index),void i.push(m)):void(g?(r&amp;&amp;r.chainAddHead(s.index,d),m.unshift(d)):(r&amp;&amp;r.chainAddTail(s.index,d),m.push(d)))}var _=s.index,w=l.index;r&amp;&amp;r.chainConnect(_,w);var k=n[_].length&lt;n[w].length;s.matches_head?l.matches_head?k?(A(_),T(_,w)):(A(w),T(w,_)):T(w,_):l.matches_head?T(_,w):k?(A(_),T(w,_)):(A(w),T(_,w))}function M(t,e,r){return c.index=t,c.matches_head=e,c.matches_pt1=r,c===s?(c=l,!1):(c=null,!0)}function A(t){r&amp;&amp;r.chainReverse(t),n[t].reverse()}function T(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],c=o[0],u=o[1];e.pointsCollinear(l,s,c)&amp;&amp;(r&amp;&amp;r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,c,u)&amp;&amp;(r&amp;&amp;r.chainRemoveHead(i,c),o.shift()),r&amp;&amp;r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}}),i}},{}],460:[function(t,e,r){function n(t,e,r){var n=[];return t.forEach(function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&amp;&amp;t.otherFill.above?2:0)+(t.otherFill&amp;&amp;t.otherFill.below?1:0);0!==e[i]&amp;&amp;n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})}),r&amp;&amp;r.selected(n),n}var i={union:function(t,e){return n(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],e)},intersect:function(t,e){return n(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],e)},difference:function(t,e){return n(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],e)},differenceRev:function(t,e){return n(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],e)},xor:function(t,e){return n(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],e)}};e.exports=i},{}],461:[function(t,e,r){&quot;use strict&quot;;var n=new Float64Array(4),i=new Float64Array(4),a=new Float64Array(4);e.exports=function(t,e,r,o,s){n.length&lt;o.length&amp;&amp;(n=new Float64Array(o.length),i=new Float64Array(o.length),a=new Float64Array(o.length));for(var l=0;l&lt;o.length;++l)n[l]=t[l]-o[l],i[l]=e[l]-t[l],a[l]=r[l]-t[l];var c=0,u=0,f=0,h=0,p=0,d=0;for(l=0;l&lt;o.length;++l){var g=i[l],m=a[l],v=n[l];c+=g*g,u+=g*m,f+=m*m,h+=v*g,p+=v*m,d+=v*v}var y,x,b,_,w,k=Math.abs(c*f-u*u),M=u*p-f*h,A=u*h-c*p;if(M+A&lt;=k)if(M&lt;0)A&lt;0&amp;&amp;h&lt;0?(A=0,-h&gt;=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d):(M=0,p&gt;=0?(A=0,y=d):-p&gt;=f?(A=1,y=f+2*p+d):y=p*(A=-p/f)+d);else if(A&lt;0)A=0,h&gt;=0?(M=0,y=d):-h&gt;=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d;else{var T=1/k;y=(M*=T)*(c*M+u*(A*=T)+2*h)+A*(u*M+f*A+2*p)+d}else M&lt;0?(b=f+p)&gt;(x=u+h)?(_=b-x)&gt;=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d:(M=0,b&lt;=0?(A=1,y=f+2*p+d):p&gt;=0?(A=0,y=d):y=p*(A=-p/f)+d):A&lt;0?(b=c+h)&gt;(x=u+p)?(_=b-x)&gt;=(w=c-2*u+f)?(A=1,M=0,y=f+2*p+d):y=(M=1-(A=_/w))*(c*M+u*A+2*h)+A*(u*M+f*A+2*p)+d:(A=0,b&lt;=0?(M=1,y=c+2*h+d):h&gt;=0?(M=0,y=d):y=h*(M=-h/c)+d):(_=f+p-u-h)&lt;=0?(M=0,A=1,y=f+2*p+d):_&gt;=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d;var S=1-M-A;for(l=0;l&lt;o.length;++l)s[l]=S*t[l]+M*e[l]+A*r[l];return y&lt;0?0:y}},{}],462:[function(t,e,r){var n,i,a=e.exports={};function o(){throw new Error(&quot;setTimeout has not been defined&quot;)}function s(){throw new Error(&quot;clearTimeout has not been defined&quot;)}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&amp;&amp;setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n=&quot;function&quot;==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i=&quot;function&quot;==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],f=!1,h=-1;function p(){f&amp;&amp;c&amp;&amp;(f=!1,c.length?u=c.concat(u):h=-1,u.length&amp;&amp;d())}function d(){if(!f){var t=l(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++h&lt;e;)c&amp;&amp;c[h].run();h=-1,e=u.length}c=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&amp;&amp;clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function m(){}a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length&gt;1)for(var r=1;r&lt;arguments.length;r++)e[r-1]=arguments[r];u.push(new g(t,e)),1!==u.length||f||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title=&quot;browser&quot;,a.browser=!0,a.env={},a.argv=[],a.version=&quot;&quot;,a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(t){return[]},a.binding=function(t){throw new Error(&quot;process.binding is not supported&quot;)},a.cwd=function(){return&quot;/&quot;},a.chdir=function(t){throw new Error(&quot;process.chdir is not supported&quot;)},a.umask=function(){return 0}},{}],463:[function(t,e,r){e.exports=t(&quot;gl-quat/slerp&quot;)},{&quot;gl-quat/slerp&quot;:279}],464:[function(t,e,r){(function(r){for(var n=t(&quot;performance-now&quot;),i=&quot;undefined&quot;==typeof window?r:window,a=[&quot;moz&quot;,&quot;webkit&quot;],o=&quot;AnimationFrame&quot;,s=i[&quot;request&quot;+o],l=i[&quot;cancel&quot;+o]||i[&quot;cancelRequest&quot;+o],c=0;!s&amp;&amp;c&lt;a.length;c++)s=i[a[c]+&quot;Request&quot;+o],l=i[a[c]+&quot;Cancel&quot;+o]||i[a[c]+&quot;CancelRequest&quot;+o];if(!s||!l){var u=0,f=0,h=[];s=function(t){if(0===h.length){var e=n(),r=Math.max(0,1e3/60-(e-u));u=r+e,setTimeout(function(){var t=h.slice(0);h.length=0;for(var e=0;e&lt;t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout(function(){throw t},0)}},Math.round(r))}return h.push({handle:++f,callback:t,cancelled:!1}),f},l=function(t){for(var e=0;e&lt;h.length;e++)h[e].handle===t&amp;&amp;(h[e].cancelled=!0)}}e.exports=function(t){return s.call(i,t)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=s,t.cancelAnimationFrame=l}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;performance-now&quot;:442}],465:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;big-rat/add&quot;);e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a&lt;r;++a)i[a]=n(t[a],e[a]);return i}},{&quot;big-rat/add&quot;:62}],466:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=new Array(t.length),r=0;r&lt;t.length;++r)e[r]=n(t[r]);return e};var n=t(&quot;big-rat&quot;)},{&quot;big-rat&quot;:65}],467:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;big-rat&quot;),i=t(&quot;big-rat/mul&quot;);e.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s&lt;a;++s)o[s]=i(t[s],r);return o}},{&quot;big-rat&quot;:65,&quot;big-rat/mul&quot;:74}],468:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;big-rat/sub&quot;);e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a&lt;r;++a)i[a]=n(t[a],e[a]);return i}},{&quot;big-rat/sub&quot;:76}],469:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;compare-cell&quot;),i=t(&quot;compare-oriented-cell&quot;),a=t(&quot;cell-orientation&quot;);e.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o&lt;e;++o){var s=t[o],l=a(s);if(0!==l){if(r&gt;0){var c=t[r-1];if(0===n(s,c)&amp;&amp;a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{&quot;cell-orientation&quot;:99,&quot;compare-cell&quot;:115,&quot;compare-oriented-cell&quot;:116}],470:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;array-bounds&quot;),i=t(&quot;color-normalize&quot;),a=t(&quot;update-diff&quot;),o=t(&quot;pick-by-alias&quot;),s=t(&quot;object-assign&quot;),l=t(&quot;flatten-vertex-data&quot;),c=t(&quot;to-float32&quot;),u=c.float32,f=c.fract32;e.exports=function(t,e){&quot;function&quot;==typeof t?(e||(e={}),e.regl=t):e=t;e.length&amp;&amp;(e.positions=e);if(!(t=e.regl).hasExtension(&quot;ANGLE_instanced_arrays&quot;))throw Error(&quot;regl-error2d: `ANGLE_instanced_arrays` extension should be enabled&quot;);var r,c,p,d,g,m,v=t._gl,y={color:&quot;black&quot;,capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:&quot;dynamic&quot;,type:&quot;uint8&quot;,data:new Uint8Array(0)}),c=t.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array(0)}),p=t.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array(0)}),g=t.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array(0)}),m=t.buffer({usage:&quot;static&quot;,type:&quot;float&quot;,data:h}),k(e),r=t({vert:&quot;\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t&quot;,frag:&quot;\n\t\tprecision mediump float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t&quot;,uniforms:{range:t.prop(&quot;range&quot;),lineWidth:t.prop(&quot;lineWidth&quot;),capSize:t.prop(&quot;capSize&quot;),opacity:t.prop(&quot;opacity&quot;),scale:t.prop(&quot;scale&quot;),translate:t.prop(&quot;translate&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translateFract:t.prop(&quot;translateFract&quot;),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:m,stride:24,offset:0},lineOffset:{buffer:m,stride:24,offset:8},capOffset:{buffer:m,stride:24,offset:16}},primitive:&quot;triangles&quot;,blend:{enable:!0,color:[0,0,0,0],equation:{rgb:&quot;add&quot;,alpha:&quot;add&quot;},func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},depth:{enable:!1},scissor:{enable:!0,box:t.prop(&quot;viewport&quot;)},viewport:t.prop(&quot;viewport&quot;),stencil:!1,instances:t.prop(&quot;count&quot;),count:h.length}),s(b,{update:k,draw:_,destroy:M,regl:t,gl:v,canvas:v.canvas,groups:x}),b;function b(t){t?k(t):null===t&amp;&amp;M(),_()}function _(e){if(&quot;number&quot;==typeof e)return w(e);e&amp;&amp;!Array.isArray(e)&amp;&amp;(e=[e]),t._refresh(),x.forEach(function(t,r){t&amp;&amp;(e&amp;&amp;(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){&quot;number&quot;==typeof t&amp;&amp;(t=x[t]),null!=t&amp;&amp;t&amp;&amp;t.count&amp;&amp;t.color&amp;&amp;t.opacity&amp;&amp;t.positions&amp;&amp;t.positions.length&gt;1&amp;&amp;(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&amp;&amp;t.after(t))}function k(t){if(t){null!=t.length?&quot;number&quot;==typeof t[0]&amp;&amp;(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?(&quot;function&quot;==typeof t?t={after:t}:&quot;number&quot;==typeof t[0]&amp;&amp;(t={positions:t}),t=o(t,{color:&quot;color colors fill&quot;,capSize:&quot;capSize cap capsize cap-size&quot;,lineWidth:&quot;lineWidth line-width width line thickness&quot;,opacity:&quot;opacity alpha&quot;,range:&quot;range dataBox&quot;,viewport:&quot;viewport viewBox&quot;,errors:&quot;errors error&quot;,positions:&quot;positions position data points&quot;}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,&quot;float64&quot;),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t=&quot;transparent&quot;),!Array.isArray(t)||&quot;number&quot;==typeof t[0]){var n=t;t=Array(r);for(var a=0;a&lt;r;a++)t[a]=n}if(t.length&lt;r)throw Error(&quot;Not enough colors&quot;);for(var o=new Uint8Array(4*r),s=0;s&lt;r;s++){var l=i(t[s],&quot;uint8&quot;);o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:v.drawingBufferWidth,height:v.drawingBufferHeight},e}}]),u):u}),e||r){var h=x.reduce(function(t,e,r){return t+(e?e.count:0)},0),m=new Float64Array(2*h),_=new Uint8Array(4*h),w=new Float32Array(4*h);x.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&amp;&amp;(_.set(a,4*i),w.set(o,4*i),m.set(r,2*i))}}),c(u(m)),p(f(m)),d(_),g(w)}}}function M(){c.destroy(),p.destroy(),d.destroy(),g.destroy(),m.destroy()}};var h=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{&quot;array-bounds&quot;:52,&quot;color-normalize&quot;:107,&quot;flatten-vertex-data&quot;:215,&quot;object-assign&quot;:434,&quot;pick-by-alias&quot;:445,&quot;to-float32&quot;:512,&quot;update-diff&quot;:523}],471:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-normalize&quot;),i=t(&quot;array-bounds&quot;),a=t(&quot;object-assign&quot;),o=t(&quot;glslify&quot;),s=t(&quot;pick-by-alias&quot;),l=t(&quot;flatten-vertex-data&quot;),c=t(&quot;earcut&quot;),u=t(&quot;array-normalize&quot;),f=t(&quot;to-float32&quot;),h=f.float32,p=f.fract32,d=t(&quot;es6-weak-map&quot;),g=t(&quot;parse-rect&quot;);function m(t,e){if(!(this instanceof m))return new m(t,e);if(&quot;function&quot;==typeof t?(e||(e={}),e.regl=t):e=t,e.length&amp;&amp;(e.positions=e),!(t=e.regl).hasExtension(&quot;ANGLE_instanced_arrays&quot;))throw Error(&quot;regl-error2d: `ANGLE_instanced_arrays` extension should be enabled&quot;);this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=m.shaders.has(t)?m.shaders.get(t):m.shaders.set(t,m.createShaders(t)).get(t),this.update(e)}e.exports=m,m.dashMult=2,m.maxPatternLength=256,m.precisionThreshold=3e6,m.maxPoints=1e4,m.maxLines=2048,m.shaders=new d,m.createShaders=function(t){var e,r=t.buffer({usage:&quot;static&quot;,type:&quot;float&quot;,data:[0,1,0,0,1,1,1,0]}),n={primitive:&quot;triangle strip&quot;,instances:t.prop(&quot;count&quot;),count:4,offset:0,uniforms:{miterMode:function(t,e){return&quot;round&quot;===e.join?2:1},miterLimit:t.prop(&quot;miterLimit&quot;),scale:t.prop(&quot;scale&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translateFract:t.prop(&quot;translateFract&quot;),translate:t.prop(&quot;translate&quot;),thickness:t.prop(&quot;thickness&quot;),dashPattern:t.prop(&quot;dashTexture&quot;),opacity:t.prop(&quot;opacity&quot;),pixelRatio:t.context(&quot;pixelRatio&quot;),id:t.prop(&quot;id&quot;),dashSize:t.prop(&quot;dashLength&quot;),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop(&quot;depth&quot;)},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:&quot;add&quot;,alpha:&quot;add&quot;},func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop(&quot;viewport&quot;)},viewport:t.prop(&quot;viewport&quot;)},i=t(a({vert:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n       + positionFract * scale + translateFract\n       + position * scaleFract\n       + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n&quot;]),frag:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\n\nuniform float dashSize, pixelRatio, thickness, opacity, id;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n&quot;]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop(&quot;positionFractBuffer&quot;),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop(&quot;positionFractBuffer&quot;),stride:8,offset:16,divisor:1},color:{buffer:t.prop(&quot;colorBuffer&quot;),stride:4,offset:0,divisor:1}}},n));try{e=t(a({cull:{enable:!0,face:&quot;back&quot;},vert:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n  return ( val &lt; 0.0 || 0.0 &lt; val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n\t// adjust scale for horizontal bars\n\tvec2 scale = max(scale, MIN_DIFF);\n\tvec2 scaleRatio = scale * viewport.zw;\n\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) &lt; MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) &lt; MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) &lt;= REVERSE_THRESHOLD &amp;&amp; abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) &lt;  length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) &lt;= REVERSE_THRESHOLD &amp;&amp; abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) &lt;  length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse &amp;&amp; baClipping &gt; 0. &amp;&amp; baClipping &lt; length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse &amp;&amp; abClipping &gt; 0. &amp;&amp; abClipping &lt; length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * scale + translate;\n\tvec2 aBotPosition = (aBotCoord) * scale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * scale + translate;\n\tvec2 bBotPosition = (bBotCoord) * scale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position  * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n&quot;]),frag:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart &lt; -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd &lt; -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart &lt; 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius &gt; cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd &lt; 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius &gt; cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n&quot;]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop(&quot;colorBuffer&quot;),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop(&quot;colorBuffer&quot;),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:&quot;triangle&quot;,elements:function(t,e){return e.triangles},offset:0,vert:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n       + positionFract * scale + translateFract\n       + position * scaleFract\n       + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n&quot;]),frag:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n&quot;]),uniforms:{scale:t.prop(&quot;scale&quot;),color:t.prop(&quot;fill&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translateFract:t.prop(&quot;translateFract&quot;),translate:t.prop(&quot;translate&quot;),opacity:t.prop(&quot;opacity&quot;),pixelRatio:t.context(&quot;pixelRatio&quot;),id:t.prop(&quot;id&quot;),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:8},positionFract:{buffer:t.prop(&quot;positionFractBuffer&quot;),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},m.defaults={dashes:null,join:&quot;miter&quot;,miterLimit:1,thickness:10,cap:&quot;square&quot;,color:&quot;black&quot;,opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},m.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&amp;&amp;(t=this).update.apply(t,e),this.draw()},m.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&amp;&amp;Array.isArray(e))return(n=t).draw.apply(n,e);&quot;number&quot;==typeof e&amp;&amp;(e=t.passes[e]),e&amp;&amp;e.count&gt;1&amp;&amp;e.opacity&amp;&amp;(t.regl._refresh(),e.fill&amp;&amp;e.triangles&amp;&amp;e.triangles.length&gt;2&amp;&amp;t.shaders.fill(e),e.thickness&amp;&amp;(e.scale[0]*e.viewport.width&gt;m.precisionThreshold||e.scale[1]*e.viewport.height&gt;m.precisionThreshold?t.shaders.rect(e):&quot;rect&quot;===e.join||!e.join&amp;&amp;(e.thickness&lt;=2||e.count&gt;=m.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},m.prototype.update=function(t){var e=this;if(t){null!=t.length?&quot;number&quot;==typeof t[0]&amp;&amp;(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if(&quot;number&quot;==typeof t[0]&amp;&amp;(t={positions:t}),t=s(t,{positions:&quot;positions points data coords&quot;,thickness:&quot;thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth&quot;,join:&quot;lineJoin linejoin join type mode&quot;,miterLimit:&quot;miterlimit miterLimit&quot;,dashes:&quot;dash dashes dasharray dash-array dashArray&quot;,color:&quot;color colour stroke colors colours stroke-color strokeColor&quot;,fill:&quot;fill fill-color fillColor&quot;,opacity:&quot;alpha opacity&quot;,overlay:&quot;overlay crease overlap intersect&quot;,close:&quot;closed close closed-path closePath&quot;,range:&quot;range dataBox&quot;,viewport:&quot;viewport viewBox&quot;,hole:&quot;holes hole hollow&quot;}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:&quot;linear&quot;,min:&quot;linear&quot;}),colorBuffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;uint8&quot;,data:new Uint8Array}),positionBuffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array}),positionFractBuffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array})},t=a({},m.defaults,t)),null!=t.thickness&amp;&amp;(d.thickness=parseFloat(t.thickness)),null!=t.opacity&amp;&amp;(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&amp;&amp;(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&amp;&amp;(d.overlay=!!t.overlay,f&lt;m.maxLines&amp;&amp;(d.depth=2*(m.maxLines-1-f%m.maxLines)/m.maxLines-1)),null!=t.join&amp;&amp;(d.join=t.join),null!=t.hole&amp;&amp;(d.hole=t.hole),null!=t.fill&amp;&amp;(d.fill=t.fill?n(t.fill,&quot;uint8&quot;):null),null!=t.viewport&amp;&amp;(d.viewport=g(t.viewport)),d.viewport||(d.viewport=g([o.drawingBufferWidth,o.drawingBufferHeight])),null!=t.close&amp;&amp;(d.close=t.close),null===t.positions&amp;&amp;(t.positions=[]),t.positions){var v,y;if(t.positions.x&amp;&amp;t.positions.y){var x=t.positions.x,b=t.positions.y;y=d.count=Math.max(x.length,b.length),v=new Float64Array(2*y);for(var _=0;_&lt;y;_++)v[2*_]=x[_],v[2*_+1]=b[_]}else v=l(t.positions,&quot;float64&quot;),y=d.count=Math.floor(v.length/2);var w=d.bounds=i(v,2);if(d.fill){for(var k=[],M={},A=0,T=0,S=0,E=d.count;T&lt;E;T++){var C=v[2*T],L=v[2*T+1];isNaN(C)||isNaN(L)||null==C||null==L?(C=v[2*A],L=v[2*A+1],M[T]=A):A=T,k[S++]=C,k[S++]=L}for(var z=c(k,d.hole||[]),P=0,O=z.length;P&lt;O;P++)null!=M[z[P]]&amp;&amp;(z[P]=M[z[P]]);d.triangles=z}var I=new Float64Array(v);u(I,2,w);var D=new Float64Array(2*y+6);d.close?v[0]===v[2*y-2]&amp;&amp;v[1]===v[2*y-1]?(D[0]=I[2*y-4],D[1]=I[2*y-3]):(D[0]=I[2*y-2],D[1]=I[2*y-1]):(D[0]=I[0],D[1]=I[1]),D.set(I,2),d.close?v[0]===v[2*y-2]&amp;&amp;v[1]===v[2*y-1]?(D[2*y+2]=I[2],D[2*y+3]=I[3],d.count-=1):(D[2*y+2]=I[0],D[2*y+3]=I[1],D[2*y+4]=I[2],D[2*y+5]=I[3]):(D[2*y+2]=I[2*y-2],D[2*y+3]=I[2*y-1],D[2*y+4]=I[2*y-2],D[2*y+5]=I[2*y-1]),d.positionBuffer(h(D)),d.positionFractBuffer(p(D))}if(t.range?d.range=t.range:d.range||(d.range=d.bounds),(t.range||t.positions)&amp;&amp;d.count){var R=d.bounds,B=R[2]-R[0],F=R[3]-R[1],N=d.range[2]-d.range[0],j=d.range[3]-d.range[1];d.scale=[B/N,F/j],d.translate=[-d.range[0]/N+R[0]/N||0,-d.range[1]/j+R[1]/j||0],d.scaleFract=p(d.scale),d.translateFract=p(d.translate)}if(t.dashes){var V,U=0;if(!t.dashes||t.dashes.length&lt;2)U=1,V=new Uint8Array([255,255,255,255,255,255,255,255]);else{U=0;for(var q=0;q&lt;t.dashes.length;++q)U+=t.dashes[q];V=new Uint8Array(U*m.dashMult);for(var H=0,G=255,W=0;W&lt;2;W++)for(var Y=0;Y&lt;t.dashes.length;++Y){for(var X=0,Z=t.dashes[Y]*m.dashMult*.5;X&lt;Z;++X)V[H++]=G;G^=255}}d.dashLength=U,d.dashTexture({channels:1,data:V,width:V.length,height:1,mag:&quot;linear&quot;,min:&quot;linear&quot;},0,0)}if(t.color){var $=d.count,J=t.color;J||(J=&quot;transparent&quot;);var K=new Uint8Array(4*$+4);if(Array.isArray(J)&amp;&amp;&quot;number&quot;!=typeof J[0]){for(var Q=0;Q&lt;$;Q++){var tt=n(J[Q],&quot;uint8&quot;);K.set(tt,4*Q)}K.set(n(J[0],&quot;uint8&quot;),4*$)}else for(var et=n(J,&quot;uint8&quot;),rt=0;rt&lt;$+1;rt++)K.set(et,4*rt);d.colorBuffer({usage:&quot;dynamic&quot;,type:&quot;uint8&quot;,data:K})}}else e.passes[f]=null}),t.length&lt;this.passes.length){for(var f=t.length;f&lt;this.passes.length;f++){var d=e.passes[f];d&amp;&amp;(d.colorBuffer.destroy(),d.positionBuffer.destroy(),d.dashTexture.destroy())}this.passes.length=t.length}for(var v=[],y=0;y&lt;this.passes.length;y++)null!==e.passes[y]&amp;&amp;v.push(e.passes[y]);return this.passes=v,this}},m.prototype.destroy=function(){return this.passes.forEach(function(t){t.colorBuffer.destroy(),t.positionBuffer.destroy(),t.dashTexture.destroy()}),this.passes.length=0,this}},{&quot;array-bounds&quot;:52,&quot;array-normalize&quot;:53,&quot;color-normalize&quot;:107,earcut:155,&quot;es6-weak-map&quot;:208,&quot;flatten-vertex-data&quot;:215,glslify:390,&quot;object-assign&quot;:434,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445,&quot;to-float32&quot;:512}],472:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./scatter&quot;),i=t(&quot;object-assign&quot;);e.exports=function(t,e){var r=new n(t,e),a=r.render.bind(r);return i(a,{render:a,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),a}},{&quot;./scatter&quot;:473,&quot;object-assign&quot;:434}],473:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-normalize&quot;),i=t(&quot;array-bounds&quot;),a=t(&quot;color-id&quot;),o=t(&quot;point-cluster&quot;),s=t(&quot;object-assign&quot;),l=t(&quot;glslify&quot;),c=t(&quot;pick-by-alias&quot;),u=t(&quot;update-diff&quot;),f=t(&quot;flatten-vertex-data&quot;),h=t(&quot;is-iexplorer&quot;),p=t(&quot;to-float32&quot;),d=t(&quot;parse-rect&quot;);function g(t,e){var r=this;if(!(this instanceof g))return new g(t,e);&quot;function&quot;==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&amp;&amp;e.length&amp;&amp;(e.positions=e);var n,i=(t=e.regl)._gl,a=[];this.tooManyColors=h,n=t.texture({data:new Uint8Array(1020),width:255,height:1,type:&quot;uint8&quot;,format:&quot;rgba&quot;,wrapS:&quot;clamp&quot;,wrapT:&quot;clamp&quot;,mag:&quot;nearest&quot;,min:&quot;nearest&quot;}),s(this,{regl:t,gl:i,groups:[],markerCache:[null],markerTextures:[null],palette:a,paletteIds:{},paletteTexture:n,maxColors:255,maxSize:100,canvas:i.canvas}),this.update(e);var o={uniforms:{pixelRatio:t.context(&quot;pixelRatio&quot;),palette:n,paletteSize:function(t,e){return[r.tooManyColors?0:255,n.height]},scale:t.prop(&quot;scale&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translate:t.prop(&quot;translate&quot;),translateFract:t.prop(&quot;translateFract&quot;),opacity:t.prop(&quot;opacity&quot;),marker:t.prop(&quot;markerTexture&quot;)},attributes:{x:function(t,e){return e.xAttr||{buffer:e.positionBuffer,stride:8,offset:0}},y:function(t,e){return e.yAttr||{buffer:e.positionBuffer,stride:8,offset:4}},xFract:function(t,e){return e.xAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:0}},yFract:function(t,e){return e.yAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:4}},size:function(t,e){return e.size.length?{buffer:e.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*e.size/r.maxSize)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:e.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/r.maxSize)]}},colorId:function(t,e){return e.color.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(4*e.color,4*e.color+4):[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(4*e.borderColor,4*e.borderColor+4):[e.borderColor]}},isActive:function(t,e){return!0===e.activation?{constant:[1]}:e.activation?e.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},scissor:{enable:!0,box:t.prop(&quot;viewport&quot;)},viewport:t.prop(&quot;viewport&quot;),stencil:{enable:!1},depth:{enable:!1},elements:t.prop(&quot;elements&quot;),count:t.prop(&quot;count&quot;),offset:t.prop(&quot;offset&quot;),primitive:&quot;points&quot;},c=s({},o);c.frag=l([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\n\nuniform sampler2D marker;\nuniform float pixelRatio, opacity;\n\nfloat smoothStep(float x, float y) {\n  return 1.0 / (1.0 + exp(50.0*(x - y)));\n}\n\nvoid main() {\n  float dist = texture2D(marker, gl_PointCoord).r, delta = fragWidth;\n\n  // max-distance alpha\n  if (dist &lt; 0.003) discard;\n\n  // null-border case\n  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\n    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\n    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\n  }\n  else {\n    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\n    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\n\n    vec4 color = fragBorderColor;\n    color.a *= borderColorAmt;\n    color = mix(color, fragColor, colorAmt);\n    color.a *= opacity;\n\n    gl_FragColor = color;\n  }\n\n}\n&quot;]),c.vert=l([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\nuniform float pixelRatio;\nuniform sampler2D palette;\n\nconst float maxSize = 100.;\nconst float borderLevel = .5;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragPointSize, fragBorderRadius,\n    fragWidth, fragBorderColorLevel, fragColorLevel;\n\nvec2 paletteCoord(float id) {\n  return vec2(\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\n  );\n}\nvec2 paletteCoord(vec2 id) {\n  return vec2(\n    (id.x + .5) / paletteSize.x,\n    (id.y + .5) / paletteSize.y\n  );\n}\nvec4 getColor(vec4 id) {\n  // zero-palette means we deal with direct buffer\n  if (paletteSize.x == 0.) return id / 255.;\n  return texture2D(palette, paletteCoord(id.xy));\n}\n\nvoid main() {\n  if (isActive == 0.) return;\n\n  vec2 position = vec2(x, y);\n  vec2 positionFract = vec2(xFract, yFract);\n\n  vec4 color = getColor(colorId);\n  vec4 borderColor = getColor(borderColorId);\n\n  float size = size * maxSize / 255.;\n  float borderSize = borderSize * maxSize / 255.;\n\n  gl_PointSize = 2. * size * pixelRatio;\n  fragPointSize = size * pixelRatio;\n\n  vec2 pos = (position + translate) * scale\n      + (positionFract + translateFract) * scale\n      + (position + translate) * scaleFract\n      + (positionFract + translateFract) * scaleFract;\n\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n  fragColor = color;\n  fragBorderColor = borderColor;\n  fragWidth = 1. / gl_PointSize;\n\n  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\n  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\n}\n&quot;]),this.drawMarker=t(c);var u=s({},o);u.frag=l([&quot;precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\n\nuniform float opacity;\nvarying float fragBorderRadius, fragWidth;\n\nfloat smoothStep(float edge0, float edge1, float x) {\n\tfloat t;\n\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n\treturn t * t * (3.0 - 2.0 * t);\n}\n\nvoid main() {\n\tfloat radius, alpha = 1.0, delta = fragWidth;\n\n\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\n\n\tif (radius &gt; 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n&quot;]),u.vert=l([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nvec2 paletteCoord(float id) {\n  return vec2(\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\n  );\n}\nvec2 paletteCoord(vec2 id) {\n  return vec2(\n    (id.x + .5) / paletteSize.x,\n    (id.y + .5) / paletteSize.y\n  );\n}\n\nvec4 getColor(vec4 id) {\n  // zero-palette means we deal with direct buffer\n  if (paletteSize.x == 0.) return id / 255.;\n  return texture2D(palette, paletteCoord(id.xy));\n}\n\nvoid main() {\n  // ignore inactive points\n  if (isActive == 0.) return;\n\n  vec2 position = vec2(x, y);\n  vec2 positionFract = vec2(xFract, yFract);\n\n  vec4 color = getColor(colorId);\n  vec4 borderColor = getColor(borderColorId);\n\n  float size = size * maxSize / 255.;\n  float borderSize = borderSize * maxSize / 255.;\n\n  gl_PointSize = (size + borderSize) * pixelRatio;\n\n  vec2 pos = (position + translate) * scale\n      + (positionFract + translateFract) * scale\n      + (position + translate) * scaleFract\n      + (positionFract + translateFract) * scaleFract;\n\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n  fragColor = color;\n  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n  fragWidth = 1. / gl_PointSize;\n}\n&quot;]),h&amp;&amp;(u.frag=u.frag.replace(&quot;smoothstep&quot;,&quot;smoothStep&quot;),c.frag=c.frag.replace(&quot;smoothstep&quot;,&quot;smoothStep&quot;)),this.drawCircle=t(u)}e.exports=g,g.defaults={color:&quot;black&quot;,borderColor:&quot;transparent&quot;,borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];return e.length&amp;&amp;(t=this).update.apply(t,e),this.draw(),this},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.groups;if(1===e.length&amp;&amp;Array.isArray(e[0])&amp;&amp;(null===e[0][0]||Array.isArray(e[0][0]))&amp;&amp;(e=e[0]),this.regl._refresh(),e.length)for(var i=0;i&lt;e.length;i++)t.drawItem(i,e[i]);else n.forEach(function(e,r){t.drawItem(r)});return this},g.prototype.drawItem=function(t,e){var r=this.groups,n=r[t];if(&quot;number&quot;==typeof e&amp;&amp;(t=e,n=r[e],e=null),n&amp;&amp;n.count&amp;&amp;n.opacity){n.activation[0]&amp;&amp;this.drawCircle(this.getMarkerDrawOptions(0,n,e));for(var i=[],a=1;a&lt;n.activation.length;a++)n.activation[a]&amp;&amp;(!0===n.activation[a]||n.activation[a].data.length)&amp;&amp;i.push.apply(i,this.getMarkerDrawOptions(a,n,e));i.length&amp;&amp;this.drawMarker(i)}},g.prototype.getMarkerDrawOptions=function(t,e,r){var n=e.range,i=e.tree,a=e.viewport,o=e.activation,l=e.selectionBuffer,c=e.count;this.regl;if(!i)return r?[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],count:r.length,elements:r,offset:0})]:[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],offset:0})];var u=[],f=i.range(n,{lod:!0,px:[(n[2]-n[0])/a.width,(n[3]-n[1])/a.height]});if(r){for(var h=o[t].data,p=new Uint8Array(c),d=0;d&lt;r.length;d++){var g=r[d];p[g]=h?h[g]:1}l.subdata(p)}for(var m=f.length;m--;){var v=f[m],y=v[0],x=v[1];u.push(s({},e,{markerTexture:this.markerTextures[t],activation:r?l:o[t],offset:y,count:x-y}))}return u},g.prototype.update=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){1===e.length&amp;&amp;Array.isArray(e[0])&amp;&amp;(e=e[0]);var n=this.groups,a=this.gl,l=this.regl,h=this.maxSize,m=this.maxColors,v=this.palette;this.groups=n=e.map(function(e,r){var y=n[r];if(void 0===e)return y;null===e?e={positions:null}:&quot;function&quot;==typeof e?e={ondraw:e}:&quot;number&quot;==typeof e[0]&amp;&amp;(e={positions:e}),null===(e=c(e,{positions:&quot;positions data points&quot;,snap:&quot;snap cluster lod tree&quot;,size:&quot;sizes size radius&quot;,borderSize:&quot;borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline&quot;,color:&quot;colors color fill fill-color fillColor&quot;,borderColor:&quot;borderColors borderColor stroke stroke-color strokeColor&quot;,marker:&quot;markers marker shape&quot;,range:&quot;range dataBox databox&quot;,viewport:&quot;viewport viewPort viewBox viewbox&quot;,opacity:&quot;opacity alpha transparency&quot;,bounds:&quot;bound bounds boundaries limits&quot;})).positions&amp;&amp;(e.positions=[]),y||(n[r]=y={id:r,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;stream&quot;,type:&quot;uint8&quot;}),sizeBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;uint8&quot;}),colorBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;uint8&quot;}),positionBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;float&quot;}),positionFractBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;float&quot;})},e=s({},g.defaults,e)),!e.positions||&quot;marker&quot;in e||(e.marker=y.marker,delete y.marker),!e.marker||&quot;positions&quot;in e||(e.positions=y.positions,delete y.positions);var x=0,b=0;if(u(y,e,[{snap:!0,size:function(t,e){return null==t&amp;&amp;(t=g.defaults.size),x+=t&amp;&amp;t.length?1:0,t},borderSize:function(t,e){return null==t&amp;&amp;(t=g.defaults.borderSize),x+=t&amp;&amp;t.length?1:0,t},opacity:parseFloat,color:function(e,r){return null==e&amp;&amp;(e=g.defaults.color),e=t.updateColor(e),b++,e},borderColor:function(e,r){return null==e&amp;&amp;(e=g.defaults.borderColor),e=t.updateColor(e),b++,e},bounds:function(t,e,r){return&quot;range&quot;in r||(r.range=null),t},positions:function(t,e,r){var n=e.snap,a=e.positionBuffer,s=e.positionFractBuffer,c=e.selectionBuffer;if(t.x||t.y)return t.x.length?e.xAttr={buffer:l.buffer(t.x),offset:0,stride:4,count:t.x.length}:e.xAttr={buffer:t.x.buffer,offset:4*t.x.offset||0,stride:4*(t.x.stride||1),count:t.x.count},t.y.length?e.yAttr={buffer:l.buffer(t.y),offset:0,stride:4,count:t.y.length}:e.yAttr={buffer:t.y.buffer,offset:4*t.y.offset||0,stride:4*(t.y.stride||1),count:t.y.count},e.count=Math.max(e.xAttr.count,e.yAttr.count),t;t=f(t,&quot;float64&quot;);var u=e.count=Math.floor(t.length/2),h=e.bounds=u?i(t,2):null;if(r.range||e.range||(delete e.range,r.range=h),r.marker||e.marker||(delete e.marker,r.marker=null),n&amp;&amp;(!0===n||u&gt;n)?e.tree=o(t,{bounds:h}):n&amp;&amp;n.length&amp;&amp;(e.tree=n),e.tree){var d={primitive:&quot;points&quot;,usage:&quot;static&quot;,data:e.tree,type:&quot;uint32&quot;};e.elements?e.elements(d):e.elements=l.elements(d)}return a({data:p.float(t),usage:&quot;dynamic&quot;}),s({data:p.fract(t),usage:&quot;dynamic&quot;}),c({data:new Uint8Array(u),type:&quot;uint8&quot;,usage:&quot;stream&quot;}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach(function(t){return t&amp;&amp;t.destroy&amp;&amp;t.destroy()}),i.length=0,e&amp;&amp;&quot;number&quot;!=typeof e[0]){for(var a=[],o=0,s=Math.min(e.length,r.count);o&lt;s;o++){var c=t.addMarker(e[o]);a[c]||(a[c]=new Uint8Array(r.count)),a[c][o]=1}for(var u=0;u&lt;a.length;u++)if(a[u]){var f={data:a[u],type:&quot;uint8&quot;,usage:&quot;static&quot;};i[u]?i[u](f):i[u]=l.buffer(f),i[u].data=a[u]}}else{i[t.addMarker(e)]=!0}return e},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=p.fract(e.scale),e.translateFract=p.fract(e.translate),t},viewport:function(t){return d(t||[a.drawingBufferWidth,a.drawingBufferHeight])}}]),x){var _=y.count,w=y.size,k=y.borderSize,M=y.sizeBuffer,A=new Uint8Array(2*_);if(w.length||k.length)for(var T=0;T&lt;_;T++)A[2*T]=Math.round(255*(null==w[T]?w:w[T])/h),A[2*T+1]=Math.round(255*(null==k[T]?k:k[T])/h);M({data:A,usage:&quot;dynamic&quot;})}if(b){var S,E=y.count,C=y.color,L=y.borderColor,z=y.colorBuffer;if(t.tooManyColors){if(C.length||L.length){S=new Uint8Array(8*E);for(var P=0;P&lt;E;P++){var O=C[P];S[8*P]=v[4*O],S[8*P+1]=v[4*O+1],S[8*P+2]=v[4*O+2],S[8*P+3]=v[4*O+3];var I=L[P];S[8*P+4]=v[4*I],S[8*P+5]=v[4*I+1],S[8*P+6]=v[4*I+2],S[8*P+7]=v[4*I+3]}}}else if(C.length||L.length){S=new Uint8Array(4*E+2);for(var D=0;D&lt;E;D++)null!=C[D]&amp;&amp;(S[4*D]=C[D]%m,S[4*D+1]=Math.floor(C[D]/m)),null!=L[D]&amp;&amp;(S[4*D+2]=L[D]%m,S[4*D+3]=Math.floor(L[D]/m))}z({data:S||new Uint8Array(0),type:&quot;uint8&quot;,usage:&quot;dynamic&quot;})}return y})}},g.prototype.addMarker=function(t){var e,r=this.markerTextures,n=this.regl,i=this.markerCache,a=null==t?0:i.indexOf(t);if(a&gt;=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o&lt;s;o++)e[o]=255*t[o]}var l=Math.floor(Math.sqrt(e.length));return a=r.length,i.push(t),r.push(n.texture({channels:1,data:e,radius:l,mag:&quot;linear&quot;,min:&quot;linear&quot;})),a},g.prototype.updateColor=function(t){var e=this.paletteIds,r=this.palette,i=this.maxColors;Array.isArray(t)||(t=[t]);var o=[];if(&quot;number&quot;==typeof t[0]){var s=[];if(Array.isArray(t))for(var l=0;l&lt;t.length;l+=4)s.push(t.slice(l,l+4));else for(var c=0;c&lt;t.length;c+=4)s.push(t.subarray(c,c+4));t=s}for(var u=0;u&lt;t.length;u++){var f=t[u];f=n(f,&quot;uint8&quot;);var h=a(f,!1);if(null==e[h]){var p=r.length;e[h]=Math.floor(p/4),r[p]=f[0],r[p+1]=f[1],r[p+2]=f[2],r[p+3]=f[3]}o[u]=e[h]}return!this.tooManyColors&amp;&amp;r.length&gt;i*i*4&amp;&amp;(this.tooManyColors=!0),this.updatePalette(r),1===o.length?o[0]:o},g.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n&gt;1)for(var i=.25*(t=t.slice()).length%e;i&lt;n*e;i++)t.push(0,0,0,0);r.height&lt;n&amp;&amp;r.resize(e,n),r.subimage({width:Math.min(.25*t.length,e),height:n,data:t},0,0)}},g.prototype.destroy=function(){return this.groups.forEach(function(t){t.sizeBuffer.destroy(),t.positionBuffer.destroy(),t.positionFractBuffer.destroy(),t.colorBuffer.destroy(),t.activation.forEach(function(t){return t&amp;&amp;t.destroy&amp;&amp;t.destroy()}),t.selectionBuffer.destroy(),t.elements&amp;&amp;t.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(t){return t&amp;&amp;t.destroy&amp;&amp;t.destroy()}),this}},{&quot;array-bounds&quot;:52,&quot;color-id&quot;:105,&quot;color-normalize&quot;:107,&quot;flatten-vertex-data&quot;:215,glslify:390,&quot;is-iexplorer&quot;:400,&quot;object-assign&quot;:434,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445,&quot;point-cluster&quot;:449,&quot;to-float32&quot;:512,&quot;update-diff&quot;:523}],474:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;regl-scatter2d/scatter&quot;),i=t(&quot;pick-by-alias&quot;),a=t(&quot;array-bounds&quot;),o=t(&quot;raf&quot;),s=t(&quot;array-range&quot;),l=t(&quot;parse-rect&quot;),c=t(&quot;flatten-vertex-data&quot;);function u(t,e){if(!(this instanceof u))return new u(t,e);this.traces=[],this.passes={},this.regl=t,this.scatter=n(t),this.canvas=this.scatter.canvas}function f(t,e,r){return(null!=t.id?t.id:t)&lt;&lt;16|(255&amp;e)&lt;&lt;8|255&amp;r}function h(t,e,r){var n,i,a,o,s=t[e],l=t[r];return s.length&gt;2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x+s.width,i=s.y+s.height),l.length&gt;2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,n,o,i]}function p(t){if(&quot;number&quot;==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}e.exports=u,u.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&amp;&amp;(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&amp;&amp;(this.planned=o(function(){e.draw(),e.dirty=!0,e.planned=null})):(this.draw(),this.dirty=!0,o(function(){e.dirty=!1})),this)},u.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;n&lt;e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);for(var i=[],a=0,o=0;o&lt;this.traces.length;o++){for(var s=this.traces[o],l=this.traces[o].passes,c=0;c&lt;l.length;c++)i.push(this.passes[l[c]]);s.passOffset=a,a+=s.passes.length}return(t=this.scatter).update.apply(t,i),this}},u.prototype.updateItem=function(t,e){var r=this.regl;if(null===e)return this.traces[t]=null,this;if(!e)return this;var n,o=i(e,{data:&quot;data items columns rows values dimensions samples x&quot;,snap:&quot;snap cluster&quot;,size:&quot;sizes size radius&quot;,color:&quot;colors color fill fill-color fillColor&quot;,opacity:&quot;opacity alpha transparency opaque&quot;,borderSize:&quot;borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline&quot;,borderColor:&quot;borderColors borderColor bordercolor stroke stroke-color strokeColor&quot;,marker:&quot;markers marker shape&quot;,range:&quot;range ranges databox dataBox&quot;,viewport:&quot;viewport viewBox viewbox&quot;,domain:&quot;domain domains area areas&quot;,padding:&quot;pad padding paddings pads margin margins&quot;,transpose:&quot;transpose transposed&quot;,diagonal:&quot;diagonal diag showDiagonal&quot;,upper:&quot;upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf&quot;,lower:&quot;lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower&quot;}),s=this.traces[t]||(this.traces[t]={id:t,buffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array}),color:&quot;black&quot;,marker:null,size:12,borderColor:&quot;transparent&quot;,borderSize:1,viewport:l([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=o.color&amp;&amp;(s.color=o.color),null!=o.size&amp;&amp;(s.size=o.size),null!=o.marker&amp;&amp;(s.marker=o.marker),null!=o.borderColor&amp;&amp;(s.borderColor=o.borderColor),null!=o.borderSize&amp;&amp;(s.borderSize=o.borderSize),null!=o.opacity&amp;&amp;(s.opacity=o.opacity),o.viewport&amp;&amp;(s.viewport=l(o.viewport)),null!=o.diagonal&amp;&amp;(s.diagonal=o.diagonal),null!=o.upper&amp;&amp;(s.upper=o.upper),null!=o.lower&amp;&amp;(s.lower=o.lower),o.data){s.buffer(c(o.data)),s.columns=o.data.length,s.count=o.data[0].length,s.bounds=[];for(var u=0;u&lt;s.columns;u++)s.bounds[u]=a(o.data[u],1)}o.range&amp;&amp;(s.range=o.range,n=s.range&amp;&amp;&quot;number&quot;!=typeof s.range[0]),o.domain&amp;&amp;(s.domain=o.domain);var d=!1;null!=o.padding&amp;&amp;(Array.isArray(o.padding)&amp;&amp;o.padding.length===s.columns&amp;&amp;&quot;number&quot;==typeof o.padding[o.padding.length-1]?(s.padding=o.padding.map(p),d=!0):s.padding=p(o.padding));var g=s.columns,m=s.count,v=s.viewport.width,y=s.viewport.height,x=s.viewport.x,b=s.viewport.y,_=v/g,w=y/g;s.passes=[];for(var k=0;k&lt;g;k++)for(var M=0;M&lt;g;M++)if((s.diagonal||M!==k)&amp;&amp;(s.upper||!(k&gt;M))&amp;&amp;(s.lower||!(k&lt;M))){var A=f(s.id,k,M),T=this.passes[A]||(this.passes[A]={});if(o.data&amp;&amp;(o.transpose?T.positions={x:{buffer:s.buffer,offset:M,count:m,stride:g},y:{buffer:s.buffer,offset:k,count:m,stride:g}}:T.positions={x:{buffer:s.buffer,offset:M*m,count:m},y:{buffer:s.buffer,offset:k*m,count:m}},T.bounds=h(s.bounds,k,M)),o.domain||o.viewport||o.data){var S=d?h(s.padding,k,M):s.padding;if(s.domain){var E=h(s.domain,k,M),C=E[0],L=E[1],z=E[2],P=E[3];T.viewport=[x+C*v+S[0],b+L*y+S[1],x+z*v-S[2],b+P*y-S[3]]}else T.viewport=[x+M*_+_*S[0],b+k*w+w*S[1],x+(M+1)*_-_*S[2],b+(k+1)*w-w*S[3]]}o.color&amp;&amp;(T.color=s.color),o.size&amp;&amp;(T.size=s.size),o.marker&amp;&amp;(T.marker=s.marker),o.borderSize&amp;&amp;(T.borderSize=s.borderSize),o.borderColor&amp;&amp;(T.borderColor=s.borderColor),o.opacity&amp;&amp;(T.opacity=s.opacity),o.range&amp;&amp;(T.range=n?h(s.range,k,M):s.range||T.bounds),s.passes.push(A)}return this},u.prototype.draw=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=[],i=0;i&lt;e.length;i++)if(&quot;number&quot;==typeof e[i]){var a=this.traces[e[i]],o=a.passes,l=a.passOffset;n.push.apply(n,s(l,l+o.length))}else if(e[i].length){var c=e[i],u=this.traces[i],f=u.passes,h=u.passOffset;f=f.map(function(t,e){n[h+e]=c})}(t=this.scatter).draw.apply(t,n)}else this.scatter.draw();return this},u.prototype.destroy=function(){return this.traces.forEach(function(t){t.buffer&amp;&amp;t.buffer.destroy&amp;&amp;t.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{&quot;array-bounds&quot;:52,&quot;array-range&quot;:54,&quot;flatten-vertex-data&quot;:215,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445,raf:464,&quot;regl-scatter2d/scatter&quot;:473}],475:[function(t,e,r){var n,i;n=this,i=function(){function t(t,e){this.id=V++,this.type=t,this.data=e}function e(t){return&quot;[&quot;+function t(e){if(0===e.length)return[];var r=e.charAt(0),n=e.charAt(e.length-1);if(1&lt;e.length&amp;&amp;r===n&amp;&amp;('&quot;'===r||&quot;'&quot;===r))return['&quot;'+e.substr(1,e.length-2).replace(/\\/g,&quot;\\\\&quot;).replace(/&quot;/g,'\\&quot;')+'&quot;'];if(r=/\[(false|true|null|\d+|'[^']*'|&quot;[^&quot;]*&quot;)\]/.exec(e))return t(e.substr(0,r.index)).concat(t(r[1])).concat(t(e.substr(r.index+r[0].length)));if(1===(r=e.split(&quot;.&quot;)).length)return['&quot;'+e.replace(/\\/g,&quot;\\\\&quot;).replace(/&quot;/g,'\\&quot;')+'&quot;'];for(e=[],n=0;n&lt;r.length;++n)e=e.concat(t(r[n]));return e}(t).join(&quot;][&quot;)+&quot;]&quot;}function r(t){return&quot;string&quot;==typeof t?t.split():t}function n(t){return&quot;string&quot;==typeof t?document.querySelector(t):t}function i(t){var e,i,a,o,s=t||{};t={};var l=[],c=[],u=&quot;undefined&quot;==typeof window?1:window.devicePixelRatio,f=!1,h=function(t){},p=function(){};if(&quot;string&quot;==typeof s?e=document.querySelector(s):&quot;object&quot;==typeof s&amp;&amp;(&quot;string&quot;==typeof s.nodeName&amp;&amp;&quot;function&quot;==typeof s.appendChild&amp;&amp;&quot;function&quot;==typeof s.getBoundingClientRect?e=s:&quot;function&quot;==typeof s.drawArrays||&quot;function&quot;==typeof s.drawElements?a=(o=s).canvas:(&quot;gl&quot;in s?o=s.gl:&quot;canvas&quot;in s?a=n(s.canvas):&quot;container&quot;in s&amp;&amp;(i=n(s.container)),&quot;attributes&quot;in s&amp;&amp;(t=s.attributes),&quot;extensions&quot;in s&amp;&amp;(l=r(s.extensions)),&quot;optionalExtensions&quot;in s&amp;&amp;(c=r(s.optionalExtensions)),&quot;onDone&quot;in s&amp;&amp;(h=s.onDone),&quot;profile&quot;in s&amp;&amp;(f=!!s.profile),&quot;pixelRatio&quot;in s&amp;&amp;(u=+s.pixelRatio))),e&amp;&amp;(&quot;canvas&quot;===e.nodeName.toLowerCase()?a=e:i=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&amp;&amp;(e=(n=t.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),i.width=r*e,i.height=r*n,j(i.style,{width:e+&quot;px&quot;,height:n+&quot;px&quot;})}var i=document.createElement(&quot;canvas&quot;);return j(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&amp;&amp;(i.style.position=&quot;absolute&quot;,j(t.style,{margin:0,padding:0})),window.addEventListener(&quot;resize&quot;,n,!1),n(),{canvas:i,onDestroy:function(){window.removeEventListener(&quot;resize&quot;,n),t.removeChild(i)}}}(i||document.body,0,u)))return null;a=e.canvas,p=e.onDestroy}o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r(&quot;webgl&quot;)||r(&quot;experimental-webgl&quot;)||r(&quot;webgl-experimental&quot;)}(a,t)}return o?{gl:o,canvas:a,container:i,extensions:l,optionalExtensions:c,pixelRatio:u,profile:f,onDone:h,onDestroy:p}:(p(),h(&quot;webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org&quot;),null)}function a(t,e){for(var r=Array(t),n=0;n&lt;t;++n)r[n]=e(n);return r}function o(t){var e,r;return e=(65535&lt;t)&lt;&lt;4,e|=r=(255&lt;(t&gt;&gt;&gt;=e))&lt;&lt;3,(e|=r=(15&lt;(t&gt;&gt;&gt;=r))&lt;&lt;2)|(r=(3&lt;(t&gt;&gt;&gt;=r))&lt;&lt;1)|t&gt;&gt;&gt;r&gt;&gt;1}function s(){function t(t){t:{for(var e=16;268435456&gt;=e;e*=16)if(t&lt;=e){t=e;break t}t=0}return 0&lt;(e=r[o(t)&gt;&gt;2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[o(t.byteLength)&gt;&gt;2].push(t)}var r=a(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function l(t){return!!t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;Array.isArray(t.shape)&amp;&amp;Array.isArray(t.stride)&amp;&amp;&quot;number&quot;==typeof t.offset&amp;&amp;t.shape.length===t.stride.length&amp;&amp;(Array.isArray(t.data)||Y(t.data))}function c(t,e,r,n,i,a){for(var o=0;o&lt;e;++o)for(var s=t[o],l=0;l&lt;r;++l)for(var c=s[l],u=0;u&lt;n;++u)i[a++]=c[u]}function u(t){return 0|$[Object.prototype.toString.call(t)]}function f(t,e){for(var r=0;r&lt;e.length;++r)t[r]=e[r]}function h(t,e,r,n,i,a,o){for(var s=0,l=0;l&lt;r;++l)for(var c=0;c&lt;n;++c)t[s++]=e[i*l+a*c+o]}function p(t,e,r,n){function i(e){this.id=c++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&amp;&amp;(this.stats={size:0})}function a(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function o(t,e,r,n,i,o){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0&lt;e.length)if(Array.isArray(e[0])){i=tt(e);for(var s=n=1;s&lt;i.length;++s)n*=i[s];t.dimension=n,a(t,e=Q(e,i,t.dtype),r),o?t.persistentData=e:G.freeType(e)}else&quot;number&quot;==typeof e[0]?(t.dimension=i,f(i=G.allocType(t.dtype,e.length),e),a(t,i,r),o?t.persistentData=i:G.freeType(i)):Y(e[0])&amp;&amp;(t.dimension=e[0].length,t.dtype=n||u(e[0])||5126,a(t,e=Q(e,[e.length,e[0].length],t.dtype),r),o?t.persistentData=e:G.freeType(e))}else if(Y(e))t.dtype=n||u(e),t.dimension=i,a(t,e,r),o&amp;&amp;(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(l(e)){i=e.shape;var c=e.stride,p=(s=e.offset,0),d=0,g=0,m=0;1===i.length?(p=i[0],d=1,g=c[0],m=0):2===i.length&amp;&amp;(p=i[0],d=i[1],g=c[0],m=c[1]),t.dtype=n||u(e.data)||5126,t.dimension=d,h(i=G.allocType(t.dtype,p*d),e.data,p,d,g,m,s),a(t,i,r),o?t.persistentData=i:G.freeType(i)}}function s(r){e.bufferCount--;for(var i=0;i&lt;n.state.length;++i){var a=n.state[i];a.buffer===r&amp;&amp;(t.disableVertexAttribArray(i),a.buffer=null)}t.deleteBuffer(r.buffer),r.buffer=null,delete p[r.id]}var c=0,p={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var d=[];return r.profile&amp;&amp;(e.getTotalBufferSize=function(){var t=0;return Object.keys(p).forEach(function(e){t+=p[e].stats.size}),t}),{create:function(n,a,c,d){function g(e){var n=35044,i=null,a=0,s=0,c=1;return Array.isArray(e)||Y(e)||l(e)?i=e:&quot;number&quot;==typeof e?a=0|e:e&amp;&amp;(&quot;data&quot;in e&amp;&amp;(i=e.data),&quot;usage&quot;in e&amp;&amp;(n=K[e.usage]),&quot;type&quot;in e&amp;&amp;(s=J[e.type]),&quot;dimension&quot;in e&amp;&amp;(c=0|e.dimension),&quot;length&quot;in e&amp;&amp;(a=0|e.length)),m.bind(),i?o(m,i,n,s,c,d):(a&amp;&amp;t.bufferData(m.type,a,n),m.dtype=s||5121,m.usage=n,m.dimension=c,m.byteLength=a),r.profile&amp;&amp;(m.stats.size=m.byteLength*et[m.dtype]),g}e.bufferCount++;var m=new i(a);return p[m.id]=m,c||g(n),g._reglType=&quot;buffer&quot;,g._buffer=m,g.subdata=function(e,r){var n,i=0|(r||0);if(m.bind(),Y(e))t.bufferSubData(m.type,i,e);else if(Array.isArray(e)){if(0&lt;e.length)if(&quot;number&quot;==typeof e[0]){var a=G.allocType(m.dtype,e.length);f(a,e),t.bufferSubData(m.type,i,a),G.freeType(a)}else(Array.isArray(e[0])||Y(e[0]))&amp;&amp;(n=tt(e),a=Q(e,n,m.dtype),t.bufferSubData(m.type,i,a),G.freeType(a))}else if(l(e)){n=e.shape;var o=e.stride,s=a=0,c=0,p=0;1===n.length?(a=n[0],s=1,c=o[0],p=0):2===n.length&amp;&amp;(a=n[0],s=n[1],c=o[0],p=o[1]),n=Array.isArray(e.data)?m.dtype:u(e.data),h(n=G.allocType(n,a*s),e.data,a,s,c,p,e.offset),t.bufferSubData(m.type,i,n),G.freeType(n)}return g},r.profile&amp;&amp;(g.stats=m.stats),g.destroy=function(){s(m)},g},createStream:function(t,e){var r=d.pop();return r||(r=new i(t)),r.bind(),o(r,e,35040,0,1,!1),r},destroyStream:function(t){d.push(t)},clear:function(){X(p).forEach(s),d.forEach(s)},getBuffer:function(t){return t&amp;&amp;t._buffer instanceof i?t._buffer:null},restore:function(){X(p).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:o}}function d(t,e,r,n){function i(t){this.id=c++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,o,s,c,u){if(n.buffer.bind(),i){var f=u;u||Y(i)&amp;&amp;(!l(i)||Y(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)}else t.bufferData(34963,c,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=c;if(f=u,!u){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0&gt;(i=s)&amp;&amp;(i=n.buffer.byteLength,5123===f?i&gt;&gt;=1:5125===f&amp;&amp;(i&gt;&gt;=2)),n.vertCount=i,i=o,0&gt;o&amp;&amp;(i=4,1===(o=n.buffer.dimension)&amp;&amp;(i=0),2===o&amp;&amp;(i=1),3===o&amp;&amp;(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&amp;&amp;(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if(&quot;number&quot;==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||Y(t)||l(t)?e=t:(&quot;data&quot;in t&amp;&amp;(e=t.data),&quot;usage&quot;in t&amp;&amp;(r=K[t.usage]),&quot;primitive&quot;in t&amp;&amp;(n=rt[t.primitive]),&quot;count&quot;in t&amp;&amp;(i=0|t.count),&quot;type&quot;in t&amp;&amp;(h=u[t.type]),&quot;length&quot;in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&amp;&amp;5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return s}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,s(t),s._reglType=&quot;elements&quot;,s._elements=f,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return&quot;function&quot;==typeof t&amp;&amp;t._elements instanceof i?t._elements:null},clear:function(){X(s).forEach(o)}}}function g(t){for(var e=G.allocType(5123,t.length),r=0;r&lt;t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{nt[0]=t[r];var n=(a=it[0])&gt;&gt;&gt;31&lt;&lt;15,i=(a&lt;&lt;1&gt;&gt;&gt;24)-127,a=a&gt;&gt;13&amp;1023;e[r]=-24&gt;i?n:-14&gt;i?n+(a+1024&gt;&gt;-14-i):15&lt;i?n+31744:n+(i+15&lt;&lt;10)+a}return e}function m(t){return Array.isArray(t)||Y(t)}function v(t){return&quot;[object &quot;+t+&quot;]&quot;}function y(t){return Array.isArray(t)&amp;&amp;(0===t.length||&quot;number&quot;==typeof t[0])}function x(t){return!(!Array.isArray(t)||0===t.length||!m(t[0]))}function b(t){return Object.prototype.toString.call(t)}function _(t){if(!t)return!1;var e=b(t);return 0&lt;=pt.indexOf(e)||(y(t)||x(t)||l(t))}function w(t,e){36193===t.type?(t.data=g(e),G.freeType(e)):t.data=e}function k(t,e,r,n,i,a){if(t=&quot;undefined&quot;!=typeof gt[t]?gt[t]:st[t]*dt[e],a&amp;&amp;(t*=6),i){for(n=0;1&lt;=r;)n+=t*r*r,r/=2;return n}return t*r*n}function M(t,e,r,n,i,a,o){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,e){if(&quot;object&quot;==typeof e&amp;&amp;e){&quot;premultiplyAlpha&quot;in e&amp;&amp;(t.premultiplyAlpha=e.premultiplyAlpha),&quot;flipY&quot;in e&amp;&amp;(t.flipY=e.flipY),&quot;alignment&quot;in e&amp;&amp;(t.unpackAlignment=e.alignment),&quot;colorSpace&quot;in e&amp;&amp;(t.colorSpace=q[e.colorSpace]),&quot;type&quot;in e&amp;&amp;(t.type=H[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;&quot;shape&quot;in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&amp;&amp;(i=e.shape[2],a=!0)):(&quot;radius&quot;in e&amp;&amp;(r=n=e.radius),&quot;width&quot;in e&amp;&amp;(r=e.width),&quot;height&quot;in e&amp;&amp;(n=e.height),&quot;channels&quot;in e&amp;&amp;(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,&quot;format&quot;in e&amp;&amp;(r=e.format,n=t.internalformat=W[r],t.format=pt[n],r in H&amp;&amp;!(&quot;type&quot;in e)&amp;&amp;(t.type=H[r]),r in J&amp;&amp;(t.compressed=!0),r=!0),!a&amp;&amp;r?t.channels=st[t.format]:a&amp;&amp;!r&amp;&amp;t.channels!==ot[t.format]&amp;&amp;(t.format=t.internalformat=ot[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function p(t,e){var r=null;if(_(e)?r=e:e&amp;&amp;(u(t,e),&quot;x&quot;in e&amp;&amp;(t.xOffset=0|e.x),&quot;y&quot;in e&amp;&amp;(t.yOffset=0|e.y),_(e.data)&amp;&amp;(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if(Y(r))t.channels=t.channels||4,t.data=r,&quot;type&quot;in e||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(r)]);else if(y(r)){switch(t.channels=t.channels||4,a=(n=r).length,t.type){case 5121:case 5123:case 5125:case 5126:(a=G.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=g(n)}t.alignment=1,t.needsFree=!0}else if(l(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(n)]);a=r.shape;var o,s,c,f,h=r.stride;3===a.length?(c=a[2],f=h[2]):f=c=1,o=a[0],s=a[1],a=h[0],h=h[1],t.alignment=1,t.width=o,t.height=s,t.channels=c,t.format=t.internalformat=ot[c],t.needsFree=!0,o=f,r=r.offset,c=t.width,f=t.height,s=t.channels;for(var p=G.allocType(36193===t.type?5126:t.type,c*f*s),d=0,v=0;v&lt;f;++v)for(var k=0;k&lt;c;++k)for(var M=0;M&lt;s;++M)p[d++]=n[a*k+h*v+o*M+r];w(t,p)}else if(b(r)===lt||b(r)===ct)b(r)===lt?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(b(r)===ut)t.element=r,t.width=r.width,t.height=r.height,t.channels=4;else if(b(r)===ft)t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(b(r)===ht)t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(x(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=m(r[0][0])?h||r[0][0].length:h||1,o=Z.shape(r),c=1,f=0;f&lt;o.length;++f)c*=o[f];c=G.allocType(36193===t.type?5126:t.type,c),Z.flatten(r,o,&quot;&quot;,c),w(t,c),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=ot[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function d(e,r,i,a,o){var s=e.element,l=e.data,c=e.internalformat,u=e.format,h=e.type,p=e.width,d=e.height;f(e),s?t.texSubImage2D(r,o,i,a,u,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,c,p,d,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,p,d)):t.texSubImage2D(r,o,i,a,p,d,u,h,l)}function v(){return dt.pop()||new h}function M(t){t.needsFree&amp;&amp;G.freeType(t.data),h.call(t),dt.push(t)}function A(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function T(t,e,r){var n=t.images[0]=v();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function S(t,e){var r=null;if(_(e))c(r=t.images[0]=v(),t),p(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i&lt;n.length;++i)c(r=t.images[i]=v(),t),r.width&gt;&gt;=i,r.height&gt;&gt;=i,p(r,n[i]),t.mipmask|=1&lt;&lt;i;else c(r=t.images[0]=v(),t),p(r,e),t.mipmask=1;c(t,t.images[0])}function E(e,r){for(var i=e.images,a=0;a&lt;i.length&amp;&amp;i[a];++a){var o=i[a],s=r,l=a,c=o.element,u=o.data,h=o.internalformat,p=o.format,d=o.type,g=o.width,m=o.height,v=o.channels;f(o),c?t.texImage2D(s,l,p,p,d,c):o.compressed?t.compressedTexImage2D(s,l,h,g,m,0,u):o.needsCopy?(n(),t.copyTexImage2D(s,l,p,o.xOffset,o.yOffset,g,m,0)):((o=!u)&amp;&amp;(u=G.zero.allocType(d,g*m*v)),t.texImage2D(s,l,p,g,m,0,p,d,u),o&amp;&amp;u&amp;&amp;G.zero.freeType(u))}}function C(){var t=gt.pop()||new A;s.call(t);for(var e=t.mipmask=0;16&gt;e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;r&lt;e.length;++r)e[r]&amp;&amp;M(e[r]),e[r]=null;gt.push(t)}function z(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function P(t,e){&quot;min&quot;in e&amp;&amp;(t.minFilter=U[e.min],0&lt;=at.indexOf(t.minFilter)&amp;&amp;!(&quot;faces&quot;in e)&amp;&amp;(t.genMipmaps=!0)),&quot;mag&quot;in e&amp;&amp;(t.magFilter=V[e.mag]);var r=t.wrapS,n=t.wrapT;if(&quot;wrap&quot;in e){var i=e.wrap;&quot;string&quot;==typeof i?r=n=N[i]:Array.isArray(i)&amp;&amp;(r=N[i[0]],n=N[i[1]])}else&quot;wrapS&quot;in e&amp;&amp;(r=N[e.wrapS]),&quot;wrapT&quot;in e&amp;&amp;(n=N[e.wrapT]);if(t.wrapS=r,t.wrapT=n,&quot;anisotropic&quot;in e&amp;&amp;(t.anisotropic=e.anisotropic),&quot;mipmap&quot;in e){switch(r=!1,typeof e.mipmap){case&quot;string&quot;:t.mipmapHint=F[e.mipmap],r=t.genMipmaps=!0;break;case&quot;boolean&quot;:r=t.genMipmaps=e.mipmap;break;case&quot;object&quot;:t.genMipmaps=!1,r=!0}!r||&quot;min&quot;in e||(t.minFilter=9984)}}function O(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&amp;&amp;t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&amp;&amp;(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function I(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=mt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new z,o.profile&amp;&amp;(this.stats={size:0})}function D(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function R(){var e=xt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function B(e){var r=e.texture,n=e.unit,i=e.target;0&lt;=n&amp;&amp;(t.activeTexture(33984+n),t.bindTexture(i,null),xt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete vt[e.id],a.textureCount--}var F={&quot;don't care&quot;:4352,&quot;dont care&quot;:4352,nice:4354,fast:4353},N={repeat:10497,clamp:33071,mirror:33648},V={nearest:9728,linear:9729},U=j({mipmap:9987,&quot;nearest mipmap nearest&quot;:9984,&quot;linear mipmap nearest&quot;:9985,&quot;nearest mipmap linear&quot;:9986,&quot;linear mipmap linear&quot;:9987},V),q={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,&quot;rgb5 a1&quot;:32820},W={alpha:6406,luminance:6409,&quot;luminance alpha&quot;:6410,rgb:6407,rgba:6408,rgba4:32854,&quot;rgb5 a1&quot;:32855,rgb565:36194},J={};e.ext_srgb&amp;&amp;(W.srgb=35904,W.srgba=35906),e.oes_texture_float&amp;&amp;(H.float32=H.float=5126),e.oes_texture_half_float&amp;&amp;(H.float16=H[&quot;half float&quot;]=36193),e.webgl_depth_texture&amp;&amp;(j(W,{depth:6402,&quot;depth stencil&quot;:34041}),j(H,{uint16:5123,uint32:5125,&quot;depth stencil&quot;:34042})),e.webgl_compressed_texture_s3tc&amp;&amp;j(J,{&quot;rgb s3tc dxt1&quot;:33776,&quot;rgba s3tc dxt1&quot;:33777,&quot;rgba s3tc dxt3&quot;:33778,&quot;rgba s3tc dxt5&quot;:33779}),e.webgl_compressed_texture_atc&amp;&amp;j(J,{&quot;rgb atc&quot;:35986,&quot;rgba atc explicit alpha&quot;:35987,&quot;rgba atc interpolated alpha&quot;:34798}),e.webgl_compressed_texture_pvrtc&amp;&amp;j(J,{&quot;rgb pvrtc 4bppv1&quot;:35840,&quot;rgb pvrtc 2bppv1&quot;:35841,&quot;rgba pvrtc 4bppv1&quot;:35842,&quot;rgba pvrtc 2bppv1&quot;:35843}),e.webgl_compressed_texture_etc1&amp;&amp;(J[&quot;rgb etc1&quot;]=36196);var K=Array.prototype.slice.call(t.getParameter(34467));Object.keys(J).forEach(function(t){var e=J[t];0&lt;=K.indexOf(e)&amp;&amp;(W[t]=e)});var Q=Object.keys(W);r.textureFormats=Q;var tt=[];Object.keys(W).forEach(function(t){tt[W[t]]=t});var et=[];Object.keys(H).forEach(function(t){et[H[t]]=t});var rt=[];Object.keys(V).forEach(function(t){rt[V[t]]=t});var nt=[];Object.keys(U).forEach(function(t){nt[U[t]]=t});var it=[];Object.keys(N).forEach(function(t){it[N[t]]=t});var pt=Q.reduce(function(t,e){var r=W[e];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r?t[r]=r:32855===r||0&lt;=e.indexOf(&quot;rgba&quot;)?t[r]=6408:t[r]=6407,t},{}),dt=[],gt=[],mt=0,vt={},yt=r.maxTextureUnits,xt=Array(yt).map(function(){return null});return j(I.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0&gt;e){for(var r=0;r&lt;yt;++r){var n=xt[r];if(n){if(0&lt;n.bindCount)continue;n.unit=-1}xt[r]=this,e=r;break}o.profile&amp;&amp;a.maxTextureUnits&lt;e+1&amp;&amp;(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0&gt;=--this.refCount&amp;&amp;B(this)}}),o.profile&amp;&amp;(a.getTotalTextureSize=function(){var t=0;return Object.keys(vt).forEach(function(e){t+=vt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var a=C();return&quot;number&quot;==typeof t?T(a,0|t,&quot;number&quot;==typeof e?0|e:0|t):t?(P(r,t),S(a,t)):T(a,1,1),r.genMipmaps&amp;&amp;(a.mipmask=(a.width&lt;&lt;1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,D(i),E(a,3553),O(r,3553),R(),L(a),o.profile&amp;&amp;(i.stats.size=k(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return vt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width&gt;&gt;a)-e,o.height=o.height||(i.height&gt;&gt;a)-r,D(i),d(o,3553,e,r,a),R(),M(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&amp;&amp;s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l,c=i.channels,u=i.type,f=0;i.mipmask&gt;&gt;f;++f){var h=a&gt;&gt;f,p=s&gt;&gt;f;if(!h||!p)break;l=G.zero.allocType(u,h*p*c),t.texImage2D(3553,f,i.format,h,p,0,i.format,i.type,l),l&amp;&amp;G.zero.freeType(l)}return R(),o.profile&amp;&amp;(i.stats.size=k(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType=&quot;texture2d&quot;,n._texture=i,o.profile&amp;&amp;(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function f(t,e,r,n,i,a){var s,l=h.texInfo;for(z.call(l),s=0;6&gt;s;++s)g[s]=C();if(&quot;number&quot;!=typeof t&amp;&amp;t){if(&quot;object&quot;==typeof t)if(e)S(g[0],t),S(g[1],e),S(g[2],r),S(g[3],n),S(g[4],i),S(g[5],a);else if(P(l,t),u(h,t),&quot;faces&quot;in t)for(t=t.faces,s=0;6&gt;s;++s)c(g[s],h),S(g[s],t[s]);else for(s=0;6&gt;s;++s)S(g[s],t)}else for(t=0|t||1,s=0;6&gt;s;++s)T(g[s],t,t);for(c(h,g[0]),h.mipmask=l.genMipmaps?(g[0].width&lt;&lt;1)-1:g[0].mipmask,h.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,D(h),s=0;6&gt;s;++s)E(g[s],34069+s);for(O(l,34067),R(),o.profile&amp;&amp;(h.stats.size=k(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=tt[h.internalformat],f.type=et[h.type],f.mag=rt[l.magFilter],f.min=nt[l.minFilter],f.wrapS=it[l.wrapS],f.wrapT=it[l.wrapT],s=0;6&gt;s;++s)L(g[s]);return f}var h=new I(34067);vt[h.id]=h,a.cubeCount++;var g=Array(6);return f(e,r,n,i,s,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=v();return c(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width&gt;&gt;i)-r,a.height=a.height||(h.height&gt;&gt;i)-n,D(h),d(a,34069+t,r,n,i),R(),M(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,D(h);for(var r=0;6&gt;r;++r)for(var n=0;h.mipmask&gt;&gt;n;++n)t.texImage2D(34069+r,n,h.format,e&gt;&gt;n,e&gt;&gt;n,0,h.format,h.type,null);return R(),o.profile&amp;&amp;(h.stats.size=k(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType=&quot;textureCube&quot;,f._texture=h,o.profile&amp;&amp;(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e&lt;yt;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),xt[e]=null;X(vt).forEach(B),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){X(vt).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32&gt;r;++r)if(0!=(e.mipmask&amp;1&lt;&lt;r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width&gt;&gt;r,e.height&gt;&gt;r,0,e.internalformat,e.type,null);else for(var n=0;6&gt;n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width&gt;&gt;r,e.height&gt;&gt;r,0,e.internalformat,e.type,null);O(e.texInfo,e.target)})}}}function A(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&amp;&amp;(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&amp;&amp;(t.texture&amp;&amp;t.texture._texture.decRef(),t.renderbuffer&amp;&amp;t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&amp;&amp;(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&amp;&amp;(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return&quot;object&quot;==typeof t&amp;&amp;(i=t.data,&quot;target&quot;in t&amp;&amp;(e=0|t.target)),&quot;texture2d&quot;===(t=i._reglType)?r=i:&quot;textureCube&quot;===t?r=i:&quot;renderbuffer&quot;===t&amp;&amp;(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&amp;&amp;(t.texture||t.renderbuffer)}function p(t,e,r){t&amp;&amp;(t.texture?t.texture.resize(e,r):t.renderbuffer&amp;&amp;t.renderbuffer.resize(e,r))}function d(){this.id=k++,M[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function m(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete M[e.id]}function v(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n&lt;i.length;++n)c(36064+n,i[n]);for(n=i.length;n&lt;r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),c(36096,e.depthAttachment),c(36128,e.stencilAttachment),c(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,x.next?x.next.framebuffer:null),x.cur=x.next,t.getError()}function y(t,e){function r(t,e){var i,a=0,o=0,s=!0,c=!0;i=null;var p=!0,d=&quot;rgba&quot;,m=&quot;uint8&quot;,y=1,x=null,w=null,k=null,M=!1;&quot;number&quot;==typeof t?(a=0|t,o=0|e||a):t?(&quot;shape&quot;in t?(a=(o=t.shape)[0],o=o[1]):(&quot;radius&quot;in t&amp;&amp;(a=o=t.radius),&quot;width&quot;in t&amp;&amp;(a=t.width),&quot;height&quot;in t&amp;&amp;(o=t.height)),(&quot;color&quot;in t||&quot;colors&quot;in t)&amp;&amp;(i=t.color||t.colors,Array.isArray(i)),i||(&quot;colorCount&quot;in t&amp;&amp;(y=0|t.colorCount),&quot;colorTexture&quot;in t&amp;&amp;(p=!!t.colorTexture,d=&quot;rgba4&quot;),&quot;colorType&quot;in t&amp;&amp;(m=t.colorType,!p)&amp;&amp;(&quot;half float&quot;===m||&quot;float16&quot;===m?d=&quot;rgba16f&quot;:&quot;float&quot;!==m&amp;&amp;&quot;float32&quot;!==m||(d=&quot;rgba32f&quot;)),&quot;colorFormat&quot;in t&amp;&amp;(d=t.colorFormat,0&lt;=b.indexOf(d)?p=!0:0&lt;=_.indexOf(d)&amp;&amp;(p=!1))),(&quot;depthTexture&quot;in t||&quot;depthStencilTexture&quot;in t)&amp;&amp;(M=!(!t.depthTexture&amp;&amp;!t.depthStencilTexture)),&quot;depth&quot;in t&amp;&amp;(&quot;boolean&quot;==typeof t.depth?s=t.depth:(x=t.depth,c=!1)),&quot;stencil&quot;in t&amp;&amp;(&quot;boolean&quot;==typeof t.stencil?c=t.stencil:(w=t.stencil,s=!1)),&quot;depthStencil&quot;in t&amp;&amp;(&quot;boolean&quot;==typeof t.depthStencil?s=c=t.depthStencil:(k=t.depthStencil,c=s=!1))):a=o=1;var A=null,T=null,S=null,E=null;if(Array.isArray(i))A=i.map(u);else if(i)A=[u(i)];else for(A=Array(y),i=0;i&lt;y;++i)A[i]=f(a,o,p,d,m);for(a=a||A[0].width,o=o||A[0].height,x?T=u(x):s&amp;&amp;!c&amp;&amp;(T=f(a,o,M,&quot;depth&quot;,&quot;uint32&quot;)),w?S=u(w):c&amp;&amp;!s&amp;&amp;(S=f(a,o,!1,&quot;stencil&quot;,&quot;uint8&quot;)),k?E=u(k):!x&amp;&amp;!w&amp;&amp;c&amp;&amp;s&amp;&amp;(E=f(a,o,M,&quot;depth stencil&quot;,&quot;depth stencil&quot;)),s=null,i=0;i&lt;A.length;++i)l(A[i]),A[i]&amp;&amp;A[i].texture&amp;&amp;(c=yt[A[i].texture._texture.format]*xt[A[i].texture._texture.type],null===s&amp;&amp;(s=c));return l(T),l(S),l(E),g(n),n.width=a,n.height=o,n.colorAttachments=A,n.depthAttachment=T,n.stencilAttachment=S,n.depthStencilAttachment=E,r.color=A.map(h),r.depth=h(T),r.stencil=h(S),r.depthStencil=h(E),r.width=n.width,r.height=n.height,v(n),r}var n=new d;return a.framebufferCount++,r(t,e),j(r,{resize:function(t,e){var i=0|t,a=0|e||i;if(i===n.width&amp;&amp;a===n.height)return r;for(var o=n.colorAttachments,s=0;s&lt;o.length;++s)p(o[s],i,a);return p(n.depthAttachment,i,a),p(n.stencilAttachment,i,a),p(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,v(n),r},_reglType:&quot;framebuffer&quot;,_framebuffer:n,destroy:function(){m(n),g(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=[&quot;rgba&quot;],_=[&quot;rgba4&quot;,&quot;rgb565&quot;,&quot;rgb5 a1&quot;];e.ext_srgb&amp;&amp;_.push(&quot;srgba&quot;),e.ext_color_buffer_half_float&amp;&amp;_.push(&quot;rgba16f&quot;,&quot;rgb16f&quot;),e.webgl_color_buffer_float&amp;&amp;_.push(&quot;rgba32f&quot;);var w=[&quot;uint8&quot;];e.oes_texture_half_float&amp;&amp;w.push(&quot;half float&quot;,&quot;float16&quot;),e.oes_texture_float&amp;&amp;w.push(&quot;float&quot;,&quot;float32&quot;);var k=0,M={};return j(x,{getFramebuffer:function(t){return&quot;function&quot;==typeof t&amp;&amp;&quot;framebuffer&quot;===t._reglType&amp;&amp;(t=t._framebuffer)instanceof d?t:null},create:y,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i=&quot;rgba&quot;;var l=&quot;uint8&quot;,c=1;if(&quot;number&quot;==typeof t?o=0|t:t?(&quot;shape&quot;in t?o=t.shape[0]:(&quot;radius&quot;in t&amp;&amp;(o=0|t.radius),&quot;width&quot;in t?o=0|t.width:&quot;height&quot;in t&amp;&amp;(o=0|t.height)),(&quot;color&quot;in t||&quot;colors&quot;in t)&amp;&amp;(s=t.color||t.colors,Array.isArray(s)),s||(&quot;colorCount&quot;in t&amp;&amp;(c=0|t.colorCount),&quot;colorType&quot;in t&amp;&amp;(l=t.colorType),&quot;colorFormat&quot;in t&amp;&amp;(i=t.colorFormat)),&quot;depth&quot;in t&amp;&amp;(a.depth=t.depth),&quot;stencil&quot;in t&amp;&amp;(a.stencil=t.stencil),&quot;depthStencil&quot;in t&amp;&amp;(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i&lt;s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(c),s={radius:o,format:i,type:l},i=0;i&lt;c;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i&lt;t.length;++i)c=t[i],o=o||c.width,a.color[i]={target:34069,data:t[i]};for(i=0;6&gt;i;++i){for(c=0;c&lt;t.length;++c)a.color[c].target=34069+i;0&lt;i&amp;&amp;(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=y(a)}return j(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),j(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t&lt;i.length;++t)i[t].resize(n);for(t=0;6&gt;t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:&quot;framebufferCube&quot;,destroy:function(){r.forEach(function(t){t.destroy()})}})},clear:function(){X(M).forEach(m)},restore:function(){X(M).forEach(function(e){e.framebuffer=t.createFramebuffer(),v(e)})}})}function T(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function S(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r&lt;t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?c:u)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(t,e){this.id=p++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],n.profile&amp;&amp;(this.stats={uniformsCount:0,attributesCount:0})}function l(r,s){var l,c;l=o(35632,r.fragId),c=o(35633,r.vertId);var u=r.program=t.createProgram();t.attachShader(u,l),t.attachShader(u,c),t.linkProgram(u);var f=t.getProgramParameter(u,35718);n.profile&amp;&amp;(r.stats.uniformsCount=f);var h=r.uniforms;for(l=0;l&lt;f;++l)if(c=t.getActiveUniform(u,l))if(1&lt;c.size)for(var p=0;p&lt;c.size;++p){var d=c.name.replace(&quot;[0]&quot;,&quot;[&quot;+p+&quot;]&quot;);a(h,new i(d,e.id(d),t.getUniformLocation(u,d),c))}else a(h,new i(c.name,e.id(c.name),t.getUniformLocation(u,c.name),c));for(f=t.getProgramParameter(u,35721),n.profile&amp;&amp;(r.stats.attributesCount=f),h=r.attributes,l=0;l&lt;f;++l)(c=t.getActiveAttrib(u,l))&amp;&amp;a(h,new i(c.name,e.id(c.name),t.getAttribLocation(u,c.name),c))}var c={},u={},f={},h=[],p=0;return n.profile&amp;&amp;(r.getMaxUniformsCount=function(){var t=0;return h.forEach(function(e){e.stats.uniformsCount&gt;t&amp;&amp;(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach(function(e){e.stats.attributesCount&gt;t&amp;&amp;(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);X(c).forEach(e),c={},X(u).forEach(e),u={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,f={},r.shaderCount=0},program:function(t,e,n){var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a),i[t]=a,h.push(a)),a},restore:function(){c={},u={};for(var t=0;t&lt;h.length;++t)l(h[t])},shader:o,frag:-1,vert:-1}}function E(t,e,r,n,i,a,o){function s(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;return Y(i)?u=i:i&amp;&amp;(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r(),i=l*c*4,u||(5121===a?u=new Uint8Array(i):5126===a&amp;&amp;(u=u||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,c,6408,a,u),u}return function(t){return t&amp;&amp;&quot;framebuffer&quot;in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=s(t)}),r}(t):s(t)}}function C(t){return Array.prototype.slice.call(t)}function L(t){return C(t).join(&quot;&quot;)}function z(){function t(){var t=[],e=[];return j(function(){t.push.apply(t,C(arguments))},{def:function(){var n=&quot;v&quot;+r++;return e.push(n),0&lt;arguments.length&amp;&amp;(t.push(n,&quot;=&quot;),t.push.apply(t,C(arguments)),t.push(&quot;;&quot;)),n},toString:function(){return L([0&lt;e.length?&quot;var &quot;+e+&quot;;&quot;:&quot;&quot;,L(t)])}})}function e(){function e(t,e){n(t,e,&quot;=&quot;,r.def(t,e),&quot;;&quot;)}var r=t(),n=t(),i=r.toString,a=n.toString;return j(function(){r.apply(r,C(arguments))},{def:r.def,entry:r,exit:n,save:e,set:function(t,n,i){e(t,n),r(t,n,&quot;=&quot;,i,&quot;;&quot;)},toString:function(){return i()+a()}})}var r=0,n=[],i=[],a=t(),o={};return{global:a,link:function(t){for(var e=0;e&lt;i.length;++e)if(i[e]===t)return n[e];return e=&quot;g&quot;+r++,n.push(e),i.push(t),e},block:t,proc:function(t,r){function n(){var t=&quot;a&quot;+i.length;return i.push(t),t}var i=[];r=r||0;for(var a=0;a&lt;r;++a)n();var s=(a=e()).toString;return o[t]=j(a,{arg:n,toString:function(){return L([&quot;function(&quot;,i.join(),&quot;){&quot;,s(),&quot;}&quot;])}})},scope:e,cond:function(){var t=L(arguments),r=e(),n=e(),i=r.toString,a=n.toString;return j(r,{then:function(){return r.apply(r,C(arguments)),this},else:function(){return n.apply(n,C(arguments)),this},toString:function(){var e=a();return e&amp;&amp;(e=&quot;else{&quot;+e+&quot;}&quot;),L([&quot;if(&quot;,t,&quot;){&quot;,i(),&quot;}&quot;,e])}})},compile:function(){var t=['&quot;use strict&quot;;',a,&quot;return {&quot;];Object.keys(o).forEach(function(e){t.push('&quot;',e,'&quot;:',o[e].toString(),&quot;,&quot;)}),t.push(&quot;}&quot;);var e=L(t).replace(/;/g,&quot;;\n&quot;).replace(/}/g,&quot;}\n&quot;).replace(/{/g,&quot;{\n&quot;);return Function.apply(null,n.concat(e)).apply(null,i)}}}function P(t){return Array.isArray(t)||Y(t)||l(t)}function O(t){return t.sort(function(t,e){return&quot;viewport&quot;===t?-1:&quot;viewport&quot;===e?1:t&lt;e?-1:1})}function I(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function D(t){return t&amp;&amp;!(t.thisDep||t.contextDep||t.propDep)}function R(t){return new I(!1,!1,!1,t)}function B(t,e){var r=t.type;return 0===r?new I(!0,1&lt;=(r=t.data.length),2&lt;=r,e):4===r?new I((r=t.data).thisDep,r.contextDep,r.propDep,e):new I(3===r,2===r,1===r,e)}function F(t,e,r,n,i,o,s,l,c,u,f,h,p,d,g){function v(t){return t.replace(&quot;.&quot;,&quot;_&quot;)}function y(t,e,r){var n=v(t);nt.push(t),et[n]=tt[n]=!!r,it[n]=e}function x(t,e,r){var n=v(t);nt.push(t),Array.isArray(r)?(tt[n]=r.slice(),et[n]=r.slice()):tt[n]=et[n]=r,at[n]=e}function b(){var t=z(),r=t.link,n=t.global;t.id=lt++,t.batchId=&quot;0&quot;;var i=r(ot),a=t.shared={props:&quot;a0&quot;};Object.keys(ot).forEach(function(t){a[t]=n.def(i,&quot;.&quot;,t)});var o=t.next={},s=t.current={};Object.keys(at).forEach(function(t){Array.isArray(tt[t])&amp;&amp;(o[t]=n.def(a.next,&quot;.&quot;,t),s[t]=n.def(a.current,&quot;.&quot;,t))});var l=t.constants={};Object.keys(st).forEach(function(t){l[t]=n.def(JSON.stringify(st[t]))}),t.invoke=function(e,n){switch(n.type){case 0:var i=[&quot;this&quot;,a.context,a.props,t.batchId];return e.def(r(n.data),&quot;.call(&quot;,i.slice(0,Math.max(n.data.length+1,4)),&quot;)&quot;);case 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def(&quot;this&quot;,n.data);case 4:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){if((t=e.id(t))in c)return c[t];var n=u.scope[t];return n||(n=u.scope[t]=new Z),c[t]=r(n)},t}function _(t,e){var r=t.static,n=t.dynamic;if(&quot;framebuffer&quot;in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),R(function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,&quot;.next&quot;,r),n=n.context,e.set(n,&quot;.framebufferWidth&quot;,r+&quot;.width&quot;),e.set(n,&quot;.framebufferHeight&quot;,r+&quot;.height&quot;),r})):R(function(t,e){var r=t.shared;return e.set(r.framebuffer,&quot;.next&quot;,&quot;null&quot;),r=r.context,e.set(r,&quot;.framebufferWidth&quot;,r+&quot;.drawingBufferWidth&quot;),e.set(r,&quot;.framebufferHeight&quot;,r+&quot;.drawingBufferHeight&quot;),&quot;null&quot;})}if(&quot;framebuffer&quot;in n){var a=n.framebuffer;return B(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;r=e.def(i,&quot;.getFramebuffer(&quot;,r,&quot;)&quot;);return e.set(i,&quot;.next&quot;,r),n=n.context,e.set(n,&quot;.framebufferWidth&quot;,r+&quot;?&quot;+r+&quot;.width:&quot;+n+&quot;.drawingBufferWidth&quot;),e.set(n,&quot;.framebufferHeight&quot;,r+&quot;?&quot;+r+&quot;.height:&quot;+n+&quot;.drawingBufferHeight&quot;),r})}return null}function w(t){function r(t){if(t in n){var r=e.id(n[t]);return(t=R(function(){return r})).id=r,t}if(t in i){var a=i[t];return B(a,function(t,e){var r=t.invoke(e,a);return e.def(t.shared.strings,&quot;.id(&quot;,r,&quot;)&quot;)})}return null}var n=t.static,i=t.dynamic,a=r(&quot;frag&quot;),o=r(&quot;vert&quot;),s=null;return D(a)&amp;&amp;D(o)?(s=f.program(o.id,a.id),t=R(function(t,e){return t.link(s)})):t=new I(a&amp;&amp;a.thisDep||o&amp;&amp;o.thisDep,a&amp;&amp;a.contextDep||o&amp;&amp;o.contextDep,a&amp;&amp;a.propDep||o&amp;&amp;o.propDep,function(t,e){var r,n,i=t.shared.shader;return r=a?a.append(t,e):e.def(i,&quot;.&quot;,&quot;frag&quot;),n=o?o.append(t,e):e.def(i,&quot;.&quot;,&quot;vert&quot;),e.def(i+&quot;.program(&quot;+n+&quot;,&quot;+r+&quot;)&quot;)}),{frag:a,vert:o,progVar:t,program:s}}function k(t,e){function r(t,e){if(t in n){var r=0|n[t];return R(function(t,n){return e&amp;&amp;(t.OFFSET=r),r})}if(t in i){var o=i[t];return B(o,function(t,r){var n=t.invoke(r,o);return e&amp;&amp;(t.OFFSET=n),n})}return e&amp;&amp;a?R(function(t,e){return t.OFFSET=&quot;0&quot;,0}):null}var n=t.static,i=t.dynamic,a=function(){if(&quot;elements&quot;in n){var t=n.elements;P(t)?t=o.getElements(o.create(t,!0)):t&amp;&amp;(t=o.getElements(t));var e=R(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null});return e.value=t,e}if(&quot;elements&quot;in i){var r=i.elements;return B(r,function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def(&quot;null&quot;);n=e.def(n,&quot;(&quot;,a,&quot;)&quot;),a=t.cond(n).then(o,&quot;=&quot;,i,&quot;.createStream(&quot;,a,&quot;);&quot;).else(o,&quot;=&quot;,i,&quot;.getElements(&quot;,a,&quot;);&quot;);return e.entry(a),e.exit(t.cond(n).then(i,&quot;.destroyStream(&quot;,o,&quot;);&quot;)),t.ELEMENTS=o})}return null}(),s=r(&quot;offset&quot;,!0);return{elements:a,primitive:function(){if(&quot;primitive&quot;in n){var t=n.primitive;return R(function(e,r){return rt[t]})}if(&quot;primitive&quot;in i){var e=i.primitive;return B(e,function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,&quot;[&quot;,i,&quot;]&quot;)})}return a?D(a)?a.value?R(function(t,e){return e.def(t.ELEMENTS,&quot;.primType&quot;)}):R(function(){return 4}):new I(a.thisDep,a.contextDep,a.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,&quot;?&quot;,r,&quot;.primType:&quot;,4)}):null}(),count:function(){if(&quot;count&quot;in n){var t=0|n.count;return R(function(){return t})}if(&quot;count&quot;in i){var e=i.count;return B(e,function(t,r){return t.invoke(r,e)})}return a?D(a)?a?s?new I(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,&quot;.vertCount-&quot;,t.OFFSET)}):R(function(t,e){return e.def(t.ELEMENTS,&quot;.vertCount&quot;)}):R(function(){return-1}):new I(a.thisDep||s.thisDep,a.contextDep||s.contextDep,a.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,&quot;?&quot;,r,&quot;.vertCount-&quot;,t.OFFSET,&quot;:-1&quot;):e.def(r,&quot;?&quot;,r,&quot;.vertCount:-1&quot;)}):null}(),instances:r(&quot;instances&quot;,!1),offset:s}}function M(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var r=n[t],a=e.id(t),s=new Z;if(P(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(c=i.getBuffer(r))s.state=1,s.buffer=c,s.type=0;else if(&quot;constant&quot;in r){var l=r.constant;s.buffer=&quot;null&quot;,s.state=2,&quot;number&quot;==typeof l?s.x=l:bt.forEach(function(t,e){e&lt;l.length&amp;&amp;(s[t]=l[e])})}else{var c=P(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),u=0|r.offset,f=0|r.stride,h=0|r.size,p=!!r.normalized,d=0;&quot;type&quot;in r&amp;&amp;(d=J[r.type]),r=0|r.divisor,s.buffer=c,s.state=1,s.size=h,s.normalized=p,s.type=d||c.dtype,s.offset=u,s.stride=f,s.divisor=r}o[t]=R(function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach(function(t){n[t]=s[t]}),s.buffer&amp;&amp;(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+&quot;.dtype&quot;),r[a]=n})}),Object.keys(a).forEach(function(t){var e=a[t];o[t]=B(e,function(t,r){function n(t){r(l[t],&quot;=&quot;,i,&quot;.&quot;,t,&quot;|0;&quot;)}var i=t.invoke(r,e),a=t.shared,o=a.isBufferArgs,s=a.buffer,l={isStream:r.def(!1)},c=new Z;c.state=1,Object.keys(c).forEach(function(t){l[t]=r.def(&quot;&quot;+c[t])});var u=l.buffer,f=l.type;return r(&quot;if(&quot;,o,&quot;(&quot;,i,&quot;)){&quot;,l.isStream,&quot;=true;&quot;,u,&quot;=&quot;,s,&quot;.createStream(&quot;,34962,&quot;,&quot;,i,&quot;);&quot;,f,&quot;=&quot;,u,&quot;.dtype;&quot;,&quot;}else{&quot;,u,&quot;=&quot;,s,&quot;.getBuffer(&quot;,i,&quot;);&quot;,&quot;if(&quot;,u,&quot;){&quot;,f,&quot;=&quot;,u,&quot;.dtype;&quot;,'}else if(&quot;constant&quot; in ',i,&quot;){&quot;,l.state,&quot;=&quot;,2,&quot;;&quot;,&quot;if(typeof &quot;+i+'.constant === &quot;number&quot;){',l[bt[0]],&quot;=&quot;,i,&quot;.constant;&quot;,bt.slice(1).map(function(t){return l[t]}).join(&quot;=&quot;),&quot;=0;&quot;,&quot;}else{&quot;,bt.map(function(t,e){return l[t]+&quot;=&quot;+i+&quot;.constant.length&gt;&quot;+e+&quot;?&quot;+i+&quot;.constant[&quot;+e+&quot;]:0;&quot;}).join(&quot;&quot;),&quot;}}else{&quot;,&quot;if(&quot;,o,&quot;(&quot;,i,&quot;.buffer)){&quot;,u,&quot;=&quot;,s,&quot;.createStream(&quot;,34962,&quot;,&quot;,i,&quot;.buffer);&quot;,&quot;}else{&quot;,u,&quot;=&quot;,s,&quot;.getBuffer(&quot;,i,&quot;.buffer);&quot;,&quot;}&quot;,f,'=&quot;type&quot; in ',i,&quot;?&quot;,a.glTypes,&quot;[&quot;,i,&quot;.type]:&quot;,u,&quot;.dtype;&quot;,l.normalized,&quot;=!!&quot;,i,&quot;.normalized;&quot;),n(&quot;size&quot;),n(&quot;offset&quot;),n(&quot;stride&quot;),n(&quot;divisor&quot;),r(&quot;}}&quot;),r.exit(&quot;if(&quot;,l.isStream,&quot;){&quot;,s,&quot;.destroyStream(&quot;,u,&quot;);&quot;,&quot;}&quot;),l})}),o}function A(t,e,r,n,i){var o=_(t),s=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return&quot;width&quot;in r?n=0|r.width:t=!1,&quot;height&quot;in r?o=0|r.height:t=!1,new I(!t&amp;&amp;e&amp;&amp;e.thisDep,!t&amp;&amp;e&amp;&amp;e.contextDep,!t&amp;&amp;e&amp;&amp;e.propDep,function(t,e){var i=t.shared.context,a=n;&quot;width&quot;in r||(a=e.def(i,&quot;.&quot;,&quot;framebufferWidth&quot;,&quot;-&quot;,s));var c=o;return&quot;height&quot;in r||(c=e.def(i,&quot;.&quot;,&quot;framebufferHeight&quot;,&quot;-&quot;,l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=B(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,&quot;.x|0&quot;),a=e.def(r,&quot;.y|0&quot;);return[i,a,e.def('&quot;width&quot; in ',r,&quot;?&quot;,r,&quot;.width|0:&quot;,&quot;(&quot;,n,&quot;.&quot;,&quot;framebufferWidth&quot;,&quot;-&quot;,i,&quot;)&quot;),r=e.def('&quot;height&quot; in ',r,&quot;?&quot;,r,&quot;.height|0:&quot;,&quot;(&quot;,n,&quot;.&quot;,&quot;framebufferHeight&quot;,&quot;-&quot;,a,&quot;)&quot;)]}),e&amp;&amp;(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new I(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,&quot;.&quot;,&quot;framebufferWidth&quot;),e.def(r,&quot;.&quot;,&quot;framebufferHeight&quot;)]}):null}var i=t.static,a=t.dynamic;if(t=n(&quot;viewport&quot;)){var o=t;t=new I(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,&quot;.viewportWidth&quot;,r[2]),e.set(n,&quot;.viewportHeight&quot;,r[3]),r})}return{viewport:t,scissor_box:n(&quot;scissor.box&quot;)}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,i={};return nt.forEach(function(t){function e(e,a){if(t in r){var s=e(r[t]);i[o]=R(function(){return s})}else if(t in n){var l=n[t];i[o]=B(l,function(t,e){return a(t,e,t.invoke(e,l))})}}var o=v(t);switch(t){case&quot;cull.enable&quot;:case&quot;blend.enable&quot;:case&quot;dither&quot;:case&quot;stencil.enable&quot;:case&quot;depth.enable&quot;:case&quot;scissor.enable&quot;:case&quot;polygonOffset.enable&quot;:case&quot;sample.alpha&quot;:case&quot;sample.enable&quot;:case&quot;depth.mask&quot;:return e(function(t){return t},function(t,e,r){return r});case&quot;depth.func&quot;:return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,&quot;[&quot;,r,&quot;]&quot;)});case&quot;depth.range&quot;:return e(function(t){return t},function(t,e,r){return[e.def(&quot;+&quot;,r,&quot;[0]&quot;),e=e.def(&quot;+&quot;,r,&quot;[1]&quot;)]});case&quot;blend.func&quot;:return e(function(t){return[wt[&quot;srcRGB&quot;in t?t.srcRGB:t.src],wt[&quot;dstRGB&quot;in t?t.dstRGB:t.dst],wt[&quot;srcAlpha&quot;in t?t.srcAlpha:t.src],wt[&quot;dstAlpha&quot;in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('&quot;',t,n,'&quot; in ',r,&quot;?&quot;,r,&quot;.&quot;,t,n,&quot;:&quot;,r,&quot;.&quot;,t)}t=t.constants.blendFuncs;var i=n(&quot;src&quot;,&quot;RGB&quot;),a=n(&quot;dst&quot;,&quot;RGB&quot;),o=(i=e.def(t,&quot;[&quot;,i,&quot;]&quot;),e.def(t,&quot;[&quot;,n(&quot;src&quot;,&quot;Alpha&quot;),&quot;]&quot;));return[i,a=e.def(t,&quot;[&quot;,a,&quot;]&quot;),o,t=e.def(t,&quot;[&quot;,n(&quot;dst&quot;,&quot;Alpha&quot;),&quot;]&quot;)]});case&quot;blend.equation&quot;:return e(function(t){return&quot;string&quot;==typeof t?[$[t],$[t]]:&quot;object&quot;==typeof t?[$[t.rgb],$[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond(&quot;typeof &quot;,r,'===&quot;string&quot;')).then(i,&quot;=&quot;,a,&quot;=&quot;,n,&quot;[&quot;,r,&quot;];&quot;),t.else(i,&quot;=&quot;,n,&quot;[&quot;,r,&quot;.rgb];&quot;,a,&quot;=&quot;,n,&quot;[&quot;,r,&quot;.alpha];&quot;),e(t),[i,a]});case&quot;blend.color&quot;:return e(function(t){return a(4,function(e){return+t[e]})},function(t,e,r){return a(4,function(t){return e.def(&quot;+&quot;,r,&quot;[&quot;,t,&quot;]&quot;)})});case&quot;stencil.mask&quot;:return e(function(t){return 0|t},function(t,e,r){return e.def(r,&quot;|0&quot;)});case&quot;stencil.func&quot;:return e(function(t){return[kt[t.cmp||&quot;keep&quot;],t.ref||0,&quot;mask&quot;in t?t.mask:-1]},function(t,e,r){return[t=e.def('&quot;cmp&quot; in ',r,&quot;?&quot;,t.constants.compareFuncs,&quot;[&quot;,r,&quot;.cmp]&quot;,&quot;:&quot;,7680),e.def(r,&quot;.ref|0&quot;),e=e.def('&quot;mask&quot; in ',r,&quot;?&quot;,r,&quot;.mask|0:-1&quot;)]});case&quot;stencil.opFront&quot;:case&quot;stencil.opBack&quot;:return e(function(e){return[&quot;stencil.opBack&quot;===t?1029:1028,Mt[e.fail||&quot;keep&quot;],Mt[e.zfail||&quot;keep&quot;],Mt[e.zpass||&quot;keep&quot;]]},function(e,r,n){function i(t){return r.def('&quot;',t,'&quot; in ',n,&quot;?&quot;,a,&quot;[&quot;,n,&quot;.&quot;,t,&quot;]:&quot;,7680)}var a=e.constants.stencilOps;return[&quot;stencil.opBack&quot;===t?1029:1028,i(&quot;fail&quot;),i(&quot;zfail&quot;),i(&quot;zpass&quot;)]});case&quot;polygonOffset.offset&quot;:return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,&quot;.factor|0&quot;),e=e.def(r,&quot;.units|0&quot;)]});case&quot;cull.face&quot;:return e(function(t){var e=0;return&quot;front&quot;===t?e=1028:&quot;back&quot;===t&amp;&amp;(e=1029),e},function(t,e,r){return e.def(r,'===&quot;front&quot;?',1028,&quot;:&quot;,1029)});case&quot;lineWidth&quot;:return e(function(t){return t},function(t,e,r){return r});case&quot;frontFace&quot;:return e(function(t){return At[t]},function(t,e,r){return e.def(r+'===&quot;cw&quot;?2304:2305')});case&quot;colorMask&quot;:return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return a(4,function(t){return&quot;!!&quot;+r+&quot;[&quot;+t+&quot;]&quot;})});case&quot;sample.coverage&quot;:return e(function(t){return[&quot;value&quot;in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('&quot;value&quot; in ',r,&quot;?+&quot;,r,&quot;.value:1&quot;),e=e.def(&quot;!!&quot;,r,&quot;.invert&quot;)]})}}),i}(t),u=w(t),f=s.viewport;return f&amp;&amp;(c.viewport=f),(s=s[f=v(&quot;scissor.box&quot;)])&amp;&amp;(c[f]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0&lt;Object.keys(c).length}).profile=function(t){var e,r=t.static;if(t=t.dynamic,&quot;profile&quot;in r){var n=!!r.profile;(e=R(function(t,e){return n})).enable=n}else if(&quot;profile&quot;in t){var i=t.profile;e=B(i,function(t,e){return t.invoke(e,i)})}return e}(t),o.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var e,n=r[t];if(&quot;number&quot;==typeof n||&quot;boolean&quot;==typeof n)e=R(function(){return n});else if(&quot;function&quot;==typeof n){var o=n._reglType;&quot;texture2d&quot;===o||&quot;textureCube&quot;===o?e=R(function(t){return t.link(n)}):&quot;framebuffer&quot;!==o&amp;&amp;&quot;framebufferCube&quot;!==o||(e=R(function(t){return t.link(n.color[0])}))}else m(n)&amp;&amp;(e=R(function(t){return t.global.def(&quot;[&quot;,a(n.length,function(t){return n[t]}),&quot;]&quot;)}));e.value=n,i[t]=e}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=B(e,function(t,r){return t.invoke(r,e)})}),i}(r),o.attributes=M(e),o.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=R(function(t,e){return&quot;number&quot;==typeof r||&quot;boolean&quot;==typeof r?&quot;&quot;+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=B(e,function(t,r){return t.invoke(r,e)})}),n}(n),o}function T(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach(function(a){e.save(n,&quot;.&quot;+a),i(n,&quot;.&quot;,a,&quot;=&quot;,r[a].append(t,e),&quot;;&quot;)}),e(i)}function S(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;Q&amp;&amp;(i=e.def(s.extensions,&quot;.webgl_draw_buffers&quot;));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,&quot;.next&quot;),n||e(&quot;if(&quot;,t,&quot;!==&quot;,o,&quot;.cur){&quot;),e(&quot;if(&quot;,t,&quot;){&quot;,a,&quot;.bindFramebuffer(&quot;,36160,&quot;,&quot;,t,&quot;.framebuffer);&quot;),Q&amp;&amp;e(i,&quot;.drawBuffersWEBGL(&quot;,s,&quot;[&quot;,t,&quot;.colorAttachments.length]);&quot;),e(&quot;}else{&quot;,a,&quot;.bindFramebuffer(&quot;,36160,&quot;,null);&quot;),Q&amp;&amp;e(i,&quot;.drawBuffersWEBGL(&quot;,l,&quot;);&quot;),e(&quot;}&quot;,o,&quot;.cur=&quot;,t,&quot;;&quot;),n||e(&quot;}&quot;)}function E(t,e,r){var n=t.shared,i=n.gl,o=t.current,s=t.next,l=n.current,c=n.next,u=t.cond(l,&quot;.dirty&quot;);nt.forEach(function(e){var n,f;if(!((e=v(e))in r.state))if(e in s){n=s[e],f=o[e];var h=a(tt[e].length,function(t){return u.def(n,&quot;[&quot;,t,&quot;]&quot;)});u(t.cond(h.map(function(t,e){return t+&quot;!==&quot;+f+&quot;[&quot;+e+&quot;]&quot;}).join(&quot;||&quot;)).then(i,&quot;.&quot;,at[e],&quot;(&quot;,h,&quot;);&quot;,h.map(function(t,e){return f+&quot;[&quot;+e+&quot;]=&quot;+t}).join(&quot;;&quot;),&quot;;&quot;))}else n=u.def(c,&quot;.&quot;,e),h=t.cond(n,&quot;!==&quot;,l,&quot;.&quot;,e),u(h),e in it?h(t.cond(n).then(i,&quot;.enable(&quot;,it[e],&quot;);&quot;).else(i,&quot;.disable(&quot;,it[e],&quot;);&quot;),l,&quot;.&quot;,e,&quot;=&quot;,n,&quot;;&quot;):h(i,&quot;.&quot;,at[e],&quot;(&quot;,n,&quot;);&quot;,l,&quot;.&quot;,e,&quot;=&quot;,n,&quot;;&quot;)}),0===Object.keys(r.state).length&amp;&amp;u(l,&quot;.dirty=false;&quot;),e(u)}function C(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;O(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var c=l.append(t,e);if(it[i]){var u=it[i];D(l)?e(s,c?&quot;.enable(&quot;:&quot;.disable(&quot;,u,&quot;);&quot;):e(t.cond(c).then(s,&quot;.enable(&quot;,u,&quot;);&quot;).else(s,&quot;.disable(&quot;,u,&quot;);&quot;)),e(o,&quot;.&quot;,i,&quot;=&quot;,c,&quot;;&quot;)}else if(m(c)){var f=a[i];e(s,&quot;.&quot;,at[i],&quot;(&quot;,c,&quot;);&quot;,c.map(function(t,e){return f+&quot;[&quot;+e+&quot;]=&quot;+t}).join(&quot;;&quot;),&quot;;&quot;)}else e(s,&quot;.&quot;,at[i],&quot;(&quot;,c,&quot;);&quot;,o,&quot;.&quot;,i,&quot;=&quot;,c,&quot;;&quot;)}})}function L(t,e){K&amp;&amp;(t.instancing=e.def(t.shared.extensions,&quot;.angle_instanced_arrays&quot;))}function F(t,e,r,n,i){function a(){return&quot;undefined&quot;==typeof performance?&quot;Date.now()&quot;:&quot;performance.now()&quot;}function o(t){t(c=e.def(),&quot;=&quot;,a(),&quot;;&quot;),&quot;string&quot;==typeof i?t(h,&quot;.count+=&quot;,i,&quot;;&quot;):t(h,&quot;.count++;&quot;),d&amp;&amp;(n?t(u=e.def(),&quot;=&quot;,g,&quot;.getNumPendingQueries();&quot;):t(g,&quot;.beginQuery(&quot;,h,&quot;);&quot;))}function s(t){t(h,&quot;.cpuTime+=&quot;,a(),&quot;-&quot;,c,&quot;;&quot;),d&amp;&amp;(n?t(g,&quot;.pushScopeStats(&quot;,u,&quot;,&quot;,g,&quot;.getNumPendingQueries(),&quot;,h,&quot;);&quot;):t(g,&quot;.endQuery();&quot;))}function l(t){var r=e.def(p,&quot;.profile&quot;);e(p,&quot;.profile=&quot;,t,&quot;;&quot;),e.exit(p,&quot;.profile=&quot;,r,&quot;;&quot;)}var c,u,f=t.shared,h=t.stats,p=f.current,g=f.timer;if(r=r.profile){if(D(r))return void(r.enable?(o(e),s(e.exit),l(&quot;true&quot;)):l(&quot;false&quot;));l(r=r.append(t,e))}else r=e.def(p,&quot;.profile&quot;);o(f=t.block()),e(&quot;if(&quot;,r,&quot;){&quot;,f,&quot;}&quot;),s(t=t.block()),e.exit(&quot;if(&quot;,r,&quot;){&quot;,t,&quot;}&quot;)}function N(t,e,r,n,i){function a(r,n,i){function a(){e(&quot;if(!&quot;,u,&quot;.buffer){&quot;,l,&quot;.enableVertexAttribArray(&quot;,c,&quot;);}&quot;);var r,a=i.type;r=i.size?e.def(i.size,&quot;||&quot;,n):n,e(&quot;if(&quot;,u,&quot;.type!==&quot;,a,&quot;||&quot;,u,&quot;.size!==&quot;,r,&quot;||&quot;,p.map(function(t){return u+&quot;.&quot;+t+&quot;!==&quot;+i[t]}).join(&quot;||&quot;),&quot;){&quot;,l,&quot;.bindBuffer(&quot;,34962,&quot;,&quot;,f,&quot;.buffer);&quot;,l,&quot;.vertexAttribPointer(&quot;,[c,r,a,i.normalized,i.stride,i.offset],&quot;);&quot;,u,&quot;.type=&quot;,a,&quot;;&quot;,u,&quot;.size=&quot;,r,&quot;;&quot;,p.map(function(t){return u+&quot;.&quot;+t+&quot;=&quot;+i[t]+&quot;;&quot;}).join(&quot;&quot;),&quot;}&quot;),K&amp;&amp;(a=i.divisor,e(&quot;if(&quot;,u,&quot;.divisor!==&quot;,a,&quot;){&quot;,t.instancing,&quot;.vertexAttribDivisorANGLE(&quot;,[c,a],&quot;);&quot;,u,&quot;.divisor=&quot;,a,&quot;;}&quot;))}function s(){e(&quot;if(&quot;,u,&quot;.buffer){&quot;,l,&quot;.disableVertexAttribArray(&quot;,c,&quot;);&quot;,&quot;}if(&quot;,bt.map(function(t,e){return u+&quot;.&quot;+t+&quot;!==&quot;+h[e]}).join(&quot;||&quot;),&quot;){&quot;,l,&quot;.vertexAttrib4f(&quot;,c,&quot;,&quot;,h,&quot;);&quot;,bt.map(function(t,e){return u+&quot;.&quot;+t+&quot;=&quot;+h[e]+&quot;;&quot;}).join(&quot;&quot;),&quot;}&quot;)}var l=o.gl,c=e.def(r,&quot;.location&quot;),u=e.def(o.attributes,&quot;[&quot;,c,&quot;]&quot;);r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],p=[&quot;buffer&quot;,&quot;normalized&quot;,&quot;offset&quot;,&quot;stride&quot;];1===r?a():2===r?s():(e(&quot;if(&quot;,r,&quot;===&quot;,1,&quot;){&quot;),a(),e(&quot;}else{&quot;),s(),e(&quot;}&quot;))}var o=t.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(Tt))return;var c=t.scopeAttrib(s);o={},Object.keys(new Z).forEach(function(t){o[t]=e.def(c,&quot;.&quot;,t)})}a(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function j(t,r,n,i,o){for(var s,l=t.shared,c=l.gl,u=0;u&lt;i.length;++u){var f,h=(g=i[u]).name,p=g.info.type,d=n.uniforms[h],g=t.link(g)+&quot;.location&quot;;if(d){if(!o(d))continue;if(D(d)){if(h=d.value,35678===p||35680===p)r(c,&quot;.uniform1i(&quot;,g,&quot;,&quot;,(p=t.link(h._texture||h.color[0]._texture))+&quot;.bind());&quot;),r.exit(p,&quot;.unbind();&quot;);else if(35674===p||35675===p||35676===p)d=2,35675===p?d=3:35676===p&amp;&amp;(d=4),r(c,&quot;.uniformMatrix&quot;,d,&quot;fv(&quot;,g,&quot;,false,&quot;,h=t.global.def(&quot;new Float32Array([&quot;+Array.prototype.slice.call(h)+&quot;])&quot;),&quot;);&quot;);else{switch(p){case 5126:s=&quot;1f&quot;;break;case 35664:s=&quot;2f&quot;;break;case 35665:s=&quot;3f&quot;;break;case 35666:s=&quot;4f&quot;;break;case 35670:case 5124:s=&quot;1i&quot;;break;case 35671:case 35667:s=&quot;2i&quot;;break;case 35672:case 35668:s=&quot;3i&quot;;break;case 35673:s=&quot;4i&quot;;break;case 35669:s=&quot;4i&quot;}r(c,&quot;.uniform&quot;,s,&quot;(&quot;,g,&quot;,&quot;,m(h)?Array.prototype.slice.call(h):h,&quot;);&quot;)}continue}f=d.append(t,r)}else{if(!o(Tt))continue;f=r.def(l.uniforms,&quot;[&quot;,e.id(h),&quot;]&quot;)}switch(35678===p?r(&quot;if(&quot;,f,&quot;&amp;&amp;&quot;,f,'._reglType===&quot;framebuffer&quot;){',f,&quot;=&quot;,f,&quot;.color[0];&quot;,&quot;}&quot;):35680===p&amp;&amp;r(&quot;if(&quot;,f,&quot;&amp;&amp;&quot;,f,'._reglType===&quot;framebufferCube&quot;){',f,&quot;=&quot;,f,&quot;.color[0];&quot;,&quot;}&quot;),h=1,p){case 35678:case 35680:p=r.def(f,&quot;._texture&quot;),r(c,&quot;.uniform1i(&quot;,g,&quot;,&quot;,p,&quot;.bind());&quot;),r.exit(p,&quot;.unbind();&quot;);continue;case 5124:case 35670:s=&quot;1i&quot;;break;case 35667:case 35671:s=&quot;2i&quot;,h=2;break;case 35668:case 35672:s=&quot;3i&quot;,h=3;break;case 35669:case 35673:s=&quot;4i&quot;,h=4;break;case 5126:s=&quot;1f&quot;;break;case 35664:s=&quot;2f&quot;,h=2;break;case 35665:s=&quot;3f&quot;,h=3;break;case 35666:s=&quot;4f&quot;,h=4;break;case 35674:s=&quot;Matrix2fv&quot;;break;case 35675:s=&quot;Matrix3fv&quot;;break;case 35676:s=&quot;Matrix4fv&quot;}if(r(c,&quot;.uniform&quot;,s,&quot;(&quot;,g,&quot;,&quot;),&quot;M&quot;===s.charAt(0)){g=Math.pow(p-35674+2,2);var v=t.global.def(&quot;new Float32Array(&quot;,g,&quot;)&quot;);r(&quot;false,(Array.isArray(&quot;,f,&quot;)||&quot;,f,&quot; instanceof Float32Array)?&quot;,f,&quot;:(&quot;,a(g,function(t){return v+&quot;[&quot;+t+&quot;]=&quot;+f+&quot;[&quot;+t+&quot;]&quot;}),&quot;,&quot;,v,&quot;)&quot;)}else r(1&lt;h?a(h,function(t){return f+&quot;[&quot;+t+&quot;]&quot;}):f);r(&quot;);&quot;)}}function V(t,e,r,n){function i(i){var a=h[i];return a?a.contextDep&amp;&amp;n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(f,&quot;.&quot;,i)}function a(){function t(){r(l,&quot;.drawElementsInstancedANGLE(&quot;,[d,m,v,g+&quot;&lt;&lt;((&quot;+v+&quot;-5121)&gt;&gt;1)&quot;,s],&quot;);&quot;)}function e(){r(l,&quot;.drawArraysInstancedANGLE(&quot;,[d,g,m,s],&quot;);&quot;)}p?y?t():(r(&quot;if(&quot;,p,&quot;){&quot;),t(),r(&quot;}else{&quot;),e(),r(&quot;}&quot;)):e()}function o(){function t(){r(u+&quot;.drawElements(&quot;+[d,m,v,g+&quot;&lt;&lt;((&quot;+v+&quot;-5121)&gt;&gt;1)&quot;]+&quot;);&quot;)}function e(){r(u+&quot;.drawArrays(&quot;+[d,g,m]+&quot;);&quot;)}p?y?t():(r(&quot;if(&quot;,p,&quot;){&quot;),t(),r(&quot;}else{&quot;),e(),r(&quot;}&quot;)):e()}var s,l,c=t.shared,u=c.gl,f=c.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&amp;&amp;n.contextDynamic||i.propDep)&amp;&amp;(a=r),i=i.append(t,a)):i=a.def(f,&quot;.&quot;,&quot;elements&quot;),i&amp;&amp;a(&quot;if(&quot;+i+&quot;)&quot;+u+&quot;.bindBuffer(34963,&quot;+i+&quot;.buffer.buffer);&quot;),i}(),d=i(&quot;primitive&quot;),g=i(&quot;offset&quot;),m=function(){var i=h.count,a=e;return i?((i.contextDep&amp;&amp;n.contextDynamic||i.propDep)&amp;&amp;(a=r),i=i.append(t,a)):i=a.def(f,&quot;.&quot;,&quot;count&quot;),i}();if(&quot;number&quot;==typeof m){if(0===m)return}else r(&quot;if(&quot;,m,&quot;){&quot;),r.exit(&quot;}&quot;);K&amp;&amp;(s=i(&quot;instances&quot;),l=t.instancing);var v=p+&quot;.type&quot;,y=h.elements&amp;&amp;D(h.elements);K&amp;&amp;(&quot;number&quot;!=typeof s||0&lt;=s)?&quot;string&quot;==typeof s?(r(&quot;if(&quot;,s,&quot;&gt;0){&quot;),a(),r(&quot;}else if(&quot;,s,&quot;&lt;0){&quot;),o(),r(&quot;}&quot;)):a():o()}function q(t,e,r,n,i){return i=(e=b()).proc(&quot;body&quot;,i),K&amp;&amp;(e.instancing=i.def(e.shared.extensions,&quot;.angle_instanced_arrays&quot;)),t(e,i,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),V(t,e,e,r)}function G(t,e,r,n){function i(){return!0}t.batchId=&quot;a1&quot;,L(t,e),N(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),V(t,e,e,r)}function W(t,e,r,n){function i(t){return t.contextDep&amp;&amp;o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,&quot;for(&quot;,s,&quot;=0;&quot;,s,&quot;&lt;&quot;,&quot;a1&quot;,&quot;;++&quot;,s,&quot;){&quot;,l,&quot;=&quot;,&quot;a0&quot;,&quot;[&quot;,s,&quot;];&quot;,u,&quot;}&quot;,c.exit),r.needsContext&amp;&amp;T(t,u,r.context),r.needsFramebuffer&amp;&amp;S(t,u,r.framebuffer),C(t,u,r.state,i),r.profile&amp;&amp;i(r.profile)&amp;&amp;F(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,a),N(t,u,r,n.attributes,i),j(t,c,r,n.uniforms,a),j(t,u,r,n.uniforms,i),V(t,c,u,r)):(e=t.global.def(&quot;{}&quot;),n=r.shader.progVar.append(t,u),l=u.def(n,&quot;.id&quot;),c=u.def(e,&quot;[&quot;,l,&quot;]&quot;),u(t.shared.gl,&quot;.useProgram(&quot;,n,&quot;.program);&quot;,&quot;if(!&quot;,c,&quot;){&quot;,c,&quot;=&quot;,e,&quot;[&quot;,l,&quot;]=&quot;,t.link(function(e){return q(G,t,r,e,2)}),&quot;(&quot;,n,&quot;);}&quot;,c,&quot;.call(this,a0[&quot;,s,&quot;],&quot;,s,&quot;);&quot;))}function Y(t,r){function n(e){var n=r.shader[e];n&amp;&amp;i.set(a.shader,&quot;.&quot;+e,n.append(t,i))}var i=t.proc(&quot;scope&quot;,3);t.batchId=&quot;a2&quot;;var a=t.shared,o=a.current;T(t,i,r.context),r.framebuffer&amp;&amp;r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);m(n)?n.forEach(function(r,n){i.set(t.next[e],&quot;[&quot;+n+&quot;]&quot;,r)}):i.set(a.next,&quot;.&quot;+e,n)}),F(t,i,r,!0,!0),[&quot;elements&quot;,&quot;offset&quot;,&quot;count&quot;,&quot;instances&quot;,&quot;primitive&quot;].forEach(function(e){var n=r.draw[e];n&amp;&amp;i.set(a.draw,&quot;.&quot;+e,&quot;&quot;+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,&quot;[&quot;+e.id(n)+&quot;]&quot;,r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){i.set(a,&quot;.&quot;+t,n[t])})}),n(&quot;vert&quot;),n(&quot;frag&quot;),0&lt;Object.keys(r.state).length&amp;&amp;(i(o,&quot;.dirty=true;&quot;),i.exit(o,&quot;.dirty=true;&quot;)),i(&quot;a1(&quot;,t.shared.context,&quot;,a0,&quot;,t.batchId,&quot;);&quot;)}function X(t,e,r){var n=e.static[r];if(n&amp;&amp;function(t){if(&quot;object&quot;==typeof t&amp;&amp;!m(t)){for(var e=Object.keys(t),r=0;r&lt;e.length;++r)if(U.isDynamic(t[e[r]]))return!0;return!1}}(n)){var i=t.global,a=Object.keys(n),o=!1,s=!1,l=!1,c=t.global.def(&quot;{}&quot;);a.forEach(function(e){var r=n[e];if(U.isDynamic(r))&quot;function&quot;==typeof r&amp;&amp;(r=n[e]=U.unbox(r)),e=B(r,null),o=o||e.thisDep,l=l||e.propDep,s=s||e.contextDep;else{switch(i(c,&quot;.&quot;,e,&quot;=&quot;),typeof r){case&quot;number&quot;:i(r);break;case&quot;string&quot;:i('&quot;',r,'&quot;');break;case&quot;object&quot;:Array.isArray(r)&amp;&amp;i(&quot;[&quot;,r.join(),&quot;]&quot;);break;default:i(t.link(r))}i(&quot;;&quot;)}}),e.dynamic[r]=new U.DynamicVariable(4,{thisDep:o,contextDep:s,propDep:l,ref:c,append:function(t,e){a.forEach(function(r){var i=n[r];U.isDynamic(i)&amp;&amp;(i=t.invoke(e,i),e(c,&quot;.&quot;,r,&quot;=&quot;,i,&quot;;&quot;))})}}),delete e.static[r]}}var Z=u.Record,$={add:32774,subtract:32778,&quot;reverse subtract&quot;:32779};r.ext_blend_minmax&amp;&amp;($.min=32775,$.max=32776);var K=r.angle_instanced_arrays,Q=r.webgl_draw_buffers,tt={dirty:!0,profile:g.profile},et={},nt=[],it={},at={};y(&quot;dither&quot;,3024),y(&quot;blend.enable&quot;,3042),x(&quot;blend.color&quot;,&quot;blendColor&quot;,[0,0,0,0]),x(&quot;blend.equation&quot;,&quot;blendEquationSeparate&quot;,[32774,32774]),x(&quot;blend.func&quot;,&quot;blendFuncSeparate&quot;,[1,0,1,0]),y(&quot;depth.enable&quot;,2929,!0),x(&quot;depth.func&quot;,&quot;depthFunc&quot;,513),x(&quot;depth.range&quot;,&quot;depthRange&quot;,[0,1]),x(&quot;depth.mask&quot;,&quot;depthMask&quot;,!0),x(&quot;colorMask&quot;,&quot;colorMask&quot;,[!0,!0,!0,!0]),y(&quot;cull.enable&quot;,2884),x(&quot;cull.face&quot;,&quot;cullFace&quot;,1029),x(&quot;frontFace&quot;,&quot;frontFace&quot;,2305),x(&quot;lineWidth&quot;,&quot;lineWidth&quot;,1),y(&quot;polygonOffset.enable&quot;,32823),x(&quot;polygonOffset.offset&quot;,&quot;polygonOffset&quot;,[0,0]),y(&quot;sample.alpha&quot;,32926),y(&quot;sample.enable&quot;,32928),x(&quot;sample.coverage&quot;,&quot;sampleCoverage&quot;,[1,!1]),y(&quot;stencil.enable&quot;,2960),x(&quot;stencil.mask&quot;,&quot;stencilMask&quot;,-1),x(&quot;stencil.func&quot;,&quot;stencilFunc&quot;,[519,0,-1]),x(&quot;stencil.opFront&quot;,&quot;stencilOpSeparate&quot;,[1028,7680,7680,7680]),x(&quot;stencil.opBack&quot;,&quot;stencilOpSeparate&quot;,[1029,7680,7680,7680]),y(&quot;scissor.enable&quot;,3089),x(&quot;scissor.box&quot;,&quot;scissor&quot;,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),x(&quot;viewport&quot;,&quot;viewport&quot;,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var ot={gl:t,context:p,strings:e,next:et,current:tt,draw:h,elements:o,buffer:i,shader:f,attributes:u.state,uniforms:c,framebuffer:l,extensions:r,timer:d,isBufferArgs:P},st={primTypes:rt,compareFuncs:kt,blendFuncs:wt,blendEquations:$,stencilOps:Mt,glTypes:J,orientationType:At};Q&amp;&amp;(st.backBuffer=[1029],st.drawBuffer=a(n.maxDrawbuffers,function(t){return 0===t?[0]:a(t,function(t){return 36064+t})}));var lt=0;return{next:et,current:tt,procs:function(){var t=b(),e=t.proc(&quot;poll&quot;),r=t.proc(&quot;refresh&quot;),i=t.block();e(i),r(i);var o,s=t.shared,l=s.gl,c=s.next,u=s.current;i(u,&quot;.dirty=false;&quot;),S(t,e),S(t,r,null,!0),K&amp;&amp;(o=t.link(K));for(var f=0;f&lt;n.maxAttributes;++f){var h=r.def(s.attributes,&quot;[&quot;,f,&quot;]&quot;),p=t.cond(h,&quot;.buffer&quot;);p.then(l,&quot;.enableVertexAttribArray(&quot;,f,&quot;);&quot;,l,&quot;.bindBuffer(&quot;,34962,&quot;,&quot;,h,&quot;.buffer.buffer);&quot;,l,&quot;.vertexAttribPointer(&quot;,f,&quot;,&quot;,h,&quot;.size,&quot;,h,&quot;.type,&quot;,h,&quot;.normalized,&quot;,h,&quot;.stride,&quot;,h,&quot;.offset);&quot;).else(l,&quot;.disableVertexAttribArray(&quot;,f,&quot;);&quot;,l,&quot;.vertexAttrib4f(&quot;,f,&quot;,&quot;,h,&quot;.x,&quot;,h,&quot;.y,&quot;,h,&quot;.z,&quot;,h,&quot;.w);&quot;,h,&quot;.buffer=null;&quot;),r(p),K&amp;&amp;r(o,&quot;.vertexAttribDivisorANGLE(&quot;,f,&quot;,&quot;,h,&quot;.divisor);&quot;)}return Object.keys(it).forEach(function(n){var a=it[n],o=i.def(c,&quot;.&quot;,n),s=t.block();s(&quot;if(&quot;,o,&quot;){&quot;,l,&quot;.enable(&quot;,a,&quot;)}else{&quot;,l,&quot;.disable(&quot;,a,&quot;)}&quot;,u,&quot;.&quot;,n,&quot;=&quot;,o,&quot;;&quot;),r(s),e(&quot;if(&quot;,o,&quot;!==&quot;,u,&quot;.&quot;,n,&quot;){&quot;,s,&quot;}&quot;)}),Object.keys(at).forEach(function(n){var o,s,f=at[n],h=tt[n],p=t.block();p(l,&quot;.&quot;,f,&quot;(&quot;),m(h)?(f=h.length,o=t.global.def(c,&quot;.&quot;,n),s=t.global.def(u,&quot;.&quot;,n),p(a(f,function(t){return o+&quot;[&quot;+t+&quot;]&quot;}),&quot;);&quot;,a(f,function(t){return s+&quot;[&quot;+t+&quot;]=&quot;+o+&quot;[&quot;+t+&quot;];&quot;}).join(&quot;&quot;)),e(&quot;if(&quot;,a(f,function(t){return o+&quot;[&quot;+t+&quot;]!==&quot;+s+&quot;[&quot;+t+&quot;]&quot;}).join(&quot;||&quot;),&quot;){&quot;,p,&quot;}&quot;)):(o=i.def(c,&quot;.&quot;,n),s=i.def(u,&quot;.&quot;,n),p(o,&quot;);&quot;,u,&quot;.&quot;,n,&quot;=&quot;,o,&quot;;&quot;),e(&quot;if(&quot;,o,&quot;!==&quot;,s,&quot;){&quot;,p,&quot;}&quot;)),r(p)}),t.compile()}(),compile:function(t,e,r,n,i){var a=b();return a.stats=a.link(i),Object.keys(e.static).forEach(function(t){X(a,e,t)}),_t.forEach(function(e){X(a,t,e)}),r=A(t,e,r,n),function(t,e){var r=t.proc(&quot;draw&quot;,1);L(t,r),T(t,r,e.context),S(t,r,e.framebuffer),E(t,r,e),C(t,r,e.state),F(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,&quot;.useProgram(&quot;,n,&quot;.program);&quot;),e.shader.program)H(t,r,e,e.shader.program);else{var i=t.global.def(&quot;{}&quot;),a=r.def(n,&quot;.id&quot;),o=r.def(i,&quot;[&quot;,a,&quot;]&quot;);r(t.cond(o).then(o,&quot;.call(this,a0);&quot;).else(o,&quot;=&quot;,i,&quot;[&quot;,a,&quot;]=&quot;,t.link(function(r){return q(H,t,e,r,1)}),&quot;(&quot;,n,&quot;);&quot;,o,&quot;.call(this,a0);&quot;))}0&lt;Object.keys(e.state).length&amp;&amp;r(t.shared.current,&quot;.dirty=true;&quot;)}(a,r),Y(a,r),function(t,e){function r(t){return t.contextDep&amp;&amp;i||t.propDep}var n=t.proc(&quot;batch&quot;,2);t.batchId=&quot;0&quot;,L(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(T(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&amp;&amp;i&amp;&amp;(o=!0),o||S(t,n,s)):S(t,n,null),e.state.viewport&amp;&amp;e.state.viewport.propDep&amp;&amp;(i=!0),E(t,n,e),C(t,n,e.state,function(t){return!r(t)}),e.profile&amp;&amp;r(e.profile)||F(t,n,e,!1,&quot;a1&quot;),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&amp;&amp;i||a.propDep)W(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,&quot;.useProgram(&quot;,a,&quot;.program);&quot;),e.shader.program)W(t,n,e,e.shader.program);else{var s=t.global.def(&quot;{}&quot;),l=(o=n.def(a,&quot;.id&quot;),n.def(s,&quot;[&quot;,o,&quot;]&quot;));n(t.cond(l).then(l,&quot;.call(this,a0,a1);&quot;).else(l,&quot;=&quot;,s,&quot;[&quot;,o,&quot;]=&quot;,t.link(function(r){return q(W,t,e,r,2)}),&quot;(&quot;,a,&quot;);&quot;,l,&quot;.call(this,a0,a1);&quot;))}0&lt;Object.keys(e.state).length&amp;&amp;n(t.shared.current,&quot;.dirty=true;&quot;)}(a,r),a.compile()}}}function N(t,e){for(var r=0;r&lt;t.length;++r)if(t[r]===e)return r;return-1}var j=function(t,e){for(var r=Object.keys(e),n=0;n&lt;r.length;++n)t[r[n]]=e[r[n]];return t},V=0,U={DynamicVariable:t,define:function(r,n){return new t(r,e(n+&quot;&quot;))},isDynamic:function(e){return&quot;function&quot;==typeof e&amp;&amp;!e._reglType||e instanceof t},unbox:function(e,r){return&quot;function&quot;==typeof e?new t(0,e):e},accessor:e},q={next:&quot;function&quot;==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:&quot;function&quot;==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},H=&quot;undefined&quot;!=typeof performance&amp;&amp;performance.now?function(){return performance.now()}:function(){return+new Date},G=s();G.zero=s();var W=function(t,e){var r=1;e.ext_texture_filter_anisotropic&amp;&amp;(r=t.getParameter(34047));var n=1,i=1;e.webgl_draw_buffers&amp;&amp;(n=t.getParameter(34852),i=t.getParameter(36063));var a=!!e.oes_texture_float;if(a){a=t.createTexture(),t.bindTexture(3553,a),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var o=t.createFramebuffer();if(t.bindFramebuffer(36160,o),t.framebufferTexture2D(36160,36064,3553,a,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))a=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=G.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?a=!1:(t.deleteFramebuffer(o),t.deleteTexture(a),a=1===s[0]),G.freeType(s)}}return s=!0,s=t.createTexture(),o=G.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,o),G.freeType(o),t.bindTexture(34067,null),t.deleteTexture(s),s=!t.getError(),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:a,npotTextureCube:s}},Y=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},X=function(t){return Object.keys(t).map(function(e){return t[e]})},Z={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a&lt;e.length;++a)i*=e[a];else i=0;switch(r=n||G.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e&lt;n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a&lt;n;++a)for(var o=t[a],s=0;s&lt;e;++s)r[i++]=o[s];break;case 3:c(t,e[0],e[1],e[2],r,0);break;default:!function t(e,r,n,i,a){for(var o=1,s=n+1;s&lt;r.length;++s)o*=r[s];var l=r[n];if(4==r.length-n){var u=r[n+1],f=r[n+2];for(r=r[n+3],s=0;s&lt;l;++s)c(e[s],u,f,r,i,a),a+=o}else for(s=0;s&lt;l;++s)t(e[s],r,n+1,i,a),a+=o}(t,e,0,r,0)}return r}},$={&quot;[object Int8Array]&quot;:5120,&quot;[object Int16Array]&quot;:5122,&quot;[object Int32Array]&quot;:5124,&quot;[object Uint8Array]&quot;:5121,&quot;[object Uint8ClampedArray]&quot;:5121,&quot;[object Uint16Array]&quot;:5123,&quot;[object Uint32Array]&quot;:5125,&quot;[object Float32Array]&quot;:5126,&quot;[object Float64Array]&quot;:5121,&quot;[object ArrayBuffer]&quot;:5121},J={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},K={dynamic:35048,stream:35040,static:35044},Q=Z.flatten,tt=Z.shape,et=[];et[5120]=1,et[5122]=2,et[5124]=4,et[5121]=1,et[5123]=2,et[5125]=4,et[5126]=4;var rt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,&quot;line loop&quot;:2,&quot;line strip&quot;:3,&quot;triangle strip&quot;:5,&quot;triangle fan&quot;:6},nt=new Float32Array(1),it=new Uint32Array(nt.buffer),at=[9984,9986,9985,9987],ot=[0,6409,6410,6407,6408],st={};st[6409]=st[6406]=st[6402]=1,st[34041]=st[6410]=2,st[6407]=st[35904]=3,st[6408]=st[35906]=4;var lt=v(&quot;HTMLCanvasElement&quot;),ct=v(&quot;CanvasRenderingContext2D&quot;),ut=v(&quot;ImageBitmap&quot;),ft=v(&quot;HTMLImageElement&quot;),ht=v(&quot;HTMLVideoElement&quot;),pt=Object.keys($).concat([lt,ct,ut,ft,ht]),dt=[];dt[5121]=1,dt[5126]=4,dt[36193]=2,dt[5123]=2,dt[5125]=4;var gt=[];gt[32854]=2,gt[32855]=2,gt[36194]=2,gt[34041]=4,gt[33776]=.5,gt[33777]=.5,gt[33778]=1,gt[33779]=1,gt[35986]=.5,gt[35987]=1,gt[34798]=1,gt[35840]=.5,gt[35841]=.25,gt[35842]=.5,gt[35843]=.25,gt[36196]=.5;var mt=[];mt[32854]=2,mt[32855]=2,mt[36194]=2,mt[33189]=2,mt[36168]=1,mt[34041]=4,mt[35907]=4,mt[34836]=16,mt[34842]=8,mt[34843]=6;var vt=function(t,e,r,n,i){function a(t){this.id=c++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&amp;&amp;(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete u[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,&quot;rgb5 a1&quot;:32855,depth:33189,stencil:36168,&quot;depth stencil&quot;:34041};e.ext_srgb&amp;&amp;(s.srgba=35907),e.ext_color_buffer_half_float&amp;&amp;(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&amp;&amp;(s.rgba32f=34836);var l=[];Object.keys(s).forEach(function(t){l[s[t]]=t});var c=0,u={};return a.prototype.decRef=function(){0&gt;=--this.refCount&amp;&amp;o(this)},i.profile&amp;&amp;(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if(&quot;object&quot;==typeof e&amp;&amp;e?(&quot;shape&quot;in e?(n=0|(a=e.shape)[0],a=0|a[1]):(&quot;radius&quot;in e&amp;&amp;(n=a=0|e.radius),&quot;width&quot;in e&amp;&amp;(n=0|e.width),&quot;height&quot;in e&amp;&amp;(a=0|e.height)),&quot;format&quot;in e&amp;&amp;(u=s[e.format])):&quot;number&quot;==typeof e?(n=0|e,a=&quot;number&quot;==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&amp;&amp;(c.stats.size=mt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&amp;&amp;a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&amp;&amp;(c.stats.size=mt[c.format]*c.width*c.height),o)},o._reglType=&quot;renderbuffer&quot;,o._renderbuffer=c,i.profile&amp;&amp;(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;,&quot;w&quot;],_t=&quot;blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset&quot;.split(&quot; &quot;),wt={0:0,1:1,zero:0,one:1,&quot;src color&quot;:768,&quot;one minus src color&quot;:769,&quot;src alpha&quot;:770,&quot;one minus src alpha&quot;:771,&quot;dst color&quot;:774,&quot;one minus dst color&quot;:775,&quot;dst alpha&quot;:772,&quot;one minus dst alpha&quot;:773,&quot;constant color&quot;:32769,&quot;one minus constant color&quot;:32770,&quot;constant alpha&quot;:32771,&quot;one minus constant alpha&quot;:32772,&quot;src alpha saturate&quot;:776},kt={never:512,less:513,&quot;&lt;&quot;:513,equal:514,&quot;=&quot;:514,&quot;==&quot;:514,&quot;===&quot;:514,lequal:515,&quot;&lt;=&quot;:515,greater:516,&quot;&gt;&quot;:516,notequal:517,&quot;!=&quot;:517,&quot;!==&quot;:517,gequal:518,&quot;&gt;=&quot;:518,always:519},Mt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,&quot;increment wrap&quot;:34055,&quot;decrement wrap&quot;:34056,invert:5386},At={cw:2304,ccw:2305},Tt=new I(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&amp;&amp;w.update(),Q=null;else{Q=q.next(e),f();for(var t=Z.length-1;0&lt;=t;--t){var r=Z[t];r&amp;&amp;r(z,null,0)}m.flush(),w&amp;&amp;w.update()}}function r(){!Q&amp;&amp;0&lt;Z.length&amp;&amp;(Q=q.next(e))}function n(){Q&amp;&amp;(q.cancel(e),Q=null)}function a(t){t.preventDefault(),n(),$.forEach(function(t){t()})}function o(t){m.getError(),y.restore(),D.restore(),O.restore(),R.restore(),B.restore(),V.restore(),w&amp;&amp;w.restore(),G.procs.refresh(),r(),J.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];U.isDynamic(i)?r[n]=U.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}var r=e(t.context||{}),n=e(t.uniforms||{}),i=e(t.attributes||{}),a=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+&quot;.&quot;+n]=e[n]})}}var r=j({},t);return delete r.uniforms,delete r.attributes,delete r.context,&quot;stencil&quot;in r&amp;&amp;r.stencil.op&amp;&amp;(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e(&quot;blend&quot;),e(&quot;depth&quot;),e(&quot;cull&quot;),e(&quot;stencil&quot;),e(&quot;polygonOffset&quot;),e(&quot;scissor&quot;),e(&quot;sample&quot;),r}(t));t={gpuTime:0,cpuTime:0,count:0};var o=(r=G.compile(a,i,n,r,t)).draw,s=r.batch,l=r.scope,c=[];return j(function(t,e){var r;if(&quot;function&quot;==typeof t)return l.call(this,null,t,0);if(&quot;function&quot;==typeof e)if(&quot;number&quot;==typeof t)for(r=0;r&lt;t;++r)l.call(this,null,e,r);else{if(!Array.isArray(t))return l.call(this,t,e,0);for(r=0;r&lt;t.length;++r)l.call(this,t[r],e,r)}else if(&quot;number&quot;==typeof t){if(0&lt;t)return s.call(this,function(t){for(;c.length&lt;t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return o.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function l(t,e){var r=0;G.procs.poll();var n=e.color;n&amp;&amp;(m.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),&quot;depth&quot;in e&amp;&amp;(m.clearDepth(+e.depth),r|=256),&quot;stencil&quot;in e&amp;&amp;(m.clearStencil(0|e.stencil),r|=1024),m.clear(r)}function c(t){return Z.push(t),r(),{cancel:function(){var e=N(Z,t);Z[e]=function t(){var e=N(Z,t);Z[e]=Z[Z.length-1],--Z.length,0&gt;=Z.length&amp;&amp;n()}}}}function u(){var t=Y.viewport,e=Y.scissor_box;t[0]=t[1]=e[0]=e[1]=0,z.viewportWidth=z.framebufferWidth=z.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,z.viewportHeight=z.framebufferHeight=z.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){z.tick+=1,z.time=g(),u(),G.procs.poll()}function h(){u(),G.procs.refresh(),w&amp;&amp;w.update()}function g(){return(H()-k)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i&lt;e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('&quot;'+a+'&quot; extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach(function(t){if(!r(t))throw Error(&quot;(regl): error restoring extension &quot;+t)})}}}(m,t);if(!y)return null;var x=function(){var t={&quot;&quot;:0},e=[&quot;&quot;];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),b={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},_=y.extensions,w=function(t,e){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(t,e,n){var i=s.pop()||new r;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=n,l.push(i)}var i=e.ext_disjoint_timer_query;if(!i)return null;var a=[],o=[],s=[],l=[],c=[],u=[];return{beginQuery:function(t){var e=a.pop()||i.createQueryEXT();i.beginQueryEXT(35007,e),o.push(e),n(o.length-1,o.length,t)},endQuery:function(){i.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,e;if(0!==(t=o.length)){u.length=Math.max(u.length,t+1),c.length=Math.max(c.length,t+1),c[0]=0;var r=u[0]=0;for(e=t=0;e&lt;o.length;++e){var n=o[e];i.getQueryObjectEXT(n,34919)?(r+=i.getQueryObjectEXT(n,34918),a.push(n)):o[t++]=n,c[e+1]=r,u[e+1]=t}for(o.length=t,e=t=0;e&lt;l.length;++e){var f=(r=l[e]).startQueryIndex;n=r.endQueryIndex,r.sum+=c[n]-c[f],f=u[f],(n=u[n])===f?(r.stats.gpuTime+=r.sum/1e6,s.push(r)):(r.startQueryIndex=f,r.endQueryIndex=n,l[t++]=r)}l.length=t}},getNumPendingQueries:function(){return o.length},clear:function(){a.push.apply(a,o);for(var t=0;t&lt;a.length;t++)i.deleteQueryEXT(a[t]);o.length=0,a.length=0},restore:function(){o.length=0,a.length=0}}}(0,_),k=H(),C=m.drawingBufferWidth,L=m.drawingBufferHeight,z={tick:0,time:0,viewportWidth:C,viewportHeight:L,framebufferWidth:C,framebufferHeight:L,drawingBufferWidth:C,drawingBufferHeight:L,pixelRatio:t.pixelRatio},P=W(m,_),O=(C=function(t,e,r,n){for(t=r.maxAttributes,e=Array(t),r=0;r&lt;t;++r)e[r]=new T;return{Record:T,scope:{},state:e}}(m,_,P),p(m,b,t,C)),I=d(m,_,O,b),D=S(m,x,b,t),R=M(m,_,P,function(){G.procs.poll()},z,b,t),B=vt(m,_,0,b,t),V=A(m,_,P,R,B,b),G=F(m,x,_,P,O,I,0,V,{},C,D,{elements:null,primitive:4,count:-1,offset:0,instances:-1},z,w,t),Y=(x=E(m,V,G.procs.poll,z),G.next),X=m.canvas,Z=[],$=[],J=[],K=[t.onDestroy],Q=null;X&amp;&amp;(X.addEventListener(&quot;webglcontextlost&quot;,a,!1),X.addEventListener(&quot;webglcontextrestored&quot;,o,!1));var tt=V.setFBO=s({framebuffer:U.define.call(null,1,&quot;framebuffer&quot;)});return h(),v=j(s,{clear:function(t){if(&quot;framebuffer&quot;in t)if(t.framebuffer&amp;&amp;&quot;framebufferCube&quot;===t.framebuffer_reglType)for(var e=0;6&gt;e;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(t,l);else l(0,t)},prop:U.define.bind(null,1),context:U.define.bind(null,2),this:U.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return I.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:B.create,framebuffer:V.create,framebufferCube:V.createCube,attributes:v,frame:c,on:function(t,e){var r;switch(t){case&quot;frame&quot;:return c(e);case&quot;lost&quot;:r=$;break;case&quot;restore&quot;:r=J;break;case&quot;destroy&quot;:r=K}return r.push(e),{cancel:function(){for(var t=0;t&lt;r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:P,hasExtension:function(t){return 0&lt;=P.extensions.indexOf(t.toLowerCase())},read:x,destroy:function(){Z.length=0,n(),X&amp;&amp;(X.removeEventListener(&quot;webglcontextlost&quot;,a),X.removeEventListener(&quot;webglcontextrestored&quot;,o)),D.clear(),V.clear(),B.clear(),R.clear(),I.clear(),O.clear(),w&amp;&amp;w.clear(),K.forEach(function(t){t()})},_gl:m,_refresh:h,poll:function(){f(),w&amp;&amp;w.update()},now:g,stats:b}),t.onDone(null,v),v}},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?e.exports=i():n.createREGL=i()},{}],476:[function(t,e,r){&quot;use strict&quot;;var n,i=&quot;&quot;;e.exports=function(t,e){if(&quot;string&quot;!=typeof t)throw new TypeError(&quot;expected a string&quot;);if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||&quot;undefined&quot;==typeof n)n=t,i=&quot;&quot;;else if(i.length&gt;=r)return i.substr(0,r);for(;r&gt;i.length&amp;&amp;e&gt;1;)1&amp;e&amp;&amp;(i+=t),e&gt;&gt;=1,t+=t;return i=(i+=t).substr(0,r)}},{}],477:[function(t,e,r){(function(t){e.exports=t.performance&amp;&amp;t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{}],478:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i&gt;=0;--i){var a=r,o=t[i],s=(r=a+o)-a,l=o-s;l&amp;&amp;(t[--n]=r,r=l)}for(var c=0,i=n;i&lt;e;++i){var a=t[i],o=r,s=(r=a+o)-a,l=o-s;l&amp;&amp;(t[c++]=l)}return t[c++]=r,t.length=c,t}},{}],479:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;),a=t(&quot;robust-scale&quot;),o=t(&quot;robust-compress&quot;),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n&lt;t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a&lt;t.length;++a)a!==e&amp;&amp;(i[o++]=t[n][a]);return r}function c(t){if(2===t.length)return[&quot;sum(prod(&quot;,t[0][0],&quot;,&quot;,t[1][1],&quot;),prod(-&quot;,t[0][1],&quot;,&quot;,t[1][0],&quot;))&quot;].join(&quot;&quot;);for(var e=[],r=0;r&lt;t.length;++r)e.push([&quot;scale(&quot;,c(l(t,r)),&quot;,&quot;,(n=r,1&amp;n?&quot;-&quot;:&quot;&quot;),t[0][r],&quot;)&quot;].join(&quot;&quot;));return function t(e){if(1===e.length)return e[0];if(2===e.length)return[&quot;sum(&quot;,e[0],&quot;,&quot;,e[1],&quot;)&quot;].join(&quot;&quot;);var r=e.length&gt;&gt;1;return[&quot;sum(&quot;,t(e.slice(0,r)),&quot;,&quot;,t(e.slice(r)),&quot;)&quot;].join(&quot;&quot;)}(e);var n}function u(t){return new Function(&quot;sum&quot;,&quot;scale&quot;,&quot;prod&quot;,&quot;compress&quot;,[&quot;function robustDeterminant&quot;,t,&quot;(m){return compress(&quot;,c(function(t){for(var e=new Array(t),r=0;r&lt;t;++r){e[r]=new Array(t);for(var n=0;n&lt;t;++n)e[r][n]=[&quot;m[&quot;,r,&quot;][&quot;,n,&quot;]&quot;].join(&quot;&quot;)}return e}(t)),&quot;)};return robustDeterminant&quot;,t].join(&quot;&quot;))(i,a,n,o)}var f=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;f.length&lt;s;)f.push(u(f.length));for(var t=[],r=[&quot;function robustDeterminant(m){switch(m.length){&quot;],n=0;n&lt;s;++n)t.push(&quot;det&quot;+n),r.push(&quot;case &quot;,n,&quot;:return det&quot;,n,&quot;(m);&quot;);r.push(&quot;}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant&quot;),t.push(&quot;CACHE&quot;,&quot;gen&quot;,r.join(&quot;&quot;));var i=Function.apply(void 0,t);for(e.exports=i.apply(void 0,f.concat([f,u])),n=0;n&lt;f.length;++n)e.exports[n]=f[n]}()},{&quot;robust-compress&quot;:478,&quot;robust-scale&quot;:485,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],480:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;);e.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a&lt;t.length;++a)r=i(r,n(t[a],e[a]));return r}},{&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],481:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;),a=t(&quot;robust-subtract&quot;),o=t(&quot;robust-scale&quot;),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n&lt;t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a&lt;t.length;++a)a!==e&amp;&amp;(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[&quot;sum(&quot;,t[0],&quot;,&quot;,t[1],&quot;)&quot;].join(&quot;&quot;);var e=t.length&gt;&gt;1;return[&quot;sum(&quot;,c(t.slice(0,e)),&quot;,&quot;,c(t.slice(e)),&quot;)&quot;].join(&quot;&quot;)}function u(t,e){if(&quot;m&quot;===t.charAt(0)){if(&quot;w&quot;===e.charAt(0)){var r=t.split(&quot;[&quot;);return[&quot;w&quot;,e.substr(1),&quot;m&quot;,r[0].substr(1)].join(&quot;&quot;)}return[&quot;prod(&quot;,t,&quot;,&quot;,e,&quot;)&quot;].join(&quot;&quot;)}return u(e,t)}function f(t){if(2===t.length)return[[&quot;diff(&quot;,u(t[0][0],t[1][1]),&quot;,&quot;,u(t[1][0],t[0][1]),&quot;)&quot;].join(&quot;&quot;)];for(var e=[],r=0;r&lt;t.length;++r)e.push([&quot;scale(&quot;,c(f(l(t,r))),&quot;,&quot;,(n=r,!0&amp;n?&quot;-&quot;:&quot;&quot;),t[0][r],&quot;)&quot;].join(&quot;&quot;));return e;var n}function h(t,e){for(var r=[],n=0;n&lt;e-2;++n)r.push([&quot;prod(m&quot;,t,&quot;[&quot;,n,&quot;],m&quot;,t,&quot;[&quot;,n,&quot;])&quot;].join(&quot;&quot;));return c(r)}function p(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r&lt;t;++r){e[r]=new Array(t);for(var n=0;n&lt;t;++n)e[r][n]=[&quot;m&quot;,n,&quot;[&quot;,t-r-2,&quot;]&quot;].join(&quot;&quot;)}return e}(t),u=0;u&lt;t;++u)s[0][u]=&quot;1&quot;,s[t-1][u]=&quot;w&quot;+u;for(u=0;u&lt;t;++u)0==(1&amp;u)?e.push.apply(e,f(l(s,u))):r.push.apply(r,f(l(s,u)));var p=c(e),d=c(r),g=&quot;exactInSphere&quot;+t,m=[];for(u=0;u&lt;t;++u)m.push(&quot;m&quot;+u);var v=[&quot;function &quot;,g,&quot;(&quot;,m.join(),&quot;){&quot;];for(u=0;u&lt;t;++u){v.push(&quot;var w&quot;,u,&quot;=&quot;,h(u,t),&quot;;&quot;);for(var y=0;y&lt;t;++y)y!==u&amp;&amp;v.push(&quot;var w&quot;,u,&quot;m&quot;,y,&quot;=scale(w&quot;,u,&quot;,m&quot;,y,&quot;[0]);&quot;)}return v.push(&quot;var p=&quot;,p,&quot;,n=&quot;,d,&quot;,d=diff(p,n);return d[d.length-1];}return &quot;,g),new Function(&quot;sum&quot;,&quot;diff&quot;,&quot;prod&quot;,&quot;scale&quot;,v.join(&quot;&quot;))(i,a,n,o)}var d=[function(){return 0},function(){return 0},function(){return 0}];!function(){for(;d.length&lt;=s;)d.push(p(d.length));for(var t=[],r=[&quot;slow&quot;],n=0;n&lt;=s;++n)t.push(&quot;a&quot;+n),r.push(&quot;o&quot;+n);var i=[&quot;function testInSphere(&quot;,t.join(),&quot;){switch(arguments.length){case 0:case 1:return 0;&quot;];for(n=2;n&lt;=s;++n)i.push(&quot;case &quot;,n,&quot;:return o&quot;,n,&quot;(&quot;,t.slice(0,n).join(),&quot;);&quot;);i.push(&quot;}var s=new Array(arguments.length);for(var i=0;i&lt;arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere&quot;),r.push(i.join(&quot;&quot;));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=p(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n&lt;=s;++n)e.exports[n]=d[n]}()},{&quot;robust-scale&quot;:485,&quot;robust-subtract&quot;:487,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],482:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-determinant&quot;),i=6;function a(t){for(var e=&quot;robustLinearSolve&quot;+t+&quot;d&quot;,r=[&quot;function &quot;,e,&quot;(A,b){return [&quot;],i=0;i&lt;t;++i){r.push(&quot;det([&quot;);for(var a=0;a&lt;t;++a){a&gt;0&amp;&amp;r.push(&quot;,&quot;),r.push(&quot;[&quot;);for(var o=0;o&lt;t;++o)o&gt;0&amp;&amp;r.push(&quot;,&quot;),o===i?r.push(&quot;+b[&quot;,a,&quot;]&quot;):r.push(&quot;+A[&quot;,a,&quot;][&quot;,o,&quot;]&quot;);r.push(&quot;]&quot;)}r.push(&quot;]),&quot;)}r.push(&quot;det(A)]}return &quot;,e);var s=new Function(&quot;det&quot;,r.join(&quot;&quot;));return s(t&lt;6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length&lt;i;)o.push(a(o.length));for(var t=[],r=[&quot;function dispatchLinearSolve(A,b){switch(A.length){&quot;],n=0;n&lt;i;++n)t.push(&quot;s&quot;+n),r.push(&quot;case &quot;,n,&quot;:return s&quot;,n,&quot;(A,b);&quot;);r.push(&quot;}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve&quot;),t.push(&quot;CACHE&quot;,&quot;g&quot;,r.join(&quot;&quot;));var s=Function.apply(void 0,t);for(e.exports=s.apply(void 0,o.concat([o,a])),n=0;n&lt;i;++n)e.exports[n]=o[n]}()},{&quot;robust-determinant&quot;:479}],483:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;),a=t(&quot;robust-scale&quot;),o=t(&quot;robust-subtract&quot;),s=5;function l(t,e){for(var r=new Array(t.length-1),n=1;n&lt;t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a&lt;t.length;++a)a!==e&amp;&amp;(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[&quot;sum(&quot;,t[0],&quot;,&quot;,t[1],&quot;)&quot;].join(&quot;&quot;);var e=t.length&gt;&gt;1;return[&quot;sum(&quot;,c(t.slice(0,e)),&quot;,&quot;,c(t.slice(e)),&quot;)&quot;].join(&quot;&quot;)}function u(t){if(2===t.length)return[[&quot;sum(prod(&quot;,t[0][0],&quot;,&quot;,t[1][1],&quot;),prod(-&quot;,t[0][1],&quot;,&quot;,t[1][0],&quot;))&quot;].join(&quot;&quot;)];for(var e=[],r=0;r&lt;t.length;++r)e.push([&quot;scale(&quot;,c(u(l(t,r))),&quot;,&quot;,(n=r,1&amp;n?&quot;-&quot;:&quot;&quot;),t[0][r],&quot;)&quot;].join(&quot;&quot;));return e;var n}function f(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r&lt;t;++r){e[r]=new Array(t);for(var n=0;n&lt;t;++n)e[r][n]=[&quot;m&quot;,n,&quot;[&quot;,t-r-1,&quot;]&quot;].join(&quot;&quot;)}return e}(t),f=[],h=0;h&lt;t;++h)0==(1&amp;h)?e.push.apply(e,u(l(s,h))):r.push.apply(r,u(l(s,h))),f.push(&quot;m&quot;+h);var p=c(e),d=c(r),g=&quot;orientation&quot;+t+&quot;Exact&quot;,m=[&quot;function &quot;,g,&quot;(&quot;,f.join(),&quot;){var p=&quot;,p,&quot;,n=&quot;,d,&quot;,d=sub(p,n);return d[d.length-1];};return &quot;,g].join(&quot;&quot;);return new Function(&quot;sum&quot;,&quot;prod&quot;,&quot;scale&quot;,&quot;sub&quot;,m)(i,n,a,o)}var h=f(3),p=f(4),d=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i&gt;0){if(a&lt;=0)return o;n=i+a}else{if(!(i&lt;0))return o;if(a&gt;=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o&gt;=s||o&lt;=-s?o:h(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+h*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b&gt;_||-b&gt;_?b:p(t,e,r,n)}];!function(){for(;d.length&lt;=s;)d.push(f(d.length));for(var t=[],r=[&quot;slow&quot;],n=0;n&lt;=s;++n)t.push(&quot;a&quot;+n),r.push(&quot;o&quot;+n);var i=[&quot;function getOrientation(&quot;,t.join(),&quot;){switch(arguments.length){case 0:case 1:return 0;&quot;];for(n=2;n&lt;=s;++n)i.push(&quot;case &quot;,n,&quot;:return o&quot;,n,&quot;(&quot;,t.slice(0,n).join(),&quot;);&quot;);i.push(&quot;}var s=new Array(arguments.length);for(var i=0;i&lt;arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation&quot;),r.push(i.join(&quot;&quot;));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=f(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n&lt;=s;++n)e.exports[n]=d[n]}()},{&quot;robust-scale&quot;:485,&quot;robust-subtract&quot;:487,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],484:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-sum&quot;),i=t(&quot;robust-scale&quot;);e.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length&lt;e.length)for(var a=0;a&lt;t.length;++a)r=n(r,i(e,t[a]));else for(var a=0;a&lt;e.length;++a)r=n(r,i(t,e[a]));return r}},{&quot;robust-scale&quot;:485,&quot;robust-sum&quot;:488}],485:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;two-sum&quot;);e.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],c=0;n(t[0],e,s),s[0]&amp;&amp;(o[c++]=s[0]);for(var u=1;u&lt;r;++u){n(t[u],e,l);var f=s[1];i(f,l[0],s),s[0]&amp;&amp;(o[c++]=s[0]);var h=l[1],p=s[1],d=h+p,g=d-h,m=p-g;s[1]=d,m&amp;&amp;(o[c++]=m)}s[1]&amp;&amp;(o[c++]=s[1]);0===c&amp;&amp;(o[c++]=0);return o.length=c,o}},{&quot;two-product&quot;:517,&quot;two-sum&quot;:518}],486:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a&gt;0&amp;&amp;o&gt;0||a&lt;0&amp;&amp;o&lt;0)return!1;var s=n(r,t,e),l=n(i,t,e);if(s&gt;0&amp;&amp;l&gt;0||s&lt;0&amp;&amp;l&lt;0)return!1;if(0===a&amp;&amp;0===o&amp;&amp;0===s&amp;&amp;0===l)return function(t,e,r,n){for(var i=0;i&lt;2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u),h=Math.max(c,u);if(h&lt;s||l&lt;f)return!1}return!0}(t,e,r,i);return!0};var n=t(&quot;robust-orientation&quot;)[3]},{&quot;robust-orientation&quot;:483}],487:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&amp;&amp;1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],-e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=-e[c],d=u(p);h&lt;d?(a=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(a=p,(c+=1)&lt;n&amp;&amp;(p=-e[c],d=u(p)));l&lt;r&amp;&amp;h&lt;d||c&gt;=n?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=-e[c],d=u(p)));var g,m,v=i+a,y=v-i,x=a-y,b=x,_=v;for(;l&lt;r&amp;&amp;c&lt;n;)h&lt;d?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=-e[c],d=u(p))),(x=(a=b)-(y=(v=i+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g;for(;l&lt;r;)(x=(a=b)-(y=(v=(i=f)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(l+=1)&lt;r&amp;&amp;(f=t[l]);for(;c&lt;n;)(x=(a=b)-(y=(v=(i=p)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(c+=1)&lt;n&amp;&amp;(p=-e[c]);b&amp;&amp;(o[s++]=b);_&amp;&amp;(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],488:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&amp;&amp;1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=e[c],d=u(p);h&lt;d?(a=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(a=p,(c+=1)&lt;n&amp;&amp;(p=e[c],d=u(p)));l&lt;r&amp;&amp;h&lt;d||c&gt;=n?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=e[c],d=u(p)));var g,m,v=i+a,y=v-i,x=a-y,b=x,_=v;for(;l&lt;r&amp;&amp;c&lt;n;)h&lt;d?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=e[c],d=u(p))),(x=(a=b)-(y=(v=i+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g;for(;l&lt;r;)(x=(a=b)-(y=(v=(i=f)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(l+=1)&lt;r&amp;&amp;(f=t[l]);for(;c&lt;n;)(x=(a=b)-(y=(v=(i=p)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(c+=1)&lt;n&amp;&amp;(p=e[c]);b&amp;&amp;(o[s++]=b);_&amp;&amp;(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],489:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t&lt;0?-1:t&gt;0?1:0}},{}],490:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return i(n(t))};var n=t(&quot;boundary-cells&quot;),i=t(&quot;reduce-simplicial-complex&quot;)},{&quot;boundary-cells&quot;:82,&quot;reduce-simplicial-complex&quot;:469}],491:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,s){r=r||0,&quot;undefined&quot;==typeof s&amp;&amp;(s=function(t){for(var e=t.length,r=0,n=0;n&lt;e;++n)r=0|Math.max(r,t[n].length);return r-1}(t));if(0===t.length||s&lt;1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a&lt;r;++a)n[a]=t[a]&lt;e|0;return n}(e,+r),c=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,c=0;c&lt;r;++c)for(var u=t[c],e=u.length,f=0;f&lt;e;++f)for(var h=0;h&lt;f;++h){var p=u[h],d=u[f];s[l++]=0|Math.min(p,d),s[l++]=0|Math.max(p,d)}a(n(s,[l/2|0,2]));for(var g=2,c=2;c&lt;l;c+=2)s[c-2]===s[c]&amp;&amp;s[c-1]===s[c+1]||(s[g++]=s[c],s[g++]=s[c+1]);return n(s,[g/2|0,2])}(t,s),u=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),c=0,u=0;u&lt;s;++u){var f=o[2*u],h=o[2*u+1];if(r[f]!==r[h]){var p=e[f],d=e[h];o[2*c]=f,o[2*c+1]=h,l[c++]=(d-a)/(d-p)}}return t.shape[0]=c,n(l,[c])}(c,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s&lt;n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o&lt;l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}r[2*o+1]=n;for(;++o&lt;e;)r[2*o]=r[2*o+1]=n;return r}(c,0|e.length),h=o(s)(t,c.data,f,l),p=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i&lt;e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(c),d=[].slice.call(u.data,0,u.shape[0]);return i.free(l),i.free(c.data),i.free(u.data),i.free(f),{cells:h,vertexIds:p,vertexWeights:d}};var n=t(&quot;ndarray&quot;),i=t(&quot;typedarray-pool&quot;),a=t(&quot;ndarray-sort&quot;),o=t(&quot;./lib/codegen&quot;)},{&quot;./lib/codegen&quot;:492,ndarray:430,&quot;ndarray-sort&quot;:428,&quot;typedarray-pool&quot;:519}],492:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=a[t];e||(e=a[t]=function(t){var e=0,r=new Array(t+1);r[0]=[[]];for(var a=1;a&lt;=t;++a)for(var o=r[a]=i(a),s=0;s&lt;o.length;++s)e=Math.max(e,o[a].length);var l=[&quot;function B(C,E,i,j){&quot;,&quot;var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];&quot;,&quot;while(l&lt;h){&quot;,&quot;var m=(l+h)&gt;&gt;1,v=E[2*m+1];&quot;,&quot;if(v===b){return m}&quot;,&quot;if(b&lt;v){h=m}else{l=m+1}&quot;,&quot;}&quot;,&quot;return l;&quot;,&quot;};&quot;,&quot;function getContour&quot;,t,&quot;d(F,E,C,S){&quot;,&quot;var n=F.length,R=[];&quot;,&quot;for(var i=0;i&lt;n;++i){var c=F[i],l=c.length;&quot;];function c(t){if(!(t.length&lt;=0)){l.push(&quot;R.push(&quot;);for(var e=0;e&lt;t.length;++e){var r=t[e];e&gt;0&amp;&amp;l.push(&quot;,&quot;),l.push(&quot;[&quot;);for(var n=0;n&lt;r.length;++n){var i=r[n];n&gt;0&amp;&amp;l.push(&quot;,&quot;),l.push(&quot;B(C,E,c[&quot;,i[0],&quot;],c[&quot;,i[1],&quot;])&quot;)}l.push(&quot;]&quot;)}l.push(&quot;);&quot;)}}for(var a=t+1;a&gt;1;--a){a&lt;t+1&amp;&amp;l.push(&quot;else &quot;),l.push(&quot;if(l===&quot;,a,&quot;){&quot;);for(var u=[],s=0;s&lt;a;++s)u.push(&quot;(S[c[&quot;+s+&quot;]]&lt;&lt;&quot;+s+&quot;)&quot;);l.push(&quot;var M=&quot;,u.join(&quot;+&quot;),&quot;;if(M===0||M===&quot;,(1&lt;&lt;a)-1,&quot;){continue}switch(M){&quot;);for(var o=r[a-1],s=0;s&lt;o.length;++s)l.push(&quot;case &quot;,s,&quot;:&quot;),c(o[s]),l.push(&quot;break;&quot;);l.push(&quot;}}&quot;)}return l.push(&quot;}return R;};return getContour&quot;,t,&quot;d&quot;),new Function(&quot;pool&quot;,l.join(&quot;&quot;))(n)}(t));return e};var n=t(&quot;typedarray-pool&quot;),i=t(&quot;marching-simplex-table&quot;),a={}},{&quot;marching-simplex-table&quot;:407,&quot;typedarray-pool&quot;:519}],493:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bit-twiddle&quot;),i=t(&quot;union-find&quot;);function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],a)-i(c+e[2],o);default:var u=t.slice(0);u.sort();var f=e.slice(0);f.sort();for(var h=0;h&lt;r;++h)if(n=u[h]-f[h])return n;return 0}}function o(t,e){return a(t[0],e[0])}function s(t,e){if(e){for(var r=t.length,n=new Array(r),i=0;i&lt;r;++i)n[i]=[t[i],e[i]];n.sort(o);for(i=0;i&lt;r;++i)t[i]=n[i][0],e[i]=n[i][1];return t}return t.sort(a),t}function l(t){if(0===t.length)return[];for(var e=1,r=t.length,n=1;n&lt;r;++n){var i=t[n];if(a(i,t[n-1])){if(n===e){e++;continue}t[e++]=i}}return t.length=e,t}function c(t,e){for(var r=0,n=t.length-1,i=-1;r&lt;=n;){var o=r+n&gt;&gt;1,s=a(t[o],e);s&lt;=0?(0===s&amp;&amp;(i=o),r=o+1):s&gt;0&amp;&amp;(n=o-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,o=r.length;i&lt;o;++i)r[i]=[];for(var s=[],l=(i=0,e.length);i&lt;l;++i)for(var u=e[i],f=u.length,h=1,p=1&lt;&lt;f;h&lt;p;++h){s.length=n.popCount(h);for(var d=0,g=0;g&lt;f;++g)h&amp;1&lt;&lt;g&amp;&amp;(s[d++]=u[g]);var m=c(t,s);if(!(m&lt;0))for(;r[m++].push(i),!(m&gt;=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e&lt;0)return[];for(var r=[],i=(1&lt;&lt;e+1)-1,a=0;a&lt;t.length;++a)for(var o=t[a],l=i;l&lt;1&lt;&lt;o.length;l=n.nextCombination(l)){for(var c=new Array(e+1),u=0,f=0;f&lt;o.length;++f)l&amp;1&lt;&lt;f&amp;&amp;(c[u++]=o[f]);r.push(c)}return s(r)}r.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n&lt;i;++n)e=r(e,t[n].length);return e-1},r.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n&lt;i;++n)for(var a=t[n],o=0,s=a.length;o&lt;s;++o)e=r(e,a[o]);return e+1},r.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r&lt;n;++r)e[r]=t[r].slice(0);return e},r.compareCells=a,r.normalize=s,r.unique=l,r.findCell=c,r.incidence=u,r.dual=function(t,e){if(!e)return u(l(f(t,0)),t);for(var r=new Array(e),n=0;n&lt;e;++n)r[n]=[];n=0;for(var i=t.length;n&lt;i;++n)for(var a=t[n],o=0,s=a.length;o&lt;s;++o)r[a[o]].push(n);return r},r.explode=function(t){for(var e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0|i.length,o=1,l=1&lt;&lt;a;o&lt;l;++o){for(var c=[],u=0;u&lt;a;++u)o&gt;&gt;&gt;u&amp;1&amp;&amp;c.push(i[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0,o=i.length;a&lt;o;++a){for(var l=new Array(i.length-1),c=0,u=0;c&lt;o;++c)c!==a&amp;&amp;(l[u++]=i[c]);e.push(l)}return s(e)},r.connectedComponents=function(t,e){return e?function(t,e){for(var r=new i(e),n=0;n&lt;t.length;++n)for(var a=t[n],o=0;o&lt;a.length;++o)for(var s=o+1;s&lt;a.length;++s)r.link(a[o],a[s]);var l=[],c=r.ranks;for(n=0;n&lt;c.length;++n)c[n]=-1;for(n=0;n&lt;t.length;++n){var u=r.find(t[n][0]);c[u]&lt;0?(c[u]=l.length,l.push([t[n].slice(0)])):l[c[u]].push(t[n].slice(0))}return l}(t,e):function(t){for(var e=l(s(f(t,0))),r=new i(e.length),n=0;n&lt;t.length;++n)for(var a=t[n],o=0;o&lt;a.length;++o)for(var u=c(e,[a[o]]),h=o+1;h&lt;a.length;++h)r.link(u,c(e,[a[h]]));var p=[],d=r.ranks;for(n=0;n&lt;d.length;++n)d[n]=-1;for(n=0;n&lt;t.length;++n){var g=r.find(c(e,[t[n][0]]));d[g]&lt;0?(d[g]=p.length,p.push([t[n].slice(0)])):p[d[g]].push(t[n].slice(0))}return p}(t)}},{&quot;bit-twiddle&quot;:79,&quot;union-find&quot;:520}],494:[function(t,e,r){arguments[4][79][0].apply(r,arguments)},{dup:79}],495:[function(t,e,r){arguments[4][493][0].apply(r,arguments)},{&quot;bit-twiddle&quot;:494,dup:493,&quot;union-find&quot;:496}],496:[function(t,e,r){&quot;use strict&quot;;function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e&lt;t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},n.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o&lt;s?a[r]=n:s&lt;o?a[n]=r:(a[n]=r,++i[r])}}},{}],497:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){for(var a=e.length,o=t.length,s=new Array(a),l=new Array(a),c=new Array(a),u=new Array(a),f=0;f&lt;a;++f)s[f]=l[f]=-1,c[f]=1/0,u[f]=!1;for(var f=0;f&lt;o;++f){var h=t[f];if(2!==h.length)throw new Error(&quot;Input must be a graph&quot;);var p=h[1],d=h[0];-1!==l[d]?l[d]=-2:l[d]=p,-1!==s[p]?s[p]=-2:s[p]=d}function g(t){if(u[t])return 1/0;var r,i,a,o,c,f=s[t],h=l[t];return f&lt;0||h&lt;0?1/0:(r=e[t],i=e[f],a=e[h],o=Math.abs(n(r,i,a)),c=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)),o/c)}function m(t,e){var r=M[t],n=M[e];M[t]=n,M[e]=r,A[r]=e,A[n]=t}function v(t){return c[M[t]]}function y(t){return 1&amp;t?t-1&gt;&gt;1:(t&gt;&gt;1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n&lt;S){var o=v(n);o&lt;r&amp;&amp;(a=n,r=o)}if(i&lt;S){var s=v(i);s&lt;r&amp;&amp;(a=i)}if(a===t)return t;m(t,a),t=a}}function b(t){for(var e=v(t);t&gt;0;){var r=y(t);if(r&gt;=0){var n=v(r);if(e&lt;n){m(t,r),t=r;continue}}return t}}function _(){if(S&gt;0){var t=M[0];return m(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=M[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]&gt;=0&amp;&amp;(s[r]=e),l[e]&gt;=0&amp;&amp;(l[e]=r),A[e]&gt;=0&amp;&amp;w(A[e],g(e)),A[r]&gt;=0&amp;&amp;w(A[r],g(r))}}for(var M=[],A=new Array(a),f=0;f&lt;a;++f){var T=c[f]=g(f);T&lt;1/0?(A[f]=M.length,M.push(f)):A[f]=-1}for(var S=M.length,f=S&gt;&gt;1;f&gt;=0;--f)x(f);for(;;){var E=_();if(E&lt;0||c[E]&gt;r)break;k(E)}for(var C=[],f=0;f&lt;a;++f)u[f]||(A[f]=C.length,C.push(e[f].slice()));C.length;function L(t,e){if(t[e]&lt;0)return e;var r=e,n=e;do{var i=t[n];if(!u[n]||i&lt;0||i===n)break;if(i=t[n=i],!u[n]||i&lt;0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}var z=[];return t.forEach(function(t){var e=L(s,t[0]),r=L(l,t[1]);if(e&gt;=0&amp;&amp;r&gt;=0&amp;&amp;e!==r){var n=A[e],i=A[r];n!==i&amp;&amp;z.push([n,i])}}),i.unique(i.normalize(z)),{positions:C,edges:z}};var n=t(&quot;robust-orientation&quot;),i=t(&quot;simplicial-complex&quot;)},{&quot;robust-orientation&quot;:483,&quot;simplicial-complex&quot;:495}],498:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r,a,o,s;if(e[0][0]&lt;e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]&gt;e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]&lt;t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]&gt;t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),c=n(r,a,o);if(l&lt;0){if(c&lt;=0)return l}else if(l&gt;0){if(c&gt;=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l&lt;0){if(c&lt;=0)return l}else if(l&gt;0){if(c&gt;=0)return l}else if(c)return c;return a[0]-s[0]};var n=t(&quot;robust-orientation&quot;);function i(t,e){var r,i,a,o;if(e[0][0]&lt;e[1][0])r=e[0],i=e[1];else{if(!(e[0][0]&gt;e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return l&lt;c?l-c:s&gt;u?s-u:l-u}r=e[1],i=e[0]}t[0][1]&lt;t[1][1]?(a=t[0],o=t[1]):(a=t[1],o=t[0]);var f=n(i,r,a);return f||((f=n(i,r,o))||o-i)}},{&quot;robust-orientation&quot;:483}],499:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=t.length,r=2*e,n=new Array(r),a=0;a&lt;e;++a){var l=t[a],c=l[0][0]&lt;l[1][0];n[2*a]=new f(l[0][0],l,c,a),n[2*a+1]=new f(l[1][0],l,!c,a)}n.sort(function(t,e){var r=t.x-e.x;return r||((r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1]))});for(var h=i(o),p=[],d=[],g=[],a=0;a&lt;r;){for(var m=n[a].x,v=[];a&lt;r;){var y=n[a];if(y.x!==m)break;a+=1,y.segment[0][0]===y.x&amp;&amp;y.segment[1][0]===y.x?y.create&amp;&amp;(y.segment[0][1]&lt;y.segment[1][1]?(v.push(new u(y.segment[0][1],y.index,!0,!0)),v.push(new u(y.segment[1][1],y.index,!1,!1))):(v.push(new u(y.segment[1][1],y.index,!0,!1)),v.push(new u(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}p.push(h.root),d.push(m),g.push(v)}return new s(p,d,g)};var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;functional-red-black-tree&quot;),a=t(&quot;robust-orientation&quot;),o=t(&quot;./lib/order-segments&quot;);function s(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function l(t,e){return t.y-e}function c(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]&lt;o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=a(n,i,e);if(s&lt;0)t=t.left;else if(s&gt;0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e&lt;0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&amp;&amp;(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&amp;&amp;(s=r.key),e&gt;0){var u=c(this.slabs[e-1],t);u&amp;&amp;(s?o(u.key,s)&gt;0&amp;&amp;(s=u.key,i=u.value):(i=u.value,s=u.key))}var f=this.horizontal[e];if(f.length&gt;0){var h=n.ge(f,t[1],l);if(h&lt;f.length){var p=f[h];if(t[1]===p.y){if(p.closed)return p.index;for(;h&lt;f.length-1&amp;&amp;f[h+1].y===t[1];)if((p=f[h+=1]).closed)return p.index;if(p.y===t[1]&amp;&amp;!p.start){if((h+=1)&gt;=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]&gt;s[1][0]&amp;&amp;(d=-d),d&gt;0&amp;&amp;(i=p.index)}else i=p.index;else p.y!==t[1]&amp;&amp;(i=p.index)}}}return i}},{&quot;./lib/order-segments&quot;:498,&quot;binary-search-bounds&quot;:78,&quot;functional-red-black-tree&quot;:218,&quot;robust-orientation&quot;:483}],500:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-dot-product&quot;),i=t(&quot;robust-sum&quot;);function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i&lt;0?i=0:i&gt;1&amp;&amp;(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l&lt;o;++l)s[l]=i*t[l]+a*r[l];return s}e.exports=function(t,e){for(var r=[],n=[],i=a(t[t.length-1],e),s=t[t.length-1],l=t[0],c=0;c&lt;t.length;++c,s=l){var u=a(l=t[c],e);if(i&lt;0&amp;&amp;u&gt;0||i&gt;0&amp;&amp;u&lt;0){var f=o(s,u,l,i);r.push(f),n.push(f.slice())}u&lt;0?n.push(l.slice()):u&gt;0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l&lt;t.length;++l,i=s){var c=a(s=t[l],e);(n&lt;0&amp;&amp;c&gt;0||n&gt;0&amp;&amp;c&lt;0)&amp;&amp;r.push(o(i,c,s,n)),c&gt;=0&amp;&amp;r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l&lt;t.length;++l,i=s){var c=a(s=t[l],e);(n&lt;0&amp;&amp;c&gt;0||n&gt;0&amp;&amp;c&lt;0)&amp;&amp;r.push(o(i,c,s,n)),c&lt;=0&amp;&amp;r.push(s.slice()),n=c}return r}},{&quot;robust-dot-product&quot;:480,&quot;robust-sum&quot;:488}],501:[function(t,e,r){!function(){&quot;use strict&quot;;var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function e(r){return function(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=&quot;&quot;;for(a=0;a&lt;d;a++)if(&quot;string&quot;==typeof r[a])g+=r[a];else if(Array.isArray(r[a])){if((s=r[a])[2])for(i=n[p],o=0;o&lt;s[2].length;o++){if(!i.hasOwnProperty(s[2][o]))throw new Error(e('[sprintf] property &quot;%s&quot; does not exist',s[2][o]));i=i[s[2][o]]}else i=s[1]?n[s[1]]:n[p++];if(t.not_type.test(s[8])&amp;&amp;t.not_primitive.test(s[8])&amp;&amp;i instanceof Function&amp;&amp;(i=i()),t.numeric_arg.test(s[8])&amp;&amp;&quot;number&quot;!=typeof i&amp;&amp;isNaN(i))throw new TypeError(e(&quot;[sprintf] expecting number but found %T&quot;,i));switch(t.number.test(s[8])&amp;&amp;(f=i&gt;=0),s[8]){case&quot;b&quot;:i=parseInt(i,10).toString(2);break;case&quot;c&quot;:i=String.fromCharCode(parseInt(i,10));break;case&quot;d&quot;:case&quot;i&quot;:i=parseInt(i,10);break;case&quot;j&quot;:i=JSON.stringify(i,null,s[6]?parseInt(s[6]):0);break;case&quot;e&quot;:i=s[7]?parseFloat(i).toExponential(s[7]):parseFloat(i).toExponential();break;case&quot;f&quot;:i=s[7]?parseFloat(i).toFixed(s[7]):parseFloat(i);break;case&quot;g&quot;:i=s[7]?String(Number(i.toPrecision(s[7]))):parseFloat(i);break;case&quot;o&quot;:i=(parseInt(i,10)&gt;&gt;&gt;0).toString(8);break;case&quot;s&quot;:i=String(i),i=s[7]?i.substring(0,s[7]):i;break;case&quot;t&quot;:i=String(!!i),i=s[7]?i.substring(0,s[7]):i;break;case&quot;T&quot;:i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s[7]?i.substring(0,s[7]):i;break;case&quot;u&quot;:i=parseInt(i,10)&gt;&gt;&gt;0;break;case&quot;v&quot;:i=i.valueOf(),i=s[7]?i.substring(0,s[7]):i;break;case&quot;x&quot;:i=(parseInt(i,10)&gt;&gt;&gt;0).toString(16);break;case&quot;X&quot;:i=(parseInt(i,10)&gt;&gt;&gt;0).toString(16).toUpperCase()}t.json.test(s[8])?g+=i:(!t.number.test(s[8])||f&amp;&amp;!s[3]?h=&quot;&quot;:(h=f?&quot;+&quot;:&quot;-&quot;,i=i.toString().replace(t.sign,&quot;&quot;)),c=s[4]?&quot;0&quot;===s[4]?&quot;0&quot;:s[4].charAt(1):&quot; &quot;,u=s[6]-(h+i).length,l=s[6]&amp;&amp;u&gt;0?c.repeat(u):&quot;&quot;,g+=s[5]?h+i+l:&quot;0&quot;===c?h+l+i:l+h+i)}return g}(function(e){if(i[e])return i[e];var r,n=e,a=[],o=0;for(;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push(&quot;%&quot;);else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError(&quot;[sprintf] unexpected placeholder&quot;);if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError(&quot;[sprintf] failed to parse named argument key&quot;);for(s.push(c[1]);&quot;&quot;!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError(&quot;[sprintf] failed to parse named argument key&quot;);s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error(&quot;[sprintf] mixing positional and named placeholders is not (yet) supported&quot;);a.push(r)}n=n.substring(r[0].length)}return i[e]=a}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var i=Object.create(null);&quot;undefined&quot;!=typeof r&amp;&amp;(r.sprintf=e,r.vsprintf=n),&quot;undefined&quot;!=typeof window&amp;&amp;(window.sprintf=e,window.vsprintf=n)}()},{}],502:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;parenthesis&quot;);e.exports=function(t,e,r){if(null==t)throw Error(&quot;First argument should be a string&quot;);if(null==e)throw Error(&quot;Separator should be a string or a RegExp&quot;);r?(&quot;string&quot;==typeof r||Array.isArray(r))&amp;&amp;(r={ignore:r}):r={},null==r.escape&amp;&amp;(r.escape=!0),null==r.ignore?r.ignore=[&quot;[]&quot;,&quot;()&quot;,&quot;{}&quot;,&quot;&lt;&gt;&quot;,'&quot;&quot;',&quot;''&quot;,&quot;``&quot;,&quot;\u201c\u201d&quot;,&quot;\xab\xbb&quot;]:(&quot;string&quot;==typeof r.ignore&amp;&amp;(r.ignore=[r.ignore]),r.ignore=r.ignore.map(function(t){return 1===t.length&amp;&amp;(t+=t),t}));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s&lt;a.length;s++){var l=a[s],c=a[s+1];&quot;\\&quot;===l[l.length-1]&amp;&amp;&quot;\\&quot;!==l[l.length-2]?(o.push(l+e+c),s++):o.push(l)}a=o}for(s=0;s&lt;a.length;s++)i[0]=a[s],a[s]=n.stringify(i,{flat:!0});return a}},{parenthesis:438}],503:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=t.length,r=new Array(e),n=new Array(e),i=new Array(e),a=new Array(e),o=new Array(e),s=new Array(e),l=0;l&lt;e;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var c,u=0,f=[],h=[];function p(e){var l=[e],c=[e];for(r[e]=n[e]=u,i[e]=!0,u+=1;c.length&gt;0;){e=c[c.length-1];var p=t[e];if(a[e]&lt;p.length){for(var d=a[e];d&lt;p.length;++d){var g=p[d];if(r[g]&lt;0){r[g]=n[g]=u,i[g]=!0,u+=1,l.push(g),c.push(g);break}i[g]&amp;&amp;(n[e]=0|Math.min(n[e],n[g])),o[g]&gt;=0&amp;&amp;s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){for(var m=[],v=[],y=0,d=l.length-1;d&gt;=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);for(var b=new Array(y),d=0;d&lt;v.length;d++)for(var _=0;_&lt;v[d].length;_++)b[--y]=v[d][_];h.push(b)}c.pop()}}}for(var l=0;l&lt;e;++l)r[l]&lt;0&amp;&amp;p(l);for(var l=0;l&lt;h.length;l++){var d=h[l];if(0!==d.length){d.sort(function(t,e){return t-e}),c=[d[0]];for(var g=1;g&lt;d.length;g++)d[g]!==d[g-1]&amp;&amp;c.push(d[g]);h[l]=c}}return{components:f,adjacencyList:h}}},{}],504:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t.split(&quot;&quot;).map(function(t){return t in n?n[t]:&quot;&quot;}).join(&quot;&quot;)};var n={&quot; &quot;:&quot; &quot;,0:&quot;\u2070&quot;,1:&quot;\xb9&quot;,2:&quot;\xb2&quot;,3:&quot;\xb3&quot;,4:&quot;\u2074&quot;,5:&quot;\u2075&quot;,6:&quot;\u2076&quot;,7:&quot;\u2077&quot;,8:&quot;\u2078&quot;,9:&quot;\u2079&quot;,&quot;+&quot;:&quot;\u207a&quot;,&quot;-&quot;:&quot;\u207b&quot;,a:&quot;\u1d43&quot;,b:&quot;\u1d47&quot;,c:&quot;\u1d9c&quot;,d:&quot;\u1d48&quot;,e:&quot;\u1d49&quot;,f:&quot;\u1da0&quot;,g:&quot;\u1d4d&quot;,h:&quot;\u02b0&quot;,i:&quot;\u2071&quot;,j:&quot;\u02b2&quot;,k:&quot;\u1d4f&quot;,l:&quot;\u02e1&quot;,m:&quot;\u1d50&quot;,n:&quot;\u207f&quot;,o:&quot;\u1d52&quot;,p:&quot;\u1d56&quot;,r:&quot;\u02b3&quot;,s:&quot;\u02e2&quot;,t:&quot;\u1d57&quot;,u:&quot;\u1d58&quot;,v:&quot;\u1d5b&quot;,w:&quot;\u02b7&quot;,x:&quot;\u02e3&quot;,y:&quot;\u02b8&quot;,z:&quot;\u1dbb&quot;}},{}],505:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){if(t.dimension&lt;=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=a(t,e),n=r.length,i=new Array(n),o=new Array(n),s=0;s&lt;n;++s)i[s]=[r[s]],o[s]=[s];return{positions:i,cells:o}}(t,e);var r=t.order.join()+&quot;-&quot;+t.dtype,s=o[r],e=+e||0;s||(s=o[r]=function(t,e){var r=t.length,a=[&quot;'use strict';&quot;],o=&quot;surfaceNets&quot;+t.join(&quot;_&quot;)+&quot;d&quot;+e;a.push(&quot;var contour=genContour({&quot;,&quot;order:[&quot;,t.join(),&quot;],&quot;,&quot;scalarArguments: 3,&quot;,&quot;phase:function phaseFunc(p,a,b,c) { return (p &gt; c)|0 },&quot;),&quot;generic&quot;===e&amp;&amp;a.push(&quot;getters:[0],&quot;);for(var s=[],l=[],c=0;c&lt;r;++c)s.push(&quot;d&quot;+c),l.push(&quot;d&quot;+c);for(var c=0;c&lt;1&lt;&lt;r;++c)s.push(&quot;v&quot;+c),l.push(&quot;v&quot;+c);for(var c=0;c&lt;1&lt;&lt;r;++c)s.push(&quot;p&quot;+c),l.push(&quot;p&quot;+c);s.push(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;),l.push(&quot;a&quot;,&quot;c&quot;),a.push(&quot;vertex:function vertexFunc(&quot;,s.join(),&quot;){&quot;);for(var u=[],c=0;c&lt;1&lt;&lt;r;++c)u.push(&quot;(p&quot;+c+&quot;&lt;&lt;&quot;+c+&quot;)&quot;);a.push(&quot;var m=(&quot;,u.join(&quot;+&quot;),&quot;)|0;if(m===0||m===&quot;,(1&lt;&lt;(1&lt;&lt;r))-1,&quot;){return}&quot;);var f=[],h=[];1&lt;&lt;(1&lt;&lt;r)&lt;=128?(a.push(&quot;switch(m){&quot;),h=a):a.push(&quot;switch(m&gt;&gt;&gt;7){&quot;);for(var c=0;c&lt;1&lt;&lt;(1&lt;&lt;r);++c){if(1&lt;&lt;(1&lt;&lt;r)&gt;128&amp;&amp;c%128==0){f.length&gt;0&amp;&amp;h.push(&quot;}}&quot;);var p=&quot;vExtra&quot;+f.length;a.push(&quot;case &quot;,c&gt;&gt;&gt;7,&quot;:&quot;,p,&quot;(m&amp;0x7f,&quot;,l.join(),&quot;);break;&quot;),h=[&quot;function &quot;,p,&quot;(m,&quot;,l.join(),&quot;){switch(m){&quot;],f.push(h)}h.push(&quot;case &quot;,127&amp;c,&quot;:&quot;);for(var d=new Array(r),g=new Array(r),m=new Array(r),v=new Array(r),y=0,x=0;x&lt;r;++x)d[x]=[],g[x]=[],m[x]=0,v[x]=0;for(var x=0;x&lt;1&lt;&lt;r;++x)for(var b=0;b&lt;r;++b){var _=x^1&lt;&lt;b;if(!(_&gt;x)&amp;&amp;!(c&amp;1&lt;&lt;_)!=!(c&amp;1&lt;&lt;x)){var w=1;c&amp;1&lt;&lt;_?g[b].push(&quot;v&quot;+_+&quot;-v&quot;+x):(g[b].push(&quot;v&quot;+x+&quot;-v&quot;+_),w=-w),w&lt;0?(d[b].push(&quot;-v&quot;+x+&quot;-v&quot;+_),m[b]+=2):(d[b].push(&quot;v&quot;+x+&quot;+v&quot;+_),m[b]-=2),y+=1;for(var k=0;k&lt;r;++k)k!==b&amp;&amp;(_&amp;1&lt;&lt;k?v[k]+=1:v[k]-=1)}}for(var M=[],b=0;b&lt;r;++b)if(0===d[b].length)M.push(&quot;d&quot;+b+&quot;-0.5&quot;);else{var A=&quot;&quot;;m[b]&lt;0?A=m[b]+&quot;*c&quot;:m[b]&gt;0&amp;&amp;(A=&quot;+&quot;+m[b]+&quot;*c&quot;);var T=d[b].length/y*.5,S=.5+v[b]/y*.5;M.push(&quot;d&quot;+b+&quot;-&quot;+S+&quot;-&quot;+T+&quot;*(&quot;+d[b].join(&quot;+&quot;)+A+&quot;)/(&quot;+g[b].join(&quot;+&quot;)+&quot;)&quot;)}h.push(&quot;a.push([&quot;,M.join(),&quot;]);&quot;,&quot;break;&quot;)}a.push(&quot;}},&quot;),f.length&gt;0&amp;&amp;h.push(&quot;}}&quot;);for(var E=[],c=0;c&lt;1&lt;&lt;r-1;++c)E.push(&quot;v&quot;+c);E.push(&quot;c0&quot;,&quot;c1&quot;,&quot;p0&quot;,&quot;p1&quot;,&quot;a&quot;,&quot;b&quot;,&quot;c&quot;),a.push(&quot;cell:function cellFunc(&quot;,E.join(),&quot;){&quot;);var C=i(r-1);a.push(&quot;if(p0){b.push(&quot;,C.map(function(t){return&quot;[&quot;+t.map(function(t){return&quot;v&quot;+t})+&quot;]&quot;}).join(),&quot;)}else{b.push(&quot;,C.map(function(t){var e=t.slice();return e.reverse(),&quot;[&quot;+e.map(function(t){return&quot;v&quot;+t})+&quot;]&quot;}).join(),&quot;)}}});function &quot;,o,&quot;(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return &quot;,o,&quot;;&quot;);for(var c=0;c&lt;f.length;++c)a.push(f[c].join(&quot;&quot;));return new Function(&quot;genContour&quot;,a.join(&quot;&quot;))(n)}(t.order,t.dtype));return s(t,e)};var n=t(&quot;ndarray-extract-contour&quot;),i=t(&quot;triangulate-hypercube&quot;),a=t(&quot;zero-crossings&quot;);var o={}},{&quot;ndarray-extract-contour&quot;:419,&quot;triangulate-hypercube&quot;:515,&quot;zero-crossings&quot;:548}],506:[function(t,e,r){&quot;use strict&quot;;Object.defineProperty(r,&quot;__esModule&quot;,{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&amp;&amp;(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&amp;&amp;s.return&amp;&amp;s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError(&quot;Invalid attempt to destructure non-iterable instance&quot;)}}(),i=2*Math.PI,a=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},o=function(t,e){var r=.551915024494,n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},s=function(t,e,r,n){var i=t*n-e*r&lt;0?-1:1,a=(t*r+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return a&gt;1&amp;&amp;(a=1),a&lt;-1&amp;&amp;(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,g=void 0===d?0:d,m=t.sweepFlag,v=void 0===m?0:m,y=[];if(0===u||0===f)return[];var x=Math.sin(p*i/360),b=Math.cos(p*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&amp;&amp;0===w)return[];u=Math.abs(u),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);k&gt;1&amp;&amp;(u*=Math.sqrt(k),f*=Math.sqrt(k));var M=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y&lt;0&amp;&amp;(y=0),y/=d*v+g*m;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,k=(h-x)/a,M=(p-b)/o,A=(-h-x)/a,T=(-p-b)/o,S=s(1,0,k,M),E=s(k,M,A,T);return 0===c&amp;&amp;E&gt;0&amp;&amp;(E-=i),1===c&amp;&amp;E&lt;0&amp;&amp;(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(M,4),T=A[0],S=A[1],E=A[2],C=A[3],L=Math.max(Math.ceil(Math.abs(C)/(i/4)),1);C/=L;for(var z=0;z&lt;L;z++)y.push(o(E,C)),E+=C;return y.map(function(t){var e=a(t[0],u,f,b,x,T,S),r=e.x,n=e.y,i=a(t[1],u,f,b,x,T,S),o=i.x,s=i.y,l=a(t[2],u,f,b,x,T,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}})},e.exports=r.default},{}],507:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;parse-svg-path&quot;),i=t(&quot;abs-svg-path&quot;),a=t(&quot;normalize-svg-path&quot;),o=t(&quot;is-svg-path&quot;),s=t(&quot;assert&quot;);e.exports=function(t){Array.isArray(t)&amp;&amp;1===t.length&amp;&amp;&quot;string&quot;==typeof t[0]&amp;&amp;(t=t[0]);&quot;string&quot;==typeof t&amp;&amp;(s(o(t),&quot;String is not an SVG path.&quot;),t=n(t));if(s(Array.isArray(t),&quot;Argument should be a string or an array of path segments.&quot;),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r&lt;l;r++)for(var c=t[r].slice(1),u=0;u&lt;c.length;u+=2)c[u+0]&lt;e[0]&amp;&amp;(e[0]=c[u+0]),c[u+1]&lt;e[1]&amp;&amp;(e[1]=c[u+1]),c[u+0]&gt;e[2]&amp;&amp;(e[2]=c[u+0]),c[u+1]&gt;e[3]&amp;&amp;(e[3]=c[u+1]);return e}},{&quot;abs-svg-path&quot;:47,assert:55,&quot;is-svg-path&quot;:404,&quot;normalize-svg-path&quot;:508,&quot;parse-svg-path&quot;:440}],508:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,p=0,d=0,g=t.length;d&lt;g;d++){var m=t[d],v=m[0];switch(v){case&quot;M&quot;:l=m[1],c=m[2];break;case&quot;A&quot;:var y=n({px:h,py:p,cx:m[6],cy:m[7],rx:m[1],ry:m[2],xAxisRotation:m[3],largeArcFlag:m[4],sweepFlag:m[5]});if(!y.length)continue;for(var x,b=0;b&lt;y.length;b++)x=y[b],m=[&quot;C&quot;,x.x1,x.y1,x.x2,x.y2,x.x,x.y],b&lt;y.length-1&amp;&amp;r.push(m);break;case&quot;S&quot;:var _=h,w=p;&quot;C&quot;!=e&amp;&amp;&quot;S&quot;!=e||(_+=_-o,w+=w-s),m=[&quot;C&quot;,_,w,m[1],m[2],m[3],m[4]];break;case&quot;T&quot;:&quot;Q&quot;==e||&quot;T&quot;==e?(u=2*h-u,f=2*p-f):(u=h,f=p),m=a(h,p,u,f,m[1],m[2]);break;case&quot;Q&quot;:u=m[1],f=m[2],m=a(h,p,m[1],m[2],m[3],m[4]);break;case&quot;L&quot;:m=i(h,p,m[1],m[2]);break;case&quot;H&quot;:m=i(h,p,m[1],p);break;case&quot;V&quot;:m=i(h,p,h,m[1]);break;case&quot;Z&quot;:m=i(h,p,l,c)}e=v,h=m[m.length-2],p=m[m.length-1],m.length&gt;4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}return r};var n=t(&quot;svg-arc-to-cubic-bezier&quot;);function i(t,e,r,n){return[&quot;C&quot;,t,e,r,n,r,n]}function a(t,e,r,n,i,a){return[&quot;C&quot;,t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{&quot;svg-arc-to-cubic-bezier&quot;:506}],509:[function(t,e,r){(function(r){&quot;use strict&quot;;var n=t(&quot;svg-path-bounds&quot;),i=t(&quot;parse-svg-path&quot;),a=t(&quot;draw-svg-path&quot;),o=t(&quot;is-svg-path&quot;),s=t(&quot;bitmap-sdf&quot;),l=document.createElement(&quot;canvas&quot;),c=l.getContext(&quot;2d&quot;);e.exports=function(t,e){if(!o(t))throw Error(&quot;Argument should be valid svg path string&quot;);e||(e={});var u,f;e.shape?(u=e.shape[0],f=e.shape[1]):(u=l.width=e.w||e.width||200,f=l.height=e.h||e.height||200);var h=Math.min(u,f),p=e.stroke||0,d=e.viewbox||e.viewBox||n(t),g=[u/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;c.fillStyle=&quot;black&quot;,c.fillRect(0,0,u,f),c.fillStyle=&quot;white&quot;,p&amp;&amp;(&quot;number&quot;!=typeof p&amp;&amp;(p=1),c.strokeStyle=p&gt;0?&quot;white&quot;:&quot;black&quot;,c.lineWidth=Math.abs(p));if(c.translate(.5*u,.5*f),c.scale(m,m),r.Path2D){var v=new Path2D(t);c.fill(v),p&amp;&amp;c.stroke(v)}else{var y=i(t);a(c,y),c.fill(),p&amp;&amp;c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;bitmap-sdf&quot;:80,&quot;draw-svg-path&quot;:152,&quot;is-svg-path&quot;:404,&quot;parse-svg-path&quot;:440,&quot;svg-path-bounds&quot;:507}],510:[function(t,e,r){(function(r){&quot;use strict&quot;;e.exports=function t(e,r,i){var i=i||{};var o=a[e];o||(o=a[e]={&quot; &quot;:{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length&lt;=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o&lt;e.length;++o)for(var s=e[o],l=0;l&lt;3;++l){var c=r[s[l]];n[i++]=c[0],n[i++]=c[1]+1.4,a=Math.max(c[0],a)}return{data:n,shape:a}}(n(r,{triangles:!0,font:e,textAlign:i.textAlign||&quot;left&quot;,textBaseline:&quot;alphabetic&quot;}));else{for(var l=r.split(/(\d|\s)/),c=new Array(l.length),u=0,f=0,h=0;h&lt;l.length;++h)c[h]=t(e,l[h]),u+=c[h].data.length,f+=c[h].shape,h&gt;0&amp;&amp;(f+=.02);for(var p=new Float32Array(u),d=0,g=-.5*f,h=0;h&lt;c.length;++h){for(var m=c[h].data,v=0;v&lt;m.length;v+=2)p[d++]=m[v]+g,p[d++]=m[v+1];g+=c[h].shape+.02}s=o[r]={data:p,shape:f}}return s};var n=t(&quot;vectorize-text&quot;),i=window||r.global||{},a=i.__TEXT_CACHE||{};i.__TEXT_CACHE={}}).call(this,t(&quot;_process&quot;))},{_process:462,&quot;vectorize-text&quot;:524}],511:[function(t,e,r){!function(t){var r=/^\s+/,n=/\s+$/,i=0,a=t.round,o=t.min,s=t.max,l=t.random;function c(e,l){if(l=l||{},(e=e||&quot;&quot;)instanceof c)return e;if(!(this instanceof c))return new c(e,l);var u=function(e){var i={r:0,g:0,b:0},a=1,l=null,c=null,u=null,f=!1,h=!1;&quot;string&quot;==typeof e&amp;&amp;(e=function(t){t=t.replace(r,&quot;&quot;).replace(n,&quot;&quot;).toLowerCase();var e,i=!1;if(S[t])t=S[t],i=!0;else if(&quot;transparent&quot;==t)return{r:0,g:0,b:0,a:0,format:&quot;name&quot;};if(e=j.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=j.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=j.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=j.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=j.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=j.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=j.hex8.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),a:R(e[4]),format:i?&quot;name&quot;:&quot;hex8&quot;};if(e=j.hex6.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:i?&quot;name&quot;:&quot;hex&quot;};if(e=j.hex4.exec(t))return{r:P(e[1]+&quot;&quot;+e[1]),g:P(e[2]+&quot;&quot;+e[2]),b:P(e[3]+&quot;&quot;+e[3]),a:R(e[4]+&quot;&quot;+e[4]),format:i?&quot;name&quot;:&quot;hex8&quot;};if(e=j.hex3.exec(t))return{r:P(e[1]+&quot;&quot;+e[1]),g:P(e[2]+&quot;&quot;+e[2]),b:P(e[3]+&quot;&quot;+e[3]),format:i?&quot;name&quot;:&quot;hex&quot;};return!1}(e));&quot;object&quot;==typeof e&amp;&amp;(V(e.r)&amp;&amp;V(e.g)&amp;&amp;V(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*L(p,255),g:255*L(d,255),b:255*L(g,255)},f=!0,h=&quot;%&quot;===String(e.r).substr(-1)?&quot;prgb&quot;:&quot;rgb&quot;):V(e.h)&amp;&amp;V(e.s)&amp;&amp;V(e.v)?(l=I(e.s),c=I(e.v),i=function(e,r,n){e=6*L(e,360),r=L(r,100),n=L(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,l,c),f=!0,h=&quot;hsv&quot;):V(e.h)&amp;&amp;V(e.s)&amp;&amp;V(e.l)&amp;&amp;(l=I(e.s),u=I(e.l),i=function(t,e,r){var n,i,a;function o(t,e,r){return r&lt;0&amp;&amp;(r+=1),r&gt;1&amp;&amp;(r-=1),r&lt;1/6?t+6*(e-t)*r:r&lt;.5?e:r&lt;2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r&lt;.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),f=!0,h=&quot;hsl&quot;),e.hasOwnProperty(&quot;a&quot;)&amp;&amp;(a=e.a));var p,d,g;return a=C(a),{ok:f,format:e.format||h,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r&lt;1&amp;&amp;(this._r=a(this._r)),this._g&lt;1&amp;&amp;(this._g=a(this._g)),this._b&lt;1&amp;&amp;(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c&gt;.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e&lt;r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,l:c}}function f(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=a,u=a-l;if(i=0===a?0:u/a,a==l)n=0;else{switch(a){case t:n=(e-r)/u+(e&lt;r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,v:c}}function h(t,e,r,n){var i=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16))];return n&amp;&amp;i[0].charAt(0)==i[0].charAt(1)&amp;&amp;i[1].charAt(0)==i[1].charAt(1)&amp;&amp;i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(&quot;&quot;)}function p(t,e,r,n){return[O(D(n)),O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16))].join(&quot;&quot;)}function d(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s-=e/100,r.s=z(r.s),c(r)}function g(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s+=e/100,r.s=z(r.s),c(r)}function m(t){return c(t).desaturate(100)}function v(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l+=e/100,r.l=z(r.l),c(r)}function y(t,e){e=0===e?0:e||10;var r=c(t).toRgb();return r.r=s(0,o(255,r.r-a(-e/100*255))),r.g=s(0,o(255,r.g-a(-e/100*255))),r.b=s(0,o(255,r.b-a(-e/100*255))),c(r)}function x(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l-=e/100,r.l=z(r.l),c(r)}function b(t,e){var r=c(t).toHsl(),n=(r.h+e)%360;return r.h=n&lt;0?360+n:n,c(r)}function _(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function w(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+120)%360,s:e.s,l:e.l}),c({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+90)%360,s:e.s,l:e.l}),c({h:(r+180)%360,s:e.s,l:e.l}),c({h:(r+270)%360,s:e.s,l:e.l})]}function M(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+72)%360,s:e.s,l:e.l}),c({h:(r+216)%360,s:e.s,l:e.l})]}function A(t,e,r){e=e||6,r=r||30;var n=c(t).toHsl(),i=360/r,a=[c(t)];for(n.h=(n.h-(i*e&gt;&gt;1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function T(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()&lt;128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,i=this.toRgb();return e=i.r/255,r=i.g/255,n=i.b/255,.2126*(e&lt;=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r&lt;=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n&lt;=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.v);return 1==this._a?&quot;hsv(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%)&quot;:&quot;hsva(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%, &quot;+this._roundA+&quot;)&quot;},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.l);return 1==this._a?&quot;hsl(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%)&quot;:&quot;hsla(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%, &quot;+this._roundA+&quot;)&quot;},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return&quot;#&quot;+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(D(n))];if(i&amp;&amp;o[0].charAt(0)==o[0].charAt(1)&amp;&amp;o[1].charAt(0)==o[1].charAt(1)&amp;&amp;o[2].charAt(0)==o[2].charAt(1)&amp;&amp;o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join(&quot;&quot;)}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return&quot;#&quot;+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?&quot;rgb(&quot;+a(this._r)+&quot;, &quot;+a(this._g)+&quot;, &quot;+a(this._b)+&quot;)&quot;:&quot;rgba(&quot;+a(this._r)+&quot;, &quot;+a(this._g)+&quot;, &quot;+a(this._b)+&quot;, &quot;+this._roundA+&quot;)&quot;},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+&quot;%&quot;,g:a(100*L(this._g,255))+&quot;%&quot;,b:a(100*L(this._b,255))+&quot;%&quot;,a:this._a}},toPercentageRgbString:function(){return 1==this._a?&quot;rgb(&quot;+a(100*L(this._r,255))+&quot;%, &quot;+a(100*L(this._g,255))+&quot;%, &quot;+a(100*L(this._b,255))+&quot;%)&quot;:&quot;rgba(&quot;+a(100*L(this._r,255))+&quot;%, &quot;+a(100*L(this._g,255))+&quot;%, &quot;+a(100*L(this._b,255))+&quot;%, &quot;+this._roundA+&quot;)&quot;},toName:function(){return 0===this._a?&quot;transparent&quot;:!(this._a&lt;1)&amp;&amp;(E[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e=&quot;#&quot;+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?&quot;GradientType = 1, &quot;:&quot;&quot;;if(t){var i=c(t);r=&quot;#&quot;+p(i._r,i._g,i._b,i._a)}return&quot;progid:DXImageTransform.Microsoft.gradient(&quot;+n+&quot;startColorstr=&quot;+e+&quot;,endColorstr=&quot;+r+&quot;)&quot;},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a&lt;1&amp;&amp;this._a&gt;=0;return e||!n||&quot;hex&quot;!==t&amp;&amp;&quot;hex6&quot;!==t&amp;&amp;&quot;hex3&quot;!==t&amp;&amp;&quot;hex4&quot;!==t&amp;&amp;&quot;hex8&quot;!==t&amp;&amp;&quot;name&quot;!==t?(&quot;rgb&quot;===t&amp;&amp;(r=this.toRgbString()),&quot;prgb&quot;===t&amp;&amp;(r=this.toPercentageRgbString()),&quot;hex&quot;!==t&amp;&amp;&quot;hex6&quot;!==t||(r=this.toHexString()),&quot;hex3&quot;===t&amp;&amp;(r=this.toHexString(!0)),&quot;hex4&quot;===t&amp;&amp;(r=this.toHex8String(!0)),&quot;hex8&quot;===t&amp;&amp;(r=this.toHex8String()),&quot;name&quot;===t&amp;&amp;(r=this.toName()),&quot;hsl&quot;===t&amp;&amp;(r=this.toHslString()),&quot;hsv&quot;===t&amp;&amp;(r=this.toHsvString()),r||this.toHexString()):&quot;name&quot;===t&amp;&amp;0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if(&quot;object&quot;==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&amp;&amp;(r[n]=&quot;a&quot;===n?t[n]:I(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&amp;&amp;c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),i=c(e).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(e,r){var n=c(e),i=c(r);return(t.max(n.getLuminance(),i.getLuminance())+.05)/(t.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,i,a=c.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:&quot;AA&quot;,size:&quot;small&quot;}).level||&quot;AA&quot;).toUpperCase(),r=(t.size||&quot;small&quot;).toLowerCase(),&quot;AA&quot;!==e&amp;&amp;&quot;AAA&quot;!==e&amp;&amp;(e=&quot;AA&quot;);&quot;small&quot;!==r&amp;&amp;&quot;large&quot;!==r&amp;&amp;(r=&quot;small&quot;);return{level:e,size:r}}(r)).level+n.size){case&quot;AAsmall&quot;:case&quot;AAAlarge&quot;:i=a&gt;=4.5;break;case&quot;AAlarge&quot;:i=a&gt;=3;break;case&quot;AAAsmall&quot;:i=a&gt;=7}return i},c.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;u&lt;e.length;u++)(n=c.readability(t,e[u]))&gt;l&amp;&amp;(l=n,s=c(e[u]));return c.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(t,[&quot;#fff&quot;,&quot;#000&quot;],r))};var S=c.names={aliceblue:&quot;f0f8ff&quot;,antiquewhite:&quot;faebd7&quot;,aqua:&quot;0ff&quot;,aquamarine:&quot;7fffd4&quot;,azure:&quot;f0ffff&quot;,beige:&quot;f5f5dc&quot;,bisque:&quot;ffe4c4&quot;,black:&quot;000&quot;,blanchedalmond:&quot;ffebcd&quot;,blue:&quot;00f&quot;,blueviolet:&quot;8a2be2&quot;,brown:&quot;a52a2a&quot;,burlywood:&quot;deb887&quot;,burntsienna:&quot;ea7e5d&quot;,cadetblue:&quot;5f9ea0&quot;,chartreuse:&quot;7fff00&quot;,chocolate:&quot;d2691e&quot;,coral:&quot;ff7f50&quot;,cornflowerblue:&quot;6495ed&quot;,cornsilk:&quot;fff8dc&quot;,crimson:&quot;dc143c&quot;,cyan:&quot;0ff&quot;,darkblue:&quot;00008b&quot;,darkcyan:&quot;008b8b&quot;,darkgoldenrod:&quot;b8860b&quot;,darkgray:&quot;a9a9a9&quot;,darkgreen:&quot;006400&quot;,darkgrey:&quot;a9a9a9&quot;,darkkhaki:&quot;bdb76b&quot;,darkmagenta:&quot;8b008b&quot;,darkolivegreen:&quot;556b2f&quot;,darkorange:&quot;ff8c00&quot;,darkorchid:&quot;9932cc&quot;,darkred:&quot;8b0000&quot;,darksalmon:&quot;e9967a&quot;,darkseagreen:&quot;8fbc8f&quot;,darkslateblue:&quot;483d8b&quot;,darkslategray:&quot;2f4f4f&quot;,darkslategrey:&quot;2f4f4f&quot;,darkturquoise:&quot;00ced1&quot;,darkviolet:&quot;9400d3&quot;,deeppink:&quot;ff1493&quot;,deepskyblue:&quot;00bfff&quot;,dimgray:&quot;696969&quot;,dimgrey:&quot;696969&quot;,dodgerblue:&quot;1e90ff&quot;,firebrick:&quot;b22222&quot;,floralwhite:&quot;fffaf0&quot;,forestgreen:&quot;228b22&quot;,fuchsia:&quot;f0f&quot;,gainsboro:&quot;dcdcdc&quot;,ghostwhite:&quot;f8f8ff&quot;,gold:&quot;ffd700&quot;,goldenrod:&quot;daa520&quot;,gray:&quot;808080&quot;,green:&quot;008000&quot;,greenyellow:&quot;adff2f&quot;,grey:&quot;808080&quot;,honeydew:&quot;f0fff0&quot;,hotpink:&quot;ff69b4&quot;,indianred:&quot;cd5c5c&quot;,indigo:&quot;4b0082&quot;,ivory:&quot;fffff0&quot;,khaki:&quot;f0e68c&quot;,lavender:&quot;e6e6fa&quot;,lavenderblush:&quot;fff0f5&quot;,lawngreen:&quot;7cfc00&quot;,lemonchiffon:&quot;fffacd&quot;,lightblue:&quot;add8e6&quot;,lightcoral:&quot;f08080&quot;,lightcyan:&quot;e0ffff&quot;,lightgoldenrodyellow:&quot;fafad2&quot;,lightgray:&quot;d3d3d3&quot;,lightgreen:&quot;90ee90&quot;,lightgrey:&quot;d3d3d3&quot;,lightpink:&quot;ffb6c1&quot;,lightsalmon:&quot;ffa07a&quot;,lightseagreen:&quot;20b2aa&quot;,lightskyblue:&quot;87cefa&quot;,lightslategray:&quot;789&quot;,lightslategrey:&quot;789&quot;,lightsteelblue:&quot;b0c4de&quot;,lightyellow:&quot;ffffe0&quot;,lime:&quot;0f0&quot;,limegreen:&quot;32cd32&quot;,linen:&quot;faf0e6&quot;,magenta:&quot;f0f&quot;,maroon:&quot;800000&quot;,mediumaquamarine:&quot;66cdaa&quot;,mediumblue:&quot;0000cd&quot;,mediumorchid:&quot;ba55d3&quot;,mediumpurple:&quot;9370db&quot;,mediumseagreen:&quot;3cb371&quot;,mediumslateblue:&quot;7b68ee&quot;,mediumspringgreen:&quot;00fa9a&quot;,mediumturquoise:&quot;48d1cc&quot;,mediumvioletred:&quot;c71585&quot;,midnightblue:&quot;191970&quot;,mintcream:&quot;f5fffa&quot;,mistyrose:&quot;ffe4e1&quot;,moccasin:&quot;ffe4b5&quot;,navajowhite:&quot;ffdead&quot;,navy:&quot;000080&quot;,oldlace:&quot;fdf5e6&quot;,olive:&quot;808000&quot;,olivedrab:&quot;6b8e23&quot;,orange:&quot;ffa500&quot;,orangered:&quot;ff4500&quot;,orchid:&quot;da70d6&quot;,palegoldenrod:&quot;eee8aa&quot;,palegreen:&quot;98fb98&quot;,paleturquoise:&quot;afeeee&quot;,palevioletred:&quot;db7093&quot;,papayawhip:&quot;ffefd5&quot;,peachpuff:&quot;ffdab9&quot;,peru:&quot;cd853f&quot;,pink:&quot;ffc0cb&quot;,plum:&quot;dda0dd&quot;,powderblue:&quot;b0e0e6&quot;,purple:&quot;800080&quot;,rebeccapurple:&quot;663399&quot;,red:&quot;f00&quot;,rosybrown:&quot;bc8f8f&quot;,royalblue:&quot;4169e1&quot;,saddlebrown:&quot;8b4513&quot;,salmon:&quot;fa8072&quot;,sandybrown:&quot;f4a460&quot;,seagreen:&quot;2e8b57&quot;,seashell:&quot;fff5ee&quot;,sienna:&quot;a0522d&quot;,silver:&quot;c0c0c0&quot;,skyblue:&quot;87ceeb&quot;,slateblue:&quot;6a5acd&quot;,slategray:&quot;708090&quot;,slategrey:&quot;708090&quot;,snow:&quot;fffafa&quot;,springgreen:&quot;00ff7f&quot;,steelblue:&quot;4682b4&quot;,tan:&quot;d2b48c&quot;,teal:&quot;008080&quot;,thistle:&quot;d8bfd8&quot;,tomato:&quot;ff6347&quot;,turquoise:&quot;40e0d0&quot;,violet:&quot;ee82ee&quot;,wheat:&quot;f5deb3&quot;,white:&quot;fff&quot;,whitesmoke:&quot;f5f5f5&quot;,yellow:&quot;ff0&quot;,yellowgreen:&quot;9acd32&quot;},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&amp;&amp;(e[t[r]]=r);return e}(S);function C(t){return t=parseFloat(t),(isNaN(t)||t&lt;0||t&gt;1)&amp;&amp;(t=1),t}function L(e,r){(function(t){return&quot;string&quot;==typeof t&amp;&amp;-1!=t.indexOf(&quot;.&quot;)&amp;&amp;1===parseFloat(t)})(e)&amp;&amp;(e=&quot;100%&quot;);var n=function(t){return&quot;string&quot;==typeof t&amp;&amp;-1!=t.indexOf(&quot;%&quot;)}(e);return e=o(r,s(0,parseFloat(e))),n&amp;&amp;(e=parseInt(e*r,10)/100),t.abs(e-r)&lt;1e-6?1:e%r/parseFloat(r)}function z(t){return o(1,s(0,t))}function P(t){return parseInt(t,16)}function O(t){return 1==t.length?&quot;0&quot;+t:&quot;&quot;+t}function I(t){return t&lt;=1&amp;&amp;(t=100*t+&quot;%&quot;),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return P(t)/255}var B,F,N,j=(F=&quot;[\\s|\\(]+(&quot;+(B=&quot;(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)&quot;)+&quot;)[,|\\s]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)\\s*\\)?&quot;,N=&quot;[\\s|\\(]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)\\s*\\)?&quot;,{CSS_UNIT:new RegExp(B),rgb:new RegExp(&quot;rgb&quot;+F),rgba:new RegExp(&quot;rgba&quot;+N),hsl:new RegExp(&quot;hsl&quot;+F),hsla:new RegExp(&quot;hsla&quot;+N),hsv:new RegExp(&quot;hsv&quot;+F),hsva:new RegExp(&quot;hsva&quot;+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(t){return!!j.CSS_UNIT.exec(t)}&quot;undefined&quot;!=typeof e&amp;&amp;e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],512:[function(t,e,r){&quot;use strict&quot;;function n(t){if(t instanceof Float32Array)return t;if(&quot;number&quot;==typeof t)return new Float32Array([t])[0];var e=new Float32Array(t);return e.set(t),e}e.exports=n,e.exports.float32=e.exports.float=n,e.exports.fract32=e.exports.fract=function(t){if(&quot;number&quot;==typeof t)return n(t-n(t));for(var e=n(t),r=0,i=e.length;r&lt;i;r++)e[r]=t[r]-e[r];return e}},{}],513:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;parse-unit&quot;);e.exports=o;var i=96;function a(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*o(r[1],t)}function o(t,e){switch(e=e||document.body,t=(t||&quot;px&quot;).trim().toLowerCase(),e!==window&amp;&amp;e!==document||(e=document.body),t){case&quot;%&quot;:return e.clientHeight/100;case&quot;ch&quot;:case&quot;ex&quot;:return function(t,e){var r=document.createElement(&quot;div&quot;);r.style[&quot;font-size&quot;]=&quot;128&quot;+t,e.appendChild(r);var n=a(r,&quot;font-size&quot;)/128;return e.removeChild(r),n}(t,e);case&quot;em&quot;:return a(e,&quot;font-size&quot;);case&quot;rem&quot;:return a(document.body,&quot;font-size&quot;);case&quot;vw&quot;:return window.innerWidth/100;case&quot;vh&quot;:return window.innerHeight/100;case&quot;vmin&quot;:return Math.min(window.innerWidth,window.innerHeight)/100;case&quot;vmax&quot;:return Math.max(window.innerWidth,window.innerHeight)/100;case&quot;in&quot;:return i;case&quot;cm&quot;:return i/2.54;case&quot;mm&quot;:return i/25.4;case&quot;pt&quot;:return i/72;case&quot;pc&quot;:return i/6}return 1}},{&quot;parse-unit&quot;:441}],514:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e=function(t){return t},r=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){return e||(n=i=0),t[0]=(n+=t[0])*a+s,t[1]=(i+=t[1])*o+l,t}},n=function(t){var e=t.bbox;function n(t){l[0]=t[0],l[1]=t[1],s(l),l[0]&lt;c&amp;&amp;(c=l[0]),l[0]&gt;f&amp;&amp;(f=l[0]),l[1]&lt;u&amp;&amp;(u=l[1]),l[1]&gt;h&amp;&amp;(h=l[1])}function i(t){switch(t.type){case&quot;GeometryCollection&quot;:t.geometries.forEach(i);break;case&quot;Point&quot;:n(t.coordinates);break;case&quot;MultiPoint&quot;:t.coordinates.forEach(n)}}if(!e){var a,o,s=r(t),l=new Array(2),c=1/0,u=c,f=-c,h=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++e&lt;r;)a=t[e],l[0]=a[0],l[1]=a[1],s(l,e),l[0]&lt;c&amp;&amp;(c=l[0]),l[0]&gt;f&amp;&amp;(f=l[0]),l[1]&lt;u&amp;&amp;(u=l[1]),l[1]&gt;h&amp;&amp;(h=l[1])}),t.objects)i(t.objects[o]);e=t.bbox=[c,u,f,h]}return e},i=function(t,e){for(var r,n=t.length,i=n-e;i&lt;--n;)r=t[i],t[i++]=t[n],t[n]=r};function a(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,a=o(t,e);return null==r&amp;&amp;null==n?{type:&quot;Feature&quot;,properties:i,geometry:a}:null==n?{type:&quot;Feature&quot;,id:r,properties:i,geometry:a}:{type:&quot;Feature&quot;,id:r,bbox:n,properties:i,geometry:a}}function o(t,e){var n=r(t),a=t.arcs;function o(t,e){e.length&amp;&amp;e.pop();for(var r=a[t&lt;0?~t:t],o=0,s=r.length;o&lt;s;++o)e.push(n(r[o].slice(),o));t&lt;0&amp;&amp;i(e,s)}function s(t){return n(t.slice())}function l(t){for(var e=[],r=0,n=t.length;r&lt;n;++r)o(t[r],e);return e.length&lt;2&amp;&amp;e.push(e[0].slice()),e}function c(t){for(var e=l(t);e.length&lt;4;)e.push(e[0].slice());return e}function u(t){return t.map(c)}return function t(e){var r,n=e.type;switch(n){case&quot;GeometryCollection&quot;:return{type:n,geometries:e.geometries.map(t)};case&quot;Point&quot;:r=s(e.coordinates);break;case&quot;MultiPoint&quot;:r=e.coordinates.map(s);break;case&quot;LineString&quot;:r=l(e.arcs);break;case&quot;MultiLineString&quot;:r=e.arcs.map(l);break;case&quot;Polygon&quot;:r=u(e.arcs);break;case&quot;MultiPolygon&quot;:r=e.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(e)}var s=function(t,e){var r={},n={},i={},a=[],o=-1;function s(t,e){for(var n in t){var i=t[n];delete e[i.start],delete i.start,delete i.end,i.forEach(function(t){r[t&lt;0?~t:t]=1}),a.push(i)}}return e.forEach(function(r,n){var i,a=t.arcs[r&lt;0?~r:r];a.length&lt;3&amp;&amp;!a[1][0]&amp;&amp;!a[1][1]&amp;&amp;(i=e[++o],e[o]=r,e[n]=i)}),e.forEach(function(e){var r,a,o=function(e){var r,n=t.arcs[e&lt;0?~e:e],i=n[0];t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1];return e&lt;0?[r,i]:[i,r]}(e),s=o[0],l=o[1];if(r=i[s])if(delete i[r.end],r.push(e),r.end=l,a=n[l]){delete n[a.start];var c=a===r?r:r.concat(a);n[c.start=r.start]=i[c.end=a.end]=c}else n[r.start]=i[r.end]=r;else if(r=n[l])if(delete n[r.start],r.unshift(e),r.start=s,a=i[s]){delete i[a.end];var u=a===r?r:a.concat(r);n[u.start=a.start]=i[u.end=r.end]=u}else n[r.start]=i[r.end]=r;else n[(r=[e]).start=s]=i[r.end=l]=r}),s(i,n),s(n,i),e.forEach(function(t){r[t&lt;0?~t:t]||a.push([t])}),a};function l(t,e,r){var n,i,a;if(arguments.length&gt;1)n=function(t,e,r){var n,i=[],a=[];function o(t){var e=t&lt;0?~t:t;(a[e]||(a[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case&quot;GeometryCollection&quot;:e.geometries.forEach(t);break;case&quot;LineString&quot;:s(e.arcs);break;case&quot;MultiLineString&quot;:case&quot;Polygon&quot;:l(e.arcs);break;case&quot;MultiPolygon&quot;:e.arcs.forEach(l)}}(e),a.forEach(null==r?function(t){i.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&amp;&amp;i.push(t[0].i)}),i}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i&lt;a;++i)n[i]=i;return{type:&quot;MultiLineString&quot;,arcs:s(t,n)}}function c(t,e){var r={},n=[],i=[];function a(t){t.forEach(function(e){e.forEach(function(e){(r[e=e&lt;0?~e:e]||(r[e]=[])).push(t)})}),n.push(t)}function l(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],a=0;++r&lt;n;)e=i,i=t[r],a+=e[0]*i[1]-e[1]*i[0];return Math.abs(a)}(o(t,{type:&quot;Polygon&quot;,arcs:[e]}).coordinates[0])}return e.forEach(function t(e){switch(e.type){case&quot;GeometryCollection&quot;:e.geometries.forEach(t);break;case&quot;Polygon&quot;:a(e.arcs);break;case&quot;MultiPolygon&quot;:e.arcs.forEach(a)}}),n.forEach(function(t){if(!t._){var e=[],n=[t];for(t._=1,i.push(e);t=n.pop();)e.push(t),t.forEach(function(t){t.forEach(function(t){r[t&lt;0?~t:t].forEach(function(t){t._||(t._=1,n.push(t))})})})}}),n.forEach(function(t){delete t._}),{type:&quot;MultiPolygon&quot;,arcs:i.map(function(e){var n,i=[];if(e.forEach(function(t){t.forEach(function(t){t.forEach(function(t){r[t&lt;0?~t:t].length&lt;2&amp;&amp;i.push(t)})})}),(n=(i=s(t,i)).length)&gt;1)for(var a,o,c=1,u=l(i[0]);c&lt;n;++c)(a=l(i[c]))&gt;u&amp;&amp;(o=i[0],i[0]=i[c],i[c]=o,u=a);return i})}}var u=function(t,e){for(var r=0,n=t.length;r&lt;n;){var i=r+n&gt;&gt;&gt;1;t[i]&lt;e?r=i+1:n=i}return r};t.bbox=n,t.feature=function(t,e){return&quot;GeometryCollection&quot;===e.type?{type:&quot;FeatureCollection&quot;,features:e.geometries.map(function(e){return a(t,e)})}:a(t,e)},t.mesh=function(t){return o(t,l.apply(this,arguments))},t.meshArcs=l,t.merge=function(t){return o(t,c.apply(this,arguments))},t.mergeArcs=c,t.neighbors=function(t){var e={},r=t.map(function(){return[]});function n(t,r){t.forEach(function(t){t&lt;0&amp;&amp;(t=~t);var n=e[t];n?n.push(r):e[t]=[r]})}function i(t,e){t.forEach(function(t){n(t,e)})}var a={LineString:n,MultiLineString:i,Polygon:i,MultiPolygon:function(t,e){t.forEach(function(t){i(t,e)})}};for(var o in t.forEach(function t(e,r){&quot;GeometryCollection&quot;===e.type?e.geometries.forEach(function(e){t(e,r)}):e.type in a&amp;&amp;a[e.type](e.arcs,r)}),e)for(var s=e[o],l=s.length,c=0;c&lt;l;++c)for(var f=c+1;f&lt;l;++f){var h,p=s[c],d=s[f];(h=r[p])[o=u(h,d)]!==d&amp;&amp;h.splice(o,0,d),(h=r[d])[o=u(h,p)]!==p&amp;&amp;h.splice(o,0,p)}return r},t.quantize=function(t,e){if(!((e=Math.floor(e))&gt;=2))throw new Error(&quot;n must be \u22652&quot;);if(t.transform)throw new Error(&quot;already quantized&quot;);var r,i=n(t),a=i[0],o=(i[2]-a)/(e-1)||1,s=i[1],l=(i[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-a)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case&quot;GeometryCollection&quot;:t.geometries.forEach(u);break;case&quot;Point&quot;:c(t.coordinates);break;case&quot;MultiPoint&quot;:t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,i=1,c=1,u=t.length,f=t[0],h=f[0]=Math.round((f[0]-a)/o),p=f[1]=Math.round((f[1]-s)/l);i&lt;u;++i)f=t[i],r=Math.round((f[0]-a)/o),n=Math.round((f[1]-s)/l),r===h&amp;&amp;n===p||((e=t[c++])[0]=r-h,h=r,e[1]=n-p,p=n);c&lt;2&amp;&amp;((e=t[c++])[0]=0,e[1]=0),t.length=c}),t.objects)u(t.objects[r]);return t.transform={scale:[o,l],translate:[a,s]},t},t.transform=r,t.untransform=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){e||(n=i=0);var r=Math.round((t[0]-s)/a),c=Math.round((t[1]-l)/o);return t[0]=r-n,n=r,t[1]=c-i,i=c,t}},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.topojson=n.topojson||{})},{}],515:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){if(t&lt;0)return[];if(0===t)return[[0]];for(var e=0|Math.round(a(t+1)),r=[],o=0;o&lt;e;++o){for(var s=n.unrank(t,o),l=[0],c=0,u=0;u&lt;s.length;++u)c+=1&lt;&lt;s[u],l.push(c);i(s)&lt;1&amp;&amp;(l[0]=c,l[t]=0),r.push(l)}return r};var n=t(&quot;permutation-rank&quot;),i=t(&quot;permutation-parity&quot;),a=t(&quot;gamma&quot;)},{gamma:219,&quot;permutation-parity&quot;:443,&quot;permutation-rank&quot;:444}],516:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],n=t.right||f(r),i=t.radius||1,a=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),&quot;eye&quot;in t){var p=t.eye,d=[p[0]-e[0],p[1]-e[1],p[2]-e[2]];o(n,d,r),c(n[0],n[1],n[2])&lt;1e-6?n=f(r):s(n,n),i=c(d[0],d[1],d[2]);var g=l(r,d)/i,m=l(n,d)/i;u=Math.acos(g),a=Math.acos(m)}return i=Math.log(i),new h(t.zoomMin,t.zoomMax,e,r,n,i,a,u)};var n=t(&quot;filtered-vector&quot;),i=t(&quot;gl-mat4/invert&quot;),a=t(&quot;gl-mat4/rotate&quot;),o=t(&quot;gl-vec3/cross&quot;),s=t(&quot;gl-vec3/normalize&quot;),l=t(&quot;gl-vec3/dot&quot;);function c(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t){return Math.min(1,Math.max(-1,t))}function f(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e&gt;Math.max(r,n)?i[2]=1:r&gt;Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l&lt;3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l&lt;3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c&lt;16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t&gt;0?Math.log(t):-1/0,e=e&gt;0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a&lt;3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),u=0;for(a=0;a&lt;3;++a)r[a]-=e[a]*i/n,u+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(u);for(a=0;a&lt;3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,k=x,M=-m*x,A=-v*x,T=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a&lt;3;++a){var C=_*r[a]+w*h[a]+k*e[a];E[4*a+1]=M*r[a]+A*h[a]+T*e[a],E[4*a+2]=C,E[4*a+3]=0}var L=E[1],z=E[5],P=E[9],O=E[2],I=E[6],D=E[10],R=z*D-P*I,B=P*O-L*D,F=L*I-z*O,N=c(R,B,F);R/=N,B/=N,F/=N,E[0]=R,E[4]=B,E[8]=F;for(a=0;a&lt;3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a&lt;3;++a){u=0;for(var j=0;j&lt;3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n&lt;16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c&lt;3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];a(i,i,n,d);for(c=0;c&lt;3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=c(u-=a*p,f-=o*p,h-=s*p),g=(u/=d)*e+a*r,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;&quot;number&quot;==typeof r&amp;&amp;(a=0|r),(a&lt;0||a&gt;3)&amp;&amp;(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),g=Math.max(h,p,d);h===g?(s=s&lt;0?-1:1,l=f=0):d===g?(f=f&lt;0?-1:1,s=l=0):(l=l&lt;0?-1:1,s=f=0)}else{var m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,k=c(x-=s*w,b-=l*w,_-=f*w),M=l*(_/=k)-f*(b/=k),A=f*(x/=k)-s*_,T=s*b-l*x,S=c(M,A,T);if(M/=S,A/=S,T/=S,this.center.jump(t,H,G,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],C=e[5],L=e[9],z=E*x+C*b+L*_,P=E*M+C*A+L*T;v=R&lt;0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,z)}else{var O=e[2],I=e[6],D=e[10],R=O*s+I*l+D*f,B=O*x+I*b+D*_,F=O*M+I*A+D*T;v=Math.asin(u(R)),y=Math.atan2(F,B)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;i(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,W=U[14]/q,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,G-j*Y,W-V*Y)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e&gt;0&amp;&amp;this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s&lt;1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=c(l,f,h);if(!(p&lt;1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,g=d[0],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x&lt;.01&amp;&amp;(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))&lt;1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,k=c(b,_,w),M=i*l+a*f+o*h,A=g*l+m*f+v*h,T=(b/=k)*l+(_/=k)*f+(w/=k)*h,S=Math.asin(u(M)),E=Math.atan2(T,A),C=this.angle._state,L=C[C.length-1],z=C[C.length-2];L%=2*Math.PI;var P=Math.abs(L+2*Math.PI-E),O=Math.abs(L-E),I=Math.abs(L-2*Math.PI-E);P&lt;O&amp;&amp;(L+=2*Math.PI),I&lt;O&amp;&amp;(L-=2*Math.PI),this.angle.jump(this.angle.lastT(),L,z),this.angle.set(t,E,S)}}}}},{&quot;filtered-vector&quot;:214,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/rotate&quot;:257,&quot;gl-vec3/cross&quot;:315,&quot;gl-vec3/dot&quot;:320,&quot;gl-vec3/normalize&quot;:337}],517:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var i=t*e,a=n*t,o=a-(a-t),s=t-o,l=n*e,c=l-(l-e),u=e-c,f=s*u-(i-o*c-s*c-o*u);if(r)return r[0]=f,r[1]=i,r;return[f,i]};var n=+(Math.pow(2,27)+1)},{}],518:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);if(r)return r[0]=o+a,r[1]=n,r;return[o+a,n]}},{}],519:[function(t,e,r){(function(e,n){&quot;use strict&quot;;var i=t(&quot;bit-twiddle&quot;),a=t(&quot;dup&quot;);e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var o=&quot;undefined&quot;!=typeof Uint8ClampedArray,s=e.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=a([32,0])),s.BUFFER||(s.BUFFER=a([32,0]));var l=s.DATA,c=s.BUFFER;function u(t){if(t){var e=t.length||t.byteLength,r=i.log2(e);l[r].push(t)}}function f(t){t=i.nextPow2(t);var e=i.log2(t),r=l[e];return r.length&gt;0?r.pop():new ArrayBuffer(t)}function h(t){return new Uint8Array(f(t),0,t)}function p(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function g(t){return new Int8Array(f(t),0,t)}function m(t){return new Int16Array(f(2*t),0,t)}function v(t){return new Int32Array(f(4*t),0,t)}function y(t){return new Float32Array(f(4*t),0,t)}function x(t){return new Float64Array(f(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(f(t),0,t):h(t)}function _(t){return new DataView(f(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),r=c[e];return r.length&gt;0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[i.log2(t.length)].push(t);else{if(&quot;[object ArrayBuffer]&quot;!==Object.prototype.toString.call(t)&amp;&amp;(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|i.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[i.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||&quot;arraybuffer&quot;===e)return f(t);switch(e){case&quot;uint8&quot;:return h(t);case&quot;uint16&quot;:return p(t);case&quot;uint32&quot;:return d(t);case&quot;int8&quot;:return g(t);case&quot;int16&quot;:return m(t);case&quot;int32&quot;:return v(t);case&quot;float&quot;:case&quot;float32&quot;:return y(t);case&quot;double&quot;:case&quot;float64&quot;:return x(t);case&quot;uint8_clamped&quot;:return b(t);case&quot;buffer&quot;:return w(t);case&quot;data&quot;:case&quot;dataview&quot;:return _(t);default:return null}return null},r.mallocArrayBuffer=f,r.mallocUint8=h,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=m,r.mallocInt32=v,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t&lt;32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{},t(&quot;buffer&quot;).Buffer)},{&quot;bit-twiddle&quot;:79,buffer:92,dup:154}],520:[function(t,e,r){&quot;use strict&quot;;function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e&lt;t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n;var i=n.prototype;Object.defineProperty(i,&quot;length&quot;,{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},i.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o&lt;s?a[r]=n:s&lt;o?a[n]=r:(a[n]=r,++i[r])}}},{}],521:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o&lt;n;++o)if(a=i,e(i=t[o],a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a&lt;r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},{}],522:[function(t,e,r){var n=/[\'\&quot;]/;e.exports=function(t){return t?(n.test(t.charAt(0))&amp;&amp;(t=t.substr(1)),n.test(t.charAt(t.length-1))&amp;&amp;(t=t.substr(0,t.length-1)),t):&quot;&quot;}},{}],523:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n&lt;i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&amp;&amp;o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if(&quot;function&quot;==typeof a[o]&amp;&amp;void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},{}],524:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){&quot;object&quot;==typeof e&amp;&amp;null!==e||(e={});return n(t,e.canvas||i,e.context||a,e)};var n=t(&quot;./lib/vtext&quot;),i=null,a=null;&quot;undefined&quot;!=typeof document&amp;&amp;((i=document.createElement(&quot;canvas&quot;)).width=8192,i.height=1024,a=i.getContext(&quot;2d&quot;))},{&quot;./lib/vtext&quot;:525}],525:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var a=n.size||64,o=n.font||&quot;normal&quot;;return r.font=a+&quot;px &quot;+o,r.textAlign=&quot;start&quot;,r.textBaseline=&quot;alphabetic&quot;,r.direction=&quot;ltr&quot;,f(function(t,e,r,n){var a=0|Math.ceil(e.measureText(r).width+2*n);if(a&gt;8192)throw new Error(&quot;vectorize-text: String too long (sorry, this will get fixed later)&quot;);var o=3*n;t.height&lt;o&amp;&amp;(t.height=o),e.fillStyle=&quot;#000&quot;,e.fillRect(0,0,t.width,t.height),e.fillStyle=&quot;#fff&quot;,e.fillText(r,n,2*n);var s=e.getImageData(0,0,a,o);return i(s.data,[o,a,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a),n,a)},e.exports.processPixels=f;var n=t(&quot;surface-nets&quot;),i=t(&quot;ndarray&quot;),a=t(&quot;simplify-planar-graph&quot;),o=t(&quot;clean-pslg&quot;),s=t(&quot;cdt2d&quot;),l=t(&quot;planar-graph-to-polyline&quot;);function c(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function u(t,e,r,n){var i=c(t,n),a=function(t,e,r){for(var n=e.textAlign||&quot;start&quot;,i=e.textBaseline||&quot;alphabetic&quot;,a=[1&lt;&lt;30,1&lt;&lt;30],o=[0,0],s=t.length,l=0;l&lt;s;++l)for(var c=t[l],u=0;u&lt;2;++u)a[u]=0|Math.min(a[u],c[u]),o[u]=0|Math.max(o[u],c[u]);var f=0;switch(n){case&quot;center&quot;:f=-.5*(a[0]+o[0]);break;case&quot;right&quot;:case&quot;end&quot;:f=-o[0];break;case&quot;left&quot;:case&quot;start&quot;:f=-a[0];break;default:throw new Error(&quot;vectorize-text: Unrecognized textAlign: '&quot;+n+&quot;'&quot;)}var h=0;switch(i){case&quot;hanging&quot;:case&quot;top&quot;:h=-a[1];break;case&quot;middle&quot;:h=-.5*(a[1]+o[1]);break;case&quot;alphabetic&quot;:case&quot;ideographic&quot;:h=-3*r;break;case&quot;bottom&quot;:h=-o[1];break;default:throw new Error(&quot;vectorize-text: Unrecoginized textBaseline: '&quot;+i+&quot;'&quot;)}var p=1/r;return&quot;lineHeight&quot;in e?p*=+e.lineHeight:&quot;width&quot;in e?p=e.width/(o[0]-a[0]):&quot;height&quot;in e&amp;&amp;(p=e.height/(o[1]-a[1])),t.map(function(t){return[p*(t[0]+f),p*(t[1]+h)]})}(i.positions,e,r),u=i.edges,f=&quot;ccw&quot;===e.orientation;if(o(a,u),e.polygons||e.polygon||e.polyline){for(var h=l(u,a),p=new Array(h.length),d=0;d&lt;h.length;++d){for(var g=h[d],m=new Array(g.length),v=0;v&lt;g.length;++v){for(var y=g[v],x=new Array(y.length),b=0;b&lt;y.length;++b)x[b]=a[y[b]].slice();f&amp;&amp;x.reverse(),m[v]=x}p[d]=m}return p}return e.triangles||e.triangulate||e.triangle?{cells:s(a,u,{delaunay:!1,exterior:!1,interior:!0}),positions:a}:{edges:u,positions:a}}function f(t,e,r){try{return u(t,e,r,!0)}catch(t){}try{return u(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:93,&quot;clean-pslg&quot;:103,ndarray:430,&quot;planar-graph-to-polyline&quot;:448,&quot;simplify-planar-graph&quot;:497,&quot;surface-nets&quot;:505}],526:[function(t,e,r){!function(){&quot;use strict&quot;;if(&quot;undefined&quot;==typeof ses||!ses.ok||ses.ok()){&quot;undefined&quot;!=typeof ses&amp;&amp;(ses.weakMapPermitHostObjects=m);var t=!1;if(&quot;function&quot;==typeof WeakMap){var r=WeakMap;if(&quot;undefined&quot;!=typeof navigator&amp;&amp;/Firefox/.test(navigator.userAgent));else{var n=new r,i=Object.freeze({});if(n.set(i,1),1===n.get(i))return void(e.exports=WeakMap);t=!0}}Object.prototype.hasOwnProperty;var a=Object.getOwnPropertyNames,o=Object.defineProperty,s=Object.isExtensible,l=&quot;weakmap:&quot;,c=l+&quot;ident:&quot;+Math.random()+&quot;___&quot;;if(&quot;undefined&quot;!=typeof crypto&amp;&amp;&quot;function&quot;==typeof crypto.getRandomValues&amp;&amp;&quot;function&quot;==typeof ArrayBuffer&amp;&amp;&quot;function&quot;==typeof Uint8Array){var u=new ArrayBuffer(25),f=new Uint8Array(u);crypto.getRandomValues(f),c=l+&quot;rand:&quot;+Array.prototype.map.call(f,function(t){return(t%36).toString(36)}).join(&quot;&quot;)+&quot;___&quot;}if(o(Object,&quot;getOwnPropertyNames&quot;,{value:function(t){return a(t).filter(v)}}),&quot;getPropertyNames&quot;in Object){var h=Object.getPropertyNames;o(Object,&quot;getPropertyNames&quot;,{value:function(t){return h(t).filter(v)}})}!function(){var t=Object.freeze;o(Object,&quot;freeze&quot;,{value:function(e){return y(e),t(e)}});var e=Object.seal;o(Object,&quot;seal&quot;,{value:function(t){return y(t),e(t)}});var r=Object.preventExtensions;o(Object,&quot;preventExtensions&quot;,{value:function(t){return y(t),r(t)}})}();var p=!1,d=0,g=function(){this instanceof g||b();var t=[],e=[],r=d++;return Object.create(g.prototype,{get___:{value:x(function(n,i){var a,o=y(n);return o?r in o?o[r]:i:(a=t.indexOf(n))&gt;=0?e[a]:i})},has___:{value:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)&gt;=0})},set___:{value:x(function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))&gt;=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this})},delete___:{value:x(function(n){var i,a,o=y(n);return o?r in o&amp;&amp;delete o[r]:!((i=t.indexOf(n))&lt;0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),&quot;function&quot;==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new g),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new g),i.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!i&amp;&amp;i.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return i&amp;&amp;i.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==m)throw new Error(&quot;bogus call to permitHostObjects___&quot;);a=!0})}})}t&amp;&amp;&quot;undefined&quot;!=typeof Proxy&amp;&amp;(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,&quot;constructor&quot;,{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(&quot;undefined&quot;!=typeof Proxy&amp;&amp;(Proxy=void 0),e.exports=g)}function m(t){t.permitHostObjects___&amp;&amp;t.permitHostObjects___(m)}function v(t){return!(t.substr(0,l.length)==l&amp;&amp;&quot;___&quot;===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError(&quot;Not an object: &quot;+t);var e=t[c];if(e&amp;&amp;e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||&quot;undefined&quot;==typeof console||(p=!0,console.warn(&quot;WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.&quot;))}}()},{}],527:[function(t,e,r){var n=t(&quot;./hidden-store.js&quot;);e.exports=function(){var t={};return function(e){if((&quot;object&quot;!=typeof e||null===e)&amp;&amp;&quot;function&quot;!=typeof e)throw new Error(&quot;Weakmap-shim: Key must be object&quot;);var r=e.valueOf(t);return r&amp;&amp;r.identity===t?r:n(e,t)}}},{&quot;./hidden-store.js&quot;:528}],528:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,&quot;valueOf&quot;,{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],529:[function(t,e,r){var n=t(&quot;./create-store.js&quot;);e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty(&quot;value&quot;)?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return&quot;value&quot;in t(e)},delete:function(e){return delete t(e).value}}}},{&quot;./create-store.js&quot;:527}],530:[function(t,e,r){var n=t(&quot;get-canvas-context&quot;);e.exports=function(t){return n(&quot;webgl&quot;,t)}},{&quot;get-canvas-context&quot;:220}],531:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;),a=n.instance();function o(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}o.prototype=new n.baseCalendar,i(o.prototype,{name:&quot;Chinese&quot;,jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Chinese&quot;,epochs:[&quot;BEC&quot;,&quot;EC&quot;],monthNumbers:function(t,e){if(&quot;string&quot;==typeof t){var r=t.match(l);return r?r[0]:&quot;&quot;}var n=this._validateYear(t),i=t.month(),a=&quot;&quot;+this.toChineseMonth(n,i);return e&amp;&amp;a.length&lt;2&amp;&amp;(a=&quot;0&quot;+a),this.isIntercalaryMonth(n,i)&amp;&amp;(a+=&quot;i&quot;),a},monthNames:function(t){if(&quot;string&quot;==typeof t){var e=t.match(c);return e?e[0]:&quot;&quot;}var r=this._validateYear(t),n=t.month(),i=[&quot;\u4e00\u6708&quot;,&quot;\u4e8c\u6708&quot;,&quot;\u4e09\u6708&quot;,&quot;\u56db\u6708&quot;,&quot;\u4e94\u6708&quot;,&quot;\u516d\u6708&quot;,&quot;\u4e03\u6708&quot;,&quot;\u516b\u6708&quot;,&quot;\u4e5d\u6708&quot;,&quot;\u5341\u6708&quot;,&quot;\u5341\u4e00\u6708&quot;,&quot;\u5341\u4e8c\u6708&quot;][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&amp;&amp;(i=&quot;\u95f0&quot;+i),i},monthNamesShort:function(t){if(&quot;string&quot;==typeof t){var e=t.match(u);return e?e[0]:&quot;&quot;}var r=this._validateYear(t),n=t.month(),i=[&quot;\u4e00&quot;,&quot;\u4e8c&quot;,&quot;\u4e09&quot;,&quot;\u56db&quot;,&quot;\u4e94&quot;,&quot;\u516d&quot;,&quot;\u4e03&quot;,&quot;\u516b&quot;,&quot;\u4e5d&quot;,&quot;\u5341&quot;,&quot;\u5341\u4e00&quot;,&quot;\u5341\u4e8c&quot;][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&amp;&amp;(i=&quot;\u95f0&quot;+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))&quot;\u95f0&quot;===e[0]&amp;&amp;(r=!0,e=e.substring(1)),&quot;\u6708&quot;===e[e.length-1]&amp;&amp;(e=e.substring(0,e.length-1)),n=1+[&quot;\u4e00&quot;,&quot;\u4e8c&quot;,&quot;\u4e09&quot;,&quot;\u56db&quot;,&quot;\u4e94&quot;,&quot;\u516d&quot;,&quot;\u4e03&quot;,&quot;\u516b&quot;,&quot;\u4e5d&quot;,&quot;\u5341&quot;,&quot;\u5341\u4e00&quot;,&quot;\u5341\u4e8c&quot;].indexOf(e);else{var i=e[e.length-1];r=&quot;i&quot;===i||&quot;I&quot;===i}return this.toMonthIndex(t,n,r)},dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&amp;&amp;(t=t.year()),&quot;number&quot;!=typeof t||t&lt;1888||t&gt;2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&amp;&amp;e!==i||e&lt;1||e&gt;12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&amp;&amp;e&lt;=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&amp;&amp;(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e&lt;0||e&gt;(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e&lt;r?e+1:e:e+1},intercalaryMonth:function(t){return t=this._validateYear(t),f[t-f[0]]&gt;&gt;13},isIntercalaryMonth:function(t,e){t.year&amp;&amp;(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&amp;&amp;r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s&gt;&gt;9&amp;4095,c=s&gt;&gt;5&amp;15,u=31&amp;s;(i=a.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),&quot;d&quot;);var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&amp;&amp;(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e&gt;(r&gt;&gt;13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&amp;1&lt;&lt;12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if(&quot;object&quot;==typeof t)o=t,a=e||{};else{var l=&quot;number&quot;==typeof t&amp;&amp;t&gt;=1888&amp;&amp;t&lt;=2111;if(!l)throw new Error(&quot;Lunar year outside range 1888-2111&quot;);var c=&quot;number&quot;==typeof e&amp;&amp;e&gt;=1&amp;&amp;e&lt;=12;if(!c)throw new Error(&quot;Lunar month outside range 1 - 12&quot;);var u,p=&quot;number&quot;==typeof r&amp;&amp;r&gt;=1&amp;&amp;r&lt;=30;if(!p)throw new Error(&quot;Lunar day outside range 1 - 30&quot;);&quot;object&quot;==typeof n?(u=!1,a=n):(u=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=f[o.year-f[0]],m=g&gt;&gt;13;d=m?o.month&gt;m?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var v=0;v&lt;d;v++){var y=g&amp;1&lt;&lt;12-v?30:29;s+=y}var x=h[o.year-h[0]],b=new Date(x&gt;&gt;9&amp;4095,(x&gt;&gt;5&amp;15)-1,(31&amp;x)+s);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if(&quot;object&quot;==typeof t)i=t,a=e||{};else{var o=&quot;number&quot;==typeof t&amp;&amp;t&gt;=1888&amp;&amp;t&lt;=2111;if(!o)throw new Error(&quot;Solar year outside range 1888-2111&quot;);var s=&quot;number&quot;==typeof e&amp;&amp;e&gt;=1&amp;&amp;e&lt;=12;if(!s)throw new Error(&quot;Solar month outside range 1 - 12&quot;);var l=&quot;number&quot;==typeof r&amp;&amp;r&gt;=1&amp;&amp;r&lt;=31;if(!l)throw new Error(&quot;Solar day outside range 1 - 31&quot;);i={year:t,month:e,day:r},a=n||{}}var c=h[i.year-h[0]],u=i.year&lt;&lt;9|i.month&lt;&lt;5|i.day;a.year=u&gt;=c?i.year:i.year-1,c=h[a.year-h[0]];var p,d=new Date(c&gt;&gt;9&amp;4095,(c&gt;&gt;5&amp;15)-1,31&amp;c),g=new Date(i.year,i.month-1,i.day);p=Math.round((g-d)/864e5);var m,v=f[a.year-f[0]];for(m=0;m&lt;13;m++){var y=v&amp;1&lt;&lt;12-m?30:29;if(p&lt;y)break;p-=y}var x=v&gt;&gt;13;!x||m&lt;x?(a.isIntercalary=!1,a.month=1+m):m===x?(a.isIntercalary=!0,a.month=m):(a.isIntercalary=!1,a.month=m);return a.day=1+p,a}(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(s),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var n=t.year(),i=t.month(),a=this.isIntercalaryMonth(n,i),s=this.toChineseMonth(n,i),l=Object.getPrototypeOf(o.prototype).add.call(this,t,e,r);if(&quot;y&quot;===r){var c=l.year(),u=l.month(),f=this.isIntercalaryMonth(c,s),h=a&amp;&amp;f?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);h!==u&amp;&amp;l.month(h)}return l}});var s=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,l=/^\d?\d[iI]?/m,c=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,u=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;n.calendars.chinese=o;var f=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],h=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],532:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Coptic&quot;,jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Coptic&quot;,epochs:[&quot;BAM&quot;,&quot;AM&quot;],monthNames:[&quot;Thout&quot;,&quot;Paopi&quot;,&quot;Hathor&quot;,&quot;Koiak&quot;,&quot;Tobi&quot;,&quot;Meshir&quot;,&quot;Paremhat&quot;,&quot;Paremoude&quot;,&quot;Pashons&quot;,&quot;Paoni&quot;,&quot;Epip&quot;,&quot;Mesori&quot;,&quot;Pi Kogi Enavot&quot;],monthNamesShort:[&quot;Tho&quot;,&quot;Pao&quot;,&quot;Hath&quot;,&quot;Koi&quot;,&quot;Tob&quot;,&quot;Mesh&quot;,&quot;Pat&quot;,&quot;Pad&quot;,&quot;Pash&quot;,&quot;Pao&quot;,&quot;Epi&quot;,&quot;Meso&quot;,&quot;PiK&quot;],dayNames:[&quot;Tkyriaka&quot;,&quot;Pesnau&quot;,&quot;Pshoment&quot;,&quot;Peftoou&quot;,&quot;Ptiou&quot;,&quot;Psoou&quot;,&quot;Psabbaton&quot;],dayNamesShort:[&quot;Tky&quot;,&quot;Pes&quot;,&quot;Psh&quot;,&quot;Pef&quot;,&quot;Pti&quot;,&quot;Pso&quot;,&quot;Psa&quot;],dayNamesMin:[&quot;Tk&quot;,&quot;Pes&quot;,&quot;Psh&quot;,&quot;Pef&quot;,&quot;Pt&quot;,&quot;Pso&quot;,&quot;Psa&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()&lt;0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[&quot;&quot;].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())&lt;0&amp;&amp;t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r&lt;=0&amp;&amp;r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],533:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Discworld&quot;,jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Discworld&quot;,epochs:[&quot;BUC&quot;,&quot;UC&quot;],monthNames:[&quot;Ick&quot;,&quot;Offle&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;Grune&quot;,&quot;August&quot;,&quot;Spune&quot;,&quot;Sektober&quot;,&quot;Ember&quot;,&quot;December&quot;],monthNamesShort:[&quot;Ick&quot;,&quot;Off&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Gru&quot;,&quot;Aug&quot;,&quot;Spu&quot;,&quot;Sek&quot;,&quot;Emb&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Octeday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Oct&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Oc&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,n.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n&gt;=2&amp;&amp;n&lt;=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||&quot;&quot;}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()&lt;0?1:0),e=i.month(),(r=i.day())+(e&gt;1?16:0)+(e&gt;2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t&gt;15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e&lt;=0?e-1:e,r,n)}});var o={20:&quot;Fruitbat&quot;,21:&quot;Anchovy&quot;};n.calendars.discworld=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],534:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Ethiopian&quot;,jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Ethiopian&quot;,epochs:[&quot;BEE&quot;,&quot;EE&quot;],monthNames:[&quot;Meskerem&quot;,&quot;Tikemet&quot;,&quot;Hidar&quot;,&quot;Tahesas&quot;,&quot;Tir&quot;,&quot;Yekatit&quot;,&quot;Megabit&quot;,&quot;Miazia&quot;,&quot;Genbot&quot;,&quot;Sene&quot;,&quot;Hamle&quot;,&quot;Nehase&quot;,&quot;Pagume&quot;],monthNamesShort:[&quot;Mes&quot;,&quot;Tik&quot;,&quot;Hid&quot;,&quot;Tah&quot;,&quot;Tir&quot;,&quot;Yek&quot;,&quot;Meg&quot;,&quot;Mia&quot;,&quot;Gen&quot;,&quot;Sen&quot;,&quot;Ham&quot;,&quot;Neh&quot;,&quot;Pag&quot;],dayNames:[&quot;Ehud&quot;,&quot;Segno&quot;,&quot;Maksegno&quot;,&quot;Irob&quot;,&quot;Hamus&quot;,&quot;Arb&quot;,&quot;Kidame&quot;],dayNamesShort:[&quot;Ehu&quot;,&quot;Seg&quot;,&quot;Mak&quot;,&quot;Iro&quot;,&quot;Ham&quot;,&quot;Arb&quot;,&quot;Kid&quot;],dayNamesMin:[&quot;Eh&quot;,&quot;Se&quot;,&quot;Ma&quot;,&quot;Ir&quot;,&quot;Ha&quot;,&quot;Ar&quot;,&quot;Ki&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()&lt;0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[&quot;&quot;].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())&lt;0&amp;&amp;t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r&lt;=0&amp;&amp;r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],535:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Hebrew&quot;,jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Hebrew&quot;,epochs:[&quot;BAM&quot;,&quot;AM&quot;],monthNames:[&quot;Nisan&quot;,&quot;Iyar&quot;,&quot;Sivan&quot;,&quot;Tammuz&quot;,&quot;Av&quot;,&quot;Elul&quot;,&quot;Tishrei&quot;,&quot;Cheshvan&quot;,&quot;Kislev&quot;,&quot;Tevet&quot;,&quot;Shevat&quot;,&quot;Adar&quot;,&quot;Adar II&quot;],monthNamesShort:[&quot;Nis&quot;,&quot;Iya&quot;,&quot;Siv&quot;,&quot;Tam&quot;,&quot;Av&quot;,&quot;Elu&quot;,&quot;Tis&quot;,&quot;Che&quot;,&quot;Kis&quot;,&quot;Tev&quot;,&quot;She&quot;,&quot;Ada&quot;,&quot;Ad2&quot;],dayNames:[&quot;Yom Rishon&quot;,&quot;Yom Sheni&quot;,&quot;Yom Shlishi&quot;,&quot;Yom Revi'i&quot;,&quot;Yom Chamishi&quot;,&quot;Yom Shishi&quot;,&quot;Yom Shabbat&quot;],dayNamesShort:[&quot;Ris&quot;,&quot;She&quot;,&quot;Shl&quot;,&quot;Rev&quot;,&quot;Cha&quot;,&quot;Shi&quot;,&quot;Sha&quot;],dayNamesMin:[&quot;Ri&quot;,&quot;She&quot;,&quot;Shl&quot;,&quot;Re&quot;,&quot;Ch&quot;,&quot;Shi&quot;,&quot;Sha&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t&lt;0?t+1:t)+1,19)&lt;7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&amp;&amp;(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&amp;&amp;this.leapYear(t)?30:8===e&amp;&amp;5===o(this.daysInYear(t),10)?30:9===e&amp;&amp;3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?&quot;embolismic&quot;:&quot;common&quot;)+&quot; &quot;+[&quot;deficient&quot;,&quot;regular&quot;,&quot;complete&quot;][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t&lt;=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e&lt;7){for(var s=7;s&lt;=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s&lt;e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s&lt;e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return o(3*(n+1),7)&lt;3&amp;&amp;n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t&gt;=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t&lt;this.toJD(e,1,1)?7:1;t&gt;this.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],536:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Islamic&quot;,jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Islamic&quot;,epochs:[&quot;BH&quot;,&quot;AH&quot;],monthNames:[&quot;Muharram&quot;,&quot;Safar&quot;,&quot;Rabi' al-awwal&quot;,&quot;Rabi' al-thani&quot;,&quot;Jumada al-awwal&quot;,&quot;Jumada al-thani&quot;,&quot;Rajab&quot;,&quot;Sha'aban&quot;,&quot;Ramadan&quot;,&quot;Shawwal&quot;,&quot;Dhu al-Qi'dah&quot;,&quot;Dhu al-Hijjah&quot;],monthNamesShort:[&quot;Muh&quot;,&quot;Saf&quot;,&quot;Rab1&quot;,&quot;Rab2&quot;,&quot;Jum1&quot;,&quot;Jum2&quot;,&quot;Raj&quot;,&quot;Sha'&quot;,&quot;Ram&quot;,&quot;Shaw&quot;,&quot;DhuQ&quot;,&quot;DhuH&quot;],dayNames:[&quot;Yawm al-ahad&quot;,&quot;Yawm al-ithnayn&quot;,&quot;Yawm ath-thulaathaa'&quot;,&quot;Yawm al-arbi'aa'&quot;,&quot;Yawm al-kham\u012bs&quot;,&quot;Yawm al-jum'a&quot;,&quot;Yawm as-sabt&quot;],dayNamesShort:[&quot;Aha&quot;,&quot;Ith&quot;,&quot;Thu&quot;,&quot;Arb&quot;,&quot;Kha&quot;,&quot;Jum&quot;,&quot;Sab&quot;],dayNamesMin:[&quot;Ah&quot;,&quot;It&quot;,&quot;Th&quot;,&quot;Ar&quot;,&quot;Kh&quot;,&quot;Ju&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30&lt;11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t&lt;=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e&lt;=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],537:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Julian&quot;,jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Julian&quot;,epochs:[&quot;BC&quot;,&quot;AD&quot;],monthNames:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],monthNamesShort:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;mm/dd/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()&lt;0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t&lt;0&amp;&amp;t++,e&lt;=2&amp;&amp;(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i&lt;14?1:13),o=r-Math.floor(a&gt;2?4716:4715),s=e-n-Math.floor(30.6001*i);return o&lt;=0&amp;&amp;o--,this.newDate(o,a,s)}}),n.calendars.julian=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],538:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Mayan&quot;,jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{&quot;&quot;:{name:&quot;Mayan&quot;,epochs:[&quot;&quot;,&quot;&quot;],monthNames:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;],monthNamesShort:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;],dayNames:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;,&quot;18&quot;,&quot;19&quot;],dayNamesShort:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;,&quot;18&quot;,&quot;19&quot;],dayNamesMin:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;,&quot;18&quot;,&quot;19&quot;],digits:null,dateFormat:&quot;YYYY.m.d&quot;,firstDay:0,isRTL:!1,haabMonths:[&quot;Pop&quot;,&quot;Uo&quot;,&quot;Zip&quot;,&quot;Zotz&quot;,&quot;Tzec&quot;,&quot;Xul&quot;,&quot;Yaxkin&quot;,&quot;Mol&quot;,&quot;Chen&quot;,&quot;Yax&quot;,&quot;Zac&quot;,&quot;Ceh&quot;,&quot;Mac&quot;,&quot;Kankin&quot;,&quot;Muan&quot;,&quot;Pax&quot;,&quot;Kayab&quot;,&quot;Cumku&quot;,&quot;Uayeb&quot;],tzolkinMonths:[&quot;Imix&quot;,&quot;Ik&quot;,&quot;Akbal&quot;,&quot;Kan&quot;,&quot;Chicchan&quot;,&quot;Cimi&quot;,&quot;Manik&quot;,&quot;Lamat&quot;,&quot;Muluc&quot;,&quot;Oc&quot;,&quot;Chuen&quot;,&quot;Eb&quot;,&quot;Ben&quot;,&quot;Ix&quot;,&quot;Men&quot;,&quot;Cib&quot;,&quot;Caban&quot;,&quot;Etznab&quot;,&quot;Cauac&quot;,&quot;Ahau&quot;]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t&lt;0?400:0,e+&quot;.&quot;+Math.floor(t/20)+&quot;.&quot;+t%20},forYear:function(t){if((t=t.split(&quot;.&quot;)).length&lt;3)throw&quot;Invalid Mayan year&quot;;for(var e=0,r=0;r&lt;t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)&gt;19||r&gt;0&amp;&amp;n&lt;0)throw&quot;Invalid Mayan year&quot;;e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o((t-=this.jdEpoch)+8+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s((t-=this.jdEpoch)+20,20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t&lt;0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],539:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar;var o=n.instance(&quot;gregorian&quot;);i(a.prototype,{name:&quot;Nanakshahi&quot;,jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Nanakshahi&quot;,epochs:[&quot;BN&quot;,&quot;AN&quot;],monthNames:[&quot;Chet&quot;,&quot;Vaisakh&quot;,&quot;Jeth&quot;,&quot;Harh&quot;,&quot;Sawan&quot;,&quot;Bhadon&quot;,&quot;Assu&quot;,&quot;Katak&quot;,&quot;Maghar&quot;,&quot;Poh&quot;,&quot;Magh&quot;,&quot;Phagun&quot;],monthNamesShort:[&quot;Che&quot;,&quot;Vai&quot;,&quot;Jet&quot;,&quot;Har&quot;,&quot;Saw&quot;,&quot;Bha&quot;,&quot;Ass&quot;,&quot;Kat&quot;,&quot;Mgr&quot;,&quot;Poh&quot;,&quot;Mgh&quot;,&quot;Pha&quot;],dayNames:[&quot;Somvaar&quot;,&quot;Mangalvar&quot;,&quot;Budhvaar&quot;,&quot;Veervaar&quot;,&quot;Shukarvaar&quot;,&quot;Sanicharvaar&quot;,&quot;Etvaar&quot;],dayNamesShort:[&quot;Som&quot;,&quot;Mangal&quot;,&quot;Budh&quot;,&quot;Veer&quot;,&quot;Shukar&quot;,&quot;Sanichar&quot;,&quot;Et&quot;],dayNamesMin:[&quot;So&quot;,&quot;Ma&quot;,&quot;Bu&quot;,&quot;Ve&quot;,&quot;Sh&quot;,&quot;Sa&quot;,&quot;Et&quot;],digits:null,dateFormat:&quot;dd-mm-yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[&quot;&quot;].invalidYear);return o.leapYear(e.year()+(e.year()&lt;1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())&lt;0&amp;&amp;t++;for(var a=i.day(),s=1;s&lt;i.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t&gt;=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r&gt;this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],540:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Nepali&quot;,jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{&quot;&quot;:{name:&quot;Nepali&quot;,epochs:[&quot;BBS&quot;,&quot;ABS&quot;],monthNames:[&quot;Baisakh&quot;,&quot;Jestha&quot;,&quot;Ashadh&quot;,&quot;Shrawan&quot;,&quot;Bhadra&quot;,&quot;Ashwin&quot;,&quot;Kartik&quot;,&quot;Mangsir&quot;,&quot;Paush&quot;,&quot;Mangh&quot;,&quot;Falgun&quot;,&quot;Chaitra&quot;],monthNamesShort:[&quot;Bai&quot;,&quot;Je&quot;,&quot;As&quot;,&quot;Shra&quot;,&quot;Bha&quot;,&quot;Ash&quot;,&quot;Kar&quot;,&quot;Mang&quot;,&quot;Pau&quot;,&quot;Ma&quot;,&quot;Fal&quot;,&quot;Chai&quot;],dayNames:[&quot;Aaitabaar&quot;,&quot;Sombaar&quot;,&quot;Manglbaar&quot;,&quot;Budhabaar&quot;,&quot;Bihibaar&quot;,&quot;Shukrabaar&quot;,&quot;Shanibaar&quot;],dayNamesShort:[&quot;Aaita&quot;,&quot;Som&quot;,&quot;Mangl&quot;,&quot;Budha&quot;,&quot;Bihi&quot;,&quot;Shukra&quot;,&quot;Shani&quot;],dayNamesMin:[&quot;Aai&quot;,&quot;So&quot;,&quot;Man&quot;,&quot;Bu&quot;,&quot;Bi&quot;,&quot;Shu&quot;,&quot;Sha&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),&quot;undefined&quot;==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r&lt;=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&amp;&amp;(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),&quot;undefined&quot;==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s&gt;9||9===s&amp;&amp;r&gt;=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&amp;&amp;(o=r,s--);9!==s;)s&lt;=0&amp;&amp;(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])&lt;0&amp;&amp;(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,&quot;d&quot;).toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i&gt;l;)++o&gt;12&amp;&amp;(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r&lt;t+2;r++)&quot;undefined&quot;==typeof this.NEPALI_CALENDAR_DATA[r]&amp;&amp;(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2000:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],541:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Persian&quot;,jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Persian&quot;,epochs:[&quot;BP&quot;,&quot;AP&quot;],monthNames:[&quot;Farvardin&quot;,&quot;Ordibehesht&quot;,&quot;Khordad&quot;,&quot;Tir&quot;,&quot;Mordad&quot;,&quot;Shahrivar&quot;,&quot;Mehr&quot;,&quot;Aban&quot;,&quot;Azar&quot;,&quot;Day&quot;,&quot;Bahman&quot;,&quot;Esfand&quot;],monthNamesShort:[&quot;Far&quot;,&quot;Ord&quot;,&quot;Kho&quot;,&quot;Tir&quot;,&quot;Mor&quot;,&quot;Sha&quot;,&quot;Meh&quot;,&quot;Aba&quot;,&quot;Aza&quot;,&quot;Day&quot;,&quot;Bah&quot;,&quot;Esf&quot;],dayNames:[&quot;Yekshambe&quot;,&quot;Doshambe&quot;,&quot;Seshambe&quot;,&quot;Ch\xe6harshambe&quot;,&quot;Panjshambe&quot;,&quot;Jom'e&quot;,&quot;Shambe&quot;],dayNamesShort:[&quot;Yek&quot;,&quot;Do&quot;,&quot;Se&quot;,&quot;Ch\xe6&quot;,&quot;Panj&quot;,&quot;Jom&quot;,&quot;Sha&quot;],dayNamesMin:[&quot;Ye&quot;,&quot;Do&quot;,&quot;Se&quot;,&quot;Ch&quot;,&quot;Pa&quot;,&quot;Jo&quot;,&quot;Sh&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 682*((e.year()-(e.year()&gt;0?474:473))%2820+474+38)%2816&lt;682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t&gt;=0?474:473),s=474+o(a,2820);return r+(e&lt;=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l&lt;=0?l-1:l;var c=t-this.toJD(l,1,1)+1,u=c&lt;=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),n.calendars.persian=a,n.calendars.jalali=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],542:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;),a=n.instance();function o(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}o.prototype=new n.baseCalendar,i(o.prototype,{name:&quot;Taiwan&quot;,jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Taiwan&quot;,epochs:[&quot;BROC&quot;,&quot;ROC&quot;],monthNames:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],monthNamesShort:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t&gt;=-this.yearsOffset&amp;&amp;t&lt;=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t&gt;=1&amp;&amp;t&lt;=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],543:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;),a=n.instance();function o(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}o.prototype=new n.baseCalendar,i(o.prototype,{name:&quot;Thai&quot;,jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Thai&quot;,epochs:[&quot;BBE&quot;,&quot;BE&quot;],monthNames:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],monthNamesShort:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t&gt;=1&amp;&amp;t&lt;=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t&gt;=-this.yearsOffset&amp;&amp;t&lt;=-1?1:0)}}),n.calendars.thai=o},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],544:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;UmmAlQura&quot;,hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Umm al-Qura&quot;,epochs:[&quot;BH&quot;,&quot;AH&quot;],monthNames:[&quot;Al-Muharram&quot;,&quot;Safar&quot;,&quot;Rabi' al-awwal&quot;,&quot;Rabi' Al-Thani&quot;,&quot;Jumada Al-Awwal&quot;,&quot;Jumada Al-Thani&quot;,&quot;Rajab&quot;,&quot;Sha'aban&quot;,&quot;Ramadan&quot;,&quot;Shawwal&quot;,&quot;Dhu al-Qi'dah&quot;,&quot;Dhu al-Hijjah&quot;],monthNamesShort:[&quot;Muh&quot;,&quot;Saf&quot;,&quot;Rab1&quot;,&quot;Rab2&quot;,&quot;Jum1&quot;,&quot;Jum2&quot;,&quot;Raj&quot;,&quot;Sha'&quot;,&quot;Ram&quot;,&quot;Shaw&quot;,&quot;DhuQ&quot;,&quot;DhuH&quot;],dayNames:[&quot;Yawm al-Ahad&quot;,&quot;Yawm al-Ithnain&quot;,&quot;Yawm al-Thal\u0101th\u0101\u2019&quot;,&quot;Yawm al-Arba\u2018\u0101\u2019&quot;,&quot;Yawm al-Kham\u012bs&quot;,&quot;Yawm al-Jum\u2018a&quot;,&quot;Yawm al-Sabt&quot;],dayNamesMin:[&quot;Ah&quot;,&quot;Ith&quot;,&quot;Th&quot;,&quot;Ar&quot;,&quot;Kh&quot;,&quot;Ju&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r&lt;=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;a&lt;o.length;a++){if(o[a]&gt;r)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n&lt;o.length&amp;&amp;!(o[n]&gt;e);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&amp;&amp;(i=(t=null!=t.year?t.year:t)&gt;=1276&amp;&amp;t&lt;=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year&lt;1276||a.year&gt;1500)throw i.replace(/\{0\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],545:[function(t,e,r){var n=t(&quot;object-assign&quot;);function i(){this.regionalOptions=[],this.regionalOptions[&quot;&quot;]={invalidCalendar:&quot;Calendar {0} not found&quot;,invalidDate:&quot;Invalid {0} date&quot;,invalidMonth:&quot;Invalid {0} month&quot;,invalidYear:&quot;Invalid {0} year&quot;,differentCalendars:&quot;Cannot mix {0} and {1} dates&quot;},this.local=this.regionalOptions[&quot;&quot;],this.calendars={},this._localCals={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&amp;&amp;!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return&quot;000000&quot;.substring(0,e-(t=&quot;&quot;+t).length)+t}function s(){this.shortYearCutoff=&quot;+10&quot;}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[&quot;&quot;]}n(i.prototype,{instance:function(t,e){t=(t||&quot;gregorian&quot;).toLowerCase(),e=e||&quot;&quot;;var r=this._localCals[t+&quot;-&quot;+e];if(!r&amp;&amp;this.calendars[t]&amp;&amp;(r=new this.calendars[t](e),this._localCals[t+&quot;-&quot;+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[&quot;&quot;].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&amp;&amp;t.year?t.calendar():&quot;string&quot;==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+&quot;&quot;).replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n=&quot;&quot;,i=0;r&gt;0;){var a=r%10;n=(0===a?&quot;&quot;:t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&amp;&amp;(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,&quot;y&quot;)},month:function(t){return 0===arguments.length?this._month:this.set(t,&quot;m&quot;)},day:function(t){return 0===arguments.length?this._day:this.set(t,&quot;d&quot;)},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[&quot;&quot;].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e&lt;0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()&lt;0?&quot;-&quot;:&quot;&quot;)+o(Math.abs(this.year()),4)+&quot;-&quot;+o(this.month(),2)+&quot;-&quot;+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&amp;&amp;(this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[&quot;&quot;].invalidYear).year()&lt;0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[&quot;&quot;].invalidYear);return(e.year()&lt;0?&quot;-&quot;:&quot;&quot;)+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[&quot;&quot;].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[&quot;&quot;].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,c.local.invalidMonth||c.regionalOptions[&quot;&quot;].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[&quot;&quot;].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,&quot;d&quot;===r||&quot;w&quot;===r){var n=t.toJD()+e*(&quot;w&quot;===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+(&quot;y&quot;===r?e:0),o=t.monthOfYear()+(&quot;m&quot;===r?e:0);i=t.day();&quot;y&quot;===r?(t.month()!==this.fromMonthOfYear(a,o)&amp;&amp;(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):&quot;m&quot;===r&amp;&amp;(!function(t){for(;o&lt;t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o&gt;e-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||&quot;y&quot;!==n&amp;&amp;&quot;m&quot;!==n||0!==e[0]&amp;&amp;t.year()&gt;0==e[0]&gt;0)){var i={y:[1,1,&quot;y&quot;],m:[1,this.monthsInYear(-1),&quot;m&quot;],w:[this.daysInWeek(),this.daysInYear(-1),&quot;d&quot;],d:[1,this.daysInYear(-1),&quot;d&quot;]}[n],a=r&lt;0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate);var n=&quot;y&quot;===r?e:t.year(),i=&quot;m&quot;===r?e:t.month(),a=&quot;d&quot;===r?e:t.day();return&quot;y&quot;!==r&amp;&amp;&quot;m&quot;!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e&gt;=this.minMonth&amp;&amp;e-this.minMonth&lt;this.monthsInYear(i)&amp;&amp;r&gt;=this.minDay&amp;&amp;r-this.minDay&lt;this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(c.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&amp;&amp;this.name!==t.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[&quot;&quot;].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&amp;&amp;!this.isValid(t,e,r))throw n.replace(/\{0\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l.prototype=new s,n(l.prototype,{name:&quot;Gregorian&quot;,jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Gregorian&quot;,epochs:[&quot;BCE&quot;,&quot;CE&quot;],monthNames:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],monthNamesShort:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;mm/dd/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[&quot;&quot;].invalidYear);return(t=e.year()+(e.year()&lt;0?1:0))%4==0&amp;&amp;(t%100!=0||t%400==0)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[&quot;&quot;].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate);t=n.year(),e=n.month(),r=n.day(),t&lt;0&amp;&amp;t++,e&lt;3&amp;&amp;(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=(r=e+1+r-Math.floor(r/4))+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o&gt;13.5?13:1),c=i-(l&gt;2.5?4716:4715);return c&lt;=0&amp;&amp;c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[&quot;&quot;].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()&gt;12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new i;c.cdate=a,c.baseCalendar=s,c.calendars.gregorian=l},{&quot;object-assign&quot;:434}],546:[function(t,e,r){var n=t(&quot;object-assign&quot;),i=t(&quot;./main&quot;);n(i.regionalOptions[&quot;&quot;],{invalidArguments:&quot;Invalid arguments&quot;,invalidFormat:&quot;Cannot format a date from another calendar&quot;,missingNumberAt:&quot;Missing number at position {0}&quot;,unknownNameAt:&quot;Unknown name at position {0}&quot;,unexpectedLiteralAt:&quot;Unexpected literal at position {0}&quot;,unexpectedText:&quot;Additional text found at end&quot;}),i.local=i.regionalOptions[&quot;&quot;],n(i.cdate.prototype,{formatDate:function(t,e){return&quot;string&quot;!=typeof t&amp;&amp;(e=t,t=&quot;&quot;),this._calendar.formatDate(t||&quot;&quot;,this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:&quot;yyyy-mm-dd&quot;,COOKIE:&quot;D, dd M yyyy&quot;,FULL:&quot;DD, MM d, yyyy&quot;,ISO_8601:&quot;yyyy-mm-dd&quot;,JULIAN:&quot;J&quot;,RFC_822:&quot;D, d M yy&quot;,RFC_850:&quot;DD, dd-M-yy&quot;,RFC_1036:&quot;D, d M yy&quot;,RFC_1123:&quot;D, d M yyyy&quot;,RFC_2822:&quot;D, d M yyyy&quot;,RSS:&quot;D, d M yy&quot;,TICKS:&quot;!&quot;,TIMESTAMP:&quot;@&quot;,W3C:&quot;yyyy-mm-dd&quot;,formatDate:function(t,e,r){if(&quot;string&quot;!=typeof t&amp;&amp;(r=e,e=t,t=&quot;&quot;),!e)return&quot;&quot;;if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[&quot;&quot;].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,f=r.monthNamesShort||this.local.monthNamesShort,h=r.monthNames||this.local.monthNames,p=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;w+n&lt;t.length&amp;&amp;t.charAt(w+n)===e;)n++;return w+=n-1,Math.floor(n/(r||1))&gt;1}),d=function(t,e,r,n){var i=&quot;&quot;+e;if(p(t,n))for(;i.length&lt;r;)i=&quot;0&quot;+i;return i},g=this,m=function(t){return&quot;function&quot;==typeof u?u.call(g,t,p(&quot;m&quot;)):x(d(&quot;m&quot;,t.month(),2))},v=function(t,e){return e?&quot;function&quot;==typeof h?h.call(g,t):h[t.month()-g.minMonth]:&quot;function&quot;==typeof f?f.call(g,t):f[t.month()-g.minMonth]},y=this.local.digits,x=function(t){return r.localNumbers&amp;&amp;y?y(t):t},b=&quot;&quot;,_=!1,w=0;w&lt;t.length;w++)if(_)&quot;'&quot;!==t.charAt(w)||p(&quot;'&quot;)?b+=t.charAt(w):_=!1;else switch(t.charAt(w)){case&quot;d&quot;:b+=x(d(&quot;d&quot;,e.day(),2));break;case&quot;D&quot;:b+=(n=&quot;D&quot;,a=e.dayOfWeek(),o=l,s=c,p(n)?s[a]:o[a]);break;case&quot;o&quot;:b+=d(&quot;o&quot;,e.dayOfYear(),3);break;case&quot;w&quot;:b+=d(&quot;w&quot;,e.weekOfYear(),2);break;case&quot;m&quot;:b+=m(e);break;case&quot;M&quot;:b+=v(e,p(&quot;M&quot;));break;case&quot;y&quot;:b+=p(&quot;y&quot;,2)?e.year():(e.year()%100&lt;10?&quot;0&quot;:&quot;&quot;)+e.year()%100;break;case&quot;Y&quot;:p(&quot;Y&quot;,2),b+=e.formatYear();break;case&quot;J&quot;:b+=e.toJD();break;case&quot;@&quot;:b+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case&quot;!&quot;:b+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case&quot;'&quot;:p(&quot;'&quot;)?b+=&quot;'&quot;:_=!0;break;default:b+=t.charAt(w)}return b},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[&quot;&quot;].invalidArguments;if(&quot;&quot;===(e=&quot;object&quot;==typeof e?e.toString():e+&quot;&quot;))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n=&quot;string&quot;!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,f=-1,h=-1,p=-1,d=-1,g=-1,m=!1,v=!1,y=function(e,r){for(var n=1;T+n&lt;t.length&amp;&amp;t.charAt(T+n)===e;)n++;return T+=n-1,Math.floor(n/(r||1))&gt;1},x=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20][&quot;oyYJ@!&quot;.indexOf(t)+1],o=new RegExp(&quot;^-?\\d{1,&quot;+a+&quot;}&quot;),s=e.substring(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[&quot;&quot;].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if(&quot;function&quot;==typeof l){y(&quot;m&quot;);var t=l.call(b,e.substring(A));return A+=t.length,t}return x(&quot;m&quot;)},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s&lt;o.length;s++)if(e.substr(A,o[s].length).toLowerCase()===o[s].toLowerCase())return A+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[&quot;&quot;].unknownNameAt).replace(/\{0\}/,A)},k=function(){if(&quot;function&quot;==typeof u){var t=y(&quot;M&quot;)?u.call(b,e.substring(A)):c.call(b,e.substring(A));return A+=t.length,t}return w(&quot;M&quot;,c,u)},M=function(){if(e.charAt(A)!==t.charAt(T))throw(i.local.unexpectedLiteralAt||i.regionalOptions[&quot;&quot;].unexpectedLiteralAt).replace(/\{0\}/,A);A++},A=0,T=0;T&lt;t.length;T++)if(v)&quot;'&quot;!==t.charAt(T)||y(&quot;'&quot;)?M():v=!1;else switch(t.charAt(T)){case&quot;d&quot;:d=x(&quot;d&quot;);break;case&quot;D&quot;:w(&quot;D&quot;,a,o);break;case&quot;o&quot;:g=x(&quot;o&quot;);break;case&quot;w&quot;:x(&quot;w&quot;);break;case&quot;m&quot;:p=_();break;case&quot;M&quot;:p=k();break;case&quot;y&quot;:var S=T;m=!y(&quot;y&quot;,2),T=S,h=x(&quot;y&quot;,2);break;case&quot;Y&quot;:h=x(&quot;Y&quot;,2);break;case&quot;J&quot;:f=x(&quot;J&quot;)+.5,&quot;.&quot;===e.charAt(A)&amp;&amp;(A++,x(&quot;J&quot;));break;case&quot;@&quot;:f=x(&quot;@&quot;)/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case&quot;!&quot;:f=x(&quot;!&quot;)/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case&quot;*&quot;:A=e.length;break;case&quot;'&quot;:y(&quot;'&quot;)?M():v=!0;break;default:M()}if(A&lt;e.length)throw i.local.unexpectedText||i.regionalOptions[&quot;&quot;].unexpectedText;if(-1===h?h=this.today().year():h&lt;100&amp;&amp;m&amp;&amp;(h+=-1===n?1900:this.today().year()-this.today().year()%100-(h&lt;=n?0:100)),&quot;string&quot;==typeof p&amp;&amp;(p=s.call(this,h,p)),g&gt;-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d&gt;E;E=this.daysInMonth(h,p))p++,d-=E}return f&gt;-1?this.fromJD(f):this.newDate(h,p,d)},determineDate:function(t,e,r,n,i){r&amp;&amp;&quot;object&quot;!=typeof r&amp;&amp;(i=n,n=r,r=null),&quot;string&quot;!=typeof n&amp;&amp;(i=n,n=&quot;&quot;);var a=this;return e=e?e.newDate():null,t=null==t?e:&quot;string&quot;==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&amp;&amp;r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||&quot;d&quot;),s=o.exec(t);return e}(t):&quot;number&quot;==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,&quot;d&quot;):a.newDate(t)}})},{&quot;./main&quot;:545,&quot;object-assign&quot;:434}],547:[function(t,e,r){e.exports=t(&quot;cwise-compiler&quot;)({args:[&quot;array&quot;,{offset:[1],array:0},&quot;scalar&quot;,&quot;scalar&quot;,&quot;index&quot;],pre:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},body:{body:&quot;{\n        var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n        var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n        if((_inline_1_da &gt;= 0) !== (_inline_1_db &gt;= 0)) {\n          _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n        }\n      }&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_1_arg1_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_1_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_1_arg3_&quot;,lvalue:!1,rvalue:!0,count:2},{name:&quot;_inline_1_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[&quot;_inline_1_da&quot;,&quot;_inline_1_db&quot;]},funcName:&quot;zeroCrossings&quot;})},{&quot;cwise-compiler&quot;:133}],548:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t(&quot;./lib/zc-core&quot;)},{&quot;./lib/zc-core&quot;:547}],549:[function(t,e,r){&quot;use strict&quot;;e.exports=[{path:&quot;&quot;,backoff:0},{path:&quot;M-2.4,-3V3L0.6,0Z&quot;,backoff:.6},{path:&quot;M-3.7,-2.5V2.5L1.3,0Z&quot;,backoff:1.3},{path:&quot;M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z&quot;,backoff:1.55},{path:&quot;M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z&quot;,backoff:1.6},{path:&quot;M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z&quot;,backoff:2},{path:&quot;M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z&quot;,backoff:0,noRotate:!0},{path:&quot;M2,2V-2H-2V2Z&quot;,backoff:0,noRotate:!0}]},{}],550:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./arrow_paths&quot;),i=t(&quot;../../plots/font_attributes&quot;),a=t(&quot;../../plots/cartesian/constants&quot;),o=t(&quot;../../plot_api/plot_template&quot;).templatedArray;e.exports=o(&quot;annotation&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc+arraydraw&quot;},text:{valType:&quot;string&quot;,editType:&quot;calc+arraydraw&quot;},textangle:{valType:&quot;angle&quot;,dflt:0,editType:&quot;calc+arraydraw&quot;},font:i({editType:&quot;calc+arraydraw&quot;,colorEditType:&quot;arraydraw&quot;}),width:{valType:&quot;number&quot;,min:1,dflt:null,editType:&quot;calc+arraydraw&quot;},height:{valType:&quot;number&quot;,min:1,dflt:null,editType:&quot;calc+arraydraw&quot;},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1,editType:&quot;arraydraw&quot;},align:{valType:&quot;enumerated&quot;,values:[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;center&quot;,editType:&quot;arraydraw&quot;},valign:{valType:&quot;enumerated&quot;,values:[&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;middle&quot;,editType:&quot;arraydraw&quot;},bgcolor:{valType:&quot;color&quot;,dflt:&quot;rgba(0,0,0,0)&quot;,editType:&quot;arraydraw&quot;},bordercolor:{valType:&quot;color&quot;,dflt:&quot;rgba(0,0,0,0)&quot;,editType:&quot;arraydraw&quot;},borderpad:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;calc+arraydraw&quot;},borderwidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;calc+arraydraw&quot;},showarrow:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc+arraydraw&quot;},arrowcolor:{valType:&quot;color&quot;,editType:&quot;arraydraw&quot;},arrowhead:{valType:&quot;integer&quot;,min:0,max:n.length,dflt:1,editType:&quot;arraydraw&quot;},startarrowhead:{valType:&quot;integer&quot;,min:0,max:n.length,dflt:1,editType:&quot;arraydraw&quot;},arrowside:{valType:&quot;flaglist&quot;,flags:[&quot;end&quot;,&quot;start&quot;],extras:[&quot;none&quot;],dflt:&quot;end&quot;,editType:&quot;arraydraw&quot;},arrowsize:{valType:&quot;number&quot;,min:.3,dflt:1,editType:&quot;calc+arraydraw&quot;},startarrowsize:{valType:&quot;number&quot;,min:.3,dflt:1,editType:&quot;calc+arraydraw&quot;},arrowwidth:{valType:&quot;number&quot;,min:.1,editType:&quot;calc+arraydraw&quot;},standoff:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;calc+arraydraw&quot;},startstandoff:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;calc+arraydraw&quot;},ax:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},ay:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},axref:{valType:&quot;enumerated&quot;,dflt:&quot;pixel&quot;,values:[&quot;pixel&quot;,a.idRegex.x.toString()],editType:&quot;calc&quot;},ayref:{valType:&quot;enumerated&quot;,dflt:&quot;pixel&quot;,values:[&quot;pixel&quot;,a.idRegex.y.toString()],editType:&quot;calc&quot;},xref:{valType:&quot;enumerated&quot;,values:[&quot;paper&quot;,a.idRegex.x.toString()],editType:&quot;calc&quot;},x:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},xanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;auto&quot;,editType:&quot;calc+arraydraw&quot;},xshift:{valType:&quot;number&quot;,dflt:0,editType:&quot;calc+arraydraw&quot;},yref:{valType:&quot;enumerated&quot;,values:[&quot;paper&quot;,a.idRegex.y.toString()],editType:&quot;calc&quot;},y:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},yanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;auto&quot;,editType:&quot;calc+arraydraw&quot;},yshift:{valType:&quot;number&quot;,dflt:0,editType:&quot;calc+arraydraw&quot;},clicktoshow:{valType:&quot;enumerated&quot;,values:[!1,&quot;onoff&quot;,&quot;onout&quot;],dflt:!1,editType:&quot;arraydraw&quot;},xclick:{valType:&quot;any&quot;,editType:&quot;arraydraw&quot;},yclick:{valType:&quot;any&quot;,editType:&quot;arraydraw&quot;},hovertext:{valType:&quot;string&quot;,editType:&quot;arraydraw&quot;},hoverlabel:{bgcolor:{valType:&quot;color&quot;,editType:&quot;arraydraw&quot;},bordercolor:{valType:&quot;color&quot;,editType:&quot;arraydraw&quot;},font:i({editType:&quot;arraydraw&quot;}),editType:&quot;arraydraw&quot;},captureevents:{valType:&quot;boolean&quot;,editType:&quot;arraydraw&quot;},editType:&quot;calc&quot;,_deprecated:{ref:{valType:&quot;string&quot;,editType:&quot;calc&quot;}}})},{&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/constants&quot;:747,&quot;../../plots/font_attributes&quot;:768,&quot;./arrow_paths&quot;:549}],551:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;./draw&quot;).draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach(function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref);e._extremes={},r&amp;&amp;s(e,r),n&amp;&amp;s(e,n)})}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t[&quot;a&quot;+a],l=t[a+&quot;ref&quot;],c=t[&quot;a&quot;+a+&quot;ref&quot;],u=t[&quot;_&quot;+a+&quot;padplus&quot;],f=t[&quot;_&quot;+a+&quot;padminus&quot;],h={x:1,y:-1}[a]*t[a+&quot;shift&quot;],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,g=p-h,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-h;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),ppadminus:Math.max(f,g,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&amp;&amp;t._fullData.length)return n.syncOrAsync([a,o],t)}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;./draw&quot;:556}],552:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../plot_api/plot_template&quot;).arrayEditor;function o(t,e){var r,n,i,a,o,l,c,u=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r&lt;u.length;r++)if(a=(i=u[r]).clicktoshow){for(n=0;n&lt;d;n++)if(l=(o=e[n]).xaxis,c=o.yaxis,l._id===i.xref&amp;&amp;c._id===i.yref&amp;&amp;l.d2r(o.x)===s(i._xclick,l)&amp;&amp;c.d2r(o.y)===s(i._yclick,c)){(i.visible?&quot;onout&quot;===a?h:p:f).push(r);break}n===d&amp;&amp;i.visible&amp;&amp;&quot;onout&quot;===a&amp;&amp;h.push(r)}return{on:f,off:h,explicitOff:p}}function s(t,e){return&quot;log&quot;===e.type?e.l2r(t):e.d2r(t)}e.exports={hasClickToShow:function(t,e){var r=o(t,e);return r.on.length&gt;0||r.explicitOff.length&gt;0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(!c.length&amp;&amp;!u.length)return;for(r=0;r&lt;c.length;r++)(s=a(t.layout,&quot;annotations&quot;,h[c[r]])).modifyItem(&quot;visible&quot;,!0),n.extendFlat(f,s.getUpdateObj());for(r=0;r&lt;u.length;r++)(s=a(t.layout,&quot;annotations&quot;,h[u[r]])).modifyItem(&quot;visible&quot;,!1),n.extendFlat(f,s.getUpdateObj());return i.call(&quot;update&quot;,t,{},f)}}},{&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../../registry&quot;:825}],553:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../color&quot;);e.exports=function(t,e,r,a){a(&quot;opacity&quot;);var o=a(&quot;bgcolor&quot;),s=a(&quot;bordercolor&quot;),l=i.opacity(s);a(&quot;borderpad&quot;);var c=a(&quot;borderwidth&quot;),u=a(&quot;showarrow&quot;);if(a(&quot;text&quot;,u?&quot; &quot;:r._dfltTitle.annotation),a(&quot;textangle&quot;),n.coerceFont(a,&quot;font&quot;,r.font),a(&quot;width&quot;),a(&quot;align&quot;),a(&quot;height&quot;)&amp;&amp;a(&quot;valign&quot;),u){var f,h,p=a(&quot;arrowside&quot;);-1!==p.indexOf(&quot;end&quot;)&amp;&amp;(f=a(&quot;arrowhead&quot;),h=a(&quot;arrowsize&quot;)),-1!==p.indexOf(&quot;start&quot;)&amp;&amp;(a(&quot;startarrowhead&quot;,f),a(&quot;startarrowsize&quot;,h)),a(&quot;arrowcolor&quot;,l?e.bordercolor:i.defaultLine),a(&quot;arrowwidth&quot;,2*(l&amp;&amp;c||1)),a(&quot;standoff&quot;),a(&quot;startstandoff&quot;)}var d=a(&quot;hovertext&quot;),g=r.hoverlabel||{};if(d){var m=a(&quot;hoverlabel.bgcolor&quot;,g.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),v=a(&quot;hoverlabel.bordercolor&quot;,g.bordercolor||i.contrast(m));n.coerceFont(a,&quot;hoverlabel.font&quot;,{family:g.font.family,size:g.font.size,color:g.font.color||v})}a(&quot;captureevents&quot;,!!d)}},{&quot;../../lib&quot;:693,&quot;../color&quot;:567}],554:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib/to_log_range&quot;);e.exports=function(t,e,r,a){e=e||{};var o=&quot;log&quot;===r&amp;&amp;&quot;linear&quot;===e.type,s=&quot;linear&quot;===r&amp;&amp;&quot;log&quot;===e.type;if(o||s)for(var l,c,u=t._fullLayout.annotations,f=e._id.charAt(0),h=0;h&lt;u.length;h++)l=u[h],c=&quot;annotations[&quot;+h+&quot;].&quot;,l[f+&quot;ref&quot;]===e._id&amp;&amp;p(f),l[&quot;a&quot;+f+&quot;ref&quot;]===e._id&amp;&amp;p(&quot;a&quot;+f);function p(t){var r=l[t],s=null;s=o?i(r,e.range):Math.pow(10,r),n(s)||(s=null),a(c+t,s)}}},{&quot;../../lib/to_log_range&quot;:720,&quot;fast-isnumeric&quot;:213}],555:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../plots/array_container_defaults&quot;),o=t(&quot;./common_defaults&quot;),s=t(&quot;./attributes&quot;);function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a(&quot;visible&quot;),c=a(&quot;clicktoshow&quot;);if(l||c){o(t,e,r,a);for(var u=e.showarrow,f=[&quot;x&quot;,&quot;y&quot;],h=[-10,-30],p={_fullLayout:r},d=0;d&lt;2;d++){var g=f[d],m=i.coerceRef(t,e,p,g,&quot;&quot;,&quot;paper&quot;);if(&quot;paper&quot;!==m)i.getFromId(p,m)._annIndices.push(e._index);if(i.coercePosition(e,p,a,m,g,.5),u){var v=&quot;a&quot;+g,y=i.coerceRef(t,e,p,v,&quot;pixel&quot;);&quot;pixel&quot;!==y&amp;&amp;y!==m&amp;&amp;(y=e[v]=&quot;pixel&quot;);var x=&quot;pixel&quot;===y?h[d]:.4;i.coercePosition(e,p,a,y,v,x)}a(g+&quot;anchor&quot;),a(g+&quot;shift&quot;)}if(n.noneOrAll(t,e,[&quot;x&quot;,&quot;y&quot;]),u&amp;&amp;n.noneOrAll(t,e,[&quot;ax&quot;,&quot;ay&quot;]),c){var b=a(&quot;xclick&quot;),_=a(&quot;yclick&quot;);e._xclick=void 0===b?e.x:i.cleanPosition(b,p,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,p,e.yref)}}}e.exports=function(t,e){a(t,e,{name:&quot;annotations&quot;,handleItemDefaults:l})}},{&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;../../plots/cartesian/axes&quot;:742,&quot;./attributes&quot;:550,&quot;./common_defaults&quot;:553}],556:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../plots/plots&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../../plots/cartesian/axes&quot;),l=t(&quot;../color&quot;),c=t(&quot;../drawing&quot;),u=t(&quot;../fx&quot;),f=t(&quot;../../lib/svg_text_utils&quot;),h=t(&quot;../../lib/setcursor&quot;),p=t(&quot;../dragelement&quot;),d=t(&quot;../../plot_api/plot_template&quot;).arrayEditor,g=t(&quot;./draw_arrow_head&quot;);function m(t,e){var r=t._fullLayout.annotations[e]||{};v(t,r,e,!1,s.getFromId(t,r.xref),s.getFromId(t,r.yref))}function v(t,e,r,a,s,m){var v,y,x=t._fullLayout,b=t._fullLayout._size,_=t._context.edits;a?(v=&quot;annotation-&quot;+a,y=a+&quot;.annotations&quot;):(v=&quot;annotation&quot;,y=&quot;annotations&quot;);var w=d(t.layout,y,e),k=w.modifyBase,M=w.modifyItem,A=w.getUpdateObj;x._infolayer.selectAll(&quot;.&quot;+v+'[data-index=&quot;'+r+'&quot;]').remove();var T=&quot;clip&quot;+x._uid+&quot;_ann&quot;+r;if(e._input&amp;&amp;!1!==e.visible){var S={x:{},y:{}},E=+e.textangle||0,C=x._infolayer.append(&quot;g&quot;).classed(v,!0).attr(&quot;data-index&quot;,String(r)).style(&quot;opacity&quot;,e.opacity),L=C.append(&quot;g&quot;).classed(&quot;annotation-text-g&quot;,!0),z=_[e.showarrow?&quot;annotationTail&quot;:&quot;annotationPosition&quot;],P=e.captureevents||_.annotationText||z,O=L.append(&quot;g&quot;).style(&quot;pointer-events&quot;,P?&quot;all&quot;:null).call(h,&quot;pointer&quot;).on(&quot;click&quot;,function(){t._dragging=!1;var i={index:r,annotation:e._input,fullAnnotation:e,event:n.event};a&amp;&amp;(i.subplotId=a),t.emit(&quot;plotly_clickannotation&quot;,i)});e.hovertext&amp;&amp;O.on(&quot;mouseover&quot;,function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();u.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:t})}).on(&quot;mouseout&quot;,function(){u.loneUnhover(x._hoverlayer.node())});var I=e.borderwidth,D=e.borderpad,R=I+D,B=O.append(&quot;rect&quot;).attr(&quot;class&quot;,&quot;bg&quot;).style(&quot;stroke-width&quot;,I+&quot;px&quot;).call(l.stroke,e.bordercolor).call(l.fill,e.bgcolor),F=e.width||e.height,N=x._topclips.selectAll(&quot;#&quot;+T).data(F?[0]:[]);N.enter().append(&quot;clipPath&quot;).classed(&quot;annclip&quot;,!0).attr(&quot;id&quot;,T).append(&quot;rect&quot;),N.exit().remove();var j=e.font,V=O.append(&quot;text&quot;).classed(&quot;annotation-text&quot;,!0).text(e.text);_.annotationText?V.call(f.makeEditable,{delegate:O,gd:t}).call(U).on(&quot;edit&quot;,function(r){e.text=r,this.call(U),M(&quot;text&quot;,r),s&amp;&amp;s.autorange&amp;&amp;k(s._name+&quot;.autorange&quot;,!0),m&amp;&amp;m.autorange&amp;&amp;k(m._name+&quot;.autorange&quot;,!0),i.call(&quot;relayout&quot;,t,A())}):V.call(U)}else n.selectAll(&quot;#&quot;+T).remove();function U(r){return r.call(c.font,j).attr({&quot;text-anchor&quot;:{left:&quot;start&quot;,right:&quot;end&quot;}[e.align]||&quot;middle&quot;}),f.convertToTspans(r,t,q),r}function q(){var r=V.selectAll(&quot;a&quot;);1===r.size()&amp;&amp;r.text()===V.text()&amp;&amp;O.insert(&quot;a&quot;,&quot;:first-child&quot;).attr({&quot;xlink:xlink:href&quot;:r.attr(&quot;xlink:href&quot;),&quot;xlink:xlink:show&quot;:r.attr(&quot;xlink:show&quot;)}).style({cursor:&quot;pointer&quot;}).node().appendChild(B.node());var n=O.select(&quot;.annotation-text-math-group&quot;),u=!n.empty(),d=c.bBox((u?n:V).node()),v=d.width,y=d.height,w=e.width||v,P=e.height||y,D=Math.round(w+2*R),j=Math.round(P+2*R);function U(t,e){return&quot;auto&quot;===e&amp;&amp;(e=t&lt;1/3?&quot;left&quot;:t&gt;2/3?&quot;right&quot;:&quot;center&quot;),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var q=!1,H=[&quot;x&quot;,&quot;y&quot;],G=0;G&lt;H.length;G++){var W,Y,X,Z,$,J=H[G],K=e[J+&quot;ref&quot;]||J,Q=e[&quot;a&quot;+J+&quot;ref&quot;],tt={x:s,y:m}[J],et=(E+(&quot;x&quot;===J?0:-90))*Math.PI/180,rt=D*Math.cos(et),nt=j*Math.sin(et),it=Math.abs(rt)+Math.abs(nt),at=e[J+&quot;anchor&quot;],ot=e[J+&quot;shift&quot;]*(&quot;x&quot;===J?1:-1),st=S[J];if(tt){var lt=tt.r2fraction(e[J]);(lt&lt;0||lt&gt;1)&amp;&amp;(Q===K?((lt=tt.r2fraction(e[&quot;a&quot;+J]))&lt;0||lt&gt;1)&amp;&amp;(q=!0):q=!0),W=tt._offset+tt.r2p(e[J]),Z=.5}else&quot;x&quot;===J?(X=e[J],W=b.l+b.w*X):(X=1-e[J],W=b.t+b.h*X),Z=e.showarrow?.5:X;if(e.showarrow){st.head=W;var ct=e[&quot;a&quot;+J];$=rt*U(.5,e.xanchor)-nt*U(.5,e.yanchor),Q===K?(st.tail=tt._offset+tt.r2p(ct),Y=$):(st.tail=W+ct,Y=$+ct),st.text=st.tail+$;var ut=x[&quot;x&quot;===J?&quot;width&quot;:&quot;height&quot;];if(&quot;paper&quot;===K&amp;&amp;(st.head=o.constrain(st.head,1,ut-1)),&quot;pixel&quot;===Q){var ft=-Math.max(st.tail-3,st.text),ht=Math.min(st.tail+3,st.text)-ut;ft&gt;0?(st.tail+=ft,st.text+=ft):ht&gt;0&amp;&amp;(st.tail-=ht,st.text-=ht)}st.tail+=ot,st.head+=ot}else Y=$=it*U(Z,at),st.text=W+$;st.text+=ot,$+=ot,Y+=ot,e[&quot;_&quot;+J+&quot;padplus&quot;]=it/2+Y,e[&quot;_&quot;+J+&quot;padminus&quot;]=it/2-Y,e[&quot;_&quot;+J+&quot;size&quot;]=it,e[&quot;_&quot;+J+&quot;shift&quot;]=$}if(t._dragging||!q){var pt=0,dt=0;if(&quot;left&quot;!==e.align&amp;&amp;(pt=(w-v)*(&quot;center&quot;===e.align?.5:1)),&quot;top&quot;!==e.valign&amp;&amp;(dt=(P-y)*(&quot;middle&quot;===e.valign?.5:1)),u)n.select(&quot;svg&quot;).attr({x:R+pt-1,y:R+dt}).call(c.setClipUrl,F?T:null);else{var gt=R+dt-d.top,mt=R+pt-d.left;V.call(f.positionText,mt,gt).call(c.setClipUrl,F?T:null)}N.select(&quot;rect&quot;).call(c.setRect,R,R,w,P),B.call(c.setRect,I/2,I/2,D-I,j-I),O.call(c.setTranslate,Math.round(S.x.text-D/2),Math.round(S.y.text-j/2)),L.attr({transform:&quot;rotate(&quot;+E+&quot;,&quot;+S.x.text+&quot;,&quot;+S.y.text+&quot;)&quot;});var vt,yt=function(r,n){C.selectAll(&quot;.annotation-arrow-g&quot;).remove();var u=S.x.head,f=S.y.head,h=S.x.tail+r,d=S.y.tail+n,v=S.x.text+r,y=S.y.text+n,x=o.rotationXYMatrix(E,v,y),w=o.apply2DTransform(x),T=o.apply2DTransform2(x),z=+B.attr(&quot;width&quot;),P=+B.attr(&quot;height&quot;),I=v-.5*z,D=I+z,R=y-.5*P,F=R+P,N=[[I,R,I,F],[I,F,D,F],[D,F,D,R],[D,R,I,R]].map(T);if(!N.reduce(function(t,e){return t^!!o.segmentsIntersect(u,f,u+1e6,f+1e6,e[0],e[1],e[2],e[3])},!1)){N.forEach(function(t){var e=o.segmentsIntersect(h,d,u,f,t[0],t[1],t[2],t[3]);e&amp;&amp;(h=e.x,d=e.y)});var j=e.arrowwidth,V=e.arrowcolor,U=e.arrowside,q=C.append(&quot;g&quot;).style({opacity:l.opacity(V)}).classed(&quot;annotation-arrow-g&quot;,!0),H=q.append(&quot;path&quot;).attr(&quot;d&quot;,&quot;M&quot;+h+&quot;,&quot;+d+&quot;L&quot;+u+&quot;,&quot;+f).style(&quot;stroke-width&quot;,j+&quot;px&quot;).call(l.stroke,l.rgb(V));if(g(H,U,e),_.annotationPosition&amp;&amp;H.node().parentNode&amp;&amp;!a){var G=u,W=f;if(e.standoff){var Y=Math.sqrt(Math.pow(u-h,2)+Math.pow(f-d,2));G+=e.standoff*(h-u)/Y,W+=e.standoff*(d-f)/Y}var X,Z,$=q.append(&quot;path&quot;).classed(&quot;annotation-arrow&quot;,!0).classed(&quot;anndrag&quot;,!0).classed(&quot;cursor-move&quot;,!0).attr({d:&quot;M3,3H-3V-3H3ZM0,0L&quot;+(h-G)+&quot;,&quot;+(d-W),transform:&quot;translate(&quot;+G+&quot;,&quot;+W+&quot;)&quot;}).style(&quot;stroke-width&quot;,j+6+&quot;px&quot;).call(l.stroke,&quot;rgba(0,0,0,0)&quot;).call(l.fill,&quot;rgba(0,0,0,0)&quot;);p.init({element:$.node(),gd:t,prepFn:function(){var t=c.getTranslate(O);X=t.x,Z=t.y,s&amp;&amp;s.autorange&amp;&amp;k(s._name+&quot;.autorange&quot;,!0),m&amp;&amp;m.autorange&amp;&amp;k(m._name+&quot;.autorange&quot;,!0)},moveFn:function(t,r){var n=w(X,Z),i=n[0]+t,a=n[1]+r;O.call(c.setTranslate,i,a),M(&quot;x&quot;,s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),M(&quot;y&quot;,m?m.p2r(m.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&amp;&amp;M(&quot;ax&quot;,s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&amp;&amp;M(&quot;ay&quot;,m.p2r(m.r2p(e.ay)+r)),q.attr(&quot;transform&quot;,&quot;translate(&quot;+t+&quot;,&quot;+r+&quot;)&quot;),L.attr({transform:&quot;rotate(&quot;+E+&quot;,&quot;+i+&quot;,&quot;+a+&quot;)&quot;})},doneFn:function(){i.call(&quot;relayout&quot;,t,A());var e=document.querySelector(&quot;.js-notes-box-panel&quot;);e&amp;&amp;e.redraw(e.selectedObj)}})}}};if(e.showarrow&amp;&amp;yt(0,0),z)p.init({element:O.node(),gd:t,prepFn:function(){vt=L.attr(&quot;transform&quot;)},moveFn:function(t,r){var n=&quot;pointer&quot;;if(e.showarrow)e.axref===e.xref?M(&quot;ax&quot;,s.p2r(s.r2p(e.ax)+t)):M(&quot;ax&quot;,e.ax+t),e.ayref===e.yref?M(&quot;ay&quot;,m.p2r(m.r2p(e.ay)+r)):M(&quot;ay&quot;,e.ay+r),yt(t,r);else{if(a)return;var i,o;if(s)i=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;i=p.align(c+t/b.w,l,0,1,e.xanchor)}if(m)o=m.p2r(m.r2p(e.y)+r);else{var u=e._ysize/b.h,f=e.y-(e._yshift+e.yshift)/b.h-u/2;o=p.align(f-r/b.h,u,0,1,e.yanchor)}M(&quot;x&quot;,i),M(&quot;y&quot;,o),s&amp;&amp;m||(n=p.getCursor(s?.5:i,m?.5:o,e.xanchor,e.yanchor))}L.attr({transform:&quot;translate(&quot;+t+&quot;,&quot;+r+&quot;)&quot;+vt}),h(O,n)},doneFn:function(){h(O),i.call(&quot;relayout&quot;,t,A());var e=document.querySelector(&quot;.js-notes-box-panel&quot;);e&amp;&amp;e.redraw(e.selectedObj)}})}else O.remove()}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(&quot;.annotation&quot;).remove();for(var r=0;r&lt;e.annotations.length;r++)e.annotations[r].visible&amp;&amp;m(t,r);return a.previousPromises(t)},drawOne:m,drawRaw:v}},{&quot;../../lib&quot;:693,&quot;../../lib/setcursor&quot;:714,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../dragelement&quot;:589,&quot;../drawing&quot;:592,&quot;../fx&quot;:609,&quot;./draw_arrow_head&quot;:557,d3:147}],557:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../color&quot;),a=t(&quot;./arrow_paths&quot;);e.exports=function(t,e,r){var o,s,l,c,u=t.node(),f=a[r.arrowhead||0],h=a[r.startarrowhead||0],p=(r.arrowwidth||1)*(r.arrowsize||1),d=(r.arrowwidth||1)*(r.startarrowsize||1),g=e.indexOf(&quot;start&quot;)&gt;=0,m=e.indexOf(&quot;end&quot;)&gt;=0,v=f.backoff*p+r.standoff,y=h.backoff*d+r.startstandoff;if(&quot;line&quot;===u.nodeName){o={x:+t.attr(&quot;x1&quot;),y:+t.attr(&quot;y1&quot;)},s={x:+t.attr(&quot;x2&quot;),y:+t.attr(&quot;y2&quot;)};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,v&amp;&amp;y&amp;&amp;v+y&gt;Math.sqrt(x*x+b*b))return void z();if(v){if(v*v&gt;x*x+b*b)return void z();var _=v*Math.cos(l),w=v*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y&gt;x*x+b*b)return void z();var k=y*Math.cos(l),M=y*Math.sin(l);o.x-=k,o.y-=M,t.attr({x1:o.x,y1:o.y})}}else if(&quot;path&quot;===u.nodeName){var A=u.getTotalLength(),T=&quot;&quot;;if(A&lt;v+y)return void z();var S=u.getPointAtLength(0),E=u.getPointAtLength(.1);l=Math.atan2(S.y-E.y,S.x-E.x),o=u.getPointAtLength(Math.min(y,A)),T=&quot;0px,&quot;+y+&quot;px,&quot;;var C=u.getPointAtLength(A),L=u.getPointAtLength(A-.1);c=Math.atan2(C.y-L.y,C.x-L.x),s=u.getPointAtLength(Math.max(0,A-v)),T+=A-(T?y+v:v)+&quot;px,&quot;+A+&quot;px&quot;,t.style(&quot;stroke-dasharray&quot;,T)}function z(){t.style(&quot;stroke-dasharray&quot;,&quot;0px,100px&quot;)}function P(e,a,o,s){e.path&amp;&amp;(e.noRotate&amp;&amp;(o=0),n.select(u.parentNode).append(&quot;path&quot;).attr({class:t.attr(&quot;class&quot;),d:e.path,transform:&quot;translate(&quot;+a.x+&quot;,&quot;+a.y+&quot;)&quot;+(o?&quot;rotate(&quot;+180*o/Math.PI+&quot;)&quot;:&quot;&quot;)+&quot;scale(&quot;+s+&quot;)&quot;}).style({fill:i.rgb(r.arrowcolor),&quot;stroke-width&quot;:0}))}g&amp;&amp;P(h,o,l,d),m&amp;&amp;P(f,s,c,p)}},{&quot;../color&quot;:567,&quot;./arrow_paths&quot;:549,d3:147}],558:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./draw&quot;),i=t(&quot;./click&quot;);e.exports={moduleType:&quot;component&quot;,name:&quot;annotations&quot;,layoutAttributes:t(&quot;./attributes&quot;),supplyLayoutDefaults:t(&quot;./defaults&quot;),includeBasePlot:t(&quot;../../plots/cartesian/include_components&quot;)(&quot;annotations&quot;),calcAutorange:t(&quot;./calc_autorange&quot;),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:t(&quot;./convert_coords&quot;)}},{&quot;../../plots/cartesian/include_components&quot;:752,&quot;./attributes&quot;:550,&quot;./calc_autorange&quot;:551,&quot;./click&quot;:552,&quot;./convert_coords&quot;:554,&quot;./defaults&quot;:555,&quot;./draw&quot;:556}],559:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../annotations/attributes&quot;),i=t(&quot;../../plot_api/edit_types&quot;).overrideAll,a=t(&quot;../../plot_api/plot_template&quot;).templatedArray;e.exports=i(a(&quot;annotation&quot;,{visible:n.visible,x:{valType:&quot;any&quot;},y:{valType:&quot;any&quot;},z:{valType:&quot;any&quot;},ax:{valType:&quot;number&quot;},ay:{valType:&quot;number&quot;},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),&quot;calc&quot;,&quot;from-root&quot;)},{&quot;../../plot_api/edit_types&quot;:725,&quot;../../plot_api/plot_template&quot;:732,&quot;../annotations/attributes&quot;:550}],560:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;);function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:&quot;linear&quot;,autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}e.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r&lt;e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(&quot;.annotation-&quot;+t.id).remove()}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742}],561:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../plots/array_container_defaults&quot;),o=t(&quot;../annotations/common_defaults&quot;),s=t(&quot;./attributes&quot;);function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+&quot;axis&quot;,a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l(&quot;visible&quot;)&amp;&amp;(o(t,e,a.fullLayout,l),c(&quot;x&quot;),c(&quot;y&quot;),c(&quot;z&quot;),n.noneOrAll(t,e,[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;]),e.xref=&quot;x&quot;,e.yref=&quot;y&quot;,e.zref=&quot;z&quot;,l(&quot;xanchor&quot;),l(&quot;yanchor&quot;),l(&quot;xshift&quot;),l(&quot;yshift&quot;),e.showarrow&amp;&amp;(e.axref=&quot;pixel&quot;,e.ayref=&quot;pixel&quot;,l(&quot;ax&quot;,-10),l(&quot;ay&quot;,-30),n.noneOrAll(t,e,[&quot;ax&quot;,&quot;ay&quot;])))}e.exports=function(t,e,r){a(t,e,{name:&quot;annotations&quot;,handleItemDefaults:l,fullLayout:r.fullLayout})}},{&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;../../plots/cartesian/axes&quot;:742,&quot;../annotations/common_defaults&quot;:553,&quot;./attributes&quot;:559}],562:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../annotations/draw&quot;).drawRaw,i=t(&quot;../../plots/gl3d/project&quot;),a=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;];e.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s&lt;o.length;s++){for(var l=o[s],c=!1,u=0;u&lt;3;u++){var f=a[u],h=l[f],p=e[f+&quot;axis&quot;].r2fraction(h);if(p&lt;0||p&gt;1){c=!0;break}}c?t.fullLayout._infolayer.select(&quot;.annotation-&quot;+t.id+'[data-index=&quot;'+s+'&quot;]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{&quot;../../plots/gl3d/project&quot;:793,&quot;../annotations/draw&quot;:556}],563:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;);e.exports={moduleType:&quot;component&quot;,name:&quot;annotations3d&quot;,schema:{subplots:{scene:{annotations:t(&quot;./attributes&quot;)}}},layoutAttributes:t(&quot;./attributes&quot;),handleDefaults:t(&quot;./defaults&quot;),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var a=r.attrRegex,o=Object.keys(t),s=0;s&lt;o.length;s++){var l=o[s];a.test(l)&amp;&amp;(t[l].annotations||[]).length&amp;&amp;(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:t(&quot;./convert&quot;),draw:t(&quot;./draw&quot;)}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./attributes&quot;:559,&quot;./convert&quot;:560,&quot;./defaults&quot;:561,&quot;./draw&quot;:562}],564:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;world-calendars/dist/main&quot;),t(&quot;world-calendars/dist/plus&quot;),t(&quot;world-calendars/dist/calendars/chinese&quot;),t(&quot;world-calendars/dist/calendars/coptic&quot;),t(&quot;world-calendars/dist/calendars/discworld&quot;),t(&quot;world-calendars/dist/calendars/ethiopian&quot;),t(&quot;world-calendars/dist/calendars/hebrew&quot;),t(&quot;world-calendars/dist/calendars/islamic&quot;),t(&quot;world-calendars/dist/calendars/julian&quot;),t(&quot;world-calendars/dist/calendars/mayan&quot;),t(&quot;world-calendars/dist/calendars/nanakshahi&quot;),t(&quot;world-calendars/dist/calendars/nepali&quot;),t(&quot;world-calendars/dist/calendars/persian&quot;),t(&quot;world-calendars/dist/calendars/taiwan&quot;),t(&quot;world-calendars/dist/calendars/thai&quot;),t(&quot;world-calendars/dist/calendars/ummalqura&quot;)},{&quot;world-calendars/dist/calendars/chinese&quot;:531,&quot;world-calendars/dist/calendars/coptic&quot;:532,&quot;world-calendars/dist/calendars/discworld&quot;:533,&quot;world-calendars/dist/calendars/ethiopian&quot;:534,&quot;world-calendars/dist/calendars/hebrew&quot;:535,&quot;world-calendars/dist/calendars/islamic&quot;:536,&quot;world-calendars/dist/calendars/julian&quot;:537,&quot;world-calendars/dist/calendars/mayan&quot;:538,&quot;world-calendars/dist/calendars/nanakshahi&quot;:539,&quot;world-calendars/dist/calendars/nepali&quot;:540,&quot;world-calendars/dist/calendars/persian&quot;:541,&quot;world-calendars/dist/calendars/taiwan&quot;:542,&quot;world-calendars/dist/calendars/thai&quot;:543,&quot;world-calendars/dist/calendars/ummalqura&quot;:544,&quot;world-calendars/dist/main&quot;:545,&quot;world-calendars/dist/plus&quot;:546}],565:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./calendars&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../constants/numerical&quot;),o=a.EPOCHJD,s=a.ONEDAY,l={valType:&quot;enumerated&quot;,values:Object.keys(n.calendars),editType:&quot;calc&quot;,dflt:&quot;gregorian&quot;},c=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},u=&quot;##&quot;,f={d:{0:&quot;dd&quot;,&quot;-&quot;:&quot;d&quot;},e:{0:&quot;d&quot;,&quot;-&quot;:&quot;d&quot;},a:{0:&quot;D&quot;,&quot;-&quot;:&quot;D&quot;},A:{0:&quot;DD&quot;,&quot;-&quot;:&quot;DD&quot;},j:{0:&quot;oo&quot;,&quot;-&quot;:&quot;o&quot;},W:{0:&quot;ww&quot;,&quot;-&quot;:&quot;w&quot;},m:{0:&quot;mm&quot;,&quot;-&quot;:&quot;m&quot;},b:{0:&quot;M&quot;,&quot;-&quot;:&quot;M&quot;},B:{0:&quot;MM&quot;,&quot;-&quot;:&quot;MM&quot;},y:{0:&quot;yy&quot;,&quot;-&quot;:&quot;yy&quot;},Y:{0:&quot;yyyy&quot;,&quot;-&quot;:&quot;yyyy&quot;},U:u,w:u,c:{0:&quot;D M d %X yyyy&quot;,&quot;-&quot;:&quot;D M d %X yyyy&quot;},x:{0:&quot;mm/dd/yyyy&quot;,&quot;-&quot;:&quot;mm/dd/yyyy&quot;}};var h={};function p(t){var e=h[t];return e||(e=h[t]=n.instance(t))}function d(t){return i.extendFlat({},l,{description:t})}function g(t){return&quot;Sets the calendar system to use with `&quot;+t+&quot;` date data.&quot;}var m={xcalendar:d(g(&quot;x&quot;))},v=i.extendFlat({},m,{ycalendar:d(g(&quot;y&quot;))}),y=i.extendFlat({},v,{zcalendar:d(g(&quot;z&quot;))}),x=d([&quot;Sets the calendar system to use for `range` and `tick0`&quot;,&quot;if this is a date axis. This does not set the calendar for&quot;,&quot;interpreting data on this axis, that's specified in the trace&quot;,&quot;or via the global `layout.calendar`&quot;].join(&quot; &quot;));e.exports={moduleType:&quot;component&quot;,name:&quot;calendars&quot;,schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:y,surface:y,mesh3d:y,scattergl:v,ohlc:m,candlestick:m},layout:{calendar:d([&quot;Sets the default calendar system to use for interpreting and&quot;,&quot;displaying dates throughout the plot.&quot;].join(&quot; &quot;))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:d([&quot;Sets the calendar system to use for `value`, if it is a date.&quot;].join(&quot; &quot;)),targetcalendar:d([&quot;Sets the calendar system to use for `target`, if it is an&quot;,&quot;array of dates. If `target` is a string (eg *x*) we use the&quot;,&quot;corresponding trace attribute (eg `xcalendar`) if it exists,&quot;,&quot;even if `targetcalendar` is provided.&quot;].join(&quot; &quot;))}}},layoutAttributes:l,handleDefaults:c,handleTraceDefaults:function(t,e,r,n){for(var i=0;i&lt;r.length;i++)c(t,e,r[i]+&quot;calendar&quot;,n.calendar)},CANONICAL_SUNDAY:{chinese:&quot;2000-01-02&quot;,coptic:&quot;2000-01-03&quot;,discworld:&quot;2000-01-03&quot;,ethiopian:&quot;2000-01-05&quot;,hebrew:&quot;5000-01-01&quot;,islamic:&quot;1000-01-02&quot;,julian:&quot;2000-01-03&quot;,mayan:&quot;5000-01-01&quot;,nanakshahi:&quot;1000-01-05&quot;,nepali:&quot;2000-01-05&quot;,persian:&quot;1000-01-01&quot;,jalali:&quot;1000-01-01&quot;,taiwan:&quot;1000-01-04&quot;,thai:&quot;2000-01-04&quot;,ummalqura:&quot;1400-01-06&quot;},CANONICAL_TICK:{chinese:&quot;2000-01-01&quot;,coptic:&quot;2000-01-01&quot;,discworld:&quot;2000-01-01&quot;,ethiopian:&quot;2000-01-01&quot;,hebrew:&quot;5000-01-01&quot;,islamic:&quot;1000-01-01&quot;,julian:&quot;2000-01-01&quot;,mayan:&quot;5000-01-01&quot;,nanakshahi:&quot;1000-01-01&quot;,nepali:&quot;2000-01-01&quot;,persian:&quot;1000-01-01&quot;,jalali:&quot;1000-01-01&quot;,taiwan:&quot;1000-01-01&quot;,thai:&quot;2000-01-01&quot;,ummalqura:&quot;1400-01-01&quot;},DFLTRANGE:{chinese:[&quot;2000-01-01&quot;,&quot;2001-01-01&quot;],coptic:[&quot;1700-01-01&quot;,&quot;1701-01-01&quot;],discworld:[&quot;1800-01-01&quot;,&quot;1801-01-01&quot;],ethiopian:[&quot;2000-01-01&quot;,&quot;2001-01-01&quot;],hebrew:[&quot;5700-01-01&quot;,&quot;5701-01-01&quot;],islamic:[&quot;1400-01-01&quot;,&quot;1401-01-01&quot;],julian:[&quot;2000-01-01&quot;,&quot;2001-01-01&quot;],mayan:[&quot;5200-01-01&quot;,&quot;5201-01-01&quot;],nanakshahi:[&quot;0500-01-01&quot;,&quot;0501-01-01&quot;],nepali:[&quot;2000-01-01&quot;,&quot;2001-01-01&quot;],persian:[&quot;1400-01-01&quot;,&quot;1401-01-01&quot;],jalali:[&quot;1400-01-01&quot;,&quot;1401-01-01&quot;],taiwan:[&quot;0100-01-01&quot;,&quot;0101-01-01&quot;],thai:[&quot;2500-01-01&quot;,&quot;2501-01-01&quot;],ummalqura:[&quot;1400-01-01&quot;,&quot;1401-01-01&quot;]},getCal:p,worldCalFmt:function(t,e,r){for(var n,i,a,l,c,h=Math.floor((e+.05)/s)+o,d=p(r).fromJD(h),g=0;-1!==(g=t.indexOf(&quot;%&quot;,g));)&quot;0&quot;===(n=t.charAt(g+1))||&quot;-&quot;===n||&quot;_&quot;===n?(a=3,i=t.charAt(g+2),&quot;_&quot;===n&amp;&amp;(n=&quot;-&quot;)):(i=n,n=&quot;0&quot;,a=2),(l=f[i])?(c=l===u?u:d.formatDate(l[n]),t=t.substr(0,g)+c+t.substr(g+a),g+=c.length):g+=a;return t}}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;./calendars&quot;:564}],566:[function(t,e,r){&quot;use strict&quot;;r.defaults=[&quot;#1f77b4&quot;,&quot;#ff7f0e&quot;,&quot;#2ca02c&quot;,&quot;#d62728&quot;,&quot;#9467bd&quot;,&quot;#8c564b&quot;,&quot;#e377c2&quot;,&quot;#7f7f7f&quot;,&quot;#bcbd22&quot;,&quot;#17becf&quot;],r.defaultLine=&quot;#444&quot;,r.lightLine=&quot;#eee&quot;,r.background=&quot;#fff&quot;,r.borderLine=&quot;#BEC8D9&quot;,r.lightFraction=1e3/11},{}],567:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;tinycolor2&quot;),i=t(&quot;fast-isnumeric&quot;),a=e.exports={},o=t(&quot;./attributes&quot;);a.defaults=o.defaults;var s=a.defaultLine=o.defaultLine;a.lightLine=o.lightLine;var l=a.background=o.background;function c(t){if(i(t)||&quot;string&quot;!=typeof t)return t;var e=t.trim();if(&quot;rgb&quot;!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),a=&quot;a&quot;===e.charAt(3)&amp;&amp;4===n.length;if(!a&amp;&amp;3!==n.length)return t;for(var o=0;o&lt;n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]&gt;=0))return t;if(3===o)n[o]&gt;1&amp;&amp;(n[o]=1);else if(n[o]&gt;=1)return t}var s=Math.round(255*n[0])+&quot;, &quot;+Math.round(255*n[1])+&quot;, &quot;+Math.round(255*n[2]);return a?&quot;rgba(&quot;+s+&quot;, &quot;+n[3]+&quot;)&quot;:&quot;rgb(&quot;+s+&quot;)&quot;}a.tinyRGB=function(t){var e=t.toRgb();return&quot;rgb(&quot;+Math.round(e.r)+&quot;, &quot;+Math.round(e.g)+&quot;, &quot;+Math.round(e.b)+&quot;)&quot;},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return&quot;rgba(&quot;+Math.round(r.r)+&quot;, &quot;+Math.round(r.g)+&quot;, &quot;+Math.round(r.b)+&quot;, &quot;+e+&quot;)&quot;},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&amp;&amp;(i=n(a.combine(t,l))),(i.isDark()?e?i.lighten(e):l:r?i.darken(r):s).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),&quot;stroke-opacity&quot;:r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),&quot;fill-opacity&quot;:r.getAlpha()})},a.clean=function(t){if(t&amp;&amp;&quot;object&quot;==typeof t){var e,r,n,i,o=Object.keys(t);for(e=0;e&lt;o.length;e++)if(i=t[n=o[e]],&quot;color&quot;===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r&lt;i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if(&quot;colorscale&quot;===n.substr(n.length-10)&amp;&amp;Array.isArray(i))for(r=0;r&lt;i.length;r++)Array.isArray(i[r])&amp;&amp;(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var s=i[0];if(!Array.isArray(s)&amp;&amp;s&amp;&amp;&quot;object&quot;==typeof s)for(r=0;r&lt;i.length;r++)a.clean(i[r])}else i&amp;&amp;&quot;object&quot;==typeof i&amp;&amp;a.clean(i)}}},{&quot;./attributes&quot;:566,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],568:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/layout_attributes&quot;),i=t(&quot;../../plots/font_attributes&quot;),a=t(&quot;../../lib/extend&quot;).extendFlat,o=t(&quot;../../plot_api/edit_types&quot;).overrideAll;e.exports=o({thicknessmode:{valType:&quot;enumerated&quot;,values:[&quot;fraction&quot;,&quot;pixels&quot;],dflt:&quot;pixels&quot;},thickness:{valType:&quot;number&quot;,min:0,dflt:30},lenmode:{valType:&quot;enumerated&quot;,values:[&quot;fraction&quot;,&quot;pixels&quot;],dflt:&quot;fraction&quot;},len:{valType:&quot;number&quot;,min:0,dflt:1},x:{valType:&quot;number&quot;,dflt:1.02,min:-2,max:3},xanchor:{valType:&quot;enumerated&quot;,values:[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;left&quot;},xpad:{valType:&quot;number&quot;,min:0,dflt:10},y:{valType:&quot;number&quot;,dflt:.5,min:-2,max:3},yanchor:{valType:&quot;enumerated&quot;,values:[&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;middle&quot;},ypad:{valType:&quot;number&quot;,min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:&quot;number&quot;,min:0,dflt:0},bgcolor:{valType:&quot;color&quot;,dflt:&quot;rgba(0,0,0,0)&quot;},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:&quot;&quot;}),ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,showexponent:n.showexponent,title:{valType:&quot;string&quot;},titlefont:i({}),titleside:{valType:&quot;enumerated&quot;,values:[&quot;right&quot;,&quot;top&quot;,&quot;bottom&quot;],dflt:&quot;top&quot;}},&quot;colorbars&quot;,&quot;from-root&quot;)},{&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/cartesian/layout_attributes&quot;:754,&quot;../../plots/font_attributes&quot;:768}],569:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./draw&quot;);e.exports=function(t,e,r){if(&quot;function&quot;==typeof r)return r(t,e);var i=e[0].trace,a=&quot;cb&quot;+i.uid,o=r.container,s=o?i[o]:i;(t._fullLayout._infolayer.selectAll(&quot;.&quot;+a).remove(),s&amp;&amp;s.showscale)&amp;&amp;(e[0].t.cb=n(t,a)).fillgradient(s.colorscale).zrange([s[r.min],s[r.max]]).options(s.colorbar)()}},{&quot;./draw&quot;:572}],570:[function(t,e,r){&quot;use strict&quot;;e.exports={cn:{colorbar:&quot;colorbar&quot;,cbbg:&quot;cbbg&quot;,cbfill:&quot;cbfill&quot;,cbfills:&quot;cbfills&quot;,cbline:&quot;cbline&quot;,cblines:&quot;cblines&quot;,cbaxis:&quot;cbaxis&quot;,cbtitleunshift:&quot;cbtitleunshift&quot;,cbtitle:&quot;cbtitle&quot;,cboutline:&quot;cboutline&quot;,crisp:&quot;crisp&quot;,jsPlaceholder:&quot;js-placeholder&quot;}}},{}],571:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plot_api/plot_template&quot;),a=t(&quot;../../plots/cartesian/tick_value_defaults&quot;),o=t(&quot;../../plots/cartesian/tick_mark_defaults&quot;),s=t(&quot;../../plots/cartesian/tick_label_defaults&quot;),l=t(&quot;./attributes&quot;);e.exports=function(t,e,r){var c=i.newContainer(e,&quot;colorbar&quot;),u=t.colorbar||{};function f(t,e){return n.coerce(u,c,l,t,e)}var h=f(&quot;thicknessmode&quot;);f(&quot;thickness&quot;,&quot;fraction&quot;===h?30/(r.width-r.margin.l-r.margin.r):30);var p=f(&quot;lenmode&quot;);f(&quot;len&quot;,&quot;fraction&quot;===p?1:r.height-r.margin.t-r.margin.b),f(&quot;x&quot;),f(&quot;xanchor&quot;),f(&quot;xpad&quot;),f(&quot;y&quot;),f(&quot;yanchor&quot;),f(&quot;ypad&quot;),n.noneOrAll(u,c,[&quot;x&quot;,&quot;y&quot;]),f(&quot;outlinecolor&quot;),f(&quot;outlinewidth&quot;),f(&quot;bordercolor&quot;),f(&quot;borderwidth&quot;),f(&quot;bgcolor&quot;),a(u,c,f,&quot;linear&quot;);var d={outerTicks:!1,font:r.font};s(u,c,f,&quot;linear&quot;,d),o(u,c,f,&quot;linear&quot;,d),f(&quot;title&quot;,r._dfltTitle.colorbar),n.coerceFont(f,&quot;titlefont&quot;,r.font),f(&quot;titleside&quot;)}},{&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/tick_label_defaults&quot;:761,&quot;../../plots/cartesian/tick_mark_defaults&quot;:762,&quot;../../plots/cartesian/tick_value_defaults&quot;:763,&quot;./attributes&quot;:568}],572:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;../../plots/plots&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../../plots/cartesian/axes&quot;),l=t(&quot;../dragelement&quot;),c=t(&quot;../../lib&quot;),u=t(&quot;../../lib/extend&quot;).extendFlat,f=t(&quot;../../lib/setcursor&quot;),h=t(&quot;../drawing&quot;),p=t(&quot;../color&quot;),d=t(&quot;../titles&quot;),g=t(&quot;../../lib/svg_text_utils&quot;),m=t(&quot;../../constants/alignment&quot;),v=m.LINE_SPACING,y=m.FROM_TL,x=m.FROM_BR,b=t(&quot;../../plots/cartesian/axis_defaults&quot;),_=t(&quot;../../plots/cartesian/position_defaults&quot;),w=t(&quot;../../plots/cartesian/layout_attributes&quot;),k=t(&quot;./attributes&quot;),M=t(&quot;./constants&quot;).cn;e.exports=function(t,e){var r={};for(var m in k)r[m]=null;function A(){var m=t._fullLayout,k=m._size;if(&quot;function&quot;==typeof r.fillcolor||&quot;function&quot;==typeof r.line.color||r.fillgradient){var S,E,C=r.zrange||n.extent((&quot;function&quot;==typeof r.fillcolor?r.fillcolor:r.line.color).domain()),L=[],z=[],P=&quot;function&quot;==typeof r.line.color?r.line.color:function(){return r.line.color},O=&quot;function&quot;==typeof r.fillcolor?r.fillcolor:function(){return r.fillcolor},I=r.levels.end+r.levels.size/100,D=r.levels.size,R=1.001*C[0]-.001*C[1],B=1.001*C[1]-.001*C[0];for(E=0;E&lt;1e5&amp;&amp;(S=r.levels.start+E*D,!(D&gt;0?S&gt;=I:S&lt;=I));E++)S&gt;R&amp;&amp;S&lt;B&amp;&amp;L.push(S);if(r.fillgradient)z=[0];else if(&quot;function&quot;==typeof r.fillcolor)if(r.filllevels)for(I=r.filllevels.end+r.filllevels.size/100,D=r.filllevels.size,E=0;E&lt;1e5&amp;&amp;(S=r.filllevels.start+E*D,!(D&gt;0?S&gt;=I:S&lt;=I));E++)S&gt;C[0]&amp;&amp;S&lt;C[1]&amp;&amp;z.push(S);else(z=L.map(function(t){return t-r.levels.size/2})).push(z[z.length-1]+r.levels.size);else r.fillcolor&amp;&amp;&quot;string&quot;==typeof r.fillcolor&amp;&amp;(z=[0]);r.levels.size&lt;0&amp;&amp;(L.reverse(),z.reverse());var F,N=k.h,j=k.w,V=Math.round(r.thickness*(&quot;fraction&quot;===r.thicknessmode?j:1)),U=V/k.w,q=Math.round(r.len*(&quot;fraction&quot;===r.lenmode?N:1)),H=q/k.h,G=r.xpad/k.w,W=(r.borderwidth+r.outlinewidth)/2,Y=r.ypad/k.h,X=Math.round(r.x*k.w+r.xpad),Z=r.x-U*({middle:.5,right:1}[r.xanchor]||0),$=r.y+H*(({top:-.5,bottom:.5}[r.yanchor]||0)-.5),J=Math.round(k.h*(1-$)),K=J-q,Q={type:&quot;linear&quot;,range:C,tickmode:r.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:r.ticks,ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,showticklabels:r.showticklabels,tickfont:r.tickfont,tickangle:r.tickangle,tickformat:r.tickformat,exponentformat:r.exponentformat,separatethousands:r.separatethousands,showexponent:r.showexponent,showtickprefix:r.showtickprefix,tickprefix:r.tickprefix,showticksuffix:r.showticksuffix,ticksuffix:r.ticksuffix,title:r.title,titlefont:r.titlefont,showline:!0,anchor:&quot;free&quot;,position:1},tt={type:&quot;linear&quot;,_id:&quot;y&quot;+e},et={letter:&quot;y&quot;,font:m.font,noHover:!0,calendar:m.calendar};if(b(Q,tt,mt,et,m),_(Q,tt,mt,et),tt.position=r.x+G+U,A.axis=tt,-1!==[&quot;top&quot;,&quot;bottom&quot;].indexOf(r.titleside)&amp;&amp;(tt.titleside=r.titleside,tt.titlex=r.x+G,tt.titley=$+(&quot;top&quot;===r.titleside?H-Y:Y)),r.line.color&amp;&amp;&quot;auto&quot;===r.tickmode){tt.tickmode=&quot;linear&quot;,tt.tick0=r.levels.start;var rt=r.levels.size,nt=c.constrain((J-K)/50,4,15)+1,it=(C[1]-C[0])/((r.nticks||nt)*rt);if(it&gt;1){var at=Math.pow(10,Math.floor(Math.log(it)/Math.LN10));rt*=at*c.roundUp(it/at,[2,5,10]),(Math.abs(r.levels.start)/r.levels.size+1e-6)%1&lt;2e-6&amp;&amp;(tt.tick0=0)}tt.dtick=rt}tt.domain=[$+Y,$+H-Y],tt.setScale();var ot=c.ensureSingle(m._infolayer,&quot;g&quot;,e,function(t){t.classed(M.colorbar,!0).each(function(){var t=n.select(this);t.append(&quot;rect&quot;).classed(M.cbbg,!0),t.append(&quot;g&quot;).classed(M.cbfills,!0),t.append(&quot;g&quot;).classed(M.cblines,!0),t.append(&quot;g&quot;).classed(M.cbaxis,!0).classed(M.crisp,!0),t.append(&quot;g&quot;).classed(M.cbtitleunshift,!0).append(&quot;g&quot;).classed(M.cbtitle,!0),t.append(&quot;rect&quot;).classed(M.cboutline,!0),t.select(&quot;.cbtitle&quot;).datum(0)})});ot.attr(&quot;transform&quot;,&quot;translate(&quot;+Math.round(k.l)+&quot;,&quot;+Math.round(k.t)+&quot;)&quot;);var st=ot.select(&quot;.cbtitleunshift&quot;).attr(&quot;transform&quot;,&quot;translate(-&quot;+Math.round(k.l)+&quot;,-&quot;+Math.round(k.t)+&quot;)&quot;);tt._axislayer=ot.select(&quot;.cbaxis&quot;);var lt=0;if(-1!==[&quot;top&quot;,&quot;bottom&quot;].indexOf(r.titleside)){var ct,ut=k.l+(r.x+G)*k.w,ft=tt.titlefont.size;ct=&quot;top&quot;===r.titleside?(1-($+H-Y))*k.h+k.t+3+.75*ft:(1-($+Y))*k.h+k.t-3-.25*ft,vt(tt._id+&quot;title&quot;,{attributes:{x:ut,y:ct,&quot;text-anchor&quot;:&quot;start&quot;}})}var ht,pt,dt,gt=c.syncOrAsync([a.previousPromises,function(){if(-1!==[&quot;top&quot;,&quot;bottom&quot;].indexOf(r.titleside)){var a=ot.select(&quot;.cbtitle&quot;),o=a.select(&quot;text&quot;),l=[-r.outlinewidth/2,r.outlinewidth/2],u=a.select(&quot;.h&quot;+tt._id+&quot;title-math-group&quot;).node(),f=15.6;if(o.node()&amp;&amp;(f=parseInt(o.node().style.fontSize,10)*v),u?(lt=h.bBox(u).height)&gt;f&amp;&amp;(l[1]-=(lt-f)/2):o.node()&amp;&amp;!o.classed(M.jsPlaceholder)&amp;&amp;(lt=h.bBox(o.node()).height),lt){if(lt+=5,&quot;top&quot;===r.titleside)tt.domain[1]-=lt/k.h,l[1]*=-1;else{tt.domain[0]+=lt/k.h;var p=g.lineCount(o);l[1]+=(1-p)*f}a.attr(&quot;transform&quot;,&quot;translate(&quot;+l+&quot;)&quot;),tt.setScale()}}ot.selectAll(&quot;.cbfills,.cblines&quot;).attr(&quot;transform&quot;,&quot;translate(0,&quot;+Math.round(k.h*(1-tt.domain[1]))+&quot;)&quot;),tt._axislayer.attr(&quot;transform&quot;,&quot;translate(0,&quot;+Math.round(-k.t)+&quot;)&quot;);var d=ot.select(&quot;.cbfills&quot;).selectAll(&quot;rect.cbfill&quot;).data(z);d.enter().append(&quot;rect&quot;).classed(M.cbfill,!0).style(&quot;stroke&quot;,&quot;none&quot;),d.exit().remove();var y=C.map(tt.c2p).map(Math.round).sort(function(t,e){return t-e});d.each(function(a,o){var s=[0===o?C[0]:(z[o]+z[o-1])/2,o===z.length-1?C[1]:(z[o]+z[o+1])/2].map(tt.c2p).map(Math.round);s[1]=c.constrain(s[1]+(s[1]&gt;s[0])?1:-1,y[0],y[1]);var l=n.select(this).attr({x:X,width:Math.max(V,2),y:n.min(s),height:Math.max(n.max(s)-n.min(s),2)});if(r.fillgradient)h.gradient(l,t,e,&quot;vertical&quot;,r.fillgradient,&quot;fill&quot;);else{var u=O(a).replace(&quot;e-&quot;,&quot;&quot;);l.attr(&quot;fill&quot;,i(u).toHexString())}});var x=ot.select(&quot;.cblines&quot;).selectAll(&quot;path.cbline&quot;).data(r.line.color&amp;&amp;r.line.width?L:[]);return x.enter().append(&quot;path&quot;).classed(M.cbline,!0),x.exit().remove(),x.each(function(t){n.select(this).attr(&quot;d&quot;,&quot;M&quot;+X+&quot;,&quot;+(Math.round(tt.c2p(t))+r.line.width/2%1)+&quot;h&quot;+V).call(h.lineGroupStyle,r.line.width,P(t),r.line.dash)}),tt._axislayer.selectAll(&quot;g.&quot;+tt._id+&quot;tick,path&quot;).remove(),tt._pos=X+V+(r.outlinewidth||0)/2-(&quot;outside&quot;===r.ticks?1:0),tt.side=&quot;right&quot;,c.syncOrAsync([function(){return s.doTicksSingle(t,tt,!0)},function(){if(-1===[&quot;top&quot;,&quot;bottom&quot;].indexOf(r.titleside)){var e=tt.titlefont.size,i=tt._offset+tt._length/2,a=k.l+(tt.position||0)*k.w+(&quot;right&quot;===tt.side?10+e*(tt.showticklabels?1:.5):-10-e*(tt.showticklabels?.5:0));vt(&quot;h&quot;+tt._id+&quot;title&quot;,{avoid:{selection:n.select(t).selectAll(&quot;g.&quot;+tt._id+&quot;tick&quot;),side:r.titleside,offsetLeft:k.l,offsetTop:0,maxShift:m.width},attributes:{x:a,y:i,&quot;text-anchor&quot;:&quot;middle&quot;},transform:{rotate:&quot;-90&quot;,offset:0}})}}])},a.previousPromises,function(){var n=V+r.outlinewidth/2+h.bBox(tt._axislayer.node()).width;if((F=st.select(&quot;text&quot;)).node()&amp;&amp;!F.classed(M.jsPlaceholder)){var i,o=st.select(&quot;.h&quot;+tt._id+&quot;title-math-group&quot;).node();i=o&amp;&amp;-1!==[&quot;top&quot;,&quot;bottom&quot;].indexOf(r.titleside)?h.bBox(o).width:h.bBox(st.node()).right-X-k.l,n=Math.max(n,i)}var s=2*r.xpad+n+r.borderwidth+r.outlinewidth/2,l=J-K;ot.select(&quot;.cbbg&quot;).attr({x:X-r.xpad-(r.borderwidth+r.outlinewidth)/2,y:K-W,width:Math.max(s,2),height:Math.max(l+2*W,2)}).call(p.fill,r.bgcolor).call(p.stroke,r.bordercolor).style({&quot;stroke-width&quot;:r.borderwidth}),ot.selectAll(&quot;.cboutline&quot;).attr({x:X,y:K+r.ypad+(&quot;top&quot;===r.titleside?lt:0),width:Math.max(V,2),height:Math.max(l-2*r.ypad-lt,2)}).call(p.stroke,r.outlinecolor).style({fill:&quot;None&quot;,&quot;stroke-width&quot;:r.outlinewidth});var c=({center:.5,right:1}[r.xanchor]||0)*s;ot.attr(&quot;transform&quot;,&quot;translate(&quot;+(k.l-c)+&quot;,&quot;+k.t+&quot;)&quot;);var u={},f=y[r.yanchor],d=x[r.yanchor];&quot;pixels&quot;===r.lenmode?(u.y=r.y,u.t=l*f,u.b=l*d):(u.t=u.b=0,u.yt=r.y+r.len*f,u.yb=r.y-r.len*d);var g=y[r.xanchor],m=x[r.xanchor];if(&quot;pixels&quot;===r.thicknessmode)u.x=r.x,u.l=s*g,u.r=s*m;else{var v=s-V;u.l=v*g,u.r=v*m,u.xl=r.x-r.thickness*g,u.xr=r.x+r.thickness*m}a.autoMargin(t,e,u)}],t);if(gt&amp;&amp;gt.then&amp;&amp;(t._promises||[]).push(gt),t._context.edits.colorbarPosition)l.init({element:ot.node(),gd:t,prepFn:function(){ht=ot.attr(&quot;transform&quot;),f(ot)},moveFn:function(t,e){ot.attr(&quot;transform&quot;,ht+&quot; translate(&quot;+t+&quot;,&quot;+e+&quot;)&quot;),pt=l.align(Z+t/k.w,U,0,1,r.xanchor),dt=l.align($-e/k.h,H,0,1,r.yanchor);var n=l.getCursor(pt,dt,r.xanchor,r.yanchor);f(ot,n)},doneFn:function(){f(ot),void 0!==pt&amp;&amp;void 0!==dt&amp;&amp;o.call(&quot;restyle&quot;,t,{&quot;colorbar.x&quot;:pt,&quot;colorbar.y&quot;:dt},T().index)}});return gt}function mt(t,e){return c.coerce(Q,tt,w,t,e)}function vt(e,r){var n=T(),i=&quot;colorbar.title&quot;,a=n._module.colorbar.container;a&amp;&amp;(i=a+&quot;.&quot;+i);var o={propContainer:tt,propName:i,traceIndex:n.index,placeholder:m._dfltTitle.colorbar,containerGroup:ot.select(&quot;.cbtitle&quot;)},s=&quot;h&quot;===e.charAt(0)?e.substr(1):&quot;h&quot;+e;ot.selectAll(&quot;.&quot;+s+&quot;,.&quot;+s+&quot;-math-group&quot;).remove(),d.draw(t,e,u(o,r||{}))}m._infolayer.selectAll(&quot;g.&quot;+e).remove()}function T(){var r,n,i=e.substr(2);for(r=0;r&lt;t._fullData.length;r++)if((n=t._fullData[r]).uid===i)return n}return r.fillcolor=null,r.line={color:null,width:null,dash:null},r.levels={start:null,end:null,size:null},r.filllevels=null,r.fillgradient=null,r.zrange=null,Object.keys(r).forEach(function(t){A[t]=function(e){return arguments.length?(r[t]=c.isPlainObject(r[t])?c.extendFlat(r[t],e):e,A):r[t]}}),A.options=function(t){for(var e in t)&quot;function&quot;==typeof A[e]&amp;&amp;A[e](t[e]);return A},A._opts=r,A}},{&quot;../../constants/alignment&quot;:665,&quot;../../lib&quot;:693,&quot;../../lib/extend&quot;:682,&quot;../../lib/setcursor&quot;:714,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../plots/cartesian/axis_defaults&quot;:744,&quot;../../plots/cartesian/layout_attributes&quot;:754,&quot;../../plots/cartesian/position_defaults&quot;:757,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../dragelement&quot;:589,&quot;../drawing&quot;:592,&quot;../titles&quot;:658,&quot;./attributes&quot;:568,&quot;./constants&quot;:570,d3:147,tinycolor2:511}],573:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t){return n.isPlainObject(t.colorbar)}},{&quot;../../lib&quot;:693}],574:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./scales.js&quot;);Object.keys(n);function i(t){return&quot;`&quot;+t+&quot;`&quot;}e.exports=function(t,e){t=t||&quot;&quot;;var r,a=(e=e||{}).cLetter||&quot;c&quot;,o=(&quot;onlyIfNumerical&quot;in e?e.onlyIfNumerical:Boolean(t),&quot;noScale&quot;in e?e.noScale:&quot;marker.line&quot;===t),s=&quot;showScaleDflt&quot;in e?e.showScaleDflt:&quot;z&quot;===a,l=&quot;string&quot;==typeof e.colorscaleDflt?n[e.colorscaleDflt]:null,c=e.editTypeOverride||&quot;&quot;,u=t?t+&quot;.&quot;:&quot;&quot;;&quot;colorAttr&quot;in e?(r=e.colorAttr,e.colorAttr):i(u+(r={z:&quot;z&quot;,c:&quot;color&quot;}[a]));var f=a+&quot;auto&quot;,h=a+&quot;min&quot;,p=a+&quot;max&quot;,d=(i(u+h),i(u+p),{});d[h]=d[p]=void 0;var g={};g[f]=!1;var m={};return&quot;color&quot;===r&amp;&amp;(m.color={valType:&quot;color&quot;,arrayOk:!0,editType:c||&quot;style&quot;}),m[f]={valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;,impliedEdits:d},m[h]={valType:&quot;number&quot;,dflt:null,editType:c||&quot;plot&quot;,impliedEdits:g},m[p]={valType:&quot;number&quot;,dflt:null,editType:c||&quot;plot&quot;,impliedEdits:g},m.colorscale={valType:&quot;colorscale&quot;,editType:&quot;calc&quot;,dflt:l,impliedEdits:{autocolorscale:!1}},m.autocolorscale={valType:&quot;boolean&quot;,dflt:!1!==e.autoColorDflt,editType:&quot;calc&quot;,impliedEdits:{colorscale:void 0}},m.reversescale={valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},o||(m.showscale={valType:&quot;boolean&quot;,dflt:s,editType:&quot;calc&quot;}),m}},{&quot;./scales.js&quot;:586}],575:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./scales&quot;),a=t(&quot;./flip_scale&quot;);e.exports=function(t,e,r,o){var s=t,l=t._input,c=t._fullInput,u=t.updateStyle;function f(e,n,i){void 0===i&amp;&amp;(i=n),u?u(t._input,r?r+&quot;.&quot;+e:e,n):l[e]=n,s[e]=i,c&amp;&amp;t!==t._fullInput&amp;&amp;(u?u(t._fullInput,r?r+&quot;.&quot;+e:e,i):c[e]=i)}r&amp;&amp;(s=n.nestedProperty(s,r).get(),l=n.nestedProperty(l,r).get(),c=n.nestedProperty(c,r).get()||{});var h=o+&quot;auto&quot;,p=o+&quot;min&quot;,d=o+&quot;max&quot;,g=s[h],m=s[p],v=s[d],y=s.colorscale;!1===g&amp;&amp;void 0!==m||(m=n.aggNums(Math.min,null,e)),!1===g&amp;&amp;void 0!==v||(v=n.aggNums(Math.max,null,e)),m===v&amp;&amp;(m-=.5,v+=.5),f(p,m),f(d,v),f(h,!1!==g||void 0===m&amp;&amp;void 0===v),s.autocolorscale&amp;&amp;(f(&quot;colorscale&quot;,y=m*v&lt;0?i.RdBu:m&gt;=0?i.Reds:i.Blues,s.reversescale?a(y):y),l.autocolorscale||f(&quot;autocolorscale&quot;,!1))}},{&quot;../../lib&quot;:693,&quot;./flip_scale&quot;:579,&quot;./scales&quot;:586}],576:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./scales&quot;);e.exports=n.RdBu},{&quot;./scales&quot;:586}],577:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../colorbar/has_colorbar&quot;),o=t(&quot;../colorbar/defaults&quot;),s=t(&quot;./is_valid_scale&quot;),l=t(&quot;./flip_scale&quot;);e.exports=function(t,e,r,c,u){var f,h=u.prefix,p=u.cLetter,d=h.slice(0,h.length-1),g=h?i.nestedProperty(t,d).get()||{}:t,m=h?i.nestedProperty(e,d).get()||{}:e,v=g[p+&quot;min&quot;],y=g[p+&quot;max&quot;],x=g.colorscale;c(h+p+&quot;auto&quot;,!(n(v)&amp;&amp;n(y)&amp;&amp;v&lt;y)),c(h+p+&quot;min&quot;),c(h+p+&quot;max&quot;),void 0!==x&amp;&amp;(f=!s(x)),c(h+&quot;autocolorscale&quot;,f);var b,_=c(h+&quot;colorscale&quot;);(c(h+&quot;reversescale&quot;)&amp;&amp;(m.colorscale=l(_)),&quot;marker.line.&quot;!==h)&amp;&amp;(u.noScale||(h&amp;&amp;(b=a(g)),c(h+&quot;showscale&quot;,b)&amp;&amp;o(g,m,r)))}},{&quot;../../lib&quot;:693,&quot;../colorbar/defaults&quot;:571,&quot;../colorbar/has_colorbar&quot;:573,&quot;./flip_scale&quot;:579,&quot;./is_valid_scale&quot;:583,&quot;fast-isnumeric&quot;:213}],578:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){for(var n=t.length,i=new Array(n),a=new Array(n),o=0;o&lt;n;o++){var s=t[o];i[o]=e+s[0]*(r-e),a[o]=s[1]}return{domain:i,range:a}}},{}],579:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e,r=t.length,n=new Array(r),i=r-1,a=0;i&gt;=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],580:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./scales&quot;),i=t(&quot;./default_scale&quot;),a=t(&quot;./is_valid_scale_array&quot;);e.exports=function(t,e){if(e||(e=i),!t)return e;function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return&quot;string&quot;==typeof t&amp;&amp;(r(),&quot;string&quot;==typeof t&amp;&amp;r()),a(t)?t:e}},{&quot;./default_scale&quot;:576,&quot;./is_valid_scale_array&quot;:584,&quot;./scales&quot;:586}],581:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;./is_valid_scale&quot;);e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(i.isArrayOrTypedArray(o))for(var l=0;l&lt;o.length;l++)if(n(o[l])){s=!0;break}return i.isPlainObject(r)&amp;&amp;(s||!0===r.showscale||n(r.cmin)&amp;&amp;n(r.cmax)||a(r.colorscale)||i.isPlainObject(r.colorbar))}},{&quot;../../lib&quot;:693,&quot;./is_valid_scale&quot;:583,&quot;fast-isnumeric&quot;:213}],582:[function(t,e,r){&quot;use strict&quot;;r.scales=t(&quot;./scales&quot;),r.defaultScale=t(&quot;./default_scale&quot;),r.attributes=t(&quot;./attributes&quot;),r.handleDefaults=t(&quot;./defaults&quot;),r.calc=t(&quot;./calc&quot;),r.hasColorscale=t(&quot;./has_colorscale&quot;),r.isValidScale=t(&quot;./is_valid_scale&quot;),r.getScale=t(&quot;./get_scale&quot;),r.flipScale=t(&quot;./flip_scale&quot;),r.extractScale=t(&quot;./extract_scale&quot;),r.makeColorScaleFunc=t(&quot;./make_color_scale_func&quot;)},{&quot;./attributes&quot;:574,&quot;./calc&quot;:575,&quot;./default_scale&quot;:576,&quot;./defaults&quot;:577,&quot;./extract_scale&quot;:578,&quot;./flip_scale&quot;:579,&quot;./get_scale&quot;:580,&quot;./has_colorscale&quot;:581,&quot;./is_valid_scale&quot;:583,&quot;./make_color_scale_func&quot;:585,&quot;./scales&quot;:586}],583:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./scales&quot;),i=t(&quot;./is_valid_scale_array&quot;);e.exports=function(t){return void 0!==n[t]||i(t)}},{&quot;./is_valid_scale_array&quot;:584,&quot;./scales&quot;:586}],584:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;tinycolor2&quot;);e.exports=function(t){var e=0;if(!Array.isArray(t)||t.length&lt;2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r&lt;t.length;r++){var i=t[r];if(2!==i.length||+i[0]&lt;e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}},{tinycolor2:511}],585:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;fast-isnumeric&quot;),o=t(&quot;../color&quot;);function s(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}e.exports=function(t,e){e=e||{};for(var r=t.domain,l=t.range,c=l.length,u=new Array(c),f=0;f&lt;c;f++){var h=i(l[f]).toRgb();u[f]=[h.r,h.g,h.b,h.a]}var p,d=n.scale.linear().domain(r).range(u).clamp(!0),g=e.noNumericCheck,m=e.returnArray;return(p=g&amp;&amp;m?d:g?function(t){return s(d(t))}:m?function(t){return a(t)?d(t):i(t).isValid()?t:o.defaultLine}:function(t){return a(t)?s(d(t)):i(t).isValid()?t:o.defaultLine}).domain=d.domain,p.range=function(){return l},p}},{&quot;../color&quot;:567,d3:147,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],586:[function(t,e,r){&quot;use strict&quot;;e.exports={Greys:[[0,&quot;rgb(0,0,0)&quot;],[1,&quot;rgb(255,255,255)&quot;]],YlGnBu:[[0,&quot;rgb(8,29,88)&quot;],[.125,&quot;rgb(37,52,148)&quot;],[.25,&quot;rgb(34,94,168)&quot;],[.375,&quot;rgb(29,145,192)&quot;],[.5,&quot;rgb(65,182,196)&quot;],[.625,&quot;rgb(127,205,187)&quot;],[.75,&quot;rgb(199,233,180)&quot;],[.875,&quot;rgb(237,248,217)&quot;],[1,&quot;rgb(255,255,217)&quot;]],Greens:[[0,&quot;rgb(0,68,27)&quot;],[.125,&quot;rgb(0,109,44)&quot;],[.25,&quot;rgb(35,139,69)&quot;],[.375,&quot;rgb(65,171,93)&quot;],[.5,&quot;rgb(116,196,118)&quot;],[.625,&quot;rgb(161,217,155)&quot;],[.75,&quot;rgb(199,233,192)&quot;],[.875,&quot;rgb(229,245,224)&quot;],[1,&quot;rgb(247,252,245)&quot;]],YlOrRd:[[0,&quot;rgb(128,0,38)&quot;],[.125,&quot;rgb(189,0,38)&quot;],[.25,&quot;rgb(227,26,28)&quot;],[.375,&quot;rgb(252,78,42)&quot;],[.5,&quot;rgb(253,141,60)&quot;],[.625,&quot;rgb(254,178,76)&quot;],[.75,&quot;rgb(254,217,118)&quot;],[.875,&quot;rgb(255,237,160)&quot;],[1,&quot;rgb(255,255,204)&quot;]],Bluered:[[0,&quot;rgb(0,0,255)&quot;],[1,&quot;rgb(255,0,0)&quot;]],RdBu:[[0,&quot;rgb(5,10,172)&quot;],[.35,&quot;rgb(106,137,247)&quot;],[.5,&quot;rgb(190,190,190)&quot;],[.6,&quot;rgb(220,170,132)&quot;],[.7,&quot;rgb(230,145,90)&quot;],[1,&quot;rgb(178,10,28)&quot;]],Reds:[[0,&quot;rgb(220,220,220)&quot;],[.2,&quot;rgb(245,195,157)&quot;],[.4,&quot;rgb(245,160,105)&quot;],[1,&quot;rgb(178,10,28)&quot;]],Blues:[[0,&quot;rgb(5,10,172)&quot;],[.35,&quot;rgb(40,60,190)&quot;],[.5,&quot;rgb(70,100,245)&quot;],[.6,&quot;rgb(90,120,245)&quot;],[.7,&quot;rgb(106,137,247)&quot;],[1,&quot;rgb(220,220,220)&quot;]],Picnic:[[0,&quot;rgb(0,0,255)&quot;],[.1,&quot;rgb(51,153,255)&quot;],[.2,&quot;rgb(102,204,255)&quot;],[.3,&quot;rgb(153,204,255)&quot;],[.4,&quot;rgb(204,204,255)&quot;],[.5,&quot;rgb(255,255,255)&quot;],[.6,&quot;rgb(255,204,255)&quot;],[.7,&quot;rgb(255,153,255)&quot;],[.8,&quot;rgb(255,102,204)&quot;],[.9,&quot;rgb(255,102,102)&quot;],[1,&quot;rgb(255,0,0)&quot;]],Rainbow:[[0,&quot;rgb(150,0,90)&quot;],[.125,&quot;rgb(0,0,200)&quot;],[.25,&quot;rgb(0,25,255)&quot;],[.375,&quot;rgb(0,152,255)&quot;],[.5,&quot;rgb(44,255,150)&quot;],[.625,&quot;rgb(151,255,0)&quot;],[.75,&quot;rgb(255,234,0)&quot;],[.875,&quot;rgb(255,111,0)&quot;],[1,&quot;rgb(255,0,0)&quot;]],Portland:[[0,&quot;rgb(12,51,131)&quot;],[.25,&quot;rgb(10,136,186)&quot;],[.5,&quot;rgb(242,211,56)&quot;],[.75,&quot;rgb(242,143,56)&quot;],[1,&quot;rgb(217,30,30)&quot;]],Jet:[[0,&quot;rgb(0,0,131)&quot;],[.125,&quot;rgb(0,60,170)&quot;],[.375,&quot;rgb(5,255,255)&quot;],[.625,&quot;rgb(255,255,0)&quot;],[.875,&quot;rgb(250,0,0)&quot;],[1,&quot;rgb(128,0,0)&quot;]],Hot:[[0,&quot;rgb(0,0,0)&quot;],[.3,&quot;rgb(230,0,0)&quot;],[.6,&quot;rgb(255,210,0)&quot;],[1,&quot;rgb(255,255,255)&quot;]],Blackbody:[[0,&quot;rgb(0,0,0)&quot;],[.2,&quot;rgb(230,0,0)&quot;],[.4,&quot;rgb(230,210,0)&quot;],[.7,&quot;rgb(255,255,255)&quot;],[1,&quot;rgb(160,200,255)&quot;]],Earth:[[0,&quot;rgb(0,0,130)&quot;],[.1,&quot;rgb(0,180,180)&quot;],[.2,&quot;rgb(40,210,40)&quot;],[.4,&quot;rgb(230,230,50)&quot;],[.6,&quot;rgb(120,70,20)&quot;],[1,&quot;rgb(255,255,255)&quot;]],Electric:[[0,&quot;rgb(0,0,0)&quot;],[.15,&quot;rgb(30,0,100)&quot;],[.4,&quot;rgb(120,0,100)&quot;],[.6,&quot;rgb(160,90,0)&quot;],[.8,&quot;rgb(230,200,0)&quot;],[1,&quot;rgb(255,250,220)&quot;]],Viridis:[[0,&quot;#440154&quot;],[.06274509803921569,&quot;#48186a&quot;],[.12549019607843137,&quot;#472d7b&quot;],[.18823529411764706,&quot;#424086&quot;],[.25098039215686274,&quot;#3b528b&quot;],[.3137254901960784,&quot;#33638d&quot;],[.3764705882352941,&quot;#2c728e&quot;],[.4392156862745098,&quot;#26828e&quot;],[.5019607843137255,&quot;#21918c&quot;],[.5647058823529412,&quot;#1fa088&quot;],[.6274509803921569,&quot;#28ae80&quot;],[.6901960784313725,&quot;#3fbc73&quot;],[.7529411764705882,&quot;#5ec962&quot;],[.8156862745098039,&quot;#84d44b&quot;],[.8784313725490196,&quot;#addc30&quot;],[.9411764705882353,&quot;#d8e219&quot;],[1,&quot;#fde725&quot;]],Cividis:[[0,&quot;rgb(0,32,76)&quot;],[.058824,&quot;rgb(0,42,102)&quot;],[.117647,&quot;rgb(0,52,110)&quot;],[.176471,&quot;rgb(39,63,108)&quot;],[.235294,&quot;rgb(60,74,107)&quot;],[.294118,&quot;rgb(76,85,107)&quot;],[.352941,&quot;rgb(91,95,109)&quot;],[.411765,&quot;rgb(104,106,112)&quot;],[.470588,&quot;rgb(117,117,117)&quot;],[.529412,&quot;rgb(131,129,120)&quot;],[.588235,&quot;rgb(146,140,120)&quot;],[.647059,&quot;rgb(161,152,118)&quot;],[.705882,&quot;rgb(176,165,114)&quot;],[.764706,&quot;rgb(192,177,109)&quot;],[.823529,&quot;rgb(209,191,102)&quot;],[.882353,&quot;rgb(225,204,92)&quot;],[.941176,&quot;rgb(243,219,79)&quot;],[1,&quot;rgb(255,233,69)&quot;]]}},{}],587:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return&quot;left&quot;===i||&quot;bottom&quot;===i?a:&quot;center&quot;===i||&quot;middle&quot;===i?s:&quot;right&quot;===i||&quot;top&quot;===i?o:a&lt;2/3-s?a:o&gt;4/3-s?o:s}},{}],588:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=[[&quot;sw-resize&quot;,&quot;s-resize&quot;,&quot;se-resize&quot;],[&quot;w-resize&quot;,&quot;move&quot;,&quot;e-resize&quot;],[&quot;nw-resize&quot;,&quot;n-resize&quot;,&quot;ne-resize&quot;]];e.exports=function(t,e,r,a){return t=&quot;left&quot;===r?0:&quot;center&quot;===r?1:&quot;right&quot;===r?2:n.constrain(Math.floor(3*t),0,2),e=&quot;bottom&quot;===a?0:&quot;middle&quot;===a?1:&quot;top&quot;===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{&quot;../../lib&quot;:693}],589:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;mouse-event-offset&quot;),i=t(&quot;has-hover&quot;),a=t(&quot;has-passive-events&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../plots/cartesian/constants&quot;),c=t(&quot;../../constants/interactions&quot;),u=e.exports={};u.align=t(&quot;./align&quot;),u.getCursor=t(&quot;./cursor&quot;);var f=t(&quot;./unhover&quot;);function h(){var t=document.createElement(&quot;div&quot;);t.className=&quot;dragcover&quot;;var e=t.style;return e.position=&quot;fixed&quot;,e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background=&quot;none&quot;,document.body.appendChild(t),t}function p(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}u.unhover=f.wrapped,u.unhoverRaw=f.raw,u.init=function(t){var e,r,n,f,d,g,m,v,y=t.gd,x=1,b=c.DBLCLICKDELAY,_=t.element;y._mouseDownTime||(y._mouseDownTime=0),_.style.pointerEvents=&quot;all&quot;,_.onmousedown=k,a?(_._ontouchstart&amp;&amp;_.removeEventListener(&quot;touchstart&quot;,_._ontouchstart),_._ontouchstart=k,_.addEventListener(&quot;touchstart&quot;,k,{passive:!1})):_.ontouchstart=k;var w=t.clampFn||function(t,e,r){return Math.abs(t)&lt;r&amp;&amp;(t=0),Math.abs(e)&lt;r&amp;&amp;(e=0),[t,e]};function k(a){a.preventDefault(),y._dragged=!1,y._dragging=!0;var o=p(a);e=o[0],r=o[1],m=a.target,g=a,v=2===a.buttons||a.ctrlKey,&quot;undefined&quot;==typeof a.clientX&amp;&amp;&quot;undefined&quot;==typeof a.clientY&amp;&amp;(a.clientX=e,a.clientY=r),(n=(new Date).getTime())-y._mouseDownTime&lt;b?x+=1:(x=1,y._mouseDownTime=n),t.prepFn&amp;&amp;t.prepFn(a,e,r),i&amp;&amp;!v?(d=h()).style.cursor=window.getComputedStyle(_).cursor:i||(d=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(_).cursor),document.addEventListener(&quot;mousemove&quot;,M),document.addEventListener(&quot;mouseup&quot;,A),document.addEventListener(&quot;touchmove&quot;,M),document.addEventListener(&quot;touchend&quot;,A)}function M(n){n.preventDefault();var i=p(n),a=t.minDrag||l.MINDRAG,o=w(i[0]-e,i[1]-r,a),s=o[0],c=o[1];(s||c)&amp;&amp;(y._dragged=!0,u.unhover(y)),y._dragged&amp;&amp;t.moveFn&amp;&amp;!v&amp;&amp;t.moveFn(s,c)}function A(e){if(document.removeEventListener(&quot;mousemove&quot;,M),document.removeEventListener(&quot;mouseup&quot;,A),document.removeEventListener(&quot;touchmove&quot;,M),document.removeEventListener(&quot;touchend&quot;,A),e.preventDefault(),i?s.removeElement(d):f&amp;&amp;(d.documentElement.style.cursor=f,f=null),y._dragging){if(y._dragging=!1,(new Date).getTime()-y._mouseDownTime&gt;b&amp;&amp;(x=Math.max(x-1,1)),y._dragged)t.doneFn&amp;&amp;t.doneFn();else if(t.clickFn&amp;&amp;t.clickFn(x,g),!v){var r;try{r=new MouseEvent(&quot;click&quot;,e)}catch(t){var n=p(e);(r=document.createEvent(&quot;MouseEvents&quot;)).initMouseEvent(&quot;click&quot;,e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}m.dispatchEvent(r)}!function(t){t._dragging=!1,t._replotPending&amp;&amp;o.call(&quot;plot&quot;,t)}(y),y._dragged=!1}else y._dragged=!1}},u.coverSlip=h},{&quot;../../constants/interactions&quot;:669,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/constants&quot;:747,&quot;../../registry&quot;:825,&quot;./align&quot;:587,&quot;./cursor&quot;:588,&quot;./unhover&quot;:590,&quot;has-hover&quot;:391,&quot;has-passive-events&quot;:392,&quot;mouse-event-offset&quot;:416}],590:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib/events&quot;),i=t(&quot;../../lib/throttle&quot;),a=t(&quot;../../lib/get_graph_div&quot;),o=t(&quot;../fx/constants&quot;),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&amp;&amp;i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&amp;&amp;!1===n.triggerHandler(t,&quot;plotly_beforehover&quot;,e)||(r._hoverlayer.selectAll(&quot;g&quot;).remove(),r._hoverlayer.selectAll(&quot;line&quot;).remove(),r._hoverlayer.selectAll(&quot;circle&quot;).remove(),t._hoverdata=void 0,e.target&amp;&amp;i&amp;&amp;t.emit(&quot;plotly_unhover&quot;,{event:e,points:i}))}},{&quot;../../lib/events&quot;:681,&quot;../../lib/get_graph_div&quot;:688,&quot;../../lib/throttle&quot;:719,&quot;../fx/constants&quot;:604}],591:[function(t,e,r){&quot;use strict&quot;;r.dash={valType:&quot;string&quot;,values:[&quot;solid&quot;,&quot;dot&quot;,&quot;dash&quot;,&quot;longdash&quot;,&quot;dashdot&quot;,&quot;longdashdot&quot;],dflt:&quot;solid&quot;,editType:&quot;style&quot;}},{}],592:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;tinycolor2&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../color&quot;),l=t(&quot;../colorscale&quot;),c=t(&quot;../../lib&quot;),u=t(&quot;../../lib/svg_text_utils&quot;),f=t(&quot;../../constants/xmlns_namespaces&quot;),h=t(&quot;../../constants/alignment&quot;).LINE_SPACING,p=t(&quot;../../constants/interactions&quot;).DESELECTDIM,d=t(&quot;../../traces/scatter/subtypes&quot;),g=t(&quot;../../traces/scatter/make_bubble_size_func&quot;),m=e.exports={};m.font=function(t,e,r,n){c.isPlainObject(e)&amp;&amp;(n=e.color,r=e.size,e=e.family),e&amp;&amp;t.style(&quot;font-family&quot;,e),r+1&amp;&amp;t.style(&quot;font-size&quot;,r+&quot;px&quot;),n&amp;&amp;t.call(s.fill,n)},m.setPosition=function(t,e,r){t.attr(&quot;x&quot;,e).attr(&quot;y&quot;,r)},m.setSize=function(t,e,r){t.attr(&quot;width&quot;,e).attr(&quot;height&quot;,r)},m.setRect=function(t,e,r,n,i){t.call(m.setPosition,e,r).call(m.setSize,n,i)},m.translatePoint=function(t,e,r,n){var a=r.c2p(t.x),o=n.c2p(t.y);return!!(i(a)&amp;&amp;i(o)&amp;&amp;e.node())&amp;&amp;(&quot;text&quot;===e.node().nodeName?e.attr(&quot;x&quot;,a).attr(&quot;y&quot;,o):e.attr(&quot;transform&quot;,&quot;translate(&quot;+a+&quot;,&quot;+o+&quot;)&quot;),!0)},m.translatePoints=function(t,e,r){t.each(function(t){var i=n.select(this);m.translatePoint(t,i,e,r)})},m.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(&quot;display&quot;,r.isPtWithinRange(t,i)&amp;&amp;n.isPtWithinRange(t,a)?null:&quot;none&quot;)},m.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each(function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,l=&quot;bar&quot;===a.type?&quot;.bartext&quot;:&quot;.point,.textpoint&quot;;t.selectAll(l).each(function(t){m.hideOutsideRangePoint(t,n.select(this),r,i,o,s)})})}},m.crispRound=function(t,e,r){return e&amp;&amp;i(e)?t._context.staticPlot?e:e&lt;1?1:Math.round(e):r||0},m.singleLineStyle=function(t,e,r,n,i){e.style(&quot;fill&quot;,&quot;none&quot;);var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,l=i||a.dash||&quot;&quot;;s.stroke(e,n||a.color),m.dashLine(e,l,o)},m.lineGroupStyle=function(t,e,r,i){t.style(&quot;fill&quot;,&quot;none&quot;).each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=i||a.dash||&quot;&quot;;n.select(this).call(s.stroke,r||a.color).call(m.dashLine,l,o)})},m.dashLine=function(t,e,r){r=+r||0,e=m.dashStyle(e,r),t.style({&quot;stroke-dasharray&quot;:e,&quot;stroke-width&quot;:r+&quot;px&quot;})},m.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return&quot;solid&quot;===t?t=&quot;&quot;:&quot;dot&quot;===t?t=r+&quot;px,&quot;+r+&quot;px&quot;:&quot;dash&quot;===t?t=3*r+&quot;px,&quot;+3*r+&quot;px&quot;:&quot;longdash&quot;===t?t=5*r+&quot;px,&quot;+5*r+&quot;px&quot;:&quot;dashdot&quot;===t?t=3*r+&quot;px,&quot;+r+&quot;px,&quot;+r+&quot;px,&quot;+r+&quot;px&quot;:&quot;longdashdot&quot;===t&amp;&amp;(t=5*r+&quot;px,&quot;+2*r+&quot;px,&quot;+r+&quot;px,&quot;+2*r+&quot;px&quot;),t},m.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&amp;&amp;t.call(s.fill,e)},m.fillGroupStyle=function(t){t.style(&quot;stroke-width&quot;,0).each(function(e){var r=n.select(this);try{r.call(s.fill,e[0].trace.fillcolor)}catch(e){c.error(e,t),r.remove()}})};var v=t(&quot;./symbol_defs&quot;);m.symbolNames=[],m.symbolFuncs=[],m.symbolNeedLines={},m.symbolNoDot={},m.symbolNoFill={},m.symbolList=[],Object.keys(v).forEach(function(t){var e=v[t];m.symbolList=m.symbolList.concat([e.n,t,e.n+100,t+&quot;-open&quot;]),m.symbolNames[e.n]=t,m.symbolFuncs[e.n]=e.f,e.needLine&amp;&amp;(m.symbolNeedLines[e.n]=!0),e.noDot?m.symbolNoDot[e.n]=!0:m.symbolList=m.symbolList.concat([e.n+200,t+&quot;-dot&quot;,e.n+300,t+&quot;-open-dot&quot;]),e.noFill&amp;&amp;(m.symbolNoFill[e.n]=!0)});var y=m.symbolNames.length,x=&quot;M0,0.5L0.5,0L0,-0.5L-0.5,0Z&quot;;function b(t,e){var r=t%100;return m.symbolFuncs[r](e)+(t&gt;=200?x:&quot;&quot;)}m.symbolNumber=function(t){if(&quot;string&quot;==typeof t){var e=0;t.indexOf(&quot;-open&quot;)&gt;0&amp;&amp;(e=100,t=t.replace(&quot;-open&quot;,&quot;&quot;)),t.indexOf(&quot;-dot&quot;)&gt;0&amp;&amp;(e+=200,t=t.replace(&quot;-dot&quot;,&quot;&quot;)),(t=m.symbolNames.indexOf(t))&gt;=0&amp;&amp;(t+=e)}return t%100&gt;=y||t&gt;=400?0:Math.floor(Math.max(t,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},k=n.format(&quot;~.1f&quot;),M={radial:{node:&quot;radialGradient&quot;},radialreversed:{node:&quot;radialGradient&quot;,reversed:!0},horizontal:{node:&quot;linearGradient&quot;,attrs:_},horizontalreversed:{node:&quot;linearGradient&quot;,attrs:_,reversed:!0},vertical:{node:&quot;linearGradient&quot;,attrs:w},verticalreversed:{node:&quot;linearGradient&quot;,attrs:w,reversed:!0}};m.gradient=function(t,e,r,i,o,l){for(var u=o.length,f=M[i],h=new Array(u),p=0;p&lt;u;p++)f.reversed?h[u-1-p]=[k(100*(1-o[p][0])),o[p][1]]:h[p]=[k(100*o[p][0]),o[p][1]];var d=&quot;g&quot;+e._fullLayout._uid+&quot;-&quot;+r,g=e._fullLayout._defs.select(&quot;.gradients&quot;).selectAll(&quot;#&quot;+d).data([i+h.join(&quot;;&quot;)],c.identity);g.exit().remove(),g.enter().append(f.node).each(function(){var t=n.select(this);f.attrs&amp;&amp;t.attr(f.attrs),t.attr(&quot;id&quot;,d);var e=t.selectAll(&quot;stop&quot;).data(h);e.exit().remove(),e.enter().append(&quot;stop&quot;),e.each(function(t){var e=a(t[1]);n.select(this).attr({offset:t[0]+&quot;%&quot;,&quot;stop-color&quot;:s.tinyRGB(e),&quot;stop-opacity&quot;:e.getAlpha()})})}),t.style(l,&quot;url(#&quot;+d+&quot;)&quot;).style(l+&quot;-opacity&quot;,null)},m.initGradients=function(t){c.ensureSingle(t._fullLayout._defs,&quot;g&quot;,&quot;gradients&quot;).selectAll(&quot;linearGradient,radialGradient&quot;).remove()},m.pointStyle=function(t,e,r){if(t.size()){var i=m.makePointStyleFns(e);t.each(function(t){m.singlePointStyle(t,n.select(this),e,i,r)})}},m.singlePointStyle=function(t,e,r,n,i){var a=r.marker,o=a.line;if(e.style(&quot;opacity&quot;,n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?a.opacity:t.mo),n.ms2mrc){var l;l=&quot;various&quot;===t.ms||&quot;various&quot;===a.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&amp;&amp;(l=t.mrc=n.selectedSizeFn(t));var u=m.symbolNumber(t.mx||a.symbol)||0;t.om=u%200&gt;=100,e.attr(&quot;d&quot;,b(u,l))}var f,h,p,d=!1;if(t.so)p=o.outlierwidth,h=o.outliercolor,f=a.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,h=&quot;mlc&quot;in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(a.color)&amp;&amp;(f=s.defaultLine,d=!0),f=&quot;mc&quot;in t?t.mcc=n.markerScale(t.mc):a.color||&quot;rgba(0,0,0,0)&quot;,n.selectedColorFn&amp;&amp;(f=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,f).style({&quot;stroke-width&quot;:(p||1)+&quot;px&quot;,fill:&quot;none&quot;});else{e.style(&quot;stroke-width&quot;,p+&quot;px&quot;);var v=a.gradient,y=t.mgt;if(y?d=!0:y=v&amp;&amp;v.type,Array.isArray(y)&amp;&amp;(y=y[0],M[y]||(y=0)),y&amp;&amp;&quot;none&quot;!==y){var x=t.mgc;x?d=!0:x=v.color;var _=r.uid;d&amp;&amp;(_+=&quot;-&quot;+t.i),m.gradient(e,i,_,y,[[0,x],[1,f]],&quot;fill&quot;)}else s.fill(e,f);p&amp;&amp;s.stroke(e,h)}},m.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=m.tryColorscale(r,&quot;&quot;),e.lineScale=m.tryColorscale(r,&quot;line&quot;),o.traceIs(t,&quot;symbols&quot;)&amp;&amp;(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&amp;&amp;c.extendFlat(e,m.makeSelectedPointStyleFns(t)),e},m.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.marker||{},a=r.marker||{},s=n.marker||{},l=i.opacity,u=a.opacity,f=s.opacity,h=void 0!==u,d=void 0!==f;(c.isArrayOrTypedArray(l)||h||d)&amp;&amp;(e.selectedOpacityFn=function(t){var e=void 0===t.mo?i.opacity:t.mo;return t.selected?h?u:e:d?f:p*e});var g=i.color,m=a.color,v=s.color;(m||v)&amp;&amp;(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?m||e:v||e});var y=i.size,x=a.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,&quot;symbols&quot;)&amp;&amp;(_||w)&amp;&amp;(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},m.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},l=i.color,c=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,p))},e},m.selectedPointStyle=function(t,e){if(t.size()&amp;&amp;e.selectedpoints){var r=m.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&amp;&amp;a.push(function(t,e){t.style(&quot;opacity&quot;,r.selectedOpacityFn(e))}),r.selectedColorFn&amp;&amp;a.push(function(t,e){s.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&amp;&amp;a.push(function(t,e){var n=e.mx||i.symbol||0,a=r.selectedSizeFn(e);t.attr(&quot;d&quot;,b(m.symbolNumber(n),a)),e.mrc2=a}),a.length&amp;&amp;t.each(function(t){for(var e=n.select(this),r=0;r&lt;a.length;r++)a[r](e,t)})}},m.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t;if(r){var n=r.colorscale,i=r.color;if(n&amp;&amp;c.isArrayOrTypedArray(i))return l.makeColorScaleFunc(l.extractScale(n,r.cmin,r.cmax))}return c.identity};var A={start:1,end:-1,middle:0,bottom:1,top:-1};function T(t,e,r,i){var a=n.select(t.node().parentNode),o=-1!==e.indexOf(&quot;top&quot;)?&quot;top&quot;:-1!==e.indexOf(&quot;bottom&quot;)?&quot;bottom&quot;:&quot;middle&quot;,s=-1!==e.indexOf(&quot;left&quot;)?&quot;end&quot;:-1!==e.indexOf(&quot;right&quot;)?&quot;start&quot;:&quot;middle&quot;,l=i?i/.8+1:0,c=(u.lineCount(t)-1)*h+1,f=A[s]*l,p=.75*r+A[o]*l+(A[o]-1)*c*r/2;t.attr(&quot;text-anchor&quot;,s),a.attr(&quot;transform&quot;,&quot;translate(&quot;+f+&quot;,&quot;+p+&quot;)&quot;)}function S(t,e){var r=t.ts||e.textfont.size;return i(r)&amp;&amp;r&gt;0?r:0}m.textPointStyle=function(t,e,r){if(t.size()){var i;if(e.selectedpoints){var a=m.makeSelectedTextStyleFns(e);i=a.selectedTextColorFn}t.each(function(t){var a=n.select(this),o=c.extractOption(t,e,&quot;tx&quot;,&quot;text&quot;);if(o||0===o){var s=t.tp||e.textposition,l=S(t,e),f=i?i(t):t.tc||e.textfont.color;a.call(m.font,t.tf||e.textfont.family,l,f).text(o).call(u.convertToTspans,r).call(T,s,l,t.mrc)}else a.remove()})}},m.selectedTextStyle=function(t,e){if(t.size()&amp;&amp;e.selectedpoints){var r=m.makeSelectedTextStyleFns(e);t.each(function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=S(t,e);s.fill(i,a),T(i,o,l,t.mrc2||t.mrc)})}};var E=.5;function C(t,e,r,i){var a=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(a*a+o*o,E/2),u=Math.pow(s*s+l*l,E/2),f=(u*u*a-c*c*s)*i,h=(u*u*o-c*c*l)*i,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&amp;&amp;f/p),2),n.round(e[1]+(p&amp;&amp;h/p),2)],[n.round(e[0]-(d&amp;&amp;f/d),2),n.round(e[1]-(d&amp;&amp;h/d),2)]]}m.smoothopen=function(t,e){if(t.length&lt;3)return&quot;M&quot;+t.join(&quot;L&quot;);var r,n=&quot;M&quot;+t[0],i=[];for(r=1;r&lt;t.length-1;r++)i.push(C(t[r-1],t[r],t[r+1],e));for(n+=&quot;Q&quot;+i[0][0]+&quot; &quot;+t[1],r=2;r&lt;t.length-1;r++)n+=&quot;C&quot;+i[r-2][1]+&quot; &quot;+i[r-1][0]+&quot; &quot;+t[r];return n+=&quot;Q&quot;+i[t.length-3][1]+&quot; &quot;+t[t.length-1]},m.smoothclosed=function(t,e){if(t.length&lt;3)return&quot;M&quot;+t.join(&quot;L&quot;)+&quot;Z&quot;;var r,n=&quot;M&quot;+t[0],i=t.length-1,a=[C(t[i],t[0],t[1],e)];for(r=1;r&lt;i;r++)a.push(C(t[r-1],t[r],t[r+1],e));for(a.push(C(t[i-1],t[i],t[0],e)),r=1;r&lt;=i;r++)n+=&quot;C&quot;+a[r-1][1]+&quot; &quot;+a[r][0]+&quot; &quot;+t[r];return n+=&quot;C&quot;+a[i][1]+&quot; &quot;+a[0][0]+&quot; &quot;+t[0]+&quot;Z&quot;};var L={hv:function(t,e){return&quot;H&quot;+n.round(e[0],2)+&quot;V&quot;+n.round(e[1],2)},vh:function(t,e){return&quot;V&quot;+n.round(e[1],2)+&quot;H&quot;+n.round(e[0],2)},hvh:function(t,e){return&quot;H&quot;+n.round((t[0]+e[0])/2,2)+&quot;V&quot;+n.round(e[1],2)+&quot;H&quot;+n.round(e[0],2)},vhv:function(t,e){return&quot;V&quot;+n.round((t[1]+e[1])/2,2)+&quot;H&quot;+n.round(e[0],2)+&quot;V&quot;+n.round(e[1],2)}},z=function(t,e){return&quot;L&quot;+n.round(e[0],2)+&quot;,&quot;+n.round(e[1],2)};m.steps=function(t){var e=L[t]||z;return function(t){for(var r=&quot;M&quot;+n.round(t[0][0],2)+&quot;,&quot;+n.round(t[0][1],2),i=1;i&lt;t.length;i++)r+=e(t[i-1],t[i]);return r}},m.makeTester=function(){var t=c.ensureSingleById(n.select(&quot;body&quot;),&quot;svg&quot;,&quot;js-plotly-tester&quot;,function(t){t.attr(f.svgAttrs).style({position:&quot;absolute&quot;,left:&quot;-10000px&quot;,top:&quot;-10000px&quot;,width:&quot;9000px&quot;,height:&quot;9000px&quot;,&quot;z-index&quot;:&quot;1&quot;})}),e=c.ensureSingle(t,&quot;path&quot;,&quot;js-reference-point&quot;,function(t){t.attr(&quot;d&quot;,&quot;M0,0H1V1H0Z&quot;).style({&quot;stroke-width&quot;:0,fill:&quot;black&quot;})});m.tester=t,m.testref=e},m.savedBBoxes={};var P=0;function O(t){var e=t.getAttribute(&quot;data-unformatted&quot;);if(null!==e)return e+t.getAttribute(&quot;data-math&quot;)+t.getAttribute(&quot;text-anchor&quot;)+t.getAttribute(&quot;style&quot;)}m.bBox=function(t,e,r){var i,a,o;if(r||(r=O(t)),r){if(i=m.savedBBoxes[r])return c.extendFlat({},i)}else if(1===t.childNodes.length){var s=t.childNodes[0];if(r=O(s)){var l=+s.getAttribute(&quot;x&quot;)||0,f=+s.getAttribute(&quot;y&quot;)||0,h=s.getAttribute(&quot;transform&quot;);if(!h){var p=m.bBox(s,!1,r);return l&amp;&amp;(p.left+=l,p.right+=l),f&amp;&amp;(p.top+=f,p.bottom+=f),p}if(r+=&quot;~&quot;+l+&quot;~&quot;+f+&quot;~&quot;+h,i=m.savedBBoxes[r])return c.extendFlat({},i)}}e?a=t:(o=m.tester.node(),a=t.cloneNode(!0),o.appendChild(a)),n.select(a).attr(&quot;transform&quot;,null).call(u.positionText,0,0);var d=a.getBoundingClientRect(),g=m.testref.node().getBoundingClientRect();e||o.removeChild(a);var v={height:d.height,width:d.width,left:d.left-g.left,top:d.top-g.top,right:d.right-g.left,bottom:d.bottom-g.top};return P&gt;=1e4&amp;&amp;(m.savedBBoxes={},P=0),r&amp;&amp;(m.savedBBoxes[r]=v),P++,c.extendFlat({},v)},m.setClipUrl=function(t,e){if(e){if(void 0===m.baseUrl){var r=n.select(&quot;base&quot;);r.size()&amp;&amp;r.attr(&quot;href&quot;)?m.baseUrl=window.location.href.split(&quot;#&quot;)[0]:m.baseUrl=&quot;&quot;}t.attr(&quot;clip-path&quot;,&quot;url(&quot;+m.baseUrl+&quot;#&quot;+e+&quot;)&quot;)}else t.attr(&quot;clip-path&quot;,null)},m.getTranslate=function(t){var e=(t[t.attr?&quot;attr&quot;:&quot;getAttribute&quot;](&quot;transform&quot;)||&quot;&quot;).replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(&quot; &quot;)}).split(&quot; &quot;);return{x:+e[0]||0,y:+e[1]||0}},m.setTranslate=function(t,e,r){var n=t.attr?&quot;attr&quot;:&quot;getAttribute&quot;,i=t.attr?&quot;attr&quot;:&quot;setAttribute&quot;,a=t[n](&quot;transform&quot;)||&quot;&quot;;return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,&quot;&quot;).trim(),a=(a+=&quot; translate(&quot;+e+&quot;, &quot;+r+&quot;)&quot;).trim(),t[i](&quot;transform&quot;,a),a},m.getScale=function(t){var e=(t[t.attr?&quot;attr&quot;:&quot;getAttribute&quot;](&quot;transform&quot;)||&quot;&quot;).replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(&quot; &quot;)}).split(&quot; &quot;);return{x:+e[0]||1,y:+e[1]||1}},m.setScale=function(t,e,r){var n=t.attr?&quot;attr&quot;:&quot;getAttribute&quot;,i=t.attr?&quot;attr&quot;:&quot;setAttribute&quot;,a=t[n](&quot;transform&quot;)||&quot;&quot;;return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,&quot;&quot;).trim(),a=(a+=&quot; scale(&quot;+e+&quot;, &quot;+r+&quot;)&quot;).trim(),t[i](&quot;transform&quot;,a),a};var I=/\s*sc.*/;m.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&amp;&amp;1===r?&quot;&quot;:&quot; scale(&quot;+e+&quot;,&quot;+r+&quot;)&quot;;t.each(function(){var t=(this.getAttribute(&quot;transform&quot;)||&quot;&quot;).replace(I,&quot;&quot;);t=(t+=n).trim(),this.setAttribute(&quot;transform&quot;,t)})}};var D=/translate\([^)]*\)\s*$/;m.setTextPointsScale=function(t,e,r){t&amp;&amp;t.each(function(){var t,i=n.select(this),a=i.select(&quot;text&quot;);if(a.node()){var o=parseFloat(a.attr(&quot;x&quot;)||0),s=parseFloat(a.attr(&quot;y&quot;)||0),l=(i.attr(&quot;transform&quot;)||&quot;&quot;).match(D);t=1===e&amp;&amp;1===r?[]:[&quot;translate(&quot;+o+&quot;,&quot;+s+&quot;)&quot;,&quot;scale(&quot;+e+&quot;,&quot;+r+&quot;)&quot;,&quot;translate(&quot;+-o+&quot;,&quot;+-s+&quot;)&quot;],l&amp;&amp;t.push(l),i.attr(&quot;transform&quot;,t.join(&quot; &quot;))}})}},{&quot;../../constants/alignment&quot;:665,&quot;../../constants/interactions&quot;:669,&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../registry&quot;:825,&quot;../../traces/scatter/make_bubble_size_func&quot;:1049,&quot;../../traces/scatter/subtypes&quot;:1056,&quot;../color&quot;:567,&quot;../colorscale&quot;:582,&quot;./symbol_defs&quot;:593,d3:147,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],593:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;);e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,0A&quot;+e+&quot;,&quot;+e+&quot; 0 1,1 0,-&quot;+e+&quot;A&quot;+e+&quot;,&quot;+e+&quot; 0 0,1 &quot;+e+&quot;,0Z&quot;}},square:{n:1,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,&quot;+e+&quot;H-&quot;+e+&quot;V-&quot;+e+&quot;H&quot;+e+&quot;Z&quot;}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return&quot;M&quot;+e+&quot;,0L0,&quot;+e+&quot;L-&quot;+e+&quot;,0L0,-&quot;+e+&quot;Z&quot;}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return&quot;M&quot;+r+&quot;,&quot;+e+&quot;H&quot;+e+&quot;V&quot;+r+&quot;H-&quot;+e+&quot;V&quot;+e+&quot;H-&quot;+r+&quot;V-&quot;+e+&quot;H-&quot;+e+&quot;V-&quot;+r+&quot;H&quot;+e+&quot;V-&quot;+e+&quot;H&quot;+r+&quot;Z&quot;}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r=&quot;l&quot;+e+&quot;,&quot;+e,i=&quot;l&quot;+e+&quot;,-&quot;+e,a=&quot;l-&quot;+e+&quot;,-&quot;+e,o=&quot;l-&quot;+e+&quot;,&quot;+e;return&quot;M0,&quot;+e+r+i+a+i+a+o+a+o+r+o+r+&quot;Z&quot;}},&quot;triangle-up&quot;:{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return&quot;M-&quot;+e+&quot;,&quot;+n.round(t/2,2)+&quot;H&quot;+e+&quot;L0,-&quot;+n.round(t,2)+&quot;Z&quot;}},&quot;triangle-down&quot;:{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return&quot;M-&quot;+e+&quot;,-&quot;+n.round(t/2,2)+&quot;H&quot;+e+&quot;L0,&quot;+n.round(t,2)+&quot;Z&quot;}},&quot;triangle-left&quot;:{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return&quot;M&quot;+n.round(t/2,2)+&quot;,-&quot;+e+&quot;V&quot;+e+&quot;L-&quot;+n.round(t,2)+&quot;,0Z&quot;}},&quot;triangle-right&quot;:{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return&quot;M-&quot;+n.round(t/2,2)+&quot;,-&quot;+e+&quot;V&quot;+e+&quot;L&quot;+n.round(t,2)+&quot;,0Z&quot;}},&quot;triangle-ne&quot;:{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return&quot;M-&quot;+r+&quot;,-&quot;+e+&quot;H&quot;+e+&quot;V&quot;+r+&quot;Z&quot;}},&quot;triangle-se&quot;:{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return&quot;M&quot;+e+&quot;,-&quot;+r+&quot;V&quot;+e+&quot;H-&quot;+r+&quot;Z&quot;}},&quot;triangle-sw&quot;:{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return&quot;M&quot;+r+&quot;,&quot;+e+&quot;H-&quot;+e+&quot;V-&quot;+r+&quot;Z&quot;}},&quot;triangle-nw&quot;:{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return&quot;M-&quot;+e+&quot;,&quot;+r+&quot;V-&quot;+e+&quot;H&quot;+r+&quot;Z&quot;}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return&quot;M&quot;+e+&quot;,&quot;+a+&quot;L&quot;+r+&quot;,&quot;+n.round(.809*t,2)+&quot;H-&quot;+r+&quot;L-&quot;+e+&quot;,&quot;+a+&quot;L0,&quot;+i+&quot;Z&quot;}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return&quot;M&quot;+i+&quot;,-&quot;+r+&quot;V&quot;+r+&quot;L0,&quot;+e+&quot;L-&quot;+i+&quot;,&quot;+r+&quot;V-&quot;+r+&quot;L0,-&quot;+e+&quot;Z&quot;}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return&quot;M-&quot;+r+&quot;,&quot;+i+&quot;H&quot;+r+&quot;L&quot;+e+&quot;,0L&quot;+r+&quot;,-&quot;+i+&quot;H-&quot;+r+&quot;L-&quot;+e+&quot;,0Z&quot;}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return&quot;M-&quot;+r+&quot;,-&quot;+e+&quot;H&quot;+r+&quot;L&quot;+e+&quot;,-&quot;+r+&quot;V&quot;+r+&quot;L&quot;+r+&quot;,&quot;+e+&quot;H-&quot;+r+&quot;L-&quot;+e+&quot;,&quot;+r+&quot;V-&quot;+r+&quot;Z&quot;}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return&quot;M&quot;+r+&quot;,&quot;+l+&quot;H&quot;+i+&quot;L&quot;+a+&quot;,&quot;+c+&quot;L&quot;+o+&quot;,&quot;+u+&quot;L0,&quot;+n.round(.382*e,2)+&quot;L-&quot;+o+&quot;,&quot;+u+&quot;L-&quot;+a+&quot;,&quot;+c+&quot;L-&quot;+i+&quot;,&quot;+l+&quot;H-&quot;+r+&quot;L0,&quot;+s+&quot;Z&quot;}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return&quot;M-&quot;+i+&quot;,0l-&quot;+r+&quot;,-&quot;+e+&quot;h&quot;+i+&quot;l&quot;+r+&quot;,-&quot;+e+&quot;l&quot;+r+&quot;,&quot;+e+&quot;h&quot;+i+&quot;l-&quot;+r+&quot;,&quot;+e+&quot;l&quot;+r+&quot;,&quot;+e+&quot;h-&quot;+i+&quot;l-&quot;+r+&quot;,&quot;+e+&quot;l-&quot;+r+&quot;,-&quot;+e+&quot;h-&quot;+i+&quot;Z&quot;}},&quot;star-triangle-up&quot;:{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o=&quot;A &quot;+a+&quot;,&quot;+a+&quot; 0 0 1 &quot;;return&quot;M-&quot;+e+&quot;,&quot;+r+o+e+&quot;,&quot;+r+o+&quot;0,-&quot;+i+o+&quot;-&quot;+e+&quot;,&quot;+r+&quot;Z&quot;}},&quot;star-triangle-down&quot;:{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o=&quot;A &quot;+a+&quot;,&quot;+a+&quot; 0 0 1 &quot;;return&quot;M&quot;+e+&quot;,-&quot;+r+o+&quot;-&quot;+e+&quot;,-&quot;+r+o+&quot;0,&quot;+i+o+e+&quot;,-&quot;+r+&quot;Z&quot;}},&quot;star-square&quot;:{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i=&quot;A &quot;+r+&quot;,&quot;+r+&quot; 0 0 1 &quot;;return&quot;M-&quot;+e+&quot;,-&quot;+e+i+&quot;-&quot;+e+&quot;,&quot;+e+i+e+&quot;,&quot;+e+i+e+&quot;,-&quot;+e+i+&quot;-&quot;+e+&quot;,-&quot;+e+&quot;Z&quot;}},&quot;star-diamond&quot;:{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i=&quot;A &quot;+r+&quot;,&quot;+r+&quot; 0 0 1 &quot;;return&quot;M-&quot;+e+&quot;,0&quot;+i+&quot;0,&quot;+e+i+e+&quot;,0&quot;+i+&quot;0,-&quot;+e+i+&quot;-&quot;+e+&quot;,0Z&quot;}},&quot;diamond-tall&quot;:{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return&quot;M0,&quot;+r+&quot;L&quot;+e+&quot;,0L0,-&quot;+r+&quot;L-&quot;+e+&quot;,0Z&quot;}},&quot;diamond-wide&quot;:{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return&quot;M0,&quot;+r+&quot;L&quot;+e+&quot;,0L0,-&quot;+r+&quot;L-&quot;+e+&quot;,0Z&quot;}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,&quot;+e+&quot;H-&quot;+e+&quot;L&quot;+e+&quot;,-&quot;+e+&quot;H-&quot;+e+&quot;Z&quot;},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,&quot;+e+&quot;V-&quot;+e+&quot;L-&quot;+e+&quot;,&quot;+e+&quot;V-&quot;+e+&quot;Z&quot;},noDot:!0},&quot;circle-cross&quot;:{n:27,f:function(t){var e=n.round(t,2);return&quot;M0,&quot;+e+&quot;V-&quot;+e+&quot;M&quot;+e+&quot;,0H-&quot;+e+&quot;M&quot;+e+&quot;,0A&quot;+e+&quot;,&quot;+e+&quot; 0 1,1 0,-&quot;+e+&quot;A&quot;+e+&quot;,&quot;+e+&quot; 0 0,1 &quot;+e+&quot;,0Z&quot;},needLine:!0,noDot:!0},&quot;circle-x&quot;:{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return&quot;M&quot;+r+&quot;,&quot;+r+&quot;L-&quot;+r+&quot;,-&quot;+r+&quot;M&quot;+r+&quot;,-&quot;+r+&quot;L-&quot;+r+&quot;,&quot;+r+&quot;M&quot;+e+&quot;,0A&quot;+e+&quot;,&quot;+e+&quot; 0 1,1 0,-&quot;+e+&quot;A&quot;+e+&quot;,&quot;+e+&quot; 0 0,1 &quot;+e+&quot;,0Z&quot;},needLine:!0,noDot:!0},&quot;square-cross&quot;:{n:29,f:function(t){var e=n.round(t,2);return&quot;M0,&quot;+e+&quot;V-&quot;+e+&quot;M&quot;+e+&quot;,0H-&quot;+e+&quot;M&quot;+e+&quot;,&quot;+e+&quot;H-&quot;+e+&quot;V-&quot;+e+&quot;H&quot;+e+&quot;Z&quot;},needLine:!0,noDot:!0},&quot;square-x&quot;:{n:30,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,&quot;+e+&quot;L-&quot;+e+&quot;,-&quot;+e+&quot;M&quot;+e+&quot;,-&quot;+e+&quot;L-&quot;+e+&quot;,&quot;+e+&quot;M&quot;+e+&quot;,&quot;+e+&quot;H-&quot;+e+&quot;V-&quot;+e+&quot;H&quot;+e+&quot;Z&quot;},needLine:!0,noDot:!0},&quot;diamond-cross&quot;:{n:31,f:function(t){var e=n.round(1.3*t,2);return&quot;M&quot;+e+&quot;,0L0,&quot;+e+&quot;L-&quot;+e+&quot;,0L0,-&quot;+e+&quot;ZM0,-&quot;+e+&quot;V&quot;+e+&quot;M-&quot;+e+&quot;,0H&quot;+e},needLine:!0,noDot:!0},&quot;diamond-x&quot;:{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return&quot;M&quot;+e+&quot;,0L0,&quot;+e+&quot;L-&quot;+e+&quot;,0L0,-&quot;+e+&quot;ZM-&quot;+r+&quot;,-&quot;+r+&quot;L&quot;+r+&quot;,&quot;+r+&quot;M-&quot;+r+&quot;,&quot;+r+&quot;L&quot;+r+&quot;,-&quot;+r},needLine:!0,noDot:!0},&quot;cross-thin&quot;:{n:33,f:function(t){var e=n.round(1.4*t,2);return&quot;M0,&quot;+e+&quot;V-&quot;+e+&quot;M&quot;+e+&quot;,0H-&quot;+e},needLine:!0,noDot:!0,noFill:!0},&quot;x-thin&quot;:{n:34,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,&quot;+e+&quot;L-&quot;+e+&quot;,-&quot;+e+&quot;M&quot;+e+&quot;,-&quot;+e+&quot;L-&quot;+e+&quot;,&quot;+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return&quot;M0,&quot;+e+&quot;V-&quot;+e+&quot;M&quot;+e+&quot;,0H-&quot;+e+&quot;M&quot;+r+&quot;,&quot;+r+&quot;L-&quot;+r+&quot;,-&quot;+r+&quot;M&quot;+r+&quot;,-&quot;+r+&quot;L-&quot;+r+&quot;,&quot;+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return&quot;M&quot;+e+&quot;,&quot;+r+&quot;V-&quot;+r+&quot;m-&quot;+r+&quot;,0V&quot;+r+&quot;M&quot;+r+&quot;,&quot;+e+&quot;H-&quot;+r+&quot;m0,-&quot;+r+&quot;H&quot;+r},needLine:!0,noFill:!0},&quot;y-up&quot;:{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return&quot;M-&quot;+e+&quot;,&quot;+i+&quot;L0,0M&quot;+e+&quot;,&quot;+i+&quot;L0,0M0,-&quot;+r+&quot;L0,0&quot;},needLine:!0,noDot:!0,noFill:!0},&quot;y-down&quot;:{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return&quot;M-&quot;+e+&quot;,-&quot;+i+&quot;L0,0M&quot;+e+&quot;,-&quot;+i+&quot;L0,0M0,&quot;+r+&quot;L0,0&quot;},needLine:!0,noDot:!0,noFill:!0},&quot;y-left&quot;:{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return&quot;M&quot;+i+&quot;,&quot;+e+&quot;L0,0M&quot;+i+&quot;,-&quot;+e+&quot;L0,0M-&quot;+r+&quot;,0L0,0&quot;},needLine:!0,noDot:!0,noFill:!0},&quot;y-right&quot;:{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return&quot;M-&quot;+i+&quot;,&quot;+e+&quot;L0,0M-&quot;+i+&quot;,-&quot;+e+&quot;L0,0M&quot;+r+&quot;,0L0,0&quot;},needLine:!0,noDot:!0,noFill:!0},&quot;line-ew&quot;:{n:41,f:function(t){var e=n.round(1.4*t,2);return&quot;M&quot;+e+&quot;,0H-&quot;+e},needLine:!0,noDot:!0,noFill:!0},&quot;line-ns&quot;:{n:42,f:function(t){var e=n.round(1.4*t,2);return&quot;M0,&quot;+e+&quot;V-&quot;+e},needLine:!0,noDot:!0,noFill:!0},&quot;line-ne&quot;:{n:43,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,-&quot;+e+&quot;L-&quot;+e+&quot;,&quot;+e},needLine:!0,noDot:!0,noFill:!0},&quot;line-nw&quot;:{n:44,f:function(t){var e=n.round(t,2);return&quot;M&quot;+e+&quot;,&quot;+e+&quot;L-&quot;+e+&quot;,-&quot;+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:147}],594:[function(t,e,r){&quot;use strict&quot;;e.exports={visible:{valType:&quot;boolean&quot;,editType:&quot;calc&quot;},type:{valType:&quot;enumerated&quot;,values:[&quot;percent&quot;,&quot;constant&quot;,&quot;sqrt&quot;,&quot;data&quot;],editType:&quot;calc&quot;},symmetric:{valType:&quot;boolean&quot;,editType:&quot;calc&quot;},array:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},arrayminus:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},value:{valType:&quot;number&quot;,min:0,dflt:10,editType:&quot;calc&quot;},valueminus:{valType:&quot;number&quot;,min:0,dflt:10,editType:&quot;calc&quot;},traceref:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;style&quot;},tracerefminus:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;style&quot;},copy_ystyle:{valType:&quot;boolean&quot;,editType:&quot;plot&quot;},copy_zstyle:{valType:&quot;boolean&quot;,editType:&quot;style&quot;},color:{valType:&quot;color&quot;,editType:&quot;style&quot;},thickness:{valType:&quot;number&quot;,min:0,dflt:2,editType:&quot;style&quot;},width:{valType:&quot;number&quot;,min:0,editType:&quot;plot&quot;},editType:&quot;calc&quot;,_deprecated:{opacity:{valType:&quot;number&quot;,editType:&quot;style&quot;}}}},{}],595:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;./compute_error&quot;);function s(t,e,r,i){var s=e[&quot;error_&quot;+i]||{},l=[];if(s.visible&amp;&amp;-1!==[&quot;linear&quot;,&quot;log&quot;].indexOf(r.type)){for(var c=o(s),u=0;u&lt;t.length;u++){var f=t[u],h=f.i;if(void 0===h)h=u;else if(null===h)continue;var p=f[i];if(n(r.c2l(p))){var d=c(p,h);if(n(d[0])&amp;&amp;n(d[1])){var g=f[i+&quot;s&quot;]=p-d[0],m=f[i+&quot;h&quot;]=p+d[1];l.push(g,m)}}}var v=a.findExtremes(r,l,{padded:!0}),y=r._id;e._extremes[y].min=e._extremes[y].min.concat(v.min),e._extremes[y].max=e._extremes[y].max.concat(v.max)}}e.exports=function(t){for(var e=t.calcdata,r=0;r&lt;e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&amp;&amp;i.traceIs(o,&quot;errorBarsOK&quot;)){var l=a.getFromId(t,o.xaxis),c=a.getFromId(t,o.yaxis);s(n,o,l,&quot;x&quot;),s(n,o,c,&quot;y&quot;)}}}},{&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;./compute_error&quot;:596,&quot;fast-isnumeric&quot;:213}],596:[function(t,e,r){&quot;use strict&quot;;function n(t,e){return&quot;percent&quot;===t?function(t){return Math.abs(t*e/100)}:&quot;constant&quot;===t?function(){return Math.abs(e)}:&quot;sqrt&quot;===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}e.exports=function(t){var e=t.type,r=t.symmetric;if(&quot;data&quot;===e){var i=t.array||[];if(r)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&amp;&amp;isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=n(e,t.value),s=n(e,t.valueminus);return r||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},{}],597:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../../plot_api/plot_template&quot;),s=t(&quot;./attributes&quot;);e.exports=function(t,e,r,l){var c=&quot;error_&quot;+l.axis,u=o.newContainer(e,c),f=t[c]||{};function h(t,e){return a.coerce(f,u,s,t,e)}if(!1!==h(&quot;visible&quot;,void 0!==f.array||void 0!==f.value||&quot;sqrt&quot;===f.type)){var p=h(&quot;type&quot;,&quot;array&quot;in f?&quot;data&quot;:&quot;percent&quot;),d=!0;&quot;sqrt&quot;!==p&amp;&amp;(d=h(&quot;symmetric&quot;,!((&quot;data&quot;===p?&quot;arrayminus&quot;:&quot;valueminus&quot;)in f))),&quot;data&quot;===p?(h(&quot;array&quot;),h(&quot;traceref&quot;),d||(h(&quot;arrayminus&quot;),h(&quot;tracerefminus&quot;))):&quot;percent&quot;!==p&amp;&amp;&quot;constant&quot;!==p||(h(&quot;value&quot;),d||h(&quot;valueminus&quot;));var g=&quot;copy_&quot;+l.inherit+&quot;style&quot;;if(l.inherit)(e[&quot;error_&quot;+l.inherit]||{}).visible&amp;&amp;h(g,!(f.color||n(f.thickness)||n(f.width)));l.inherit&amp;&amp;u[g]||(h(&quot;color&quot;,r),h(&quot;thickness&quot;),h(&quot;width&quot;,i.traceIs(e,&quot;gl3d&quot;)?0:4))}}},{&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../../registry&quot;:825,&quot;./attributes&quot;:594,&quot;fast-isnumeric&quot;:213}],598:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plot_api/edit_types&quot;).overrideAll,a=t(&quot;./attributes&quot;),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,e.exports={moduleType:&quot;component&quot;,name:&quot;errorbars&quot;,schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,&quot;calc&quot;,&quot;nested&quot;),scattergl:i(o,&quot;calc&quot;,&quot;nested&quot;)}},supplyDefaults:t(&quot;./defaults&quot;),calc:t(&quot;./calc&quot;),makeComputeError:t(&quot;./compute_error&quot;),plot:t(&quot;./plot&quot;),style:t(&quot;./style&quot;),hoverInfo:function(t,e,r){(e.error_y||{}).visible&amp;&amp;(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys));(e.error_x||{}).visible&amp;&amp;(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},{&quot;../../lib&quot;:693,&quot;../../plot_api/edit_types&quot;:725,&quot;./attributes&quot;:594,&quot;./calc&quot;:595,&quot;./compute_error&quot;:596,&quot;./defaults&quot;:597,&quot;./plot&quot;:599,&quot;./style&quot;:600}],599:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../drawing&quot;),o=t(&quot;../../traces/scatter/subtypes&quot;);e.exports=function(t,e,r){var s=e.xaxis,l=e.yaxis,c=r&amp;&amp;r.duration&gt;0;t.each(function(t){var u,f=t[0].trace,h=f.error_x||{},p=f.error_y||{};f.ids&amp;&amp;(u=function(t){return t.id});var d=o.hasMarkers(f)&amp;&amp;f.marker.maxdisplayed&gt;0;p.visible||h.visible||(t=[]);var g=n.select(this).selectAll(&quot;g.errorbar&quot;).data(t,u);if(g.exit().remove(),t.length){h.visible||g.selectAll(&quot;path.xerror&quot;).remove(),p.visible||g.selectAll(&quot;path.yerror&quot;).remove(),g.style(&quot;opacity&quot;,1);var m=g.enter().append(&quot;g&quot;).classed(&quot;errorbar&quot;,!0);c&amp;&amp;m.style(&quot;opacity&quot;,0).transition().duration(r.duration).style(&quot;opacity&quot;,1),a.setClipUrl(g,e.layerClipId),g.each(function(t){var e=n.select(this),a=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};void 0!==t.yh&amp;&amp;(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0)));void 0!==t.xh&amp;&amp;(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0)));return n}(t,s,l);if(!d||t.vis){var o,u=e.select(&quot;path.yerror&quot;);if(p.visible&amp;&amp;i(a.x)&amp;&amp;i(a.yh)&amp;&amp;i(a.ys)){var f=p.width;o=&quot;M&quot;+(a.x-f)+&quot;,&quot;+a.yh+&quot;h&quot;+2*f+&quot;m-&quot;+f+&quot;,0V&quot;+a.ys,a.noYS||(o+=&quot;m-&quot;+f+&quot;,0h&quot;+2*f),!u.size()?u=e.append(&quot;path&quot;).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;).classed(&quot;yerror&quot;,!0):c&amp;&amp;(u=u.transition().duration(r.duration).ease(r.easing)),u.attr(&quot;d&quot;,o)}else u.remove();var g=e.select(&quot;path.xerror&quot;);if(h.visible&amp;&amp;i(a.y)&amp;&amp;i(a.xh)&amp;&amp;i(a.xs)){var m=(h.copy_ystyle?p:h).width;o=&quot;M&quot;+a.xh+&quot;,&quot;+(a.y-m)+&quot;v&quot;+2*m+&quot;m0,-&quot;+m+&quot;H&quot;+a.xs,a.noXS||(o+=&quot;m0,-&quot;+m+&quot;v&quot;+2*m),!g.size()?g=e.append(&quot;path&quot;).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;).classed(&quot;xerror&quot;,!0):c&amp;&amp;(g=g.transition().duration(r.duration).ease(r.easing)),g.attr(&quot;d&quot;,o)}else g.remove()}})}})}},{&quot;../../traces/scatter/subtypes&quot;:1056,&quot;../drawing&quot;:592,d3:147,&quot;fast-isnumeric&quot;:213}],600:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../color&quot;);e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll(&quot;path.yerror&quot;).style(&quot;stroke-width&quot;,r.thickness+&quot;px&quot;).call(i.stroke,r.color),a.copy_ystyle&amp;&amp;(a=r),o.selectAll(&quot;path.xerror&quot;).style(&quot;stroke-width&quot;,a.thickness+&quot;px&quot;).call(i.stroke,a.color)})}},{&quot;../color&quot;:567,d3:147}],601:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;);e.exports={hoverlabel:{bgcolor:{valType:&quot;color&quot;,arrayOk:!0,editType:&quot;none&quot;},bordercolor:{valType:&quot;color&quot;,arrayOk:!0,editType:&quot;none&quot;},font:n({arrayOk:!0,editType:&quot;none&quot;}),namelength:{valType:&quot;integer&quot;,min:-1,arrayOk:!0,editType:&quot;none&quot;},editType:&quot;calc&quot;}}},{&quot;../../plots/font_attributes&quot;:768}],602:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../registry&quot;);function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&amp;&amp;(e[0][r]=i(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s&lt;e.length;s++){var l=e[s],c=l[0].trace;if(!i.traceIs(c,&quot;pie&quot;)){var u=i.traceIs(c,&quot;2dMap&quot;)?a:n.fillArray;u(c.hoverinfo,l,&quot;hi&quot;,o(c)),c.hoverlabel&amp;&amp;(u(c.hoverlabel.bgcolor,l,&quot;hbg&quot;),u(c.hoverlabel.bordercolor,l,&quot;hbc&quot;),u(c.hoverlabel.font.size,l,&quot;hts&quot;),u(c.hoverlabel.font.color,l,&quot;htc&quot;),u(c.hoverlabel.font.family,l,&quot;htf&quot;),u(c.hoverlabel.namelength,l,&quot;hnl&quot;))}}}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825}],603:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;./hover&quot;).hover;e.exports=function(t,e,r){var a=n.getComponentMethod(&quot;annotations&quot;,&quot;onClick&quot;)(t,t._hoverdata);function o(){t.emit(&quot;plotly_click&quot;,{points:t._hoverdata,event:e})}void 0!==r&amp;&amp;i(t,e,r,!0),t._hoverdata&amp;&amp;e&amp;&amp;e.target&amp;&amp;(a&amp;&amp;a.then?a.then(o):o(),e.stopImmediatePropagation&amp;&amp;e.stopImmediatePropagation())}},{&quot;../../registry&quot;:825,&quot;./hover&quot;:607}],604:[function(t,e,r){&quot;use strict&quot;;e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:&quot;Arial, sans-serif&quot;,HOVERMINTIME:50,HOVERID:&quot;-hover&quot;}},{}],605:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./attributes&quot;),a=t(&quot;./hoverlabel_defaults&quot;);e.exports=function(t,e,r,o){a(t,e,function(r,a){return n.coerce(t,e,i,r,a)},o.hoverlabel)}},{&quot;../../lib&quot;:693,&quot;./attributes&quot;:601,&quot;./hoverlabel_defaults&quot;:608}],606:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);r.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},r.isTraceInSubplots=function(t,e){if(&quot;splom&quot;===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a&lt;n.length;a++)for(var o=0;o&lt;i.length;o++)if(-1!==e.indexOf(n[a]+i[o]))return!0;return!1}return-1!==e.indexOf(r.getSubplot(t))},r.flat=function(t,e){for(var r=new Array(t.length),n=0;n&lt;t.length;n++)r[n]=e;return r},r.p2c=function(t,e){for(var r=new Array(t.length),n=0;n&lt;t.length;n++)r[n]=t[n].p2c(e);return r},r.getDistanceFunction=function(t,e,n,i){return&quot;closest&quot;===t?i||r.quadrature(e,n):&quot;x&quot;===t?e:n},r.getClosest=function(t,e,r){if(!1!==r.index)r.index&gt;=0&amp;&amp;r.index&lt;t.length?r.distance=0:r.index=!1;else for(var n=0;n&lt;t.length;n++){var i=e(t[n]);i&lt;=r.distance&amp;&amp;(r.index=n,r.distance=i)}return r},r.inbox=function(t,e,r){return t*e&lt;0||0===t?r:1/0},r.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},r.makeEventData=function(t,e,n){var i=&quot;index&quot;in t?t.index:t.pointNumber,a={data:e._input,fullData:e,curveNumber:e.index,pointNumber:i};if(e._indexToPoints){var o=e._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return e._module.eventData?a=e._module.eventData(a,t,e,n,i):(&quot;xVal&quot;in t?a.x=t.xVal:&quot;x&quot;in t&amp;&amp;(a.x=t.x),&quot;yVal&quot;in t?a.y=t.yVal:&quot;y&quot;in t&amp;&amp;(a.y=t.y),t.xa&amp;&amp;(a.xaxis=t.xa),t.ya&amp;&amp;(a.yaxis=t.ya),void 0!==t.zLabelVal&amp;&amp;(a.z=t.zLabelVal)),r.appendArrayPointValue(a,e,i),a},r.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s&lt;i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){var u=o(n.nestedProperty(e,l).get(),r);void 0!==u&amp;&amp;(t[c]=u)}}},r.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s&lt;i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){for(var u=n.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h&lt;r.length;h++)f[h]=o(u,r[h]);t[c]=f}}};var i={ids:&quot;id&quot;,locations:&quot;location&quot;,labels:&quot;label&quot;,values:&quot;value&quot;,&quot;marker.colors&quot;:&quot;color&quot;};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&amp;&amp;Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}},{&quot;../../lib&quot;:693}],607:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;tinycolor2&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../../lib/events&quot;),l=t(&quot;../../lib/svg_text_utils&quot;),c=t(&quot;../../lib/override_cursor&quot;),u=t(&quot;../drawing&quot;),f=t(&quot;../color&quot;),h=t(&quot;../dragelement&quot;),p=t(&quot;../../plots/cartesian/axes&quot;),d=t(&quot;../../registry&quot;),g=t(&quot;./helpers&quot;),m=t(&quot;./constants&quot;),v=m.YANGLE,y=Math.PI*v/180,x=1/Math.sin(y),b=Math.cos(y),_=Math.sin(y),w=m.HOVERARROWSIZE,k=m.HOVERTEXTPAD;function M(t,e,r){var i=e.hovermode,a=e.rotateLabels,s=e.bgColor,c=e.container,h=e.outerContainer,p=e.commonLabelOpts||{},d=e.fontFamily||m.HOVERFONT,g=e.fontSize||m.HOVERFONTSIZE,y=t[0],x=y.xa,b=y.ya,_=&quot;y&quot;===i?&quot;yLabel&quot;:&quot;xLabel&quot;,M=y[_],A=(String(M)||&quot;&quot;).split(&quot; &quot;)[0],T=h.node().getBoundingClientRect(),S=T.top,E=T.width,C=T.height,L=void 0!==M&amp;&amp;y.distance&lt;=e.hoverdistance&amp;&amp;(&quot;x&quot;===i||&quot;y&quot;===i);if(L){var z,P,O=!0;for(z=0;z&lt;t.length;z++){O&amp;&amp;void 0===t[z].zLabel&amp;&amp;(O=!1),P=t[z].hoverinfo||t[z].trace.hoverinfo;var I=Array.isArray(P)?P:P.split(&quot;+&quot;);if(-1===I.indexOf(&quot;all&quot;)&amp;&amp;-1===I.indexOf(i)){L=!1;break}}O&amp;&amp;(L=!1)}var D=c.selectAll(&quot;g.axistext&quot;).data(L?[0]:[]);D.enter().append(&quot;g&quot;).classed(&quot;axistext&quot;,!0),D.exit().remove(),D.each(function(){var e=n.select(this),a=o.ensureSingle(e,&quot;path&quot;,&quot;&quot;,function(t){t.style({&quot;stroke-width&quot;:&quot;1px&quot;})}),s=o.ensureSingle(e,&quot;text&quot;,&quot;&quot;,function(t){t.attr(&quot;data-notex&quot;,1)}),c=p.bgcolor||f.defaultLine,h=p.bordercolor||f.contrast(c),m=f.contrast(c);a.style({fill:c,stroke:h}),s.text(M).call(u.font,p.font.family||d,p.font.size||g,p.font.color||m).call(l.positionText,0,0).call(l.convertToTspans,r),e.attr(&quot;transform&quot;,&quot;&quot;);var v=s.node().getBoundingClientRect();if(&quot;x&quot;===i){s.attr(&quot;text-anchor&quot;,&quot;middle&quot;).call(l.positionText,0,&quot;top&quot;===x.side?S-v.bottom-w-k:S-v.top+w+k);var T=&quot;top&quot;===x.side?&quot;-&quot;:&quot;&quot;;a.attr(&quot;d&quot;,&quot;M0,0L&quot;+w+&quot;,&quot;+T+w+&quot;H&quot;+(k+v.width/2)+&quot;v&quot;+T+(2*k+v.height)+&quot;H-&quot;+(k+v.width/2)+&quot;V&quot;+T+w+&quot;H-&quot;+w+&quot;Z&quot;),e.attr(&quot;transform&quot;,&quot;translate(&quot;+(x._offset+(y.x0+y.x1)/2)+&quot;,&quot;+(b._offset+(&quot;top&quot;===x.side?0:b._length))+&quot;)&quot;)}else{s.attr(&quot;text-anchor&quot;,&quot;right&quot;===b.side?&quot;start&quot;:&quot;end&quot;).call(l.positionText,(&quot;right&quot;===b.side?1:-1)*(k+w),S-v.top-v.height/2);var E=&quot;right&quot;===b.side?&quot;&quot;:&quot;-&quot;;a.attr(&quot;d&quot;,&quot;M0,0L&quot;+E+w+&quot;,&quot;+w+&quot;V&quot;+(k+v.height/2)+&quot;h&quot;+E+(2*k+v.width)+&quot;V-&quot;+(k+v.height/2)+&quot;H&quot;+E+w+&quot;V-&quot;+w+&quot;Z&quot;),e.attr(&quot;transform&quot;,&quot;translate(&quot;+(x._offset+(&quot;right&quot;===b.side?x._length:0))+&quot;,&quot;+(b._offset+(y.y0+y.y1)/2)+&quot;)&quot;)}t=t.filter(function(t){return void 0!==t.zLabelVal||(t[_]||&quot;&quot;).split(&quot; &quot;)[0]===A})});var R=c.selectAll(&quot;g.hovertext&quot;).data(t,function(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa,t.ya||&quot;&quot;].join(&quot;,&quot;)});return R.enter().append(&quot;g&quot;).classed(&quot;hovertext&quot;,!0).each(function(){var t=n.select(this);t.append(&quot;rect&quot;).call(f.fill,f.addOpacity(s,.8)),t.append(&quot;text&quot;).classed(&quot;name&quot;,!0),t.append(&quot;path&quot;).style(&quot;stroke-width&quot;,&quot;1px&quot;),t.append(&quot;text&quot;).classed(&quot;nums&quot;,!0).call(u.font,d,g)}),R.exit().remove(),R.each(function(t){var e=n.select(this).attr(&quot;transform&quot;,&quot;&quot;),o=&quot;&quot;,c=&quot;&quot;,h=t.bgcolor||t.color,p=f.combine(f.opacity(h)?h:f.defaultLine,s),m=f.combine(f.opacity(t.color)?t.color:f.defaultLine,s),y=t.borderColor||f.contrast(p);if(void 0!==t.nameOverride&amp;&amp;(t.name=t.nameOverride),t.name){o=l.plainText(t.name||&quot;&quot;);var x=Math.round(t.nameLength);x&gt;-1&amp;&amp;o.length&gt;x&amp;&amp;(o=x&gt;3?o.substr(0,x-3)+&quot;...&quot;:o.substr(0,x))}void 0!==t.zLabel?(void 0!==t.xLabel&amp;&amp;(c+=&quot;x: &quot;+t.xLabel+&quot;&lt;br&gt;&quot;),void 0!==t.yLabel&amp;&amp;(c+=&quot;y: &quot;+t.yLabel+&quot;&lt;br&gt;&quot;),c+=(c?&quot;z: &quot;:&quot;&quot;)+t.zLabel):L&amp;&amp;t[i+&quot;Label&quot;]===M?c=t[(&quot;x&quot;===i?&quot;y&quot;:&quot;x&quot;)+&quot;Label&quot;]||&quot;&quot;:void 0===t.xLabel?void 0!==t.yLabel&amp;&amp;(c=t.yLabel):c=void 0===t.yLabel?t.xLabel:&quot;(&quot;+t.xLabel+&quot;, &quot;+t.yLabel+&quot;)&quot;,!t.text&amp;&amp;0!==t.text||Array.isArray(t.text)||(c+=(c?&quot;&lt;br&gt;&quot;:&quot;&quot;)+t.text),void 0!==t.extraText&amp;&amp;(c+=(c?&quot;&lt;br&gt;&quot;:&quot;&quot;)+t.extraText),&quot;&quot;===c&amp;&amp;(&quot;&quot;===o&amp;&amp;e.remove(),c=o);var b=e.select(&quot;text.nums&quot;).call(u.font,t.fontFamily||d,t.fontSize||g,t.fontColor||y).text(c).attr(&quot;data-notex&quot;,1).call(l.positionText,0,0).call(l.convertToTspans,r),_=e.select(&quot;text.name&quot;),A=0;o&amp;&amp;o!==c?(_.call(u.font,t.fontFamily||d,t.fontSize||g,m).text(o).attr(&quot;data-notex&quot;,1).call(l.positionText,0,0).call(l.convertToTspans,r),A=_.node().getBoundingClientRect().width+2*k):(_.remove(),e.select(&quot;rect&quot;).remove()),e.select(&quot;path&quot;).style({fill:p,stroke:y});var T,z,P=b.node().getBoundingClientRect(),O=t.xa._offset+(t.x0+t.x1)/2,I=t.ya._offset+(t.y0+t.y1)/2,D=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),B=P.width+w+k+A;t.ty0=S-P.top,t.bx=P.width+2*k,t.by=P.height+2*k,t.anchor=&quot;start&quot;,t.txwidth=P.width,t.tx2width=A,t.offset=0,a?(t.pos=O,T=I+R/2+B&lt;=C,z=I-R/2-B&gt;=0,&quot;top&quot;!==t.idealAlign&amp;&amp;T||!z?T?(I+=R/2,t.anchor=&quot;start&quot;):t.anchor=&quot;middle&quot;:(I-=R/2,t.anchor=&quot;end&quot;)):(t.pos=I,T=O+D/2+B&lt;=E,z=O-D/2-B&gt;=0,&quot;left&quot;!==t.idealAlign&amp;&amp;T||!z?T?(O+=D/2,t.anchor=&quot;start&quot;):t.anchor=&quot;middle&quot;:(O-=D/2,t.anchor=&quot;end&quot;)),b.attr(&quot;text-anchor&quot;,t.anchor),A&amp;&amp;_.attr(&quot;text-anchor&quot;,t.anchor),e.attr(&quot;transform&quot;,&quot;translate(&quot;+O+&quot;,&quot;+I+&quot;)&quot;+(a?&quot;rotate(&quot;+v+&quot;)&quot;:&quot;&quot;))}),R}function A(t,e){t.each(function(t){var r=n.select(this);if(t.del)r.remove();else{var i=&quot;end&quot;===t.anchor?-1:1,a=r.select(&quot;text.nums&quot;),o={start:1,end:-1,middle:0}[t.anchor],s=o*(w+k),c=s+o*(t.txwidth+k),f=0,h=t.offset;&quot;middle&quot;===t.anchor&amp;&amp;(s-=t.tx2width/2,c+=t.txwidth/2+k),e&amp;&amp;(h*=-_,f=t.offset*b),r.select(&quot;path&quot;).attr(&quot;d&quot;,&quot;middle&quot;===t.anchor?&quot;M-&quot;+(t.bx/2+t.tx2width/2)+&quot;,&quot;+(h-t.by/2)+&quot;h&quot;+t.bx+&quot;v&quot;+t.by+&quot;h-&quot;+t.bx+&quot;Z&quot;:&quot;M0,0L&quot;+(i*w+f)+&quot;,&quot;+(w+h)+&quot;v&quot;+(t.by/2-w)+&quot;h&quot;+i*t.bx+&quot;v-&quot;+t.by+&quot;H&quot;+(i*w+f)+&quot;V&quot;+(h-w)+&quot;Z&quot;),a.call(l.positionText,s+f,h+t.ty0-t.by/2+k),t.tx2width&amp;&amp;(r.select(&quot;text.name&quot;).call(l.positionText,c+o*k+f,h+t.ty0-t.by/2+k),r.select(&quot;rect&quot;).call(u.setRect,c+(o-1)*t.tx2width/2+f,h-t.by/2-1,t.tx2width,t.by+2))}})}function T(t,e){var r=t.index,n=t.trace||{},i=t.cd[0],a=t.cd[r]||{},s=Array.isArray(r)?function(t,e){return o.castOption(i,r,t)||o.extractOption({},n,&quot;&quot;,e)}:function(t,e){return o.extractOption(a,n,t,e)};function l(e,r,n){var i=s(r,n);i&amp;&amp;(t[e]=i)}if(l(&quot;hoverinfo&quot;,&quot;hi&quot;,&quot;hoverinfo&quot;),l(&quot;bgcolor&quot;,&quot;hbg&quot;,&quot;hoverlabel.bgcolor&quot;),l(&quot;borderColor&quot;,&quot;hbc&quot;,&quot;hoverlabel.bordercolor&quot;),l(&quot;fontFamily&quot;,&quot;htf&quot;,&quot;hoverlabel.font.family&quot;),l(&quot;fontSize&quot;,&quot;hts&quot;,&quot;hoverlabel.font.size&quot;),l(&quot;fontColor&quot;,&quot;htc&quot;,&quot;hoverlabel.font.color&quot;),l(&quot;nameLength&quot;,&quot;hnl&quot;,&quot;hoverlabel.namelength&quot;),t.posref=&quot;y&quot;===e?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&amp;&amp;(t.xLabel=&quot;xLabel&quot;in t?t.xLabel:p.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&amp;&amp;(t.yLabel=&quot;yLabel&quot;in t?t.yLabel:p.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&amp;&amp;void 0===t.zLabel&amp;&amp;(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||&quot;log&quot;===t.xa.type&amp;&amp;t.xerr&lt;=0)){var c=p.tickText(t.xa,t.xa.c2l(t.xerr),&quot;hover&quot;).text;void 0!==t.xerrneg?t.xLabel+=&quot; +&quot;+c+&quot; / -&quot;+p.tickText(t.xa,t.xa.c2l(t.xerrneg),&quot;hover&quot;).text:t.xLabel+=&quot; \xb1 &quot;+c,&quot;x&quot;===e&amp;&amp;(t.distance+=1)}if(!(isNaN(t.yerr)||&quot;log&quot;===t.ya.type&amp;&amp;t.yerr&lt;=0)){var u=p.tickText(t.ya,t.ya.c2l(t.yerr),&quot;hover&quot;).text;void 0!==t.yerrneg?t.yLabel+=&quot; +&quot;+u+&quot; / -&quot;+p.tickText(t.ya,t.ya.c2l(t.yerrneg),&quot;hover&quot;).text:t.yLabel+=&quot; \xb1 &quot;+u,&quot;y&quot;===e&amp;&amp;(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return&quot;all&quot;!==f&amp;&amp;(-1===(f=Array.isArray(f)?f:f.split(&quot;+&quot;)).indexOf(&quot;x&quot;)&amp;&amp;(t.xLabel=void 0),-1===f.indexOf(&quot;y&quot;)&amp;&amp;(t.yLabel=void 0),-1===f.indexOf(&quot;z&quot;)&amp;&amp;(t.zLabel=void 0),-1===f.indexOf(&quot;text&quot;)&amp;&amp;(t.text=void 0),-1===f.indexOf(&quot;name&quot;)&amp;&amp;(t.name=void 0)),t}function S(t,e){var r,n,i=e.container,o=e.fullLayout,s=e.event,l=!!t.hLinePoint,c=!!t.vLinePoint;if(i.selectAll(&quot;.spikeline&quot;).remove(),c||l){var h=f.combine(o.plot_bgcolor,o.paper_bgcolor);if(l){var p,d,g=t.hLinePoint;r=g&amp;&amp;g.xa,&quot;cursor&quot;===(n=g&amp;&amp;g.ya).spikesnap?(p=s.pointerX,d=s.pointerY):(p=r._offset+g.x,d=n._offset+g.y);var m,v,y=a.readability(g.color,h)&lt;1.5?f.contrast(h):g.color,x=n.spikemode,b=n.spikethickness,_=n.spikecolor||y,w=n._boundingBox,k=(w.left+w.right)/2&lt;p?w.right:w.left;-1===x.indexOf(&quot;toaxis&quot;)&amp;&amp;-1===x.indexOf(&quot;across&quot;)||(-1!==x.indexOf(&quot;toaxis&quot;)&amp;&amp;(m=k,v=p),-1!==x.indexOf(&quot;across&quot;)&amp;&amp;(m=n._counterSpan[0],v=n._counterSpan[1]),i.insert(&quot;line&quot;,&quot;:first-child&quot;).attr({x1:m,x2:v,y1:d,y2:d,&quot;stroke-width&quot;:b,stroke:_,&quot;stroke-dasharray&quot;:u.dashStyle(n.spikedash,b)}).classed(&quot;spikeline&quot;,!0).classed(&quot;crisp&quot;,!0),i.insert(&quot;line&quot;,&quot;:first-child&quot;).attr({x1:m,x2:v,y1:d,y2:d,&quot;stroke-width&quot;:b+2,stroke:h}).classed(&quot;spikeline&quot;,!0).classed(&quot;crisp&quot;,!0)),-1!==x.indexOf(&quot;marker&quot;)&amp;&amp;i.insert(&quot;circle&quot;,&quot;:first-child&quot;).attr({cx:k+(&quot;right&quot;!==n.side?b:-b),cy:d,r:b,fill:_}).classed(&quot;spikeline&quot;,!0)}if(c){var M,A,T=t.vLinePoint;r=T&amp;&amp;T.xa,n=T&amp;&amp;T.ya,&quot;cursor&quot;===r.spikesnap?(M=s.pointerX,A=s.pointerY):(M=r._offset+T.x,A=n._offset+T.y);var S,E,C=a.readability(T.color,h)&lt;1.5?f.contrast(h):T.color,L=r.spikemode,z=r.spikethickness,P=r.spikecolor||C,O=r._boundingBox,I=(O.top+O.bottom)/2&lt;A?O.bottom:O.top;-1===L.indexOf(&quot;toaxis&quot;)&amp;&amp;-1===L.indexOf(&quot;across&quot;)||(-1!==L.indexOf(&quot;toaxis&quot;)&amp;&amp;(S=I,E=A),-1!==L.indexOf(&quot;across&quot;)&amp;&amp;(S=r._counterSpan[0],E=r._counterSpan[1]),i.insert(&quot;line&quot;,&quot;:first-child&quot;).attr({x1:M,x2:M,y1:S,y2:E,&quot;stroke-width&quot;:z,stroke:P,&quot;stroke-dasharray&quot;:u.dashStyle(r.spikedash,z)}).classed(&quot;spikeline&quot;,!0).classed(&quot;crisp&quot;,!0),i.insert(&quot;line&quot;,&quot;:first-child&quot;).attr({x1:M,x2:M,y1:S,y2:E,&quot;stroke-width&quot;:z+2,stroke:h}).classed(&quot;spikeline&quot;,!0).classed(&quot;crisp&quot;,!0)),-1!==L.indexOf(&quot;marker&quot;)&amp;&amp;i.insert(&quot;circle&quot;,&quot;:first-child&quot;).attr({cx:M,cy:I-(&quot;top&quot;!==r.side?z:-z),r:z,fill:P}).classed(&quot;spikeline&quot;,!0)}}}function E(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}r.hover=function(t,e,r,a){t=o.getGraphDiv(t),o.throttle(t._fullLayout._uid+m.HOVERID,m.HOVERMINTIME,function(){!function(t,e,r,a){r||(r=&quot;xy&quot;);var l=Array.isArray(r)?r:[r],u=t._fullLayout,m=u._plots||[],v=m[r],y=u._has(&quot;cartesian&quot;);if(v){var b=v.overlays.map(function(t){return t.id});l=l.concat(b)}for(var _=l.length,w=new Array(_),k=new Array(_),C=!1,L=0;L&lt;_;L++){var z=l[L],P=m[z];if(P)C=!0,w[L]=p.getFromId(t,P.xaxis._id),k[L]=p.getFromId(t,P.yaxis._id);else{var O=u[z]._subplot;w[L]=O.xaxis,k[L]=O.yaxis}}var I=e.hovermode||u.hovermode;I&amp;&amp;!C&amp;&amp;(I=&quot;closest&quot;);if(-1===[&quot;x&quot;,&quot;y&quot;,&quot;closest&quot;].indexOf(I)||!t.calcdata||t.querySelector(&quot;.zoombox&quot;)||t._dragging)return h.unhoverRaw(t,e);var D,R,B,F,N,j,V,U,q,H,G,W,Y,X=-1===u.hoverdistance?1/0:u.hoverdistance,Z=-1===u.spikedistance?1/0:u.spikedistance,$=[],J=[],K={hLinePoint:null,vLinePoint:null},Q=!1;if(Array.isArray(e))for(I=&quot;array&quot;,B=0;B&lt;e.length;B++)N=t.calcdata[e[B].curveNumber||0],j=N[0].trace,&quot;skip&quot;!==N[0].trace.hoverinfo&amp;&amp;(J.push(N),&quot;h&quot;===j.orientation&amp;&amp;(Q=!0));else{for(F=0;F&lt;t.calcdata.length;F++)N=t.calcdata[F],&quot;skip&quot;!==(j=N[0].trace).hoverinfo&amp;&amp;g.isTraceInSubplots(j,l)&amp;&amp;(J.push(N),&quot;h&quot;===j.orientation&amp;&amp;(Q=!0));var tt,et,rt=!e.target;if(rt)tt=&quot;xpx&quot;in e?e.xpx:w[0]._length/2,et=&quot;ypx&quot;in e?e.ypx:k[0]._length/2;else{if(!1===s.triggerHandler(t,&quot;plotly_beforehover&quot;,e))return;var nt=e.target.getBoundingClientRect();if(tt=e.clientX-nt.left,et=e.clientY-nt.top,tt&lt;0||tt&gt;w[0]._length||et&lt;0||et&gt;k[0]._length)return h.unhoverRaw(t,e)}if(e.pointerX=tt+w[0]._offset,e.pointerY=et+k[0]._offset,D=&quot;xval&quot;in e?g.flat(l,e.xval):g.p2c(w,tt),R=&quot;yval&quot;in e?g.flat(l,e.yval):g.p2c(k,et),!i(D[0])||!i(R[0]))return o.warn(&quot;Fx.hover failed&quot;,e,t),h.unhoverRaw(t,e)}var it=1/0;for(F=0;F&lt;J.length;F++)if((N=J[F])&amp;&amp;N[0]&amp;&amp;N[0].trace&amp;&amp;!0===N[0].trace.visible&amp;&amp;(j=N[0].trace,-1===[&quot;carpet&quot;,&quot;contourcarpet&quot;].indexOf(j._module.name))){if(&quot;splom&quot;===j.type?V=l[U=0]:(V=g.getSubplot(j),U=l.indexOf(V)),q=I,W={cd:N,trace:j,xa:w[U],ya:k[U],maxHoverDistance:X,maxSpikeDistance:Z,index:!1,distance:Math.min(it,X),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:f.defaultLine,name:j.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},u[V]&amp;&amp;(W.subplot=u[V]._subplot),Y=$.length,&quot;array&quot;===q){var at=e[F];&quot;pointNumber&quot;in at?(W.index=at.pointNumber,q=&quot;closest&quot;):(q=&quot;&quot;,&quot;xval&quot;in at&amp;&amp;(H=at.xval,q=&quot;x&quot;),&quot;yval&quot;in at&amp;&amp;(G=at.yval,q=q?&quot;closest&quot;:&quot;y&quot;))}else H=D[U],G=R[U];if(0!==X)if(j._module&amp;&amp;j._module.hoverPoints){var ot=j._module.hoverPoints(W,H,G,q,u._hoverlayer);if(ot)for(var st,lt=0;lt&lt;ot.length;lt++)st=ot[lt],i(st.x0)&amp;&amp;i(st.y0)&amp;&amp;$.push(T(st,I))}else o.log(&quot;Unrecognized trace type in hover:&quot;,j);if(&quot;closest&quot;===I&amp;&amp;$.length&gt;Y&amp;&amp;($.splice(0,Y),it=$[0].distance),y&amp;&amp;0!==Z&amp;&amp;0===$.length){W.distance=Z,W.index=!1;var ct=j._module.hoverPoints(W,H,G,&quot;closest&quot;,u._hoverlayer);if(ct&amp;&amp;(ct=ct.filter(function(t){return t.spikeDistance&lt;=Z})),ct&amp;&amp;ct.length){var ut,ft=ct.filter(function(t){return t.xa.showspikes});if(ft.length){var ht=ft[0];i(ht.x0)&amp;&amp;i(ht.y0)&amp;&amp;(ut=mt(ht),(!K.vLinePoint||K.vLinePoint.spikeDistance&gt;ut.spikeDistance)&amp;&amp;(K.vLinePoint=ut))}var pt=ct.filter(function(t){return t.ya.showspikes});if(pt.length){var dt=pt[0];i(dt.x0)&amp;&amp;i(dt.y0)&amp;&amp;(ut=mt(dt),(!K.hLinePoint||K.hLinePoint.spikeDistance&gt;ut.spikeDistance)&amp;&amp;(K.hLinePoint=ut))}}}}function gt(t,e){for(var r,n=null,i=1/0,a=0;a&lt;t.length;a++)(r=t[a].spikeDistance)&lt;i&amp;&amp;r&lt;=e&amp;&amp;(n=t[a],i=r);return n}function mt(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}var vt={fullLayout:u,container:u._hoverlayer,outerContainer:u._paperdiv,event:e},yt=t._spikepoints,xt={vLinePoint:K.vLinePoint,hLinePoint:K.hLinePoint};if(t._spikepoints=xt,y&amp;&amp;0!==Z&amp;&amp;0!==$.length){var bt=$.filter(function(t){return t.ya.showspikes}),_t=gt(bt,Z);K.hLinePoint=mt(_t);var wt=$.filter(function(t){return t.xa.showspikes}),kt=gt(wt,Z);K.vLinePoint=mt(kt)}if(0===$.length){var Mt=h.unhoverRaw(t,e);return!y||null===K.hLinePoint&amp;&amp;null===K.vLinePoint||E(yt)&amp;&amp;S(K,vt),Mt}y&amp;&amp;E(yt)&amp;&amp;S(K,vt);$.sort(function(t,e){return t.distance-e.distance});var At=t._hoverdata,Tt=[];for(B=0;B&lt;$.length;B++){var St=$[B];Tt.push(g.makeEventData(St,St.trace,St.cd))}t._hoverdata=Tt;var Et=&quot;y&quot;===I&amp;&amp;(J.length&gt;1||$.length&gt;1)||&quot;closest&quot;===I&amp;&amp;Q&amp;&amp;$.length&gt;1,Ct=f.combine(u.plot_bgcolor||f.background,u.paper_bgcolor),Lt={hovermode:I,rotateLabels:Et,bgColor:Ct,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},zt=M($,Lt,t);if(function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.map(function(t,n){var i=t[e],a=&quot;x&quot;===i._id.charAt(0),o=i.range;return!n&amp;&amp;o&amp;&amp;o[0]&gt;o[1]!==a&amp;&amp;(f=-1),[{i:n,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?x:1)/2,pmin:0,pmax:a?r.width:r.height}]}).sort(function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)});function p(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i&gt;.01){for(s=t.length-1;s&gt;=0;s--)t[s].dp+=i;n=!1}if(!(a&lt;.01)){if(i&lt;-.01){for(s=t.length-1;s&gt;=0;s--)t[s].dp-=a;n=!1}if(n){var c=0;for(o=0;o&lt;t.length;o++)(l=t[o]).pos+l.dp+l.size&gt;e.pmax&amp;&amp;c++;for(o=t.length-1;o&gt;=0&amp;&amp;!(c&lt;=0);o--)(l=t[o]).pos&gt;e.pmax-1&amp;&amp;(l.del=!0,c--);for(o=0;o&lt;t.length&amp;&amp;!(c&lt;=0);o++)if((l=t[o]).pos&lt;e.pmin+1)for(l.del=!0,c--,a=2*l.size,s=t.length-1;s&gt;=0;s--)t[s].dp-=a;for(o=t.length-1;o&gt;=0&amp;&amp;!(c&lt;=0);o--)(l=t[o]).pos+l.dp+l.size&gt;e.pmax&amp;&amp;(l.del=!0,c--)}}}for(;!n&amp;&amp;u&lt;=t.length;){for(u++,n=!0,o=0;o&lt;h.length-1;){var d=h[o],g=h[o+1],m=d[d.length-1],v=g[0];if((i=m.pos+m.dp+m.size-v.pos-v.dp+v.size)&gt;.01&amp;&amp;m.pmin===v.pmin&amp;&amp;m.pmax===v.pmax){for(s=g.length-1;s&gt;=0;s--)g[s].dp+=i;for(d.push.apply(d,g),h.splice(o+1,1),c=0,s=d.length-1;s&gt;=0;s--)c+=d[s].dp;for(a=c/d.length,s=d.length-1;s&gt;=0;s--)d[s].dp-=a;n=!1}else o++}h.forEach(p)}for(o=h.length-1;o&gt;=0;o--){var y=h[o];for(s=y.length-1;s&gt;=0;s--){var b=y[s],_=t[b.i];_.offset=b.dp,_.del=b.del}}}($,Et?&quot;xa&quot;:&quot;ya&quot;,u),A(zt,Et),e.target&amp;&amp;e.target.tagName){var Pt=d.getComponentMethod(&quot;annotations&quot;,&quot;hasClickToShow&quot;)(t,Tt);c(n.select(e.target),Pt?&quot;pointer&quot;:&quot;&quot;)}if(!e.target||a||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n&gt;=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}(t,0,At))return;At&amp;&amp;t.emit(&quot;plotly_unhover&quot;,{event:e,points:At});t.emit(&quot;plotly_hover&quot;,{event:e,points:t._hoverdata,xaxes:w,yaxes:k,xvals:D,yvals:R})}(t,e,r,a)})},r.loneHover=function(t,e){var r={color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:&quot;&quot;},xa:{_offset:0},ya:{_offset:0},index:0},i=n.select(e.container),a=e.outerContainer?n.select(e.outerContainer):i,o={hovermode:&quot;closest&quot;,rotateLabels:!1,bgColor:e.bgColor||f.background,container:i,outerContainer:a},s=M([r],o,e.gd);return A(s,o.rotateLabels),s.node()}},{&quot;../../lib&quot;:693,&quot;../../lib/events&quot;:681,&quot;../../lib/override_cursor&quot;:705,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../dragelement&quot;:589,&quot;../drawing&quot;:592,&quot;./constants&quot;:604,&quot;./helpers&quot;:606,d3:147,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],608:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t,e,r,i){r(&quot;hoverlabel.bgcolor&quot;,(i=i||{}).bgcolor),r(&quot;hoverlabel.bordercolor&quot;,i.bordercolor),r(&quot;hoverlabel.namelength&quot;,i.namelength),n.coerceFont(r,&quot;hoverlabel.font&quot;,i.font)}},{&quot;../../lib&quot;:693}],609:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../dragelement&quot;),o=t(&quot;./helpers&quot;),s=t(&quot;./layout_attributes&quot;);e.exports={moduleType:&quot;component&quot;,name:&quot;fx&quot;,constants:t(&quot;./constants&quot;),schema:{layout:s},attributes:t(&quot;./attributes&quot;),layoutAttributes:s,supplyLayoutGlobalDefaults:t(&quot;./layout_global_defaults&quot;),supplyDefaults:t(&quot;./defaults&quot;),supplyLayoutDefaults:t(&quot;./layout_defaults&quot;),calc:t(&quot;./calc&quot;),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,&quot;hoverlabel.&quot;+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,&quot;hoverinfo&quot;,function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)})},hover:t(&quot;./hover&quot;).hover,unhover:a.unhover,loneHover:t(&quot;./hover&quot;).loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll(&quot;g.hovertext&quot;).remove(),e.selectAll(&quot;.spikeline&quot;).remove()},click:t(&quot;./click&quot;)}},{&quot;../../lib&quot;:693,&quot;../dragelement&quot;:589,&quot;./attributes&quot;:601,&quot;./calc&quot;:602,&quot;./click&quot;:603,&quot;./constants&quot;:604,&quot;./defaults&quot;:605,&quot;./helpers&quot;:606,&quot;./hover&quot;:607,&quot;./layout_attributes&quot;:610,&quot;./layout_defaults&quot;:611,&quot;./layout_global_defaults&quot;:612,d3:147}],610:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;),i=t(&quot;../../plots/font_attributes&quot;)({editType:&quot;none&quot;});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:&quot;flaglist&quot;,flags:[&quot;event&quot;,&quot;select&quot;],dflt:&quot;event&quot;,editType:&quot;plot&quot;,extras:[&quot;none&quot;]},dragmode:{valType:&quot;enumerated&quot;,values:[&quot;zoom&quot;,&quot;pan&quot;,&quot;select&quot;,&quot;lasso&quot;,&quot;orbit&quot;,&quot;turntable&quot;],dflt:&quot;zoom&quot;,editType:&quot;modebar&quot;},hovermode:{valType:&quot;enumerated&quot;,values:[&quot;x&quot;,&quot;y&quot;,&quot;closest&quot;,!1],editType:&quot;modebar&quot;},hoverdistance:{valType:&quot;integer&quot;,min:-1,dflt:20,editType:&quot;none&quot;},spikedistance:{valType:&quot;integer&quot;,min:-1,dflt:20,editType:&quot;none&quot;},hoverlabel:{bgcolor:{valType:&quot;color&quot;,editType:&quot;none&quot;},bordercolor:{valType:&quot;color&quot;,editType:&quot;none&quot;},font:i,namelength:{valType:&quot;integer&quot;,min:-1,dflt:15,editType:&quot;none&quot;},editType:&quot;none&quot;},selectdirection:{valType:&quot;enumerated&quot;,values:[&quot;h&quot;,&quot;v&quot;,&quot;d&quot;,&quot;any&quot;],dflt:&quot;any&quot;,editType:&quot;none&quot;}}},{&quot;../../plots/font_attributes&quot;:768,&quot;./constants&quot;:604}],611:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./layout_attributes&quot;);e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}var o,s=a(&quot;clickmode&quot;);&quot;select&quot;===a(&quot;dragmode&quot;)&amp;&amp;a(&quot;selectdirection&quot;),e._has(&quot;cartesian&quot;)?s.indexOf(&quot;select&quot;)&gt;-1?o=&quot;closest&quot;:(e._isHoriz=function(t){for(var e=!0,r=0;r&lt;t.length;r++){var n=t[r];if(&quot;h&quot;!==n.orientation){e=!1;break}}return e}(r),o=e._isHoriz?&quot;y&quot;:&quot;x&quot;):o=&quot;closest&quot;,a(&quot;hovermode&quot;,o)&amp;&amp;(a(&quot;hoverdistance&quot;),a(&quot;spikedistance&quot;));var l=e._has(&quot;mapbox&quot;),c=e._has(&quot;geo&quot;),u=e._basePlotModules.length;&quot;zoom&quot;===e.dragmode&amp;&amp;((l||c)&amp;&amp;1===u||l&amp;&amp;c&amp;&amp;2===u)&amp;&amp;(e.dragmode=&quot;pan&quot;)}},{&quot;../../lib&quot;:693,&quot;./layout_attributes&quot;:610}],612:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./hoverlabel_defaults&quot;),a=t(&quot;./layout_attributes&quot;);e.exports=function(t,e){i(t,e,function(r,i){return n.coerce(t,e,a,r,i)})}},{&quot;../../lib&quot;:693,&quot;./hoverlabel_defaults&quot;:608,&quot;./layout_attributes&quot;:610}],613:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../lib/regex&quot;).counter,a=t(&quot;../../plots/domain&quot;).attributes,o=t(&quot;../../plots/cartesian/constants&quot;).idRegex,s=t(&quot;../../plot_api/plot_template&quot;),l={rows:{valType:&quot;integer&quot;,min:1,editType:&quot;plot&quot;},roworder:{valType:&quot;enumerated&quot;,values:[&quot;top to bottom&quot;,&quot;bottom to top&quot;],dflt:&quot;top to bottom&quot;,editType:&quot;plot&quot;},columns:{valType:&quot;integer&quot;,min:1,editType:&quot;plot&quot;},subplots:{valType:&quot;info_array&quot;,freeLength:!0,dimensions:2,items:{valType:&quot;enumerated&quot;,values:[i(&quot;xy&quot;).toString(),&quot;&quot;],editType:&quot;plot&quot;},editType:&quot;plot&quot;},xaxes:{valType:&quot;info_array&quot;,freeLength:!0,items:{valType:&quot;enumerated&quot;,values:[o.x.toString(),&quot;&quot;],editType:&quot;plot&quot;},editType:&quot;plot&quot;},yaxes:{valType:&quot;info_array&quot;,freeLength:!0,items:{valType:&quot;enumerated&quot;,values:[o.y.toString(),&quot;&quot;],editType:&quot;plot&quot;},editType:&quot;plot&quot;},pattern:{valType:&quot;enumerated&quot;,values:[&quot;independent&quot;,&quot;coupled&quot;],dflt:&quot;coupled&quot;,editType:&quot;plot&quot;},xgap:{valType:&quot;number&quot;,min:0,max:1,editType:&quot;plot&quot;},ygap:{valType:&quot;number&quot;,min:0,max:1,editType:&quot;plot&quot;},domain:a({name:&quot;grid&quot;,editType:&quot;plot&quot;,noGridCell:!0},{}),xside:{valType:&quot;enumerated&quot;,values:[&quot;bottom&quot;,&quot;bottom plot&quot;,&quot;top plot&quot;,&quot;top&quot;],dflt:&quot;bottom plot&quot;,editType:&quot;plot&quot;},yside:{valType:&quot;enumerated&quot;,values:[&quot;left&quot;,&quot;left plot&quot;,&quot;right plot&quot;,&quot;right&quot;],dflt:&quot;left plot&quot;,editType:&quot;plot&quot;},editType:&quot;plot&quot;};function c(t,e,r){var n=e[r+&quot;axes&quot;],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,a){var o=e(t+&quot;gap&quot;,r),s=e(&quot;domain.&quot;+t);e(t+&quot;side&quot;,n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-o),f=u*(1-o),h=0;h&lt;i;h++){var p=c+u*h;l[a?i-1-h:h]=[p,p+f]}return l}function f(t,e,r,n,i){var a,o=new Array(r);function s(t,r){-1!==e.indexOf(r)&amp;&amp;void 0===n[r]?(o[t]=r,n[r]=t):o[t]=&quot;&quot;}if(Array.isArray(t))for(a=0;a&lt;r;a++)s(a,t[a]);else for(s(0,i),a=1;a&lt;r;a++)s(a,i+(a+1));return o}e.exports={moduleType:&quot;component&quot;,name:&quot;grid&quot;,schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(t,e){var r=t.grid||{},i=c(e,r,&quot;x&quot;),a=c(e,r,&quot;y&quot;);if(t.grid||i||a){var o,f,h=Array.isArray(r.subplots)&amp;&amp;Array.isArray(r.subplots[0]),p=Array.isArray(i),d=Array.isArray(a),g=p&amp;&amp;i!==r.xaxes&amp;&amp;d&amp;&amp;a!==r.yaxes;h?(o=r.subplots.length,f=r.subplots[0].length):(d&amp;&amp;(o=a.length),p&amp;&amp;(f=i.length));var m=s.newContainer(e,&quot;grid&quot;),v=M(&quot;rows&quot;,o),y=M(&quot;columns&quot;,f);if(v*y&gt;1){h||p||d||&quot;independent&quot;===M(&quot;pattern&quot;)&amp;&amp;(h=!0),m._hasSubplotGrid=h;var x,b,_=&quot;top to bottom&quot;===M(&quot;roworder&quot;),w=h?.2:.1,k=h?.3:.1;g&amp;&amp;e._splomGridDflt&amp;&amp;(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u(&quot;x&quot;,M,w,x,y),y:u(&quot;y&quot;,M,k,b,v,_)}}else delete e.grid}function M(t,e){return n.coerce(r,m,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&amp;&amp;r._domains){var n,i,a,o,s,l,u,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,m=r.columns,v=&quot;independent&quot;===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n&lt;g;n++){var _=l[n]=new Array(m),w=x[n]||[];for(i=0;i&lt;m;i++)if(v?(s=1===b?&quot;xy&quot;:&quot;x&quot;+b+&quot;y&quot;+b,b++):s=w[i],_[i]=&quot;&quot;,-1!==p.cartesian.indexOf(s)){if(u=s.indexOf(&quot;y&quot;),a=s.slice(0,u),o=s.slice(u),void 0!==y[a]&amp;&amp;y[a]!==i||void 0!==y[o]&amp;&amp;y[o]!==n)continue;_[i]=s,y[a]=i,y[o]=n}}}else{var k=c(e,h,&quot;x&quot;),M=c(e,h,&quot;y&quot;);r.xaxes=f(k,p.xaxis,m,y,&quot;x&quot;),r.yaxes=f(M,p.yaxis,g,y,&quot;y&quot;)}var A=r._anchors={},T=&quot;top to bottom&quot;===r.roworder;for(var S in y){var E,C,L,z=S.charAt(0),P=r[z+&quot;side&quot;];if(P.length&lt;8)A[S]=&quot;free&quot;;else if(&quot;x&quot;===z){if(&quot;t&quot;===P.charAt(0)===T?(E=0,C=1,L=g):(E=g-1,C=-1,L=-1),d){var O=y[S];for(n=E;n!==L;n+=C)if((s=l[n][O])&amp;&amp;(u=s.indexOf(&quot;y&quot;),s.slice(0,u)===S)){A[S]=s.slice(u);break}}else for(n=E;n!==L;n+=C)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(S+o)){A[S]=o;break}}else if(&quot;l&quot;===P.charAt(0)?(E=0,C=1,L=m):(E=m-1,C=-1,L=-1),d){var I=y[S];for(n=E;n!==L;n+=C)if((s=l[I][n])&amp;&amp;(u=s.indexOf(&quot;y&quot;),s.slice(u)===S)){A[S]=s.slice(0,u);break}}else for(n=E;n!==L;n+=C)if(a=r.xaxes[n],-1!==p.cartesian.indexOf(a+S)){A[S]=a;break}}}}}},{&quot;../../lib&quot;:693,&quot;../../lib/regex&quot;:710,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/constants&quot;:747,&quot;../../plots/domain&quot;:767}],614:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/constants&quot;),i=t(&quot;../../plot_api/plot_template&quot;).templatedArray;e.exports=i(&quot;image&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;arraydraw&quot;},source:{valType:&quot;string&quot;,editType:&quot;arraydraw&quot;},layer:{valType:&quot;enumerated&quot;,values:[&quot;below&quot;,&quot;above&quot;],dflt:&quot;above&quot;,editType:&quot;arraydraw&quot;},sizex:{valType:&quot;number&quot;,dflt:0,editType:&quot;arraydraw&quot;},sizey:{valType:&quot;number&quot;,dflt:0,editType:&quot;arraydraw&quot;},sizing:{valType:&quot;enumerated&quot;,values:[&quot;fill&quot;,&quot;contain&quot;,&quot;stretch&quot;],dflt:&quot;contain&quot;,editType:&quot;arraydraw&quot;},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1,editType:&quot;arraydraw&quot;},x:{valType:&quot;any&quot;,dflt:0,editType:&quot;arraydraw&quot;},y:{valType:&quot;any&quot;,dflt:0,editType:&quot;arraydraw&quot;},xanchor:{valType:&quot;enumerated&quot;,values:[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;left&quot;,editType:&quot;arraydraw&quot;},yanchor:{valType:&quot;enumerated&quot;,values:[&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;top&quot;,editType:&quot;arraydraw&quot;},xref:{valType:&quot;enumerated&quot;,values:[&quot;paper&quot;,n.idRegex.x.toString()],dflt:&quot;paper&quot;,editType:&quot;arraydraw&quot;},yref:{valType:&quot;enumerated&quot;,values:[&quot;paper&quot;,n.idRegex.y.toString()],dflt:&quot;paper&quot;,editType:&quot;arraydraw&quot;},editType:&quot;arraydraw&quot;})},{&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/constants&quot;:747}],615:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib/to_log_range&quot;);e.exports=function(t,e,r,a){e=e||{};var o=&quot;log&quot;===r&amp;&amp;&quot;linear&quot;===e.type,s=&quot;linear&quot;===r&amp;&amp;&quot;log&quot;===e.type;if(o||s)for(var l,c,u=t._fullLayout.images,f=e._id.charAt(0),h=0;h&lt;u.length;h++)if(c=&quot;images[&quot;+h+&quot;].&quot;,(l=u[h])[f+&quot;ref&quot;]===e._id){var p=l[f],d=l[&quot;size&quot;+f],g=null,m=null;if(o){g=i(p,e.range);var v=d/Math.pow(10,g)/2;m=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else m=(g=Math.pow(10,p))*(Math.pow(10,d/2)-Math.pow(10,-d/2));n(g)?n(m)||(m=null):(g=null,m=null),a(c+f,g),a(c+&quot;size&quot;+f,m)}}},{&quot;../../lib/to_log_range&quot;:720,&quot;fast-isnumeric&quot;:213}],616:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../plots/array_container_defaults&quot;),o=t(&quot;./attributes&quot;);function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a(&quot;source&quot;);if(!a(&quot;visible&quot;,!!s))return e;a(&quot;layer&quot;),a(&quot;xanchor&quot;),a(&quot;yanchor&quot;),a(&quot;sizex&quot;),a(&quot;sizey&quot;),a(&quot;sizing&quot;),a(&quot;opacity&quot;);for(var l={_fullLayout:r},c=[&quot;x&quot;,&quot;y&quot;],u=0;u&lt;2;u++){var f=c[u],h=i.coerceRef(t,e,l,f,&quot;paper&quot;);i.coercePosition(e,l,a,h,f,0)}return e}e.exports=function(t,e){a(t,e,{name:&quot;images&quot;,handleItemDefaults:s})}},{&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;../../plots/cartesian/axes&quot;:742,&quot;./attributes&quot;:614}],617:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../drawing&quot;),a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;../../constants/xmlns_namespaces&quot;);e.exports=function(t){var e,r,s=t._fullLayout,l=[],c={},u=[];for(r=0;r&lt;s.images.length;r++){var f=s.images[r];if(f.visible)if(&quot;below&quot;===f.layer&amp;&amp;&quot;paper&quot;!==f.xref&amp;&amp;&quot;paper&quot;!==f.yref){e=f.xref+f.yref;var h=s._plots[e];if(!h){u.push(f);continue}h.mainplot&amp;&amp;(e=h.mainplot.id),c[e]||(c[e]=[]),c[e].push(f)}else&quot;above&quot;===f.layer?l.push(f):u.push(f)}var p={x:{left:{sizing:&quot;xMin&quot;,offset:0},center:{sizing:&quot;xMid&quot;,offset:-.5},right:{sizing:&quot;xMax&quot;,offset:-1}},y:{top:{sizing:&quot;YMin&quot;,offset:0},middle:{sizing:&quot;YMid&quot;,offset:-.5},bottom:{sizing:&quot;YMax&quot;,offset:-1}}};function d(e){var r=n.select(this);if(!this.img||this.img.src!==e.source){r.attr(&quot;xmlns&quot;,o.svg);var i=new Promise(function(t){var n=new Image;function i(){r.remove(),t()}this.img=n,n.setAttribute(&quot;crossOrigin&quot;,&quot;anonymous&quot;),n.onerror=i,n.onload=function(){var e=document.createElement(&quot;canvas&quot;);e.width=this.width,e.height=this.height,e.getContext(&quot;2d&quot;).drawImage(this,0,0);var n=e.toDataURL(&quot;image/png&quot;);r.attr(&quot;xlink:href&quot;,n),t()},r.on(&quot;error&quot;,i),n.src=e.source}.bind(this));t._promises.push(i)}}function g(e){var r=n.select(this),o=a.getFromId(t,e.xref),l=a.getFromId(t,e.yref),c=s._size,u=o?Math.abs(o.l2p(e.sizex)-o.l2p(0)):e.sizex*c.w,f=l?Math.abs(l.l2p(e.sizey)-l.l2p(0)):e.sizey*c.h,h=u*p.x[e.xanchor].offset,d=f*p.y[e.yanchor].offset,g=p.x[e.xanchor].sizing+p.y[e.yanchor].sizing,m=(o?o.r2p(e.x)+o._offset:e.x*c.w+c.l)+h,v=(l?l.r2p(e.y)+l._offset:c.h-e.y*c.h+c.t)+d;switch(e.sizing){case&quot;fill&quot;:g+=&quot; slice&quot;;break;case&quot;stretch&quot;:g=&quot;none&quot;}r.attr({x:m,y:v,width:u,height:f,preserveAspectRatio:g,opacity:e.opacity});var y=(o?o._id:&quot;&quot;)+(l?l._id:&quot;&quot;);r.call(i.setClipUrl,y?&quot;clip&quot;+s._uid+y:null)}var m=s._imageLowerLayer.selectAll(&quot;image&quot;).data(u),v=s._imageUpperLayer.selectAll(&quot;image&quot;).data(l);m.enter().append(&quot;image&quot;),v.enter().append(&quot;image&quot;),m.exit().remove(),v.exit().remove(),m.each(function(t){d.bind(this)(t),g.bind(this)(t)}),v.each(function(t){d.bind(this)(t),g.bind(this)(t)});var y=Object.keys(s._plots);for(r=0;r&lt;y.length;r++){e=y[r];var x=s._plots[e];if(x.imagelayer){var b=x.imagelayer.selectAll(&quot;image&quot;).data(c[e]||[]);b.enter().append(&quot;image&quot;),b.exit().remove(),b.each(function(t){d.bind(this)(t),g.bind(this)(t)})}}}},{&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../plots/cartesian/axes&quot;:742,&quot;../drawing&quot;:592,d3:147}],618:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;component&quot;,name:&quot;images&quot;,layoutAttributes:t(&quot;./attributes&quot;),supplyLayoutDefaults:t(&quot;./defaults&quot;),includeBasePlot:t(&quot;../../plots/cartesian/include_components&quot;)(&quot;images&quot;),draw:t(&quot;./draw&quot;),convertCoords:t(&quot;./convert_coords&quot;)}},{&quot;../../plots/cartesian/include_components&quot;:752,&quot;./attributes&quot;:614,&quot;./convert_coords&quot;:615,&quot;./defaults&quot;:616,&quot;./draw&quot;:617}],619:[function(t,e,r){&quot;use strict&quot;;r.isRightAnchor=function(t){return&quot;right&quot;===t.xanchor||&quot;auto&quot;===t.xanchor&amp;&amp;t.x&gt;=2/3},r.isCenterAnchor=function(t){return&quot;center&quot;===t.xanchor||&quot;auto&quot;===t.xanchor&amp;&amp;t.x&gt;1/3&amp;&amp;t.x&lt;2/3},r.isBottomAnchor=function(t){return&quot;bottom&quot;===t.yanchor||&quot;auto&quot;===t.yanchor&amp;&amp;t.y&lt;=1/3},r.isMiddleAnchor=function(t){return&quot;middle&quot;===t.yanchor||&quot;auto&quot;===t.yanchor&amp;&amp;t.y&gt;1/3&amp;&amp;t.y&lt;2/3}},{}],620:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;),i=t(&quot;../color/attributes&quot;);e.exports={bgcolor:{valType:&quot;color&quot;,editType:&quot;legend&quot;},bordercolor:{valType:&quot;color&quot;,dflt:i.defaultLine,editType:&quot;legend&quot;},borderwidth:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;legend&quot;},font:n({editType:&quot;legend&quot;}),orientation:{valType:&quot;enumerated&quot;,values:[&quot;v&quot;,&quot;h&quot;],dflt:&quot;v&quot;,editType:&quot;legend&quot;},traceorder:{valType:&quot;flaglist&quot;,flags:[&quot;reversed&quot;,&quot;grouped&quot;],extras:[&quot;normal&quot;],editType:&quot;legend&quot;},tracegroupgap:{valType:&quot;number&quot;,min:0,dflt:10,editType:&quot;legend&quot;},x:{valType:&quot;number&quot;,min:-2,max:3,dflt:1.02,editType:&quot;legend&quot;},xanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;left&quot;,editType:&quot;legend&quot;},y:{valType:&quot;number&quot;,min:-2,max:3,dflt:1,editType:&quot;legend&quot;},yanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;auto&quot;,editType:&quot;legend&quot;},editType:&quot;legend&quot;}},{&quot;../../plots/font_attributes&quot;:768,&quot;../color/attributes&quot;:566}],621:[function(t,e,r){&quot;use strict&quot;;e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:&quot;#808BA4&quot;,scrollBarMargin:4,textOffsetX:40}},{}],622:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plot_api/plot_template&quot;),o=t(&quot;./attributes&quot;),s=t(&quot;../../plots/layout_attributes&quot;),l=t(&quot;./helpers&quot;);e.exports=function(t,e,r){for(var c,u,f,h,p=t.legend||{},d=0,g=!1,m=&quot;normal&quot;,v=0;v&lt;r.length;v++){var y=r[v];y.visible&amp;&amp;((y.showlegend||y._dfltShowLegend)&amp;&amp;(d++,y.showlegend&amp;&amp;(g=!0,(n.traceIs(y,&quot;pie&quot;)||!0===y._input.showlegend)&amp;&amp;d++)),(n.traceIs(y,&quot;bar&quot;)&amp;&amp;&quot;stack&quot;===e.barmode||-1!==[&quot;tonextx&quot;,&quot;tonexty&quot;].indexOf(y.fill))&amp;&amp;(m=l.isGrouped({traceorder:m})?&quot;grouped+reversed&quot;:&quot;reversed&quot;),void 0!==y.legendgroup&amp;&amp;&quot;&quot;!==y.legendgroup&amp;&amp;(m=l.isReversed({traceorder:m})?&quot;reversed+grouped&quot;:&quot;grouped&quot;))}if(!1!==i.coerce(t,e,s,&quot;showlegend&quot;,g&amp;&amp;d&gt;1)){var x=a.newContainer(e,&quot;legend&quot;);if(_(&quot;bgcolor&quot;,e.paper_bgcolor),_(&quot;bordercolor&quot;),_(&quot;borderwidth&quot;),i.coerceFont(_,&quot;font&quot;,e.font),_(&quot;orientation&quot;),&quot;h&quot;===x.orientation){var b=t.xaxis;b&amp;&amp;b.rangeslider&amp;&amp;b.rangeslider.visible?(c=0,f=&quot;left&quot;,u=1.1,h=&quot;bottom&quot;):(c=0,f=&quot;left&quot;,u=-.1,h=&quot;top&quot;)}_(&quot;traceorder&quot;,m),l.isGrouped(e.legend)&amp;&amp;_(&quot;tracegroupgap&quot;),_(&quot;x&quot;,c),_(&quot;xanchor&quot;,f),_(&quot;y&quot;,u),_(&quot;yanchor&quot;,h),i.noneOrAll(p,x,[&quot;x&quot;,&quot;y&quot;])}function _(t,e){return i.coerce(p,x,o,t,e)}}},{&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/layout_attributes&quot;:796,&quot;../../registry&quot;:825,&quot;./attributes&quot;:620,&quot;./helpers&quot;:626}],623:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plots/plots&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../../lib/events&quot;),l=t(&quot;../dragelement&quot;),c=t(&quot;../drawing&quot;),u=t(&quot;../color&quot;),f=t(&quot;../../lib/svg_text_utils&quot;),h=t(&quot;./handle_click&quot;),p=t(&quot;./constants&quot;),d=t(&quot;../../constants/interactions&quot;),g=t(&quot;../../constants/alignment&quot;),m=g.LINE_SPACING,v=g.FROM_TL,y=g.FROM_BR,x=t(&quot;./get_legend_data&quot;),b=t(&quot;./style&quot;),_=t(&quot;./helpers&quot;),w=t(&quot;./anchor_utils&quot;),k=d.DBLCLICKDELAY;function M(t,e,r,n,i){var a=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};if(a._group&amp;&amp;(o.group=a._group),&quot;pie&quot;===a.type&amp;&amp;(o.label=r.datum()[0].label),!1!==s.triggerHandler(t,&quot;plotly_legendclick&quot;,o))if(1===n)e._clickTimeout=setTimeout(function(){h(r,t,n)},k);else if(2===n){e._clickTimeout&amp;&amp;clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,&quot;plotly_legenddoubleclick&quot;,o)&amp;&amp;h(r,t,n)}}function A(t,e,r){var n=t.data()[0][0],a=e._fullLayout,s=n.trace,l=o.traceIs(s,&quot;pie&quot;),u=s.index,h=l?n.label:s.name,d=e._context.edits.legendText&amp;&amp;!l,g=i.ensureSingle(t,&quot;text&quot;,&quot;legendtext&quot;);function v(r){f.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,i,a=t.select(&quot;g[class*=math-group]&quot;),o=a.node(),s=e._fullLayout.legend.font.size*m;if(o){var l=c.bBox(o);n=l.height,i=l.width,c.setTranslate(a,0,n/4)}else{var u=t.select(&quot;.legendtext&quot;),h=f.lineCount(u),d=u.node();n=s*h,i=d?c.bBox(d).width:0;var g=s*(.3+(1-h)/2);f.positionText(u,p.textOffsetX,g)}n=Math.max(n,16)+3,r.height=n,r.width=i}(t,e)})}g.attr(&quot;text-anchor&quot;,&quot;start&quot;).classed(&quot;user-select-none&quot;,!0).call(c.font,a.legend.font).text(d?T(h,r):h),f.positionText(g,p.textOffsetX,0),d?g.call(f.makeEditable,{gd:e,text:h}).call(v).on(&quot;edit&quot;,function(t){this.text(T(t,r)).call(v);var a=n.trace._fullInput||{},s={};if(o.hasTransform(a,&quot;groupby&quot;)){var l=o.getTransformIndices(a,&quot;groupby&quot;),c=l[l.length-1],f=i.keyedContainer(a,&quot;transforms[&quot;+c+&quot;].styles&quot;,&quot;target&quot;,&quot;value.name&quot;);f.set(n.trace._group,t),s=f.constructUpdate()}else s.name=t;return o.call(&quot;restyle&quot;,e,s,u)}):v(g)}function T(t,e){var r=Math.max(4,e);if(t&amp;&amp;t.trim().length&gt;=r/2)return t;for(var n=r-(t=t||&quot;&quot;).length;n&gt;0;n--)t+=&quot; &quot;;return t}function S(t,e){var r,a=1,o=i.ensureSingle(t,&quot;rect&quot;,&quot;legendtoggle&quot;,function(t){t.style(&quot;cursor&quot;,&quot;pointer&quot;).attr(&quot;pointer-events&quot;,&quot;all&quot;).call(u.fill,&quot;rgba(0,0,0,0)&quot;)});o.on(&quot;mousedown&quot;,function(){(r=(new Date).getTime())-e._legendMouseDownTime&lt;k?a+=1:(a=1,e._legendMouseDownTime=r)}),o.on(&quot;mouseup&quot;,function(){if(!e._dragged&amp;&amp;!e._editing){var r=e._fullLayout.legend;(new Date).getTime()-e._legendMouseDownTime&gt;k&amp;&amp;(a=Math.max(a-1,1)),M(e,r,t,a,n.event)}})}function E(t,e,r){var i=t._fullLayout,a=i.legend,o=a.borderwidth,s=_.isGrouped(a),l=0;if(a._width=0,a._height=0,_.isVertical(a))s&amp;&amp;e.each(function(t,e){c.setTranslate(this,0,e*a.tracegroupgap)}),r.each(function(t){var e=t[0],r=e.height,n=e.width;c.setTranslate(this,o,5+o+a._height+r/2),a._height+=r,a._width=Math.max(a._width,n)}),a._width+=45+2*o,a._height+=10+2*o,s&amp;&amp;(a._height+=(a._lgroupsLength-1)*a.tracegroupgap),l=40;else if(s){for(var u=[a._width],f=e.data(),h=0,p=f.length;h&lt;p;h++){var d=f[h].map(function(t){return t[0].width}),g=40+Math.max.apply(null,d);a._width+=a.tracegroupgap+g,u.push(a._width)}e.each(function(t,e){c.setTranslate(this,u[e],0)}),e.each(function(){var t=n.select(this).selectAll(&quot;g.traces&quot;),e=0;t.each(function(t){var r=t[0].height;c.setTranslate(this,0,5+o+e+r/2),e+=r}),a._height=Math.max(a._height,e)}),a._height+=10+2*o,a._width+=2*o}else{var m,v=0,y=0,x=0,b=0,w=0,k=a.tracegroupgap||5;r.each(function(t){x=Math.max(40+t[0].width,x),w+=40+t[0].width+k}),m=i._size.w&gt;o+w-k,r.each(function(t){var e=t[0],r=m?40+t[0].width:x;o+b+k+r&gt;i._size.w&amp;&amp;(b=0,v+=y,a._height=a._height+y,y=0),c.setTranslate(this,o+b,5+o+e.height/2+v),a._width+=k+r,a._height=Math.max(a._height,e.height),b+=k+r,y=Math.max(e.height,y)}),a._width+=2*o,a._height+=10+2*o}a._width=Math.ceil(a._width),a._height=Math.ceil(a._height);var M=t._context.edits.legendText||t._context.edits.legendPosition;r.each(function(t){var e=t[0],r=n.select(this).select(&quot;.legendtoggle&quot;);c.setRect(r,0,-e.height/2,(M?0:a._width)+l,e.height)})}function C(t){var e=t._fullLayout.legend,r=&quot;left&quot;;w.isRightAnchor(e)?r=&quot;right&quot;:w.isCenterAnchor(e)&amp;&amp;(r=&quot;center&quot;);var n=&quot;top&quot;;w.isBottomAnchor(e)?n=&quot;bottom&quot;:w.isMiddleAnchor(e)&amp;&amp;(n=&quot;middle&quot;),a.autoMargin(t,&quot;legend&quot;,{x:e.x,y:e.y,l:e._width*v[r],r:e._width*y[r],b:e._height*y[n],t:e._height*v[n]})}e.exports=function(t){var e=t._fullLayout,r=&quot;legend&quot;+e._uid;if(e._infolayer&amp;&amp;t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,f=e.showlegend&amp;&amp;x(t.calcdata,s),h=e.hiddenlabels||[];if(!e.showlegend||!f.length)return e._infolayer.selectAll(&quot;.legend&quot;).remove(),e._topdefs.select(&quot;#&quot;+r).remove(),void a.autoMargin(t,&quot;legend&quot;);for(var d=0,g=0;g&lt;f.length;g++)for(var m=0;m&lt;f[g].length;m++){var _=f[g][m][0],k=_.trace,T=o.traceIs(k,&quot;pie&quot;)?_.label:k.name;d=Math.max(d,T&amp;&amp;T.length||0)}var L=!1,z=i.ensureSingle(e._infolayer,&quot;g&quot;,&quot;legend&quot;,function(t){t.attr(&quot;pointer-events&quot;,&quot;all&quot;),L=!0}),P=i.ensureSingleById(e._topdefs,&quot;clipPath&quot;,r,function(t){t.append(&quot;rect&quot;)}),O=i.ensureSingle(z,&quot;rect&quot;,&quot;bg&quot;,function(t){t.attr(&quot;shape-rendering&quot;,&quot;crispEdges&quot;)});O.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style(&quot;stroke-width&quot;,s.borderwidth+&quot;px&quot;);var I=i.ensureSingle(z,&quot;g&quot;,&quot;scrollbox&quot;),D=i.ensureSingle(z,&quot;rect&quot;,&quot;scrollbar&quot;,function(t){t.attr({rx:20,ry:3,width:0,height:0}).call(u.fill,&quot;#808BA4&quot;)}),R=I.selectAll(&quot;g.groups&quot;).data(f);R.enter().append(&quot;g&quot;).attr(&quot;class&quot;,&quot;groups&quot;),R.exit().remove();var B=R.selectAll(&quot;g.traces&quot;).data(i.identity);B.enter().append(&quot;g&quot;).attr(&quot;class&quot;,&quot;traces&quot;),B.exit().remove(),B.call(b,t).style(&quot;opacity&quot;,function(t){var e=t[0].trace;return o.traceIs(e,&quot;pie&quot;)?-1!==h.indexOf(t[0].label)?.5:1:&quot;legendonly&quot;===e.visible?.5:1}).each(function(){n.select(this).call(A,t,d).call(S,t)}),i.syncOrAsync([a.previousPromises,function(){L&amp;&amp;(E(t,R,B),C(t));var u=e.width,f=e.height;E(t,R,B),s._height&gt;f?function(t){var e=t._fullLayout.legend,r=&quot;left&quot;;w.isRightAnchor(e)?r=&quot;right&quot;:w.isCenterAnchor(e)&amp;&amp;(r=&quot;center&quot;);a.autoMargin(t,&quot;legend&quot;,{x:e.x,y:.5,l:e._width*v[r],r:e._width*y[r],b:0,t:0})}(t):C(t);var h=e._size,d=h.l+h.w*s.x,g=h.t+h.h*(1-s.y);w.isRightAnchor(s)?d-=s._width:w.isCenterAnchor(s)&amp;&amp;(d-=s._width/2),w.isBottomAnchor(s)?g-=s._height:w.isMiddleAnchor(s)&amp;&amp;(g-=s._height/2);var m=s._width,x=h.w;m&gt;x?(d=h.l,m=x):(d+m&gt;u&amp;&amp;(d=u-m),d&lt;0&amp;&amp;(d=0),m=Math.min(u-d,s._width));var b,_,k,A,T=s._height,S=h.h;if(T&gt;S?(g=h.t,T=S):(g+T&gt;f&amp;&amp;(g=f-T),g&lt;0&amp;&amp;(g=0),T=Math.min(f-g,s._height)),c.setTranslate(z,d,g),D.on(&quot;.drag&quot;,null),z.on(&quot;wheel&quot;,null),s._height&lt;=T||t._context.staticPlot)O.attr({width:m-s.borderwidth,height:T-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),c.setTranslate(I,0,0),P.select(&quot;rect&quot;).attr({width:m-2*s.borderwidth,height:T-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth}),c.setClipUrl(I,r),c.setRect(D,0,0,0,0),delete s._scrollY;else{var F,N,j=Math.max(p.scrollBarMinHeight,T*T/s._height),V=T-j-2*p.scrollBarMargin,U=s._height-T,q=V/U,H=Math.min(s._scrollY||0,U);O.attr({width:m-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:T-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),P.select(&quot;rect&quot;).attr({width:m-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:T-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth+H}),c.setClipUrl(I,r),W(H,j,q),z.on(&quot;wheel&quot;,function(){W(H=i.constrain(s._scrollY+n.event.deltaY/V*U,0,U),j,q),0!==H&amp;&amp;H!==U&amp;&amp;n.event.preventDefault()});var G=n.behavior.drag().on(&quot;dragstart&quot;,function(){F=n.event.sourceEvent.clientY,N=H}).on(&quot;drag&quot;,function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||W(H=i.constrain((t.clientY-F)/q+N,0,U),j,q)});D.call(G)}function W(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(I,0,-e),c.setRect(D,m,p.scrollBarMargin+e*n,p.scrollBarWidth,r),P.select(&quot;rect&quot;).attr({y:s.borderwidth+e})}t._context.edits.legendPosition&amp;&amp;(z.classed(&quot;cursor-move&quot;,!0),l.init({element:z.node(),gd:t,prepFn:function(){var t=c.getTranslate(z);k=t.x,A=t.y},moveFn:function(t,e){var r=k+t,n=A+e;c.setTranslate(z,r,n),b=l.align(r,0,h.l,h.l+h.w,s.xanchor),_=l.align(n,0,h.t+h.h,h.t,s.yanchor)},doneFn:function(){void 0!==b&amp;&amp;void 0!==_&amp;&amp;o.call(&quot;relayout&quot;,t,{&quot;legend.x&quot;:b,&quot;legend.y&quot;:_})},clickFn:function(r,n){var i=e._infolayer.selectAll(&quot;g.traces&quot;).filter(function(){var t=this.getBoundingClientRect();return n.clientX&gt;=t.left&amp;&amp;n.clientX&lt;=t.right&amp;&amp;n.clientY&gt;=t.top&amp;&amp;n.clientY&lt;=t.bottom});i.size()&gt;0&amp;&amp;M(t,z,i,r,n)}}))}],t)}}},{&quot;../../constants/alignment&quot;:665,&quot;../../constants/interactions&quot;:669,&quot;../../lib&quot;:693,&quot;../../lib/events&quot;:681,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../dragelement&quot;:589,&quot;../drawing&quot;:592,&quot;./anchor_utils&quot;:619,&quot;./constants&quot;:621,&quot;./get_legend_data&quot;:624,&quot;./handle_click&quot;:625,&quot;./helpers&quot;:626,&quot;./style&quot;:628,d3:147}],624:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;./helpers&quot;);e.exports=function(t,e){var r,a,o={},s=[],l=!1,c={},u=0;function f(t,r){if(&quot;&quot;!==t&amp;&amp;i.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n=&quot;~~i&quot;+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r&lt;t.length;r++){var h=t[r],p=h[0],d=p.trace,g=d.legendgroup;if(d.visible&amp;&amp;d.showlegend)if(n.traceIs(d,&quot;pie&quot;))for(c[g]||(c[g]={}),a=0;a&lt;h.length;a++){var m=h[a].label;c[g][m]||(f(g,{label:m,color:h[a].color,i:h[a].i,trace:d,pts:h[a].pts}),c[g][m]=!0)}else f(g,p)}if(!s.length)return[];var v,y,x=s.length;if(l&amp;&amp;i.isGrouped(e))for(y=new Array(x),r=0;r&lt;x;r++)v=o[s[r]],y[r]=i.isReversed(e)?v.reverse():v;else{for(y=[new Array(x)],r=0;r&lt;x;r++)v=o[s[r]][0],y[0][i.isReversed(e)?x-r-1:r]=v;x=1}return e._lgroupsLength=x,y}},{&quot;../../registry&quot;:825,&quot;./helpers&quot;:626}],625:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../registry&quot;),a=!0;e.exports=function(t,e,r){if(!e._dragged&amp;&amp;!e._editing){var o,s,l,c,u,f=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],h=t.data()[0][0],p=e._fullData,d=h.trace,g=d.legendgroup,m={},v=[],y=[],x=[];if(1===r&amp;&amp;a&amp;&amp;e.data&amp;&amp;e._context.showTips?(n.notifier(n._(e,&quot;Double-click on legend to isolate one trace&quot;),&quot;long&quot;),a=!1):a=!1,i.traceIs(d,&quot;pie&quot;)){var b=h.label,_=f.indexOf(b);1===r?-1===_?f.push(b):f.splice(_,1):2===r&amp;&amp;(f=[],e.calcdata[0].forEach(function(t){b!==t.label&amp;&amp;f.push(t.label)}),e._fullLayout.hiddenlabels&amp;&amp;e._fullLayout.hiddenlabels.length===f.length&amp;&amp;-1===_&amp;&amp;(f=[])),i.call(&quot;relayout&quot;,e,&quot;hiddenlabels&quot;,f)}else{var w,k=g&amp;&amp;g.length,M=[];if(k)for(o=0;o&lt;p.length;o++)(w=p[o]).visible&amp;&amp;w.legendgroup===g&amp;&amp;M.push(o);if(1===r){var A;switch(d.visible){case!0:A=&quot;legendonly&quot;;break;case!1:A=!1;break;case&quot;legendonly&quot;:A=!0}if(k)for(o=0;o&lt;p.length;o++)!1!==p[o].visible&amp;&amp;p[o].legendgroup===g&amp;&amp;P(p[o],A);else P(d,A)}else if(2===r){var T,S,E=!0;for(o=0;o&lt;p.length;o++)if(!(p[o]===d)&amp;&amp;!(T=k&amp;&amp;p[o].legendgroup===g)&amp;&amp;!0===p[o].visible&amp;&amp;!i.traceIs(p[o],&quot;notLegendIsolatable&quot;)){E=!1;break}for(o=0;o&lt;p.length;o++)if(!1!==p[o].visible&amp;&amp;!i.traceIs(p[o],&quot;notLegendIsolatable&quot;))switch(d.visible){case&quot;legendonly&quot;:P(p[o],!0);break;case!0:S=!!E||&quot;legendonly&quot;,T=p[o]===d||k&amp;&amp;p[o].legendgroup===g,P(p[o],!!T||S)}}for(o=0;o&lt;y.length;o++)if(l=y[o]){var C=l.constructUpdate(),L=Object.keys(C);for(s=0;s&lt;L.length;s++)c=L[s],(m[c]=m[c]||[])[x[o]]=C[c]}for(u=Object.keys(m),o=0;o&lt;u.length;o++)for(c=u[o],s=0;s&lt;v.length;s++)m[c].hasOwnProperty(s)||(m[c][s]=void 0);i.call(&quot;restyle&quot;,e,m,v)}}function z(t,e,r){var n=v.indexOf(t),i=m[e];return i||(i=m[e]=[]),-1===v.indexOf(t)&amp;&amp;(v.push(t),n=v.length-1),i[n]=r,n}function P(t,e){var r=t._fullInput;if(i.hasTransform(r,&quot;groupby&quot;)){var a=y[r.index];if(!a){var o=i.getTransformIndices(r,&quot;groupby&quot;),s=o[o.length-1];a=n.keyedContainer(r,&quot;transforms[&quot;+s+&quot;].styles&quot;,&quot;target&quot;,&quot;value.visible&quot;),y[r.index]=a}var l=a.get(t._group);void 0===l&amp;&amp;(l=!0),!1!==l&amp;&amp;a.set(t._group,e),x[r.index]=z(r.index,&quot;visible&quot;,!1!==r.visible)}else{var c=!1!==r.visible&amp;&amp;e;z(r.index,&quot;visible&quot;,c)}}}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825}],626:[function(t,e,r){&quot;use strict&quot;;r.isGrouped=function(t){return-1!==(t.traceorder||&quot;&quot;).indexOf(&quot;grouped&quot;)},r.isVertical=function(t){return&quot;h&quot;!==t.orientation},r.isReversed=function(t){return-1!==(t.traceorder||&quot;&quot;).indexOf(&quot;reversed&quot;)}},{}],627:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;component&quot;,name:&quot;legend&quot;,layoutAttributes:t(&quot;./attributes&quot;),supplyLayoutDefaults:t(&quot;./defaults&quot;),draw:t(&quot;./draw&quot;),style:t(&quot;./style&quot;)}},{&quot;./attributes&quot;:620,&quot;./defaults&quot;:622,&quot;./draw&quot;:623,&quot;./style&quot;:628}],628:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../drawing&quot;),s=t(&quot;../color&quot;),l=t(&quot;../../traces/scatter/subtypes&quot;),c=t(&quot;../../traces/pie/style_one&quot;);e.exports=function(t,e){t.each(function(t){var e=n.select(this),r=a.ensureSingle(e,&quot;g&quot;,&quot;layers&quot;);r.style(&quot;opacity&quot;,t[0].trace.opacity),r.selectAll(&quot;g.legendfill&quot;).data([t]).enter().append(&quot;g&quot;).classed(&quot;legendfill&quot;,!0),r.selectAll(&quot;g.legendlines&quot;).data([t]).enter().append(&quot;g&quot;).classed(&quot;legendlines&quot;,!0);var i=r.selectAll(&quot;g.legendsymbols&quot;).data([t]);i.enter().append(&quot;g&quot;).classed(&quot;legendsymbols&quot;,!0),i.selectAll(&quot;g.legendpoints&quot;).data([t]).enter().append(&quot;g&quot;).classed(&quot;legendpoints&quot;,!0)}).each(function(t){var e=t[0].trace,r=e.marker||{},a=r.line||{},o=n.select(this).select(&quot;g.legendpoints&quot;).selectAll(&quot;path.legendbar&quot;).data(i.traceIs(e,&quot;bar&quot;)?[t]:[]);o.enter().append(&quot;path&quot;).classed(&quot;legendbar&quot;,!0).attr(&quot;d&quot;,&quot;M6,6H-6V-6H6Z&quot;).attr(&quot;transform&quot;,&quot;translate(20,0)&quot;),o.exit().remove(),o.each(function(t){var e=n.select(this),i=t[0],o=(i.mlw+1||a.width+1)-1;e.style(&quot;stroke-width&quot;,o+&quot;px&quot;).call(s.fill,i.mc||r.color),o&amp;&amp;e.call(s.stroke,i.mlc||a.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(&quot;g.legendpoints&quot;).selectAll(&quot;path.legendbox&quot;).data(i.traceIs(e,&quot;box-violin&quot;)&amp;&amp;e.visible?[t]:[]);r.enter().append(&quot;path&quot;).classed(&quot;legendbox&quot;,!0).attr(&quot;d&quot;,&quot;M6,6H-6V-6H6Z&quot;).attr(&quot;transform&quot;,&quot;translate(20,0)&quot;),r.exit().remove(),r.each(function(){var t=e.line.width,r=n.select(this);r.style(&quot;stroke-width&quot;,t+&quot;px&quot;).call(s.fill,e.fillcolor),t&amp;&amp;s.stroke(r,e.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(&quot;g.legendpoints&quot;).selectAll(&quot;path.legendpie&quot;).data(i.traceIs(e,&quot;pie&quot;)&amp;&amp;e.visible?[t]:[]);r.enter().append(&quot;path&quot;).classed(&quot;legendpie&quot;,!0).attr(&quot;d&quot;,&quot;M6,6H-6V-6H6Z&quot;).attr(&quot;transform&quot;,&quot;translate(20,0)&quot;),r.exit().remove(),r.size()&amp;&amp;r.call(c,t[0],e)}).each(function(t){var r=t[0].trace,i=r.visible&amp;&amp;r.fill&amp;&amp;&quot;none&quot;!==r.fill,a=l.hasLines(r),s=r.contours,c=!1,u=!1;if(s){var f=s.coloring;&quot;lines&quot;===f?c=!0:a=&quot;none&quot;===f||&quot;heatmap&quot;===f||s.showlines,&quot;constraint&quot;===s.type?i=&quot;=&quot;!==s._operation:&quot;fill&quot;!==f&amp;&amp;&quot;heatmap&quot;!==f||(u=!0)}var h=l.hasMarkers(r)||l.hasText(r),p=i||u,d=a||c,g=h||!p?&quot;M5,0&quot;:d?&quot;M5,-2&quot;:&quot;M5,-3&quot;,m=n.select(this),v=m.select(&quot;.legendfill&quot;).selectAll(&quot;path&quot;).data(i||u?[t]:[]);v.enter().append(&quot;path&quot;).classed(&quot;js-fill&quot;,!0),v.exit().remove(),v.attr(&quot;d&quot;,g+&quot;h30v6h-30z&quot;).call(i?o.fillGroupStyle:function(t){if(t.size()){var n=&quot;legendfill-&quot;+r.uid;o.gradient(t,e,n,&quot;horizontalreversed&quot;,r.colorscale,&quot;fill&quot;)}});var y=m.select(&quot;.legendlines&quot;).selectAll(&quot;path&quot;).data(a||c?[t]:[]);y.enter().append(&quot;path&quot;).classed(&quot;js-line&quot;,!0),y.exit().remove(),y.attr(&quot;d&quot;,g+(c?&quot;l30,0.0001&quot;:&quot;h30&quot;)).call(a?o.lineGroupStyle:function(t){if(t.size()){var n=&quot;legendline-&quot;+r.uid;o.lineGroupStyle(t),o.gradient(t,e,n,&quot;horizontalreversed&quot;,r.colorscale,&quot;stroke&quot;)}})}).each(function(t){var r,i,s=t[0],c=s.trace,u=l.hasMarkers(c),f=l.hasText(c),h=l.hasLines(c);function p(t,e,r){var n=a.nestedProperty(c,t).get(),i=Array.isArray(n)&amp;&amp;e?e(n):n;if(r){if(i&lt;r[0])return r[0];if(i&gt;r[1])return r[1]}return i}function d(t){return t[0]}if(u||f||h){var g={},m={};if(u){g.mc=p(&quot;marker.color&quot;,d),g.mx=p(&quot;marker.symbol&quot;,d),g.mo=p(&quot;marker.opacity&quot;,a.mean,[.2,1]),g.mlc=p(&quot;marker.line.color&quot;,d),g.mlw=p(&quot;marker.line.width&quot;,a.mean,[0,5]),m.marker={sizeref:1,sizemin:1,sizemode:&quot;diameter&quot;};var v=p(&quot;marker.size&quot;,a.mean,[2,16]);g.ms=v,m.marker.size=v}h&amp;&amp;(m.line={width:p(&quot;line.width&quot;,d,[0,10])}),f&amp;&amp;(g.tx=&quot;Aa&quot;,g.tp=p(&quot;textposition&quot;,d),g.ts=10,g.tc=p(&quot;textfont.color&quot;,d),g.tf=p(&quot;textfont.family&quot;,d)),r=[a.minExtend(s,g)],(i=a.minExtend(c,m)).selectedpoints=null}var y=n.select(this).select(&quot;g.legendpoints&quot;),x=y.selectAll(&quot;path.scatterpts&quot;).data(u?r:[]);x.enter().insert(&quot;path&quot;,&quot;:first-child&quot;).classed(&quot;scatterpts&quot;,!0).attr(&quot;transform&quot;,&quot;translate(20,0)&quot;),x.exit().remove(),x.call(o.pointStyle,i,e),u&amp;&amp;(r[0].mrc=3);var b=y.selectAll(&quot;g.pointtext&quot;).data(f?r:[]);b.enter().append(&quot;g&quot;).classed(&quot;pointtext&quot;,!0).append(&quot;text&quot;).attr(&quot;transform&quot;,&quot;translate(20,0)&quot;),b.exit().remove(),b.selectAll(&quot;text&quot;).call(o.textPointStyle,i,e)}).each(function(t){var e=t[0].trace,r=n.select(this).select(&quot;g.legendpoints&quot;).selectAll(&quot;path.legendcandle&quot;).data(&quot;candlestick&quot;===e.type&amp;&amp;e.visible?[t,t]:[]);r.enter().append(&quot;path&quot;).classed(&quot;legendcandle&quot;,!0).attr(&quot;d&quot;,function(t,e){return e?&quot;M-15,0H-8M-8,6V-6H8Z&quot;:&quot;M15,0H8M8,-6V6H-8Z&quot;}).attr(&quot;transform&quot;,&quot;translate(20,0)&quot;).style(&quot;stroke-miterlimit&quot;,1),r.exit().remove(),r.each(function(t,r){var i=e[r?&quot;increasing&quot;:&quot;decreasing&quot;],a=i.line.width,o=n.select(this);o.style(&quot;stroke-width&quot;,a+&quot;px&quot;).call(s.fill,i.fillcolor),a&amp;&amp;s.stroke(o,i.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(&quot;g.legendpoints&quot;).selectAll(&quot;path.legendohlc&quot;).data(&quot;ohlc&quot;===e.type&amp;&amp;e.visible?[t,t]:[]);r.enter().append(&quot;path&quot;).classed(&quot;legendohlc&quot;,!0).attr(&quot;d&quot;,function(t,e){return e?&quot;M-15,0H0M-8,-6V0&quot;:&quot;M15,0H0M8,6V0&quot;}).attr(&quot;transform&quot;,&quot;translate(20,0)&quot;).style(&quot;stroke-miterlimit&quot;,1),r.exit().remove(),r.each(function(t,r){var i=e[r?&quot;increasing&quot;:&quot;decreasing&quot;],a=i.line.width,l=n.select(this);l.style(&quot;fill&quot;,&quot;none&quot;).call(o.dashLine,i.line.dash,a),a&amp;&amp;s.stroke(l,i.line.color)})})}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;../../traces/pie/style_one&quot;:1018,&quot;../../traces/scatter/subtypes&quot;:1056,&quot;../color&quot;:567,&quot;../drawing&quot;:592,d3:147}],629:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../plots/plots&quot;),a=t(&quot;../../plots/cartesian/axis_ids&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../../../build/ploticon&quot;),l=o._,c=e.exports={};function u(t,e){var r,i,o=e.currentTarget,s=o.getAttribute(&quot;data-attr&quot;),l=o.getAttribute(&quot;data-val&quot;)||!0,c=t._fullLayout,u={},f=a.list(t,null,!0),h=&quot;on&quot;;if(&quot;zoom&quot;===s){var p,d=&quot;in&quot;===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i&lt;f.length;i++)if(!(r=f[i]).fixedrange)if(p=r._name,&quot;auto&quot;===l)u[p+&quot;.autorange&quot;]=!0;else if(&quot;reset&quot;===l){if(void 0===r._rangeInitial)u[p+&quot;.autorange&quot;]=!0;else{var v=r._rangeInitial.slice();u[p+&quot;.range[0]&quot;]=v[0],u[p+&quot;.range[1]&quot;]=v[1]}void 0!==r._showSpikeInitial&amp;&amp;(u[p+&quot;.showspikes&quot;]=r._showSpikeInitial,&quot;on&quot;!==h||r._showSpikeInitial||(h=&quot;off&quot;))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[g*y[0]+m*y[1],g*y[1]+m*y[0]];u[p+&quot;.range[0]&quot;]=r.l2r(x[0]),u[p+&quot;.range[1]&quot;]=r.l2r(x[1])}c._cartesianSpikesEnabled=h}else{if(&quot;hovermode&quot;!==s||&quot;x&quot;!==l&amp;&amp;&quot;y&quot;!==l){if(&quot;hovermode&quot;===s&amp;&amp;&quot;closest&quot;===l){for(i=0;i&lt;f.length;i++)r=f[i],&quot;on&quot;!==h||r.showspikes||(h=&quot;off&quot;);c._cartesianSpikesEnabled=h}}else l=c._isHoriz?&quot;y&quot;:&quot;x&quot;,o.setAttribute(&quot;data-val&quot;,l);u[s]=l}n.call(&quot;relayout&quot;,t,u)}function f(t,e){for(var r=e.currentTarget,i=r.getAttribute(&quot;data-attr&quot;),a=r.getAttribute(&quot;data-val&quot;)||!0,o=t._fullLayout._subplots.gl3d,s={},l=i.split(&quot;.&quot;),c=0;c&lt;o.length;c++)s[o[c]+&quot;.&quot;+l[1]]=a;var u=&quot;pan&quot;===a?a:&quot;zoom&quot;;s.dragmode=u,n.call(&quot;relayout&quot;,t,s)}function h(t,e){for(var r=e.currentTarget.getAttribute(&quot;data-attr&quot;),i=t._fullLayout,a=i._subplots.gl3d,s={},l=0;l&lt;a.length;l++){var c=a[l],u=c+&quot;.camera&quot;,f=i[c]._scene;&quot;resetDefault&quot;===r?s[u]=null:&quot;resetLastSave&quot;===r&amp;&amp;(s[u]=o.extendDeep({},f.cameraInitial))}n.call(&quot;relayout&quot;,t,s)}function p(t,e){var r=e.currentTarget,i=r._previousVal||!1,a=t.layout,s=t._fullLayout,l=s._subplots.gl3d,c=[&quot;xaxis&quot;,&quot;yaxis&quot;,&quot;zaxis&quot;],u=[&quot;showspikes&quot;,&quot;spikesides&quot;,&quot;spikethickness&quot;,&quot;spikecolor&quot;],f={},h={},p={};if(i)p=o.extendDeep(a,i),r._previousVal=null;else{p={&quot;allaxes.showspikes&quot;:!1};for(var d=0;d&lt;l.length;d++){var g=l[d],m=s[g],v=f[g]={};v.hovermode=m.hovermode,p[g+&quot;.hovermode&quot;]=!1;for(var y=0;y&lt;3;y++){var x=c[y];h=v[x]={};for(var b=0;b&lt;u.length;b++){var _=u[b];h[_]=m[x][_]}}}r._previousVal=o.extendDeep({},f)}n.call(&quot;relayout&quot;,t,p)}function d(t,e){for(var r=e.currentTarget,i=r.getAttribute(&quot;data-attr&quot;),a=r.getAttribute(&quot;data-val&quot;)||!0,o=t._fullLayout,s=o._subplots.geo,l=0;l&lt;s.length;l++){var c=s[l],u=o[c];if(&quot;zoom&quot;===i){var f=u.projection.scale,h=&quot;in&quot;===a?2*f:.5*f;n.call(&quot;relayout&quot;,t,c+&quot;.projection.scale&quot;,h)}else&quot;reset&quot;===i&amp;&amp;m(t,&quot;geo&quot;)}}function g(t){var e,r=t._fullLayout;e=r._has(&quot;cartesian&quot;)?r._isHoriz?&quot;y&quot;:&quot;x&quot;:&quot;closest&quot;;var i=!t._fullLayout.hovermode&amp;&amp;e;n.call(&quot;relayout&quot;,t,&quot;hovermode&quot;,i)}function m(t,e){for(var r=t._fullLayout,i=r._subplots[e],a={},o=0;o&lt;i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,c=Object.keys(l),u=0;u&lt;c.length;u++){var f=c[u];a[s+&quot;.&quot;+f]=l[f]}n.call(&quot;relayout&quot;,t,a)}c.toImage={name:&quot;toImage&quot;,title:function(t){var e=(t._context.toImageButtonOptions||{}).format||&quot;png&quot;;return l(t,&quot;png&quot;===e?&quot;Download plot as a png&quot;:&quot;Download plot&quot;)},icon:s.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||&quot;png&quot;};o.notifier(l(t,&quot;Taking snapshot - this may take a few seconds&quot;),&quot;long&quot;),&quot;svg&quot;!==r.format&amp;&amp;o.isIE()&amp;&amp;(o.notifier(l(t,&quot;IE only supports svg.  Changing format to svg.&quot;),&quot;long&quot;),r.format=&quot;svg&quot;),[&quot;filename&quot;,&quot;width&quot;,&quot;height&quot;,&quot;scale&quot;].forEach(function(t){e[t]&amp;&amp;(r[t]=e[t])}),n.call(&quot;downloadImage&quot;,t,r).then(function(e){o.notifier(l(t,&quot;Snapshot succeeded&quot;)+&quot; - &quot;+e,&quot;long&quot;)}).catch(function(){o.notifier(l(t,&quot;Sorry, there was a problem downloading your snapshot!&quot;),&quot;long&quot;)})}},c.sendDataToCloud={name:&quot;sendDataToCloud&quot;,title:function(t){return l(t,&quot;Edit in Chart Studio&quot;)},icon:s.disk,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:&quot;zoom2d&quot;,title:function(t){return l(t,&quot;Zoom&quot;)},attr:&quot;dragmode&quot;,val:&quot;zoom&quot;,icon:s.zoombox,click:u},c.pan2d={name:&quot;pan2d&quot;,title:function(t){return l(t,&quot;Pan&quot;)},attr:&quot;dragmode&quot;,val:&quot;pan&quot;,icon:s.pan,click:u},c.select2d={name:&quot;select2d&quot;,title:function(t){return l(t,&quot;Box Select&quot;)},attr:&quot;dragmode&quot;,val:&quot;select&quot;,icon:s.selectbox,click:u},c.lasso2d={name:&quot;lasso2d&quot;,title:function(t){return l(t,&quot;Lasso Select&quot;)},attr:&quot;dragmode&quot;,val:&quot;lasso&quot;,icon:s.lasso,click:u},c.zoomIn2d={name:&quot;zoomIn2d&quot;,title:function(t){return l(t,&quot;Zoom in&quot;)},attr:&quot;zoom&quot;,val:&quot;in&quot;,icon:s.zoom_plus,click:u},c.zoomOut2d={name:&quot;zoomOut2d&quot;,title:function(t){return l(t,&quot;Zoom out&quot;)},attr:&quot;zoom&quot;,val:&quot;out&quot;,icon:s.zoom_minus,click:u},c.autoScale2d={name:&quot;autoScale2d&quot;,title:function(t){return l(t,&quot;Autoscale&quot;)},attr:&quot;zoom&quot;,val:&quot;auto&quot;,icon:s.autoscale,click:u},c.resetScale2d={name:&quot;resetScale2d&quot;,title:function(t){return l(t,&quot;Reset axes&quot;)},attr:&quot;zoom&quot;,val:&quot;reset&quot;,icon:s.home,click:u},c.hoverClosestCartesian={name:&quot;hoverClosestCartesian&quot;,title:function(t){return l(t,&quot;Show closest data on hover&quot;)},attr:&quot;hovermode&quot;,val:&quot;closest&quot;,icon:s.tooltip_basic,gravity:&quot;ne&quot;,click:u},c.hoverCompareCartesian={name:&quot;hoverCompareCartesian&quot;,title:function(t){return l(t,&quot;Compare data on hover&quot;)},attr:&quot;hovermode&quot;,val:function(t){return t._fullLayout._isHoriz?&quot;y&quot;:&quot;x&quot;},icon:s.tooltip_compare,gravity:&quot;ne&quot;,click:u},c.zoom3d={name:&quot;zoom3d&quot;,title:function(t){return l(t,&quot;Zoom&quot;)},attr:&quot;scene.dragmode&quot;,val:&quot;zoom&quot;,icon:s.zoombox,click:f},c.pan3d={name:&quot;pan3d&quot;,title:function(t){return l(t,&quot;Pan&quot;)},attr:&quot;scene.dragmode&quot;,val:&quot;pan&quot;,icon:s.pan,click:f},c.orbitRotation={name:&quot;orbitRotation&quot;,title:function(t){return l(t,&quot;Orbital rotation&quot;)},attr:&quot;scene.dragmode&quot;,val:&quot;orbit&quot;,icon:s[&quot;3d_rotate&quot;],click:f},c.tableRotation={name:&quot;tableRotation&quot;,title:function(t){return l(t,&quot;Turntable rotation&quot;)},attr:&quot;scene.dragmode&quot;,val:&quot;turntable&quot;,icon:s[&quot;z-axis&quot;],click:f},c.resetCameraDefault3d={name:&quot;resetCameraDefault3d&quot;,title:function(t){return l(t,&quot;Reset camera to default&quot;)},attr:&quot;resetDefault&quot;,icon:s.home,click:h},c.resetCameraLastSave3d={name:&quot;resetCameraLastSave3d&quot;,title:function(t){return l(t,&quot;Reset camera to last save&quot;)},attr:&quot;resetLastSave&quot;,icon:s.movie,click:h},c.hoverClosest3d={name:&quot;hoverClosest3d&quot;,title:function(t){return l(t,&quot;Toggle show closest data on hover&quot;)},attr:&quot;hovermode&quot;,val:null,toggle:!0,icon:s.tooltip_basic,gravity:&quot;ne&quot;,click:p},c.zoomInGeo={name:&quot;zoomInGeo&quot;,title:function(t){return l(t,&quot;Zoom in&quot;)},attr:&quot;zoom&quot;,val:&quot;in&quot;,icon:s.zoom_plus,click:d},c.zoomOutGeo={name:&quot;zoomOutGeo&quot;,title:function(t){return l(t,&quot;Zoom out&quot;)},attr:&quot;zoom&quot;,val:&quot;out&quot;,icon:s.zoom_minus,click:d},c.resetGeo={name:&quot;resetGeo&quot;,title:function(t){return l(t,&quot;Reset&quot;)},attr:&quot;reset&quot;,val:null,icon:s.autoscale,click:d},c.hoverClosestGeo={name:&quot;hoverClosestGeo&quot;,title:function(t){return l(t,&quot;Toggle show closest data on hover&quot;)},attr:&quot;hovermode&quot;,val:null,toggle:!0,icon:s.tooltip_basic,gravity:&quot;ne&quot;,click:g},c.hoverClosestGl2d={name:&quot;hoverClosestGl2d&quot;,title:function(t){return l(t,&quot;Toggle show closest data on hover&quot;)},attr:&quot;hovermode&quot;,val:null,toggle:!0,icon:s.tooltip_basic,gravity:&quot;ne&quot;,click:g},c.hoverClosestPie={name:&quot;hoverClosestPie&quot;,title:function(t){return l(t,&quot;Toggle show closest data on hover&quot;)},attr:&quot;hovermode&quot;,val:&quot;closest&quot;,icon:s.tooltip_basic,gravity:&quot;ne&quot;,click:g},c.toggleHover={name:&quot;toggleHover&quot;,title:function(t){return l(t,&quot;Toggle show closest data on hover&quot;)},attr:&quot;hovermode&quot;,val:null,toggle:!0,icon:s.tooltip_basic,gravity:&quot;ne&quot;,click:function(t,e){g(t),p(t,e)}},c.resetViews={name:&quot;resetViews&quot;,title:function(t){return l(t,&quot;Reset views&quot;)},icon:s.home,click:function(t,e){var r=e.currentTarget;r.setAttribute(&quot;data-attr&quot;,&quot;zoom&quot;),r.setAttribute(&quot;data-val&quot;,&quot;reset&quot;),u(t,e),r.setAttribute(&quot;data-attr&quot;,&quot;resetLastSave&quot;),h(t,e),m(t,&quot;geo&quot;),m(t,&quot;mapbox&quot;)}},c.toggleSpikelines={name:&quot;toggleSpikelines&quot;,title:function(t){return l(t,&quot;Toggle Spike Lines&quot;)},icon:s.spikeline,attr:&quot;_cartesianSpikesEnabled&quot;,val:&quot;on&quot;,click:function(t){var e=t._fullLayout;e._cartesianSpikesEnabled=&quot;on&quot;===e._cartesianSpikesEnabled?&quot;off&quot;:&quot;on&quot;;var r=function(t){for(var e,r,n=t._fullLayout,i=a.list(t,null,!0),o={},s=0;s&lt;i.length;s++)e=i[s],r=e._name,o[r+&quot;.showspikes&quot;]=&quot;on&quot;===n._cartesianSpikesEnabled||e._showSpikeInitial;return o}(t);n.call(&quot;relayout&quot;,t,r)}},c.resetViewMapbox={name:&quot;resetViewMapbox&quot;,title:function(t){return l(t,&quot;Reset view&quot;)},attr:&quot;reset&quot;,icon:s.home,click:function(t){m(t,&quot;mapbox&quot;)}}},{&quot;../../../build/ploticon&quot;:2,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825}],630:[function(t,e,r){&quot;use strict&quot;;r.manage=t(&quot;./manage&quot;)},{&quot;./manage&quot;:631}],631:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axis_ids&quot;),i=t(&quot;../../traces/scatter/subtypes&quot;),a=t(&quot;../../registry&quot;),o=t(&quot;./modebar&quot;),s=t(&quot;./buttons&quot;);e.exports=function(t){var e=t._fullLayout,r=t._context,l=e._modeBar;if(r.displayModeBar){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error([&quot;*modeBarButtonsToRemove* configuration options&quot;,&quot;must be an array.&quot;].join(&quot; &quot;));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error([&quot;*modeBarButtonsToAdd* configuration options&quot;,&quot;must be an array.&quot;].join(&quot; &quot;));var c,u=r.modeBarButtons;c=Array.isArray(u)&amp;&amp;u.length?function(t){for(var e=0;e&lt;t.length;e++)for(var r=t[e],n=0;n&lt;r.length;n++){var i=r[n];if(&quot;string&quot;==typeof i){if(void 0===s[i])throw new Error([&quot;*modeBarButtons* configuration options&quot;,&quot;invalid button name&quot;].join(&quot; &quot;));t[e][n]=s[i]}}return t}(u):function(t,e,r){var o=t._fullLayout,l=t._fullData,c=o._has(&quot;cartesian&quot;),u=o._has(&quot;gl3d&quot;),f=o._has(&quot;geo&quot;),h=o._has(&quot;pie&quot;),p=o._has(&quot;gl2d&quot;),d=o._has(&quot;ternary&quot;),g=o._has(&quot;mapbox&quot;),m=o._has(&quot;polar&quot;),v=function(t){for(var e=n.list({_fullLayout:t},null,!0),r=0;r&lt;e.length;r++)if(!e[r].fixedrange)return!1;return!0}(o),y=[];function x(t){if(t.length){for(var r=[],n=0;n&lt;t.length;n++){var i=t[n];-1===e.indexOf(i)&amp;&amp;r.push(s[i])}y.push(r)}}x([&quot;toImage&quot;,&quot;sendDataToCloud&quot;]);var b=[],_=[],w=[],k=[];(c||p||h||d)+f+u+g+m&gt;1?(_=[&quot;toggleHover&quot;],w=[&quot;resetViews&quot;]):f?(b=[&quot;zoomInGeo&quot;,&quot;zoomOutGeo&quot;],_=[&quot;hoverClosestGeo&quot;],w=[&quot;resetGeo&quot;]):u?(_=[&quot;hoverClosest3d&quot;],w=[&quot;resetCameraDefault3d&quot;,&quot;resetCameraLastSave3d&quot;]):g?(_=[&quot;toggleHover&quot;],w=[&quot;resetViewMapbox&quot;]):_=p?[&quot;hoverClosestGl2d&quot;]:h?[&quot;hoverClosestPie&quot;]:[&quot;toggleHover&quot;];c&amp;&amp;(_=[&quot;toggleSpikelines&quot;,&quot;hoverClosestCartesian&quot;,&quot;hoverCompareCartesian&quot;]);!c&amp;&amp;!p||v||(b=[&quot;zoomIn2d&quot;,&quot;zoomOut2d&quot;,&quot;autoScale2d&quot;],&quot;resetViews&quot;!==w[0]&amp;&amp;(w=[&quot;resetScale2d&quot;]));u?k=[&quot;zoom3d&quot;,&quot;pan3d&quot;,&quot;orbitRotation&quot;,&quot;tableRotation&quot;]:(c||p)&amp;&amp;!v||d?k=[&quot;zoom2d&quot;,&quot;pan2d&quot;]:g||f?k=[&quot;pan2d&quot;]:m&amp;&amp;(k=[&quot;zoom2d&quot;]);(function(t){for(var e=!1,r=0;r&lt;t.length&amp;&amp;!e;r++){var n=t[r];n._module&amp;&amp;n._module.selectPoints&amp;&amp;(a.traceIs(n,&quot;scatter-like&quot;)?(i.hasMarkers(n)||i.hasText(n))&amp;&amp;(e=!0):a.traceIs(n,&quot;box-violin&quot;)&amp;&amp;&quot;all&quot;!==n.boxpoints&amp;&amp;&quot;all&quot;!==n.points||(e=!0))}return e})(l)&amp;&amp;k.push(&quot;select2d&quot;,&quot;lasso2d&quot;);return x(k),x(b.concat(w)),x(_),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r&lt;e.length;r++)t.push(e[r]);else t.push(e);return t}(y,r)}(t,r.modeBarButtonsToRemove,r.modeBarButtonsToAdd),l?l.update(t,c):e._modeBar=o(t,c)}else l&amp;&amp;(l.destroy(),delete e._modeBar)}},{&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;../../registry&quot;:825,&quot;../../traces/scatter/subtypes&quot;:1056,&quot;./buttons&quot;:629,&quot;./modebar&quot;:632}],632:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../../../build/ploticon&quot;);function s(t){this.container=t.container,this.element=document.createElement(&quot;div&quot;),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var l=s.prototype;l.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context;&quot;hover&quot;===r.displayModeBar?this.element.className=&quot;modebar modebar--hover&quot;:this.element.className=&quot;modebar&quot;;var n=!this.hasButtons(e),i=this.hasLogo!==r.displaylogo,a=this.locale!==r.locale;this.locale=r.locale,(n||i||a)&amp;&amp;(this.removeAllButtons(),this.updateButtons(e),r.displaylogo&amp;&amp;(this.element.appendChild(this.getLogo()),this.hasLogo=!0)),this.updateActiveButton()},l.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var r=e.createGroup();t.forEach(function(t){var n=t.name;if(!n)throw new Error(&quot;must provide button 'name' in button config&quot;);if(-1!==e.buttonsNames.indexOf(n))throw new Error(&quot;button name '&quot;+n+&quot;' is taken&quot;);e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)}),e.element.appendChild(r)})},l.createGroup=function(){var t=document.createElement(&quot;div&quot;);return t.className=&quot;modebar-group&quot;,t},l.createButton=function(t){var e=this,r=document.createElement(&quot;a&quot;);r.setAttribute(&quot;rel&quot;,&quot;tooltip&quot;),r.className=&quot;modebar-btn&quot;;var i=t.title;void 0===i?i=t.name:&quot;function&quot;==typeof i&amp;&amp;(i=i(this.graphInfo)),(i||0===i)&amp;&amp;r.setAttribute(&quot;data-title&quot;,i),void 0!==t.attr&amp;&amp;r.setAttribute(&quot;data-attr&quot;,t.attr);var a=t.val;if(void 0!==a&amp;&amp;(&quot;function&quot;==typeof a&amp;&amp;(a=a(this.graphInfo)),r.setAttribute(&quot;data-val&quot;,a)),&quot;function&quot;!=typeof t.click)throw new Error(&quot;must provide button 'click' function in button config&quot;);r.addEventListener(&quot;click&quot;,function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)}),r.setAttribute(&quot;data-toggle&quot;,t.toggle||!1),t.toggle&amp;&amp;n.select(r).classed(&quot;active&quot;,!0);var s=t.icon;return&quot;function&quot;==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute(&quot;data-gravity&quot;,t.gravity||&quot;n&quot;),r},l.createIcon=function(t){var e=i(t.height)?Number(t.height):t.ascent-t.descent,r=&quot;http://www.w3.org/2000/svg&quot;,n=document.createElementNS(r,&quot;svg&quot;),a=document.createElementNS(r,&quot;path&quot;);return n.setAttribute(&quot;height&quot;,&quot;1em&quot;),n.setAttribute(&quot;width&quot;,t.width/e+&quot;em&quot;),n.setAttribute(&quot;viewBox&quot;,[0,0,t.width,e].join(&quot; &quot;)),a.setAttribute(&quot;d&quot;,t.path),t.transform?a.setAttribute(&quot;transform&quot;,t.transform):void 0!==t.ascent&amp;&amp;a.setAttribute(&quot;transform&quot;,&quot;matrix(1 0 0 -1 0 &quot;+t.ascent+&quot;)&quot;),n.appendChild(a),n},l.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute(&quot;data-attr&quot;):null;this.buttonElements.forEach(function(t){var i=t.getAttribute(&quot;data-val&quot;)||!0,o=t.getAttribute(&quot;data-attr&quot;),s=&quot;true&quot;===t.getAttribute(&quot;data-toggle&quot;),l=n.select(t);if(s)o===r&amp;&amp;l.classed(&quot;active&quot;,!l.classed(&quot;active&quot;));else{var c=null===o?o:a.nestedProperty(e,o).get();l.classed(&quot;active&quot;,c===i)}})},l.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r&lt;t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n&lt;t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},l.getLogo=function(){var t=this.createGroup(),e=document.createElement(&quot;a&quot;);return e.href=&quot;https://plot.ly/&quot;,e.target=&quot;_blank&quot;,e.setAttribute(&quot;data-title&quot;,a._(this.graphInfo,&quot;Produced with Plotly&quot;)),e.className=&quot;modebar-btn plotlyjsicon modebar-btn--logo&quot;,e.appendChild(this.createIcon(o.plotlylogo)),t.appendChild(e),t},l.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},l.destroy=function(){a.removeElement(this.container.querySelector(&quot;.modebar&quot;))},e.exports=function(t,e){var r=t._fullLayout,i=new s({graphInfo:t,container:r._paperdiv.node(),buttons:e});return r._privateplot&amp;&amp;n.select(i.element).append(&quot;span&quot;).classed(&quot;badge-private float--left&quot;,!0).text(&quot;PRIVATE&quot;),i}},{&quot;../../../build/ploticon&quot;:2,&quot;../../lib&quot;:693,d3:147,&quot;fast-isnumeric&quot;:213}],633:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;),i=t(&quot;../color/attributes&quot;),a=(0,t(&quot;../../plot_api/plot_template&quot;).templatedArray)(&quot;button&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;plot&quot;},step:{valType:&quot;enumerated&quot;,values:[&quot;month&quot;,&quot;year&quot;,&quot;day&quot;,&quot;hour&quot;,&quot;minute&quot;,&quot;second&quot;,&quot;all&quot;],dflt:&quot;month&quot;,editType:&quot;plot&quot;},stepmode:{valType:&quot;enumerated&quot;,values:[&quot;backward&quot;,&quot;todate&quot;],dflt:&quot;backward&quot;,editType:&quot;plot&quot;},count:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;plot&quot;},label:{valType:&quot;string&quot;,editType:&quot;plot&quot;},editType:&quot;plot&quot;});e.exports={visible:{valType:&quot;boolean&quot;,editType:&quot;plot&quot;},buttons:a,x:{valType:&quot;number&quot;,min:-2,max:3,editType:&quot;plot&quot;},xanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;left&quot;,editType:&quot;plot&quot;},y:{valType:&quot;number&quot;,min:-2,max:3,editType:&quot;plot&quot;},yanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;bottom&quot;,editType:&quot;plot&quot;},font:n({editType:&quot;plot&quot;}),bgcolor:{valType:&quot;color&quot;,dflt:i.lightLine,editType:&quot;plot&quot;},activecolor:{valType:&quot;color&quot;,editType:&quot;plot&quot;},bordercolor:{valType:&quot;color&quot;,dflt:i.defaultLine,editType:&quot;plot&quot;},borderwidth:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;plot&quot;},editType:&quot;plot&quot;}},{&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/font_attributes&quot;:768,&quot;../color/attributes&quot;:566}],634:[function(t,e,r){&quot;use strict&quot;;e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],635:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../color&quot;),a=t(&quot;../../plot_api/plot_template&quot;),o=t(&quot;../../plots/array_container_defaults&quot;),s=t(&quot;./attributes&quot;),l=t(&quot;./constants&quot;);function c(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o(&quot;visible&quot;)){var l=o(&quot;step&quot;);&quot;all&quot;!==l&amp;&amp;(!a||&quot;gregorian&quot;===a||&quot;month&quot;!==l&amp;&amp;&quot;year&quot;!==l?o(&quot;stepmode&quot;):e.stepmode=&quot;backward&quot;,o(&quot;count&quot;)),o(&quot;label&quot;)}}e.exports=function(t,e,r,u,f){var h=t.rangeselector||{},p=a.newContainer(e,&quot;rangeselector&quot;);function d(t,e){return n.coerce(h,p,s,t,e)}if(d(&quot;visible&quot;,o(h,p,{name:&quot;buttons&quot;,handleItemDefaults:c,calendar:f}).length&gt;0)){var g=function(t,e,r){for(var n=r.filter(function(r){return e[r].anchor===t._id}),i=0,a=0;a&lt;n.length;a++){var o=e[n[a]].domain;o&amp;&amp;(i=Math.max(o[1],i))}return[t.domain[0],i+l.yPad]}(e,r,u);d(&quot;x&quot;,g[0]),d(&quot;y&quot;,g[1]),n.noneOrAll(t,e,[&quot;x&quot;,&quot;y&quot;]),d(&quot;xanchor&quot;),d(&quot;yanchor&quot;),n.coerceFont(d,&quot;font&quot;,r.font);var m=d(&quot;bgcolor&quot;);d(&quot;activecolor&quot;,i.contrast(m,l.lightAmount,l.darkAmount)),d(&quot;bordercolor&quot;),d(&quot;borderwidth&quot;)}}},{&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/array_container_defaults&quot;:738,&quot;../color&quot;:567,&quot;./attributes&quot;:633,&quot;./constants&quot;:634}],636:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../plots/plots&quot;),o=t(&quot;../color&quot;),s=t(&quot;../drawing&quot;),l=t(&quot;../../lib&quot;),c=t(&quot;../../lib/svg_text_utils&quot;),u=t(&quot;../../plots/cartesian/axis_ids&quot;),f=t(&quot;../legend/anchor_utils&quot;),h=t(&quot;../../constants/alignment&quot;),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR,m=t(&quot;./constants&quot;),v=t(&quot;./get_update_object&quot;);function y(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,&quot;rect&quot;,&quot;selector-rect&quot;,function(t){t.attr(&quot;shape-rendering&quot;,&quot;crispEdges&quot;)});n.attr({rx:m.rx,ry:m.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style(&quot;stroke-width&quot;,e.borderwidth+&quot;px&quot;)}function b(t,e,r,n){var i;l.ensureSingle(t,&quot;text&quot;,&quot;selector-text&quot;,function(t){t.classed(&quot;user-select-none&quot;,!0).attr(&quot;text-anchor&quot;,&quot;middle&quot;)}).call(s.font,e.font).text((i=r,i.label?i.label:&quot;all&quot;===i.step?&quot;all&quot;:i.count+i.step.charAt(0))).call(function(t){c.convertToTspans(t,n)})}e.exports=function(t){var e=t._fullLayout._infolayer.selectAll(&quot;.rangeselector&quot;).data(function(t){for(var e=u.list(t,&quot;x&quot;,!0),r=[],n=0;n&lt;e.length;n++){var i=e[n];i.rangeselector&amp;&amp;i.rangeselector.visible&amp;&amp;r.push(i)}return r}(t),y);e.enter().append(&quot;g&quot;).classed(&quot;rangeselector&quot;,!0),e.exit().remove(),e.style({cursor:&quot;pointer&quot;,&quot;pointer-events&quot;:&quot;all&quot;}),e.each(function(e){var r=n.select(this),o=e,u=o.rangeselector,h=r.selectAll(&quot;g.button&quot;).data(l.filterVisible(u.buttons));h.enter().append(&quot;g&quot;).classed(&quot;button&quot;,!0),h.exit().remove(),h.each(function(e){var r=n.select(this),a=v(o,e);e._isActive=function(t,e,r){if(&quot;all&quot;===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&amp;&amp;t.range[1]===r[n[1]]}(o,e,a),r.call(x,u,e),r.call(b,u,e,t),r.on(&quot;click&quot;,function(){t._dragged||i.call(&quot;relayout&quot;,t,a)}),r.on(&quot;mouseover&quot;,function(){e._isHovered=!0,r.call(x,u,e)}),r.on(&quot;mouseout&quot;,function(){e._isHovered=!1,r.call(x,u,e)})}),function(t,e,r,i,o){var l=0,u=0,h=r.borderwidth;e.each(function(){var t=n.select(this),e=t.select(&quot;.selector-text&quot;),i=r.font.size*p,a=Math.max(i*c.lineCount(e),16)+3;u=Math.max(u,a)}),e.each(function(){var t=n.select(this),e=t.select(&quot;.selector-rect&quot;),i=t.select(&quot;.selector-text&quot;),a=i.node()&amp;&amp;s.bBox(i.node()).width,o=r.font.size*p,f=c.lineCount(i),d=Math.max(a+10,m.minButtonWidth);t.attr(&quot;transform&quot;,&quot;translate(&quot;+(h+l)+&quot;,&quot;+h+&quot;)&quot;),e.attr({x:0,y:0,width:d,height:u}),c.positionText(i,d/2,u/2-(f-1)*o/2+3),l+=d+5});var v=t._fullLayout._size,y=v.l+v.w*r.x,x=v.t+v.h*(1-r.y),b=&quot;left&quot;;f.isRightAnchor(r)&amp;&amp;(y-=l,b=&quot;right&quot;);f.isCenterAnchor(r)&amp;&amp;(y-=l/2,b=&quot;center&quot;);var _=&quot;top&quot;;f.isBottomAnchor(r)&amp;&amp;(x-=u,_=&quot;bottom&quot;);f.isMiddleAnchor(r)&amp;&amp;(x-=u/2,_=&quot;middle&quot;);l=Math.ceil(l),u=Math.ceil(u),y=Math.round(y),x=Math.round(x),a.autoMargin(t,i+&quot;-range-selector&quot;,{x:r.x,y:r.y,l:l*d[b],r:l*g[b],b:u*g[_],t:u*d[_]}),o.attr(&quot;transform&quot;,&quot;translate(&quot;+y+&quot;,&quot;+x+&quot;)&quot;)}(t,h,u,o._name,r)})}},{&quot;../../constants/alignment&quot;:665,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../drawing&quot;:592,&quot;../legend/anchor_utils&quot;:619,&quot;./constants&quot;:634,&quot;./get_update_object&quot;:637,d3:147}],637:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;);e.exports=function(t,e){var r=t._name,i={};if(&quot;all&quot;===e.step)i[r+&quot;.autorange&quot;]=!0;else{var a=function(t,e){var r,i=t.range,a=new Date(t.r2l(i[1])),o=e.step,s=e.count;switch(e.stepmode){case&quot;backward&quot;:r=t.l2r(+n.time[o].utc.offset(a,-s));break;case&quot;todate&quot;:var l=n.time[o].utc.offset(a,-s);r=t.l2r(+n.time[o].utc.ceil(l))}var c=i[1];return[r,c]}(t,e);i[r+&quot;.range[0]&quot;]=a[0],i[r+&quot;.range[1]&quot;]=a[1]}return i}},{d3:147}],638:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;component&quot;,name:&quot;rangeselector&quot;,schema:{subplots:{xaxis:{rangeselector:t(&quot;./attributes&quot;)}}},layoutAttributes:t(&quot;./attributes&quot;),handleDefaults:t(&quot;./defaults&quot;),draw:t(&quot;./draw&quot;)}},{&quot;./attributes&quot;:633,&quot;./defaults&quot;:635,&quot;./draw&quot;:636}],639:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../color/attributes&quot;);e.exports={bgcolor:{valType:&quot;color&quot;,dflt:n.background,editType:&quot;plot&quot;},bordercolor:{valType:&quot;color&quot;,dflt:n.defaultLine,editType:&quot;plot&quot;},borderwidth:{valType:&quot;integer&quot;,dflt:0,min:0,editType:&quot;plot&quot;},autorange:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;,impliedEdits:{&quot;range[0]&quot;:void 0,&quot;range[1]&quot;:void 0}},range:{valType:&quot;info_array&quot;,items:[{valType:&quot;any&quot;,editType:&quot;calc&quot;,impliedEdits:{&quot;^autorange&quot;:!1}},{valType:&quot;any&quot;,editType:&quot;calc&quot;,impliedEdits:{&quot;^autorange&quot;:!1}}],editType:&quot;calc&quot;,impliedEdits:{autorange:!1}},thickness:{valType:&quot;number&quot;,dflt:.15,min:0,max:1,editType:&quot;plot&quot;},visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},editType:&quot;calc&quot;}},{&quot;../color/attributes&quot;:566}],640:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axis_ids&quot;).list,i=t(&quot;../../plots/cartesian/autorange&quot;).getAutoRange,a=t(&quot;./constants&quot;);e.exports=function(t){for(var e=n(t,&quot;x&quot;,!0),r=0;r&lt;e.length;r++){var o=e[r],s=o[a.name];s&amp;&amp;s.visible&amp;&amp;s.autorange&amp;&amp;(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},{&quot;../../plots/cartesian/autorange&quot;:741,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;./constants&quot;:641}],641:[function(t,e,r){&quot;use strict&quot;;e.exports={name:&quot;rangeslider&quot;,containerClassName:&quot;rangeslider-container&quot;,bgClassName:&quot;rangeslider-bg&quot;,rangePlotClassName:&quot;rangeslider-rangeplot&quot;,maskMinClassName:&quot;rangeslider-mask-min&quot;,maskMaxClassName:&quot;rangeslider-mask-max&quot;,slideBoxClassName:&quot;rangeslider-slidebox&quot;,grabberMinClassName:&quot;rangeslider-grabber-min&quot;,grabAreaMinClassName:&quot;rangeslider-grabarea-min&quot;,handleMinClassName:&quot;rangeslider-handle-min&quot;,grabberMaxClassName:&quot;rangeslider-grabber-max&quot;,grabAreaMaxClassName:&quot;rangeslider-grabarea-max&quot;,handleMaxClassName:&quot;rangeslider-handle-max&quot;,maskMinOppAxisClassName:&quot;rangeslider-mask-min-opp-axis&quot;,maskMaxOppAxisClassName:&quot;rangeslider-mask-max-opp-axis&quot;,maskColor:&quot;rgba(0,0,0,0.4)&quot;,maskOppAxisColor:&quot;rgba(0,0,0,0.2)&quot;,slideBoxFill:&quot;transparent&quot;,slideBoxCursor:&quot;ew-resize&quot;,grabAreaFill:&quot;transparent&quot;,grabAreaCursor:&quot;col-resize&quot;,grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],642:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plot_api/plot_template&quot;),a=t(&quot;../../plots/cartesian/axis_ids&quot;),o=t(&quot;./attributes&quot;),s=t(&quot;./oppaxis_attributes&quot;);e.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,f,h=l.rangeslider,p=i.newContainer(c,&quot;rangeslider&quot;);if(_(&quot;visible&quot;)){_(&quot;bgcolor&quot;,e.plot_bgcolor),_(&quot;bordercolor&quot;),_(&quot;borderwidth&quot;),_(&quot;thickness&quot;),_(&quot;autorange&quot;,!c.isValidRange(h.range)),_(&quot;range&quot;);var d=e._subplots;if(d)for(var g=d.cartesian.filter(function(t){return t.substr(0,t.indexOf(&quot;y&quot;))===a.name2id(r)}).map(function(t){return t.substr(t.indexOf(&quot;y&quot;),t.length)}),m=n.simpleMap(g,a.id2name),v=0;v&lt;m.length;v++){var y=m[v];u=h[y]||{},f=i.newContainer(p,y,&quot;yaxis&quot;);var x,b=e[y];u.range&amp;&amp;b.isValidRange(u.range)&amp;&amp;(x=&quot;fixed&quot;),&quot;match&quot;!==w(&quot;rangemode&quot;,x)&amp;&amp;w(&quot;range&quot;,b.range.slice())}p._input=h}}function _(t,e){return n.coerce(h,p,o,t,e)}function w(t,e){return n.coerce(u,f,s,t,e)}}},{&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;./attributes&quot;:639,&quot;./oppaxis_attributes&quot;:645}],643:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../plots/plots&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../drawing&quot;),l=t(&quot;../color&quot;),c=t(&quot;../titles&quot;),u=t(&quot;../../plots/cartesian&quot;),f=t(&quot;../../plots/cartesian/axes&quot;),h=t(&quot;../dragelement&quot;),p=t(&quot;../../lib/setcursor&quot;),d=t(&quot;./constants&quot;);function g(t,e,r,n){var i=o.ensureSingle(t,&quot;rect&quot;,d.bgClassName,function(t){t.attr({x:0,y:0,&quot;shape-rendering&quot;:&quot;crispEdges&quot;})}),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,l=-n._offsetShift,c=s.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:&quot;translate(&quot;+l+&quot;,&quot;+l+&quot;)&quot;,fill:n.bgcolor,stroke:n.bordercolor,&quot;stroke-width&quot;:c})}function m(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,&quot;clipPath&quot;,n._clipId,function(t){t.append(&quot;rect&quot;).attr({x:0,y:0})}).select(&quot;rect&quot;).attr({width:n._width,height:n._height})}function v(t,e,r,i){var l,c=f.getSubplots(e,r),h=e.calcdata,p=t.selectAll(&quot;g.&quot;+d.rangePlotClassName).data(c,o.identity);p.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return d.rangePlotClassName+&quot; &quot;+t}).call(s.setClipUrl,i._clipId),p.order(),p.exit().remove(),p.each(function(t,o){var s=n.select(this),c=0===o,p=f.getFromId(e,t,&quot;y&quot;),d=p._name,g=i[d],m={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};m.layout[d]={type:p.type,domain:[0,1],range:&quot;match&quot;!==g.rangemode?g.range.slice():p.range.slice(),calendar:p.calendar},a.supplyDefaults(m);var v={id:t,plotgroup:s,xaxis:m._fullLayout.xaxis,yaxis:m._fullLayout[d],isRangePlot:!0};c?l=v:(v.mainplot=&quot;xy&quot;,v.mainplotinfo=l),u.rangePlot(e,v,function(t,e){for(var r=[],n=0;n&lt;t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&amp;&amp;r.push(i)}return r}(h,t))})}function y(t,e,r,n,i){(o.ensureSingle(t,&quot;rect&quot;,d.maskMinClassName,function(t){t.attr({x:0,y:0,&quot;shape-rendering&quot;:&quot;crispEdges&quot;})}).attr(&quot;height&quot;,n._height).call(l.fill,d.maskColor),o.ensureSingle(t,&quot;rect&quot;,d.maskMaxClassName,function(t){t.attr({y:0,&quot;shape-rendering&quot;:&quot;crispEdges&quot;})}).attr(&quot;height&quot;,n._height).call(l.fill,d.maskColor),&quot;match&quot;!==i.rangemode)&amp;&amp;(o.ensureSingle(t,&quot;rect&quot;,d.maskMinOppAxisClassName,function(t){t.attr({y:0,&quot;shape-rendering&quot;:&quot;crispEdges&quot;})}).attr(&quot;width&quot;,n._width).call(l.fill,d.maskOppAxisColor),o.ensureSingle(t,&quot;rect&quot;,d.maskMaxOppAxisClassName,function(t){t.attr({y:0,&quot;shape-rendering&quot;:&quot;crispEdges&quot;})}).attr(&quot;width&quot;,n._width).style(&quot;border-top&quot;,d.maskOppBorder).call(l.fill,d.maskOppAxisColor))}function x(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,&quot;rect&quot;,d.slideBoxClassName,function(t){t.attr({y:0,cursor:d.slideBoxCursor,&quot;shape-rendering&quot;:&quot;crispEdges&quot;})}).attr({height:n._height,fill:d.slideBoxFill})}function b(t,e,r,n){var i=o.ensureSingle(t,&quot;g&quot;,d.grabberMinClassName),a=o.ensureSingle(t,&quot;g&quot;,d.grabberMaxClassName),s={x:0,width:d.handleWidth,rx:d.handleRadius,fill:l.background,stroke:l.defaultLine,&quot;stroke-width&quot;:d.handleStrokeWidth,&quot;shape-rendering&quot;:&quot;crispEdges&quot;},c={y:Math.round(n._height/4),height:Math.round(n._height/2)};if(o.ensureSingle(i,&quot;rect&quot;,d.handleMinClassName,function(t){t.attr(s)}).attr(c),o.ensureSingle(a,&quot;rect&quot;,d.handleMaxClassName,function(t){t.attr(s)}).attr(c),!e._context.staticPlot){var u={width:d.grabAreaWidth,x:0,y:0,fill:d.grabAreaFill,cursor:d.grabAreaCursor};o.ensureSingle(i,&quot;rect&quot;,d.grabAreaMinClassName,function(t){t.attr(u)}).attr(&quot;height&quot;,n._height),o.ensureSingle(a,&quot;rect&quot;,d.grabAreaMaxClassName,function(t){t.attr(u)}).attr(&quot;height&quot;,n._height)}}e.exports=function(t){var e=t._fullLayout,r=function(t){var e=f.list({_fullLayout:t},&quot;x&quot;,!0),r=d.name,n=[];if(t._has(&quot;gl2d&quot;))return n;for(var i=0;i&lt;e.length;i++){var a=e[i];a[r]&amp;&amp;a[r].visible&amp;&amp;n.push(a)}return n}(e);var s=e._infolayer.selectAll(&quot;g.&quot;+d.containerClassName).data(r,function(t){return t._name});s.enter().append(&quot;g&quot;).classed(d.containerClassName,!0).attr(&quot;pointer-events&quot;,&quot;all&quot;),s.exit().each(function(t){var r=t[d.name];e._topdefs.select(&quot;#&quot;+r._clipId).remove()}).remove(),0!==r.length&amp;&amp;s.each(function(r){var s=n.select(this),l=r[d.name],u=e[f.id2name(r.anchor)],_=l[f.id2name(r.anchor)];if(l.range){var w=l.range,k=r.range;w[0]=r.l2r(Math.min(r.r2l(w[0]),r.r2l(k[0]))),w[1]=r.l2r(Math.max(r.r2l(w[1]),r.r2l(k[1]))),l._input.range=w.slice()}r.cleanRange(&quot;rangeslider.range&quot;);for(var M=e.margin,A=e._size,T=r.domain,S=(r._boundingBox||{}).height||0,E=1/0,C=f.getSubplots(t,r),L=0;L&lt;C.length;L++){var z=f.getFromId(t,C[L].substr(C[L].indexOf(&quot;y&quot;)));E=Math.min(E,z.domain[0])}l._id=d.name+r._id,l._clipId=l._id+&quot;-&quot;+e._uid,l._width=A.w*(T[1]-T[0]),l._height=(e.height-M.b-M.t)*l.thickness,l._offsetShift=Math.floor(l.borderwidth/2);var P=Math.round(M.l+A.w*T[0]),O=Math.round(A.t+A.h*(1-E)+S+l._offsetShift+d.extraPad);s.attr(&quot;transform&quot;,&quot;translate(&quot;+P+&quot;,&quot;+O+&quot;)&quot;);var I=r.r2l(l.range[0]),D=r.r2l(l.range[1]),R=D-I;if(l.p2d=function(t){return t/l._width*R+I},l.d2p=function(t){return(t-I)/R*l._width},l._rl=[I,D],&quot;match&quot;!==_.rangemode){var B=u.r2l(_.range[0]),F=u.r2l(_.range[1])-B;l.d2pOppAxis=function(t){return(t-B)/F*l._height}}s.call(g,t,r,l).call(m,t,r,l).call(v,t,r,l).call(y,t,r,l,_).call(x,t,r,l).call(b,t,r,l),function(t,e,r,a){var s=t.select(&quot;rect.&quot;+d.slideBoxClassName).node(),l=t.select(&quot;rect.&quot;+d.grabAreaMinClassName).node(),c=t.select(&quot;rect.&quot;+d.grabAreaMaxClassName).node();t.on(&quot;mousedown&quot;,function(){var u=n.event,f=u.target,d=u.clientX,g=d-t.node().getBoundingClientRect().left,m=a.d2p(r._rl[0]),v=a.d2p(r._rl[1]),y=h.coverSlip();function x(t){var u,h,x,b=+t.clientX-d;switch(f){case s:x=&quot;ew-resize&quot;,u=m+b,h=v+b;break;case l:x=&quot;col-resize&quot;,u=m+b,h=v;break;case c:x=&quot;col-resize&quot;,u=m,h=v+b;break;default:x=&quot;ew-resize&quot;,u=g,h=g+b}if(h&lt;u){var _=h;h=u,u=_}a._pixelMin=u,a._pixelMax=h,p(n.select(y),x),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){i.call(&quot;relayout&quot;,e,r._name+&quot;.range&quot;,[s,l])})}(0,e,r,a)}y.addEventListener(&quot;mousemove&quot;,x),y.addEventListener(&quot;mouseup&quot;,function t(){y.removeEventListener(&quot;mousemove&quot;,x);y.removeEventListener(&quot;mouseup&quot;,t);o.removeElement(y)})})}(s,t,r,l),function(t,e,r,n,i,a){var s=d.handleWidth/2;function l(t){return o.constrain(t,0,n._width)}function c(t){return o.constrain(t,0,n._height)}function u(t){return o.constrain(t,-s,n._width+s)}var f=l(n.d2p(r._rl[0])),h=l(n.d2p(r._rl[1]));if(t.select(&quot;rect.&quot;+d.slideBoxClassName).attr(&quot;x&quot;,f).attr(&quot;width&quot;,h-f),t.select(&quot;rect.&quot;+d.maskMinClassName).attr(&quot;width&quot;,f),t.select(&quot;rect.&quot;+d.maskMaxClassName).attr(&quot;x&quot;,h).attr(&quot;width&quot;,n._width-h),&quot;match&quot;!==a.rangemode){var p=n._height-c(n.d2pOppAxis(i._rl[1])),g=n._height-c(n.d2pOppAxis(i._rl[0]));t.select(&quot;rect.&quot;+d.maskMinOppAxisClassName).attr(&quot;x&quot;,f).attr(&quot;height&quot;,p).attr(&quot;width&quot;,h-f),t.select(&quot;rect.&quot;+d.maskMaxOppAxisClassName).attr(&quot;x&quot;,f).attr(&quot;y&quot;,g).attr(&quot;height&quot;,n._height-g).attr(&quot;width&quot;,h-f),t.select(&quot;rect.&quot;+d.slideBoxClassName).attr(&quot;y&quot;,p).attr(&quot;height&quot;,g-p)}var m=Math.round(u(f-s))-.5,v=Math.round(u(h-s))+.5;t.select(&quot;g.&quot;+d.grabberMinClassName).attr(&quot;transform&quot;,&quot;translate(&quot;+m+&quot;,0.5)&quot;),t.select(&quot;g.&quot;+d.grabberMaxClassName).attr(&quot;transform&quot;,&quot;translate(&quot;+v+&quot;,0.5)&quot;)}(s,0,r,l,u,_),&quot;bottom&quot;===r.side&amp;&amp;c.draw(t,r._id+&quot;title&quot;,{propContainer:r,propName:r._name+&quot;.title&quot;,placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:O+l._height+l._offsetShift+10+1.5*r.titlefont.size,&quot;text-anchor&quot;:&quot;middle&quot;}}),a.autoMargin(t,l._id,{x:T[0],y:E,l:0,r:0,t:0,b:l._height+M.b+S,pad:d.extraPad+2*l._offsetShift})})}},{&quot;../../lib&quot;:693,&quot;../../lib/setcursor&quot;:714,&quot;../../plots/cartesian&quot;:753,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../dragelement&quot;:589,&quot;../drawing&quot;:592,&quot;../titles&quot;:658,&quot;./constants&quot;:641,d3:147}],644:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./attributes&quot;),a=t(&quot;./oppaxis_attributes&quot;);e.exports={moduleType:&quot;component&quot;,name:&quot;rangeslider&quot;,schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:t(&quot;./attributes&quot;),handleDefaults:t(&quot;./defaults&quot;),calcAutorange:t(&quot;./calc_autorange&quot;),draw:t(&quot;./draw&quot;)}},{&quot;../../lib&quot;:693,&quot;./attributes&quot;:639,&quot;./calc_autorange&quot;:640,&quot;./defaults&quot;:642,&quot;./draw&quot;:643,&quot;./oppaxis_attributes&quot;:645}],645:[function(t,e,r){&quot;use strict&quot;;e.exports={_isSubplotObj:!0,rangemode:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;fixed&quot;,&quot;match&quot;],dflt:&quot;match&quot;,editType:&quot;calc&quot;},range:{valType:&quot;info_array&quot;,items:[{valType:&quot;any&quot;,editType:&quot;plot&quot;},{valType:&quot;any&quot;,editType:&quot;plot&quot;}],editType:&quot;plot&quot;},editType:&quot;calc&quot;}},{}],646:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../annotations/attributes&quot;),i=t(&quot;../../traces/scatter/attributes&quot;).line,a=t(&quot;../drawing/attributes&quot;).dash,o=t(&quot;../../lib/extend&quot;).extendFlat,s=t(&quot;../../plot_api/plot_template&quot;).templatedArray;e.exports=s(&quot;shape&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc+arraydraw&quot;},type:{valType:&quot;enumerated&quot;,values:[&quot;circle&quot;,&quot;rect&quot;,&quot;path&quot;,&quot;line&quot;],editType:&quot;calc+arraydraw&quot;},layer:{valType:&quot;enumerated&quot;,values:[&quot;below&quot;,&quot;above&quot;],dflt:&quot;above&quot;,editType:&quot;arraydraw&quot;},xref:o({},n.xref,{}),xsizemode:{valType:&quot;enumerated&quot;,values:[&quot;scaled&quot;,&quot;pixel&quot;],dflt:&quot;scaled&quot;,editType:&quot;calc+arraydraw&quot;},xanchor:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},x0:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},x1:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},yref:o({},n.yref,{}),ysizemode:{valType:&quot;enumerated&quot;,values:[&quot;scaled&quot;,&quot;pixel&quot;],dflt:&quot;scaled&quot;,editType:&quot;calc+arraydraw&quot;},yanchor:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},y0:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},y1:{valType:&quot;any&quot;,editType:&quot;calc+arraydraw&quot;},path:{valType:&quot;string&quot;,editType:&quot;calc+arraydraw&quot;},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1,editType:&quot;arraydraw&quot;},line:{color:o({},i.color,{editType:&quot;arraydraw&quot;}),width:o({},i.width,{editType:&quot;calc+arraydraw&quot;}),dash:o({},a,{editType:&quot;arraydraw&quot;}),editType:&quot;calc+arraydraw&quot;},fillcolor:{valType:&quot;color&quot;,dflt:&quot;rgba(0,0,0,0)&quot;,editType:&quot;arraydraw&quot;},editType:&quot;arraydraw&quot;})},{&quot;../../lib/extend&quot;:682,&quot;../../plot_api/plot_template&quot;:732,&quot;../../traces/scatter/attributes&quot;:1032,&quot;../annotations/attributes&quot;:550,&quot;../drawing/attributes&quot;:591}],647:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;./constants&quot;),o=t(&quot;./helpers&quot;);function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if(&quot;pixel&quot;===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p&lt;0?Math.abs(p)+c:c,g=h&gt;0?h+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,i){var s=&quot;category&quot;===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for(&quot;date&quot;===t.type&amp;&amp;(s=o.decodeDate(s)),l=0;l&lt;d.length;l++)void 0!==(c=i[d[l].charAt(0)].drawn)&amp;&amp;(!(u=d[l].substr(1).match(a.paramRE))||u.length&lt;c||((f=s(u[c]))&lt;h&amp;&amp;(h=f),f&gt;p&amp;&amp;(p=f)));return p&gt;=h?[h,p]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&amp;&amp;t._fullData.length)for(var o=0;o&lt;r.length;o++){var c,f,h=r[o];if(h._extremes={},&quot;paper&quot;!==h.xref){var p=&quot;pixel&quot;===h.xsizemode?h.xanchor:h.x0,d=&quot;pixel&quot;===h.xsizemode?h.xanchor:h.x1;(f=u(c=i.getFromId(t,h.xref),p,d,h.path,a.paramIsX))&amp;&amp;(h._extremes[c._id]=i.findExtremes(c,f,s(h)))}if(&quot;paper&quot;!==h.yref){var g=&quot;pixel&quot;===h.ysizemode?h.yanchor:h.y0,m=&quot;pixel&quot;===h.ysizemode?h.yanchor:h.y1;(f=u(c=i.getFromId(t,h.yref),g,m,h.path,a.paramIsY))&amp;&amp;(h._extremes[c._id]=i.findExtremes(c,f,l(h)))}}}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;./constants&quot;:648,&quot;./helpers&quot;:651}],648:[function(t,e,r){&quot;use strict&quot;;e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],649:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../plots/array_container_defaults&quot;),o=t(&quot;./attributes&quot;),s=t(&quot;./helpers&quot;);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(a(&quot;visible&quot;)){a(&quot;layer&quot;),a(&quot;opacity&quot;),a(&quot;fillcolor&quot;),a(&quot;line.color&quot;),a(&quot;line.width&quot;),a(&quot;line.dash&quot;);for(var l=a(&quot;type&quot;,t.path?&quot;path&quot;:&quot;rect&quot;),c=a(&quot;xsizemode&quot;),u=a(&quot;ysizemode&quot;),f=[&quot;x&quot;,&quot;y&quot;],h=0;h&lt;2;h++){var p,d,g,m=f[h],v=m+&quot;anchor&quot;,y=&quot;x&quot;===m?c:u,x={_fullLayout:r},b=i.coerceRef(t,e,x,m,&quot;&quot;,&quot;paper&quot;);if(&quot;paper&quot;!==b?((p=i.getFromId(x,b))._shapeIndices.push(e._index),g=s.rangeToShapePosition(p),d=s.shapePositionToRange(p)):d=g=n.identity,&quot;path&quot;!==l){var _=m+&quot;0&quot;,w=m+&quot;1&quot;,k=t[_],M=t[w];t[_]=d(t[_],!0),t[w]=d(t[w],!0),&quot;pixel&quot;===y?(a(_,0),a(w,10)):(i.coercePosition(e,x,a,b,_,.25),i.coercePosition(e,x,a,b,w,.75)),e[_]=g(e[_]),e[w]=g(e[w]),t[_]=k,t[w]=M}if(&quot;pixel&quot;===y){var A=t[v];t[v]=d(t[v],!0),i.coercePosition(e,x,a,b,v,.25),e[v]=g(e[v]),t[v]=A}}&quot;path&quot;===l?a(&quot;path&quot;):n.noneOrAll(t,e,[&quot;x0&quot;,&quot;x1&quot;,&quot;y0&quot;,&quot;y1&quot;])}}e.exports=function(t,e){a(t,e,{name:&quot;shapes&quot;,handleItemDefaults:l})}},{&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;../../plots/cartesian/axes&quot;:742,&quot;./attributes&quot;:646,&quot;./helpers&quot;:651}],650:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;../color&quot;),s=t(&quot;../drawing&quot;),l=t(&quot;../../plot_api/plot_template&quot;).arrayEditor,c=t(&quot;../dragelement&quot;),u=t(&quot;../../lib/setcursor&quot;),f=t(&quot;./constants&quot;),h=t(&quot;./helpers&quot;);function p(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index=&quot;'+e+'&quot;]').remove();var r=t._fullLayout.shapes[e]||{};if(r._input&amp;&amp;!1!==r.visible)if(&quot;below&quot;!==r.layer)v(t._fullLayout._shapeUpperLayer);else if(&quot;paper&quot;===r.xref||&quot;paper&quot;===r.yref)v(t._fullLayout._shapeLowerLayer);else{var p=t._fullLayout._plots[r.xref+r.yref];if(p)v((p.mainplotinfo||p).shapelayer);else v(t._fullLayout._shapeLowerLayer)}function v(p){var v={&quot;data-index&quot;:e,&quot;fill-rule&quot;:&quot;evenodd&quot;,d:g(t,r)},y=r.line.width?r.line.color:&quot;rgba(0,0,0,0)&quot;,x=p.append(&quot;path&quot;).attr(v).style(&quot;opacity&quot;,r.opacity).call(o.stroke,y).call(o.fill,r.fillcolor).call(s.dashLine,r.line.dash,r.line.width);d(x,t,r),t._context.edits.shapePosition&amp;&amp;function(t,e,r,o,p){var v,y,x,b,_,w,k,M,A,T,S,E,C,L,z,P,O=10,I=10,D=&quot;pixel&quot;===r.xsizemode,R=&quot;pixel&quot;===r.ysizemode,B=&quot;line&quot;===r.type,F=&quot;path&quot;===r.type,N=l(t.layout,&quot;shapes&quot;,r),j=N.modifyItem,V=a.getFromId(t,r.xref),U=a.getFromId(t,r.yref),q=h.getDataToPixel(t,V),H=h.getDataToPixel(t,U,!0),G=h.getPixelToData(t,V),W=h.getPixelToData(t,U,!0),Y=B?function(){var t=Math.max(r.line.width,10),n=p.append(&quot;g&quot;).attr(&quot;data-index&quot;,o);n.append(&quot;path&quot;).attr(&quot;d&quot;,e.attr(&quot;d&quot;)).style({cursor:&quot;move&quot;,&quot;stroke-width&quot;:t,&quot;stroke-opacity&quot;:&quot;0&quot;});var i={&quot;fill-opacity&quot;:&quot;0&quot;},a=t/2&gt;10?t/2:10;return n.append(&quot;circle&quot;).attr({&quot;data-line-point&quot;:&quot;start-point&quot;,cx:D?q(r.xanchor)+r.x0:q(r.x0),cy:R?H(r.yanchor)-r.y0:H(r.y0),r:a}).style(i).classed(&quot;cursor-grab&quot;,!0),n.append(&quot;circle&quot;).attr({&quot;data-line-point&quot;:&quot;end-point&quot;,cx:D?q(r.xanchor)+r.x1:q(r.x1),cy:R?H(r.yanchor)-r.y1:H(r.y1),r:a}).style(i).classed(&quot;cursor-grab&quot;,!0),n}():e,X={element:Y.node(),gd:t,prepFn:function(n){D&amp;&amp;(_=q(r.xanchor));R&amp;&amp;(w=H(r.yanchor));&quot;path&quot;===r.type?z=r.path:(v=D?r.x0:q(r.x0),y=R?r.y0:H(r.y0),x=D?r.x1:q(r.x1),b=R?r.y1:H(r.y1));v&lt;x?(A=v,C=&quot;x0&quot;,T=x,L=&quot;x1&quot;):(A=x,C=&quot;x1&quot;,T=v,L=&quot;x0&quot;);!R&amp;&amp;y&lt;b||R&amp;&amp;y&gt;b?(k=y,S=&quot;y0&quot;,M=b,E=&quot;y1&quot;):(k=b,S=&quot;y1&quot;,M=y,E=&quot;y0&quot;);Z(n),K(p,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),l=a.getFromId(r,i),c=&quot;&quot;;&quot;paper&quot;===n||o.autorange||(c+=n);&quot;paper&quot;===i||l.autorange||(c+=i);t.call(s.setClipUrl,c?&quot;clip&quot;+r._fullLayout._uid+c:null)}(e,r,t),X.moveFn=&quot;move&quot;===P?$:J},doneFn:function(){u(e),Q(p),d(e,t,r),n.call(&quot;relayout&quot;,t,N.getUpdateObj())},clickFn:function(){Q(p)}};function Z(t){if(B)P=&quot;path&quot;===t.target.tagName?&quot;move&quot;:&quot;start-point&quot;===t.target.attributes[&quot;data-line-point&quot;].value?&quot;resize-over-start-point&quot;:&quot;resize-over-end-point&quot;;else{var r=X.element.getBoundingClientRect(),n=r.right-r.left,i=r.bottom-r.top,a=t.clientX-r.left,o=t.clientY-r.top,s=!F&amp;&amp;n&gt;O&amp;&amp;i&gt;I&amp;&amp;!t.shiftKey?c.getCursor(a/n,1-o/i):&quot;move&quot;;u(e,s),P=s.split(&quot;-&quot;)[0]}}function $(n,i){if(&quot;path&quot;===r.type){var a=function(t){return t},o=a,s=a;D?j(&quot;xanchor&quot;,r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&amp;&amp;&quot;date&quot;===V.type&amp;&amp;(o=h.encodeDate(o))),R?j(&quot;yanchor&quot;,r.yanchor=W(w+i)):(s=function(t){return W(H(t)+i)},U&amp;&amp;&quot;date&quot;===U.type&amp;&amp;(s=h.encodeDate(s))),j(&quot;path&quot;,r.path=m(z,o,s))}else D?j(&quot;xanchor&quot;,r.xanchor=G(_+n)):(j(&quot;x0&quot;,r.x0=G(v+n)),j(&quot;x1&quot;,r.x1=G(x+n))),R?j(&quot;yanchor&quot;,r.yanchor=W(w+i)):(j(&quot;y0&quot;,r.y0=W(y+i)),j(&quot;y1&quot;,r.y1=W(b+i)));e.attr(&quot;d&quot;,g(t,r)),K(p,r)}function J(n,i){if(F){var a=function(t){return t},o=a,s=a;D?j(&quot;xanchor&quot;,r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&amp;&amp;&quot;date&quot;===V.type&amp;&amp;(o=h.encodeDate(o))),R?j(&quot;yanchor&quot;,r.yanchor=W(w+i)):(s=function(t){return W(H(t)+i)},U&amp;&amp;&quot;date&quot;===U.type&amp;&amp;(s=h.encodeDate(s))),j(&quot;path&quot;,r.path=m(z,o,s))}else if(B){if(&quot;resize-over-start-point&quot;===P){var l=v+n,c=R?y-i:y+i;j(&quot;x0&quot;,r.x0=D?l:G(l)),j(&quot;y0&quot;,r.y0=R?c:W(c))}else if(&quot;resize-over-end-point&quot;===P){var u=x+n,f=R?b-i:b+i;j(&quot;x1&quot;,r.x1=D?u:G(u)),j(&quot;y1&quot;,r.y1=R?f:W(f))}}else{var d=~P.indexOf(&quot;n&quot;)?k+i:k,N=~P.indexOf(&quot;s&quot;)?M+i:M,Y=~P.indexOf(&quot;w&quot;)?A+n:A,X=~P.indexOf(&quot;e&quot;)?T+n:T;~P.indexOf(&quot;n&quot;)&amp;&amp;R&amp;&amp;(d=k-i),~P.indexOf(&quot;s&quot;)&amp;&amp;R&amp;&amp;(N=M-i),(!R&amp;&amp;N-d&gt;I||R&amp;&amp;d-N&gt;I)&amp;&amp;(j(S,r[S]=R?d:W(d)),j(E,r[E]=R?N:W(N))),X-Y&gt;O&amp;&amp;(j(C,r[C]=D?Y:G(Y)),j(L,r[L]=D?X:G(X)))}e.attr(&quot;d&quot;,g(t,r)),K(p,r)}function K(t,e){(D||R)&amp;&amp;function(){var r=&quot;path&quot;!==e.type,n=t.selectAll(&quot;.visual-cue&quot;).data([0]);n.enter().append(&quot;path&quot;).attr({fill:&quot;#fff&quot;,&quot;fill-rule&quot;:&quot;evenodd&quot;,stroke:&quot;#000&quot;,&quot;stroke-width&quot;:1}).classed(&quot;visual-cue&quot;,!0);var a=q(D?e.xanchor:i.midRange(r?[e.x0,e.x1]:h.extractPathCoords(e.path,f.paramIsX))),o=H(R?e.yanchor:i.midRange(r?[e.y0,e.y1]:h.extractPathCoords(e.path,f.paramIsY)));if(a=h.roundPositionForSharpStrokeRendering(a,1),o=h.roundPositionForSharpStrokeRendering(o,1),D&amp;&amp;R){var s=&quot;M&quot;+(a-1-1)+&quot;,&quot;+(o-1-1)+&quot;h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z&quot;;n.attr(&quot;d&quot;,s)}else if(D){var l=&quot;M&quot;+(a-1-1)+&quot;,&quot;+(o-9-1)+&quot;v18 h2 v-18 Z&quot;;n.attr(&quot;d&quot;,l)}else{var c=&quot;M&quot;+(a-9-1)+&quot;,&quot;+(o-1-1)+&quot;h18 v2 h-18 Z&quot;;n.attr(&quot;d&quot;,c)}}()}function Q(t){t.selectAll(&quot;.visual-cue&quot;).remove()}c.init(X),Y.node().onmousemove=Z}(t,x,r,e,p)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,&quot;&quot;);t.call(s.setClipUrl,n?&quot;clip&quot;+e._fullLayout._uid+n:null)}function g(t,e){var r,n,o,s,l,c,u,p,d=e.type,g=a.getFromId(t,e.xref),m=a.getFromId(t,e.yref),v=t._fullLayout._size;if(g?(r=h.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return v.l+v.w*t},m?(o=h.shapePositionToRange(m),s=function(t){return m._offset+m.r2p(o(t,!0))}):s=function(t){return v.t+v.h*(1-t)},&quot;path&quot;===d)return g&amp;&amp;&quot;date&quot;===g.type&amp;&amp;(n=h.decodeDate(n)),m&amp;&amp;&quot;date&quot;===m.type&amp;&amp;(s=h.decodeDate(s)),function(t,e,r){var n=t.path,a=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(f.segmentRE,function(t){var n=0,c=t.charAt(0),u=f.paramIsX[c],h=f.paramIsY[c],p=f.numParams[c],d=t.substr(1).replace(f.paramRE,function(t){return u[n]?t=&quot;pixel&quot;===a?e(s)+Number(t):e(t):h[n]&amp;&amp;(t=&quot;pixel&quot;===o?r(l)-Number(t):r(t)),++n&gt;p&amp;&amp;(t=&quot;X&quot;),t});return n&gt;p&amp;&amp;(d=d.replace(/[\s,]*X.*/,&quot;&quot;),i.log(&quot;Ignoring extra params in segment &quot;+t)),c+d})}(e,n,s);if(&quot;pixel&quot;===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if(&quot;pixel&quot;===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,p=x-e.y1}else u=s(e.y0),p=s(e.y1);if(&quot;line&quot;===d)return&quot;M&quot;+l+&quot;,&quot;+u+&quot;L&quot;+c+&quot;,&quot;+p;if(&quot;rect&quot;===d)return&quot;M&quot;+l+&quot;,&quot;+u+&quot;H&quot;+c+&quot;V&quot;+p+&quot;H&quot;+l+&quot;Z&quot;;var b=(l+c)/2,_=(u+p)/2,w=Math.abs(b-l),k=Math.abs(_-u),M=&quot;A&quot;+w+&quot;,&quot;+k,A=b+w+&quot;,&quot;+_;return&quot;M&quot;+A+M+&quot; 0 1,1 &quot;+(b+&quot;,&quot;+(_-k))+M+&quot; 0 0,1 &quot;+A+&quot;Z&quot;}function m(t,e,r){return t.replace(f.segmentRE,function(t){var n=0,i=t.charAt(0),a=f.paramIsX[i],o=f.paramIsY[i],s=f.numParams[i];return i+t.substr(1).replace(f.paramRE,function(t){return n&gt;=s?t:(a[n]?t=e(t):o[n]&amp;&amp;(t=r(t)),n++,t)})})}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll(&quot;path&quot;).remove(),e._shapeLowerLayer.selectAll(&quot;path&quot;).remove(),e._plots){var n=e._plots[r].shapelayer;n&amp;&amp;n.selectAll(&quot;path&quot;).remove()}for(var i=0;i&lt;e.shapes.length;i++)e.shapes[i].visible&amp;&amp;p(t,i)},drawOne:p}},{&quot;../../lib&quot;:693,&quot;../../lib/setcursor&quot;:714,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../dragelement&quot;:589,&quot;../drawing&quot;:592,&quot;./constants&quot;:648,&quot;./helpers&quot;:651}],651:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;),i=t(&quot;../../lib&quot;);r.rangeToShapePosition=function(t){return&quot;log&quot;===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return&quot;log&quot;===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&amp;&amp;(e=e.replace(&quot;_&quot;,&quot; &quot;)),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(&quot; &quot;,&quot;_&quot;)}},r.extractPathCoords=function(t,e){var r=[];return t.match(n.segmentRE).forEach(function(t){var a=e[t.charAt(0)].drawn;if(void 0!==a){var o=t.substr(1).match(n.paramRE);!o||o.length&lt;a||r.push(i.cleanNumber(o[a]))}}),r},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},&quot;date&quot;===e.type&amp;&amp;(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i},r.roundPositionForSharpStrokeRendering=function(t,e){var r=1===Math.round(e%2),n=Math.round(t);return r?n+.5:n}},{&quot;../../lib&quot;:693,&quot;./constants&quot;:648}],652:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./draw&quot;);e.exports={moduleType:&quot;component&quot;,name:&quot;shapes&quot;,layoutAttributes:t(&quot;./attributes&quot;),supplyLayoutDefaults:t(&quot;./defaults&quot;),includeBasePlot:t(&quot;../../plots/cartesian/include_components&quot;)(&quot;shapes&quot;),calcAutorange:t(&quot;./calc_autorange&quot;),draw:n.draw,drawOne:n.drawOne}},{&quot;../../plots/cartesian/include_components&quot;:752,&quot;./attributes&quot;:646,&quot;./calc_autorange&quot;:647,&quot;./defaults&quot;:649,&quot;./draw&quot;:650}],653:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;),i=t(&quot;../../plots/pad_attributes&quot;),a=t(&quot;../../lib/extend&quot;).extendDeepAll,o=t(&quot;../../plot_api/edit_types&quot;).overrideAll,s=t(&quot;../../plots/animation_attributes&quot;),l=t(&quot;../../plot_api/plot_template&quot;).templatedArray,c=t(&quot;./constants&quot;),u=l(&quot;step&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0},method:{valType:&quot;enumerated&quot;,values:[&quot;restyle&quot;,&quot;relayout&quot;,&quot;animate&quot;,&quot;update&quot;,&quot;skip&quot;],dflt:&quot;restyle&quot;},args:{valType:&quot;info_array&quot;,freeLength:!0,items:[{valType:&quot;any&quot;},{valType:&quot;any&quot;},{valType:&quot;any&quot;}]},label:{valType:&quot;string&quot;},value:{valType:&quot;string&quot;},execute:{valType:&quot;boolean&quot;,dflt:!0}});e.exports=o(l(&quot;slider&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0},active:{valType:&quot;number&quot;,min:0,dflt:0},steps:u,lenmode:{valType:&quot;enumerated&quot;,values:[&quot;fraction&quot;,&quot;pixels&quot;],dflt:&quot;fraction&quot;},len:{valType:&quot;number&quot;,min:0,dflt:1},x:{valType:&quot;number&quot;,min:-2,max:3,dflt:0},pad:a({},i,{},{t:{dflt:20}}),xanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;left&quot;},y:{valType:&quot;number&quot;,min:-2,max:3,dflt:0},yanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;top&quot;},transition:{duration:{valType:&quot;number&quot;,min:0,dflt:150},easing:{valType:&quot;enumerated&quot;,values:s.transition.easing.values,dflt:&quot;cubic-in-out&quot;}},currentvalue:{visible:{valType:&quot;boolean&quot;,dflt:!0},xanchor:{valType:&quot;enumerated&quot;,values:[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;left&quot;},offset:{valType:&quot;number&quot;,dflt:10},prefix:{valType:&quot;string&quot;},suffix:{valType:&quot;string&quot;},font:n({})},font:n({}),activebgcolor:{valType:&quot;color&quot;,dflt:c.gripBgActiveColor},bgcolor:{valType:&quot;color&quot;,dflt:c.railBgColor},bordercolor:{valType:&quot;color&quot;,dflt:c.railBorderColor},borderwidth:{valType:&quot;number&quot;,min:0,dflt:c.railBorderWidth},ticklen:{valType:&quot;number&quot;,min:0,dflt:c.tickLength},tickcolor:{valType:&quot;color&quot;,dflt:c.tickColor},tickwidth:{valType:&quot;number&quot;,min:0,dflt:1},minorticklen:{valType:&quot;number&quot;,min:0,dflt:c.minorTickLength}}),&quot;arraydraw&quot;,&quot;from-root&quot;)},{&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/animation_attributes&quot;:737,&quot;../../plots/font_attributes&quot;:768,&quot;../../plots/pad_attributes&quot;:804,&quot;./constants&quot;:654}],654:[function(t,e,r){&quot;use strict&quot;;e.exports={name:&quot;sliders&quot;,containerClassName:&quot;slider-container&quot;,groupClassName:&quot;slider-group&quot;,inputAreaClass:&quot;slider-input-area&quot;,railRectClass:&quot;slider-rail-rect&quot;,railTouchRectClass:&quot;slider-rail-touch-rect&quot;,gripRectClass:&quot;slider-grip-rect&quot;,tickRectClass:&quot;slider-tick-rect&quot;,inputProxyClass:&quot;slider-input-proxy&quot;,labelsClass:&quot;slider-labels&quot;,labelGroupClass:&quot;slider-label-group&quot;,labelClass:&quot;slider-label&quot;,currentValueClass:&quot;slider-current-value&quot;,railHeight:5,menuIndexAttrName:&quot;slider-active-index&quot;,autoMarginIdRoot:&quot;slider-&quot;,minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:&quot;#bec8d9&quot;,railBgColor:&quot;#f8fafc&quot;,railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:&quot;#bec8d9&quot;,gripBgColor:&quot;#f6f8fa&quot;,gripBgActiveColor:&quot;#dbdde0&quot;,labelPadding:8,labelOffset:0,tickWidth:1,tickColor:&quot;#333&quot;,tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:&quot;#333&quot;,minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],655:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/array_container_defaults&quot;),a=t(&quot;./attributes&quot;),o=t(&quot;./constants&quot;).name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:&quot;steps&quot;,handleItemDefaults:c}),l=0,u=0;u&lt;s.length;u++)s[u].visible&amp;&amp;l++;if(l&lt;2?e.visible=!1:o(&quot;visible&quot;)){e._stepCount=l;var f=e._visibleSteps=n.filterVisible(s);(s[o(&quot;active&quot;)]||{}).visible||(e.active=f[0]._index),o(&quot;x&quot;),o(&quot;y&quot;),n.noneOrAll(t,e,[&quot;x&quot;,&quot;y&quot;]),o(&quot;xanchor&quot;),o(&quot;yanchor&quot;),o(&quot;len&quot;),o(&quot;lenmode&quot;),o(&quot;pad.t&quot;),o(&quot;pad.r&quot;),o(&quot;pad.b&quot;),o(&quot;pad.l&quot;),n.coerceFont(o,&quot;font&quot;,r.font),o(&quot;currentvalue.visible&quot;)&amp;&amp;(o(&quot;currentvalue.xanchor&quot;),o(&quot;currentvalue.prefix&quot;),o(&quot;currentvalue.suffix&quot;),o(&quot;currentvalue.offset&quot;),n.coerceFont(o,&quot;currentvalue.font&quot;,e.font)),o(&quot;transition.duration&quot;),o(&quot;transition.easing&quot;),o(&quot;bgcolor&quot;),o(&quot;activebgcolor&quot;),o(&quot;bordercolor&quot;),o(&quot;borderwidth&quot;),o(&quot;ticklen&quot;),o(&quot;tickwidth&quot;),o(&quot;tickcolor&quot;),o(&quot;minorticklen&quot;)}}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if(&quot;skip&quot;===t.method||Array.isArray(t.args)?r(&quot;visible&quot;):e.visible=!1){r(&quot;method&quot;),r(&quot;args&quot;);var i=r(&quot;label&quot;,&quot;step-&quot;+e._index);r(&quot;value&quot;,i),r(&quot;execute&quot;)}}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;./attributes&quot;:653,&quot;./constants&quot;:654}],656:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../plots/plots&quot;),a=t(&quot;../color&quot;),o=t(&quot;../drawing&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../lib/svg_text_utils&quot;),c=t(&quot;../legend/anchor_utils&quot;),u=t(&quot;../../plot_api/plot_template&quot;).arrayEditor,f=t(&quot;./constants&quot;),h=t(&quot;../../constants/alignment&quot;),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR;function m(t){return f.autoMarginIdRoot+t._index}function v(t){return t._index}function y(t,e){var r=o.tester.selectAll(&quot;g.&quot;+f.labelGroupClass).data(e._visibleSteps);r.enter().append(&quot;g&quot;).classed(f.labelGroupClass,!0);var a=0,s=0;r.each(function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);s=Math.max(s,i.height),a=Math.max(a,i.width)}}),r.remove();var u=e._dims={};u.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var h=t._fullLayout._size;u.lx=h.l+h.w*e.x,u.ly=h.t+h.h*(1-e.y),&quot;fraction&quot;===e.lenmode?u.outerLength=Math.round(h.w*e.len):u.outerLength=e.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-e.pad.l-e.pad.r);var p=(u.inputAreaLength-2*f.stepInset)/(e._stepCount-1),v=a+f.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(v/p)),u.labelHeight=s,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,e.currentvalue.visible){var y=o.tester.append(&quot;g&quot;);r.each(function(t){var r=x(y,e,t.label),n=r.node()&amp;&amp;o.bBox(r.node())||{width:0,height:0},i=l.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)}),u.currentValueTotalHeight=u.currentValueHeight+e.currentvalue.offset,y.remove()}u.height=u.currentValueTotalHeight+f.tickOffset+e.ticklen+f.labelOffset+u.labelHeight+e.pad.t+e.pad.b;var b=&quot;left&quot;;c.isRightAnchor(e)&amp;&amp;(u.lx-=u.outerLength,b=&quot;right&quot;),c.isCenterAnchor(e)&amp;&amp;(u.lx-=u.outerLength/2,b=&quot;center&quot;);var w=&quot;top&quot;;c.isBottomAnchor(e)&amp;&amp;(u.ly-=u.height,w=&quot;bottom&quot;),c.isMiddleAnchor(e)&amp;&amp;(u.ly-=u.height/2,w=&quot;middle&quot;),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var k={y:e.y,b:u.height*g[w],t:u.height*d[w]};&quot;fraction&quot;===e.lenmode?(k.l=0,k.xl=e.x-e.len*d[b],k.r=0,k.xr=e.x+e.len*g[b]):(k.x=e.x,k.l=u.outerLength*d[b],k.r=u.outerLength*g[b]),i.autoMargin(t,m(e),k)}function x(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case&quot;right&quot;:n=a.inputAreaLength-f.currentValueInset-a.currentValueMaxWidth,i=&quot;left&quot;;break;case&quot;center&quot;:n=.5*a.inputAreaLength,i=&quot;middle&quot;;break;default:n=f.currentValueInset,i=&quot;left&quot;}var c=s.ensureSingle(t,&quot;text&quot;,f.labelClass,function(t){t.classed(&quot;user-select-none&quot;,!0).attr({&quot;text-anchor&quot;:i,&quot;data-notex&quot;:1})}),u=e.currentvalue.prefix?e.currentvalue.prefix:&quot;&quot;;if(&quot;string&quot;==typeof r)u+=r;else u+=e.steps[e.active].label;e.currentvalue.suffix&amp;&amp;(u+=e.currentvalue.suffix),c.call(o.font,e.currentvalue.font).text(u).call(l.convertToTspans,e._gd);var h=l.lineCount(c),d=(a.currentValueMaxLines+1-h)*e.currentvalue.font.size*p;return l.positionText(c,n,d),c}}function b(t,e,r){s.ensureSingle(t,&quot;rect&quot;,f.gripRectClass,function(n){n.call(A,e,t,r).style(&quot;pointer-events&quot;,&quot;all&quot;)}).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style(&quot;stroke-width&quot;,r.borderwidth+&quot;px&quot;)}function _(t,e,r){var n=s.ensureSingle(t,&quot;text&quot;,f.labelClass,function(t){t.classed(&quot;user-select-none&quot;,!0).attr({&quot;text-anchor&quot;:&quot;middle&quot;,&quot;data-notex&quot;:1})});return n.call(o.font,r.font).text(e.step.label).call(l.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,&quot;g&quot;,f.labelsClass),i=e._dims,a=r.selectAll(&quot;g.&quot;+f.labelGroupClass).data(i.labelSteps);a.enter().append(&quot;g&quot;).classed(f.labelGroupClass,!0),a.exit().remove(),a.each(function(t){var r=n.select(this);r.call(_,t,e),o.setTranslate(r,E(e,t.fraction),f.tickOffset+e.ticklen+e.font.size*p+f.labelOffset+i.currentValueTotalHeight)})}function k(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&amp;&amp;M(t,e,r,o,!0,i)}function M(t,e,r,n,a,o){var s=r.active;r.active=n,u(t.layout,f.name,r).applyUpdate(&quot;active&quot;,n);var l=r.steps[r.active];e.call(S,r,o),e.call(x,r),t.emit(&quot;plotly_sliderchange&quot;,{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&amp;&amp;l.method&amp;&amp;a&amp;&amp;(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&amp;&amp;(r.execute&amp;&amp;i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function A(t,e,r){var i=r.node(),o=n.select(e);function s(){return r.data()[0]}t.on(&quot;mousedown&quot;,function(){var t=s();e.emit(&quot;plotly_sliderstart&quot;,{slider:t});var l=r.select(&quot;.&quot;+f.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(a.fill,t.activebgcolor);var c=C(t,n.mouse(i)[0]);k(e,r,t,c,!0),t._dragging=!0,o.on(&quot;mousemove&quot;,function(){var t=s(),a=C(t,n.mouse(i)[0]);k(e,r,t,a,!1)}),o.on(&quot;mouseup&quot;,function(){var t=s();t._dragging=!1,l.call(a.fill,t.bgcolor),o.on(&quot;mouseup&quot;,null),o.on(&quot;mousemove&quot;,null),e.emit(&quot;plotly_sliderend&quot;,{slider:t,step:t.steps[t.active]})})})}function T(t,e){var r=t.selectAll(&quot;rect.&quot;+f.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append(&quot;rect&quot;).classed(f.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+&quot;px&quot;,&quot;shape-rendering&quot;:&quot;crispEdges&quot;}),r.each(function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(a.fill,e.tickcolor),o.setTranslate(l,E(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?f.tickOffset:f.minorTickOffset)+i.currentValueTotalHeight)})}function S(t,e,r){for(var n=t.select(&quot;rect.&quot;+f.gripRectClass),i=0,a=0;a&lt;e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=E(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&amp;&amp;e.transition.duration&gt;0&amp;&amp;(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(&quot;transform&quot;,&quot;translate(&quot;+(o-.5*f.gripWidth)+&quot;,&quot;+e._dims.currentValueTotalHeight+&quot;)&quot;)}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function C(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,&quot;rect&quot;,f.railTouchRectClass,function(n){n.call(A,e,t,r).style(&quot;pointer-events&quot;,&quot;all&quot;)});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr(&quot;opacity&quot;,0),o.setTranslate(i,0,n.currentValueTotalHeight)}function z(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,&quot;rect&quot;,f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,&quot;shape-rendering&quot;:&quot;crispEdges&quot;}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(&quot;stroke-width&quot;,e.borderwidth+&quot;px&quot;),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[f.name],n=[],i=0;i&lt;r.length;i++){var a=r[i];a.visible&amp;&amp;(a._gd=e,n.push(a))}return n}(e,t),a=e._infolayer.selectAll(&quot;g.&quot;+f.containerClassName).data(r.length&gt;0?[0]:[]);function s(e){e._commandObserver&amp;&amp;(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(e))}if(a.enter().append(&quot;g&quot;).classed(f.containerClassName,!0).style(&quot;cursor&quot;,&quot;ew-resize&quot;),a.exit().each(function(){n.select(this).selectAll(&quot;g.&quot;+f.groupClassName).each(s)}).remove(),0!==r.length){var l=a.selectAll(&quot;g.&quot;+f.groupClassName).data(r,v);l.enter().append(&quot;g&quot;).classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c&lt;r.length;c++){var u=r[c];y(t,u)}l.each(function(e){var r=n.select(this);!function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n&lt;r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})}(e),i.manageCommandObserver(t,e,e._visibleSteps,function(e){var n=r.data()[0];n.active!==e.index&amp;&amp;(n._dragging||M(t,r,n,e.index,!1,!0))}),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index);e.call(x,r).call(z,r).call(w,r).call(T,r).call(L,t,r).call(b,t,r);var n=r._dims;o.setTranslate(e,n.lx+r.pad.l,n.ly+r.pad.t),e.call(S,r,!1),e.call(x,r)}(t,n.select(this),e)})}}},{&quot;../../constants/alignment&quot;:665,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/plots&quot;:805,&quot;../color&quot;:567,&quot;../drawing&quot;:592,&quot;../legend/anchor_utils&quot;:619,&quot;./constants&quot;:654,d3:147}],657:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;);e.exports={moduleType:&quot;component&quot;,name:n.name,layoutAttributes:t(&quot;./attributes&quot;),supplyLayoutDefaults:t(&quot;./defaults&quot;),draw:t(&quot;./draw&quot;)}},{&quot;./attributes&quot;:653,&quot;./constants&quot;:654,&quot;./defaults&quot;:655,&quot;./draw&quot;:656}],658:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../../plots/plots&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../drawing&quot;),c=t(&quot;../color&quot;),u=t(&quot;../../lib/svg_text_utils&quot;),f=t(&quot;../../constants/interactions&quot;);e.exports={draw:function(t,e,r){var p,d=r.propContainer,g=r.propName,m=r.placeholder,v=r.traceIndex,y=r.avoid||{},x=r.attributes,b=r.transform,_=r.containerGroup,w=t._fullLayout,k=d.titlefont||{},M=k.family,A=k.size,T=k.color,S=1,E=!1,C=(d.title||&quot;&quot;).trim();&quot;title&quot;===g?p=&quot;titleText&quot;:-1!==g.indexOf(&quot;axis&quot;)?p=&quot;axisTitleText&quot;:g.indexOf(!0)&amp;&amp;(p=&quot;colorbarTitleText&quot;);var L=t._context.edits[p];&quot;&quot;===C?S=0:C.replace(h,&quot; % &quot;)===m.replace(h,&quot; % &quot;)&amp;&amp;(S=.2,E=!0,L||(C=&quot;&quot;));var z=C||L;_||(_=s.ensureSingle(w._infolayer,&quot;g&quot;,&quot;g-&quot;+e));var P=_.selectAll(&quot;text&quot;).data(z?[0]:[]);if(P.enter().append(&quot;text&quot;),P.text(C).attr(&quot;class&quot;,e),P.exit().remove(),!z)return _;function O(t){s.syncOrAsync([I,D],t)}function I(e){var r;return b?(r=&quot;&quot;,b.rotate&amp;&amp;(r+=&quot;rotate(&quot;+[b.rotate,x.x,x.y]+&quot;)&quot;),b.offset&amp;&amp;(r+=&quot;translate(0, &quot;+b.offset+&quot;)&quot;)):r=null,e.attr(&quot;transform&quot;,r),e.style({&quot;font-family&quot;:M,&quot;font-size&quot;:n.round(A,2)+&quot;px&quot;,fill:c.rgb(T),opacity:S*c.opacity(T),&quot;font-weight&quot;:a.fontWeight}).attr(x).call(u.convertToTspans,t),a.previousPromises(t)}function D(t){var e=n.select(t.node().parentNode);if(y&amp;&amp;y.selection&amp;&amp;y.side&amp;&amp;C){e.attr(&quot;transform&quot;,null);var r=0,a={left:&quot;right&quot;,right:&quot;left&quot;,top:&quot;bottom&quot;,bottom:&quot;top&quot;}[y.side],o=-1!==[&quot;left&quot;,&quot;top&quot;].indexOf(y.side)?-1:1,c=i(y.pad)?y.pad:2,u=l.bBox(e.node()),f={left:0,top:0,right:w.width,bottom:w.height},h=y.maxShift||(f[y.side]-u[y.side])*(&quot;left&quot;===y.side||&quot;top&quot;===y.side?-1:1);if(h&lt;0)r=h;else{var p=y.offsetLeft||0,d=y.offsetTop||0;u.left-=p,u.right-=p,u.top-=d,u.bottom-=d,y.selection.each(function(){var t=l.bBox(this);s.bBoxIntersect(u,t,c)&amp;&amp;(r=Math.max(r,o*(t[y.side]-u[a])+c))}),r=Math.min(h,r)}if(r&gt;0||h&lt;0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[y.side];e.attr(&quot;transform&quot;,&quot;translate(&quot;+g+&quot;)&quot;)}}}P.call(O),L&amp;&amp;(C?P.on(&quot;.opacity&quot;,null):(S=0,E=!0,P.text(m).on(&quot;mouseover.opacity&quot;,function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style(&quot;opacity&quot;,1)}).on(&quot;mouseout.opacity&quot;,function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style(&quot;opacity&quot;,0)})),P.call(u.makeEditable,{gd:t}).on(&quot;edit&quot;,function(e){void 0!==v?o.call(&quot;restyle&quot;,t,g,e,v):o.call(&quot;relayout&quot;,t,g,e)}).on(&quot;cancel&quot;,function(){this.text(this.attr(&quot;data-unformatted&quot;)).call(O)}).on(&quot;input&quot;,function(t){this.text(t||&quot; &quot;).call(u.positionText,x.x,x.y)}));return P.classed(&quot;js-placeholder&quot;,E),_}};var h=/ [XY][0-9]* /},{&quot;../../constants/interactions&quot;:669,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825,&quot;../color&quot;:567,&quot;../drawing&quot;:592,d3:147,&quot;fast-isnumeric&quot;:213}],659:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;),i=t(&quot;../color/attributes&quot;),a=t(&quot;../../lib/extend&quot;).extendFlat,o=t(&quot;../../plot_api/edit_types&quot;).overrideAll,s=t(&quot;../../plots/pad_attributes&quot;),l=t(&quot;../../plot_api/plot_template&quot;).templatedArray,c=l(&quot;button&quot;,{visible:{valType:&quot;boolean&quot;},method:{valType:&quot;enumerated&quot;,values:[&quot;restyle&quot;,&quot;relayout&quot;,&quot;animate&quot;,&quot;update&quot;,&quot;skip&quot;],dflt:&quot;restyle&quot;},args:{valType:&quot;info_array&quot;,freeLength:!0,items:[{valType:&quot;any&quot;},{valType:&quot;any&quot;},{valType:&quot;any&quot;}]},label:{valType:&quot;string&quot;,dflt:&quot;&quot;},execute:{valType:&quot;boolean&quot;,dflt:!0}});e.exports=o(l(&quot;updatemenu&quot;,{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:&quot;boolean&quot;},type:{valType:&quot;enumerated&quot;,values:[&quot;dropdown&quot;,&quot;buttons&quot;],dflt:&quot;dropdown&quot;},direction:{valType:&quot;enumerated&quot;,values:[&quot;left&quot;,&quot;right&quot;,&quot;up&quot;,&quot;down&quot;],dflt:&quot;down&quot;},active:{valType:&quot;integer&quot;,min:-1,dflt:0},showactive:{valType:&quot;boolean&quot;,dflt:!0},buttons:c,x:{valType:&quot;number&quot;,min:-2,max:3,dflt:-.05},xanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;left&quot;,&quot;center&quot;,&quot;right&quot;],dflt:&quot;right&quot;},y:{valType:&quot;number&quot;,min:-2,max:3,dflt:1},yanchor:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],dflt:&quot;top&quot;},pad:a({},s,{}),font:n({}),bgcolor:{valType:&quot;color&quot;},bordercolor:{valType:&quot;color&quot;,dflt:i.borderLine},borderwidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;arraydraw&quot;}}),&quot;arraydraw&quot;,&quot;from-root&quot;)},{&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/font_attributes&quot;:768,&quot;../../plots/pad_attributes&quot;:804,&quot;../color/attributes&quot;:566}],660:[function(t,e,r){&quot;use strict&quot;;e.exports={name:&quot;updatemenus&quot;,containerClassName:&quot;updatemenu-container&quot;,headerGroupClassName:&quot;updatemenu-header-group&quot;,headerClassName:&quot;updatemenu-header&quot;,headerArrowClassName:&quot;updatemenu-header-arrow&quot;,dropdownButtonGroupClassName:&quot;updatemenu-dropdown-button-group&quot;,dropdownButtonClassName:&quot;updatemenu-dropdown-button&quot;,buttonClassName:&quot;updatemenu-button&quot;,itemRectClassName:&quot;updatemenu-item-rect&quot;,itemTextClassName:&quot;updatemenu-item-text&quot;,menuIndexAttrName:&quot;updatemenu-active-index&quot;,autoMarginIdRoot:&quot;updatemenu-&quot;,blankHeaderOpts:{label:&quot;  &quot;},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:&quot;#F4FAFF&quot;,hoverColor:&quot;#F4FAFF&quot;,arrowSymbol:{left:&quot;\u25c4&quot;,right:&quot;\u25ba&quot;,up:&quot;\u25b2&quot;,down:&quot;\u25bc&quot;}}},{}],661:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/array_container_defaults&quot;),a=t(&quot;./attributes&quot;),o=t(&quot;./constants&quot;).name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o(&quot;visible&quot;,i(t,e,{name:&quot;buttons&quot;,handleItemDefaults:c}).length&gt;0)&amp;&amp;(o(&quot;active&quot;),o(&quot;direction&quot;),o(&quot;type&quot;),o(&quot;showactive&quot;),o(&quot;x&quot;),o(&quot;y&quot;),n.noneOrAll(t,e,[&quot;x&quot;,&quot;y&quot;]),o(&quot;xanchor&quot;),o(&quot;yanchor&quot;),o(&quot;pad.t&quot;),o(&quot;pad.r&quot;),o(&quot;pad.b&quot;),o(&quot;pad.l&quot;),n.coerceFont(o,&quot;font&quot;,r.font),o(&quot;bgcolor&quot;,r.paper_bgcolor),o(&quot;bordercolor&quot;),o(&quot;borderwidth&quot;))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r(&quot;visible&quot;,&quot;skip&quot;===t.method||Array.isArray(t.args))&amp;&amp;(r(&quot;method&quot;),r(&quot;args&quot;),r(&quot;label&quot;),r(&quot;execute&quot;))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;./attributes&quot;:659,&quot;./constants&quot;:660}],662:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../plots/plots&quot;),a=t(&quot;../color&quot;),o=t(&quot;../drawing&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../lib/svg_text_utils&quot;),c=t(&quot;../legend/anchor_utils&quot;),u=t(&quot;../../plot_api/plot_template&quot;).arrayEditor,f=t(&quot;../../constants/alignment&quot;).LINE_SPACING,h=t(&quot;./constants&quot;),p=t(&quot;./scrollbox&quot;);function d(t){return t._index}function g(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function m(t,e,r,n,i,a,o,s){e.active=o,u(t.layout,h.name,e).applyUpdate(&quot;active&quot;,o),&quot;buttons&quot;===e.type?y(t,n,null,null,e):&quot;dropdown&quot;===e.type&amp;&amp;(i.attr(h.menuIndexAttrName,&quot;-1&quot;),v(t,n,i,a,e),s||y(t,n,i,a,e))}function v(t,e,r,n,i){var a=s.ensureSingle(e,&quot;g&quot;,h.headerClassName,function(t){t.style(&quot;pointer-events&quot;,&quot;all&quot;)}),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(x,i,u,t).call(S,i,f,p),s.ensureSingle(e,&quot;text&quot;,h.headerArrowClassName,function(t){t.classed(&quot;user-select-none&quot;,!0).attr(&quot;text-anchor&quot;,&quot;end&quot;).call(o.font,i.font).text(h.arrowSymbol[i.direction])}).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),a.on(&quot;click&quot;,function(){r.call(E,String(g(r,i)?-1:i._index)),y(t,e,r,n,i)}),a.on(&quot;mouseover&quot;,function(){a.call(k)}),a.on(&quot;mouseout&quot;,function(){a.call(M,i)}),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr(&quot;pointer-events&quot;,&quot;all&quot;);var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&amp;&amp;&quot;buttons&quot;!==o.type?[]:o.buttons,c=&quot;dropdown&quot;===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll(&quot;g.&quot;+c).data(s.filterVisible(l)),f=u.enter().append(&quot;g&quot;).classed(c,!0),p=u.exit();&quot;dropdown&quot;===o.type?(f.attr(&quot;opacity&quot;,&quot;0&quot;).transition().attr(&quot;opacity&quot;,&quot;1&quot;),p.transition().attr(&quot;opacity&quot;,&quot;0&quot;).remove()):p.remove();var d=0,g=0,v=o._dims,y=-1!==[&quot;up&quot;,&quot;down&quot;].indexOf(o.direction);&quot;dropdown&quot;===o.type&amp;&amp;(y?g=v.headerHeight+h.gapButtonHeader:d=v.headerWidth+h.gapButtonHeader),&quot;dropdown&quot;===o.type&amp;&amp;&quot;up&quot;===o.direction&amp;&amp;(g=-h.gapButtonHeader+h.gapButton-v.openHeight),&quot;dropdown&quot;===o.type&amp;&amp;&quot;left&quot;===o.direction&amp;&amp;(d=-h.gapButtonHeader+h.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+g+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},_={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each(function(s,l){var c=n.select(this);c.call(x,o,s,t).call(S,o,b),c.on(&quot;click&quot;,function(){n.event.defaultPrevented||(m(t,o,0,e,r,a,l),s.execute&amp;&amp;i.executeAPICommand(t,s.method,s.args),t.emit(&quot;plotly_buttonclicked&quot;,{menu:o,button:s,active:o.active}))}),c.on(&quot;mouseover&quot;,function(){c.call(k)}),c.on(&quot;mouseout&quot;,function(){c.call(M,o),u.call(w,o)})}),u.call(w,o),y?(_.w=Math.max(v.openWidth,v.headerWidth),_.h=b.y-_.t):(_.w=b.x-_.l,_.h=Math.max(v.openHeight,v.headerHeight)),_.direction=o.direction,a&amp;&amp;(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u=&quot;up&quot;===c||&quot;down&quot;===c,f=i._dims,p=i.active;if(u)for(s=0,l=0;l&lt;p;l++)s+=f.heights[l]+h.gapButton;else for(o=0,l=0;l&lt;p;l++)o+=f.widths[l]+h.gapButton;n.enable(a,o,s),n.hbar&amp;&amp;n.hbar.attr(&quot;opacity&quot;,&quot;0&quot;).transition().attr(&quot;opacity&quot;,&quot;1&quot;);n.vbar&amp;&amp;n.vbar.attr(&quot;opacity&quot;,&quot;0&quot;).transition().attr(&quot;opacity&quot;,&quot;1&quot;)}(0,0,0,a,o,_):function(t){var e=!!t.hbar,r=!!t.vbar;e&amp;&amp;t.hbar.transition().attr(&quot;opacity&quot;,&quot;0&quot;).each(&quot;end&quot;,function(){e=!1,r||t.disable()});r&amp;&amp;t.vbar.transition().attr(&quot;opacity&quot;,&quot;0&quot;).each(&quot;end&quot;,function(){r=!1,e||t.disable()})}(a))}function x(t,e,r,n){t.call(b,e).call(_,e,r,n)}function b(t,e){s.ensureSingle(t,&quot;rect&quot;,h.itemRectClassName,function(t){t.attr({rx:h.rx,ry:h.ry,&quot;shape-rendering&quot;:&quot;crispEdges&quot;})}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(&quot;stroke-width&quot;,e.borderwidth+&quot;px&quot;)}function _(t,e,r,n){s.ensureSingle(t,&quot;text&quot;,h.itemTextClassName,function(t){t.classed(&quot;user-select-none&quot;,!0).attr({&quot;text-anchor&quot;:&quot;start&quot;,&quot;data-notex&quot;:1})}).call(o.font,e.font).text(r.label).call(l.convertToTspans,n)}function w(t,e){var r=e.active;t.each(function(t,i){var o=n.select(this);i===r&amp;&amp;e.showactive&amp;&amp;o.select(&quot;rect.&quot;+h.itemRectClassName).call(a.fill,h.activeColor)})}function k(t){t.select(&quot;rect.&quot;+h.itemRectClassName).call(a.fill,h.hoverColor)}function M(t,e){t.select(&quot;rect.&quot;+h.itemRectClassName).call(a.fill,e.bgcolor)}function A(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll(&quot;g.&quot;+h.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append(&quot;g&quot;).classed(h.dropdownButtonClassName,!0);var u=-1!==[&quot;up&quot;,&quot;down&quot;].indexOf(e.direction);a.each(function(i,a){var s=n.select(this);s.call(x,e,i,t);var c=s.select(&quot;.&quot;+h.itemTextClassName),p=c.node()&amp;&amp;o.bBox(c.node()).width,d=Math.max(p+h.textPadX,h.minWidth),g=e.font.size*f,m=l.lineCount(c),v=Math.max(g*m,h.minHeight)+h.textOffsetY;v=Math.ceil(v),d=Math.ceil(d),r.widths[a]=d,r.heights[a]=v,r.height1=Math.max(r.height1,v),r.width1=Math.max(r.width1,d),u?(r.totalWidth=Math.max(r.totalWidth,d),r.openWidth=r.totalWidth,r.totalHeight+=v+h.gapButton,r.openHeight+=v+h.gapButton):(r.totalWidth+=d+h.gapButton,r.openWidth+=d+h.gapButton,r.totalHeight=Math.max(r.totalHeight,v),r.openHeight=r.totalHeight)}),u?r.totalHeight-=h.gapButton:r.totalWidth-=h.gapButton,r.headerWidth=r.width1+h.arrowPadX,r.headerHeight=r.height1,&quot;dropdown&quot;===e.type&amp;&amp;(u?(r.width1+=h.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=h.arrowPadX),a.remove();var p=r.totalWidth+e.pad.l+e.pad.r,d=r.totalHeight+e.pad.t+e.pad.b,g=t._fullLayout._size;r.lx=g.l+g.w*e.x,r.ly=g.t+g.h*(1-e.y);var m=&quot;left&quot;;c.isRightAnchor(e)&amp;&amp;(r.lx-=p,m=&quot;right&quot;),c.isCenterAnchor(e)&amp;&amp;(r.lx-=p/2,m=&quot;center&quot;);var v=&quot;top&quot;;c.isBottomAnchor(e)&amp;&amp;(r.ly-=d,v=&quot;bottom&quot;),c.isMiddleAnchor(e)&amp;&amp;(r.ly-=d/2,v=&quot;middle&quot;),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),i.autoMargin(t,T(e),{x:e.x,y:e.y,l:p*({right:1,center:.5}[m]||0),r:p*({left:1,center:.5}[m]||0),b:d*({top:1,middle:.5}[v]||0),t:d*({bottom:1,middle:.5}[v]||0)})}function T(t){return h.autoMarginIdRoot+t._index}function S(t,e,r,n){n=n||{};var i=t.select(&quot;.&quot;+h.itemRectClassName),a=t.select(&quot;.&quot;+h.itemTextClassName),s=e.borderwidth,c=r.index,u=e._dims;o.setTranslate(t,s+r.x,s+r.y);var p=-1!==[&quot;up&quot;,&quot;down&quot;].indexOf(e.direction),d=n.height||(p?u.heights[c]:u.height1);i.attr({x:0,y:0,width:n.width||(p?u.width1:u.widths[c]),height:d});var g=e.font.size*f,m=(l.lineCount(a)-1)*g/2;l.positionText(a,h.textOffsetX,d/2-m+h.textOffsetY),p?r.y+=u.heights[c]+r.yPad:r.x+=u.widths[c]+r.xPad,r.index++}function E(t,e){t.attr(h.menuIndexAttrName,e||&quot;-1&quot;).selectAll(&quot;g.&quot;+h.dropdownButtonClassName).remove()}e.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[h.name]);function a(e){i.autoMargin(t,T(e))}var o=e._menulayer.selectAll(&quot;g.&quot;+h.containerClassName).data(r.length&gt;0?[0]:[]);if(o.enter().append(&quot;g&quot;).classed(h.containerClassName,!0).style(&quot;cursor&quot;,&quot;pointer&quot;),o.exit().each(function(){n.select(this).selectAll(&quot;g.&quot;+h.headerGroupClassName).each(a)}).remove(),0!==r.length){var l=o.selectAll(&quot;g.&quot;+h.headerGroupClassName).data(r,d);l.enter().append(&quot;g&quot;).classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,&quot;g&quot;,h.dropdownButtonGroupClassName,function(t){t.style(&quot;pointer-events&quot;,&quot;all&quot;)}),u=0;u&lt;r.length;u++){var f=r[u];A(t,f)}var x=&quot;updatemenus&quot;+e._uid,b=new p(t,c,x);l.enter().size()&amp;&amp;(c.node().parentNode.appendChild(c.node()),c.call(E)),l.exit().each(function(t){c.call(E),a(t)}).remove(),l.each(function(e){var r=n.select(this),a=&quot;dropdown&quot;===e.type?c:null;i.manageCommandObserver(t,e,e.buttons,function(n){m(t,e,e.buttons[n.index],r,a,b,n.index,!0)}),&quot;dropdown&quot;===e.type?(v(t,r,c,b,e),g(c,e)&amp;&amp;y(t,r,c,b,e)):y(t,r,null,null,e)})}}},{&quot;../../constants/alignment&quot;:665,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/plots&quot;:805,&quot;../color&quot;:567,&quot;../drawing&quot;:592,&quot;../legend/anchor_utils&quot;:619,&quot;./constants&quot;:660,&quot;./scrollbox&quot;:664,d3:147}],663:[function(t,e,r){arguments[4][657][0].apply(r,arguments)},{&quot;./attributes&quot;:659,&quot;./constants&quot;:660,&quot;./defaults&quot;:661,&quot;./draw&quot;:662,dup:657}],664:[function(t,e,r){&quot;use strict&quot;;e.exports=s;var n=t(&quot;d3&quot;),i=t(&quot;../color&quot;),a=t(&quot;../drawing&quot;),o=t(&quot;../../lib&quot;);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(&quot;rect.scrollbox-bg&quot;).data([0]),this.bg.exit().on(&quot;.drag&quot;,null).on(&quot;wheel&quot;,null).remove(),this.bg.enter().append(&quot;rect&quot;).classed(&quot;scrollbox-bg&quot;,!0).style(&quot;pointer-events&quot;,&quot;all&quot;).attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor=&quot;#808BA4&quot;,s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,c=o.height;this.position=t;var u,f,h,p,d=this.position.l,g=this.position.w,m=this.position.t,v=this.position.h,y=this.position.direction,x=&quot;down&quot;===y,b=&quot;left&quot;===y,_=&quot;up&quot;===y,w=g,k=v;x||b||&quot;right&quot;===y||_||(this.position.direction=&quot;down&quot;,x=!0),x||_?(f=(u=d)+w,x?(h=m,k=(p=Math.min(h+k,c))-h):k=(p=m+k)-(h=Math.max(p-k,0))):(p=(h=m)+k,b?w=(f=d+w)-(u=Math.max(f-w,0)):(u=d,w=(f=Math.min(u+w,l))-u)),this._box={l:u,t:h,w:w,h:k};var M=g&gt;w,A=s.barLength+2*s.barPad,T=s.barWidth+2*s.barPad,S=d,E=m+v;E+T&gt;c&amp;&amp;(E=c-T);var C=this.container.selectAll(&quot;rect.scrollbar-horizontal&quot;).data(M?[0]:[]);C.exit().on(&quot;.drag&quot;,null).remove(),C.enter().append(&quot;rect&quot;).classed(&quot;scrollbar-horizontal&quot;,!0).call(i.fill,s.barColor),M?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:T}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v&gt;k,z=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,O=d+g,I=m;O+z&gt;l&amp;&amp;(O=l-z);var D=this.container.selectAll(&quot;rect.scrollbar-vertical&quot;).data(L?[0]:[]);D.exit().on(&quot;.drag&quot;,null).remove(),D.enter().append(&quot;rect&quot;).classed(&quot;scrollbar-vertical&quot;,!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:I,width:z,height:P}),this._vbarYMin=I+P/2,this._vbarTranslateMax=k-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,B=u-.5,F=L?f+z+.5:f+.5,N=h-.5,j=M?p+T+.5:p+.5,V=o._topdefs.selectAll(&quot;#&quot;+R).data(M||L?[0]:[]);if(V.exit().remove(),V.enter().append(&quot;clipPath&quot;).attr(&quot;id&quot;,R).append(&quot;rect&quot;),M||L?(this._clipRect=V.select(&quot;rect&quot;).attr({x:Math.floor(B),y:Math.floor(N),width:Math.ceil(F)-Math.floor(B),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on(&quot;wheel&quot;,null).on(&quot;.drag&quot;,null).call(a.setClipUrl,null),delete this._clipRect),M||L){var U=n.behavior.drag().on(&quot;dragstart&quot;,function(){n.event.sourceEvent.preventDefault()}).on(&quot;drag&quot;,this._onBoxDrag.bind(this));this.container.on(&quot;wheel&quot;,null).on(&quot;wheel&quot;,this._onBoxWheel.bind(this)).on(&quot;.drag&quot;,null).call(U);var q=n.behavior.drag().on(&quot;dragstart&quot;,function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on(&quot;drag&quot;,this._onBarDrag.bind(this));M&amp;&amp;this.hbar.on(&quot;.drag&quot;,null).call(q),L&amp;&amp;this.vbar.on(&quot;.drag&quot;,null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&amp;&amp;(this.bg.attr({width:0,height:0}),this.container.on(&quot;wheel&quot;,null).on(&quot;.drag&quot;,null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&amp;&amp;(this.hbar.on(&quot;.drag&quot;,null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&amp;&amp;(this.vbar.on(&quot;.drag&quot;,null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&amp;&amp;(t-=n.event.dx),this.vbar&amp;&amp;(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&amp;&amp;(t+=n.event.deltaY),this.vbar&amp;&amp;(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&amp;&amp;this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{&quot;../../lib&quot;:693,&quot;../color&quot;:567,&quot;../drawing&quot;:592,d3:147}],665:[function(t,e,r){&quot;use strict&quot;;e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,MID_SHIFT:.35,OPPOSITE_SIDE:{left:&quot;right&quot;,right:&quot;left&quot;,top:&quot;bottom&quot;,bottom:&quot;top&quot;}}},{}],666:[function(t,e,r){&quot;use strict&quot;;e.exports={COMPARISON_OPS:[&quot;=&quot;,&quot;!=&quot;,&quot;&lt;&quot;,&quot;&gt;=&quot;,&quot;&gt;&quot;,&quot;&lt;=&quot;],COMPARISON_OPS2:[&quot;=&quot;,&quot;&lt;&quot;,&quot;&gt;=&quot;,&quot;&gt;&quot;,&quot;&lt;=&quot;],INTERVAL_OPS:[&quot;[]&quot;,&quot;()&quot;,&quot;[)&quot;,&quot;(]&quot;,&quot;][&quot;,&quot;)(&quot;,&quot;](&quot;,&quot;)[&quot;],SET_OPS:[&quot;{}&quot;,&quot;}{&quot;],CONSTRAINT_REDUCTION:{&quot;=&quot;:&quot;=&quot;,&quot;&lt;&quot;:&quot;&lt;&quot;,&quot;&lt;=&quot;:&quot;&lt;&quot;,&quot;&gt;&quot;:&quot;&gt;&quot;,&quot;&gt;=&quot;:&quot;&gt;&quot;,&quot;[]&quot;:&quot;[]&quot;,&quot;()&quot;:&quot;[]&quot;,&quot;[)&quot;:&quot;[]&quot;,&quot;(]&quot;:&quot;[]&quot;,&quot;][&quot;:&quot;][&quot;,&quot;)(&quot;:&quot;][&quot;,&quot;](&quot;:&quot;][&quot;,&quot;)[&quot;:&quot;][&quot;}}},{}],667:[function(t,e,r){&quot;use strict&quot;;e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],668:[function(t,e,r){&quot;use strict&quot;;e.exports={circle:&quot;\u25cf&quot;,&quot;circle-open&quot;:&quot;\u25cb&quot;,square:&quot;\u25a0&quot;,&quot;square-open&quot;:&quot;\u25a1&quot;,diamond:&quot;\u25c6&quot;,&quot;diamond-open&quot;:&quot;\u25c7&quot;,cross:&quot;+&quot;,x:&quot;\u274c&quot;}},{}],669:[function(t,e,r){&quot;use strict&quot;;e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300,DESELECTDIM:.2}},{}],670:[function(t,e,r){&quot;use strict&quot;;e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:&quot;\u2212&quot;}},{}],671:[function(t,e,r){&quot;use strict&quot;;r.xmlns=&quot;http://www.w3.org/2000/xmlns/&quot;,r.svg=&quot;http://www.w3.org/2000/svg&quot;,r.xlink=&quot;http://www.w3.org/1999/xlink&quot;,r.svgAttrs={xmlns:r.svg,&quot;xmlns:xlink&quot;:r.xlink}},{}],672:[function(t,e,r){&quot;use strict&quot;;r.version=&quot;1.41.3&quot;,t(&quot;es6-promise&quot;).polyfill(),t(&quot;../build/plotcss&quot;),t(&quot;./fonts/mathjax_config&quot;);for(var n=t(&quot;./registry&quot;),i=r.register=n.register,a=t(&quot;./plot_api&quot;),o=Object.keys(a),s=0;s&lt;o.length;s++){var l=o[s];r[l]=a[l],i({moduleType:&quot;apiMethod&quot;,name:l,fn:a[l]})}i(t(&quot;./traces/scatter&quot;)),i([t(&quot;./components/fx&quot;),t(&quot;./components/legend&quot;),t(&quot;./components/annotations&quot;),t(&quot;./components/annotations3d&quot;),t(&quot;./components/shapes&quot;),t(&quot;./components/images&quot;),t(&quot;./components/updatemenus&quot;),t(&quot;./components/sliders&quot;),t(&quot;./components/rangeslider&quot;),t(&quot;./components/rangeselector&quot;),t(&quot;./components/grid&quot;),t(&quot;./components/errorbars&quot;)]),i([t(&quot;./locale-en&quot;),t(&quot;./locale-en-us&quot;)]),r.Icons=t(&quot;../build/ploticon&quot;),r.Plots=t(&quot;./plots/plots&quot;),r.Fx=t(&quot;./components/fx&quot;),r.Snapshot=t(&quot;./snapshot&quot;),r.PlotSchema=t(&quot;./plot_api/plot_schema&quot;),r.Queue=t(&quot;./lib/queue&quot;),r.d3=t(&quot;d3&quot;)},{&quot;../build/plotcss&quot;:1,&quot;../build/ploticon&quot;:2,&quot;./components/annotations&quot;:558,&quot;./components/annotations3d&quot;:563,&quot;./components/errorbars&quot;:598,&quot;./components/fx&quot;:609,&quot;./components/grid&quot;:613,&quot;./components/images&quot;:618,&quot;./components/legend&quot;:627,&quot;./components/rangeselector&quot;:638,&quot;./components/rangeslider&quot;:644,&quot;./components/shapes&quot;:652,&quot;./components/sliders&quot;:657,&quot;./components/updatemenus&quot;:663,&quot;./fonts/mathjax_config&quot;:673,&quot;./lib/queue&quot;:709,&quot;./locale-en&quot;:723,&quot;./locale-en-us&quot;:722,&quot;./plot_api&quot;:727,&quot;./plot_api/plot_schema&quot;:731,&quot;./plots/plots&quot;:805,&quot;./registry&quot;:825,&quot;./snapshot&quot;:830,&quot;./traces/scatter&quot;:1044,d3:147,&quot;es6-promise&quot;:202}],673:[function(t,e,r){&quot;use strict&quot;;&quot;undefined&quot;!=typeof MathJax?(r.MathJax=!0,MathJax.Hub.Config({messageStyle:&quot;none&quot;,skipStartupTypeset:!0,displayAlign:&quot;left&quot;,tex2jax:{inlineMath:[[&quot;$&quot;,&quot;$&quot;],[&quot;\\(&quot;,&quot;\\)&quot;]]}}),MathJax.Hub.Configured()):r.MathJax=!1},{}],674:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./mod&quot;),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])&gt;s-1e-15}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0]&lt;e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))&gt;(n=i(n,s))&amp;&amp;(n+=s);var a=i(t,s),o=a+s;return a&gt;=r&amp;&amp;a&lt;=n||o&gt;=r&amp;&amp;o&lt;=n}function f(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,f,h,p,d,g=l([r,n]);function m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r&lt;n?(u=r,h=n):(u=n,h=r),t&lt;e?(p=t,d=e):(p=e,d=t);var v,y=Math.abs(h-u)&lt;=o?0:1;function x(t,e,r){return&quot;A&quot;+[t,t]+&quot; &quot;+[0,y,r]+&quot; &quot;+m(t,e)}return g?v=null===p?&quot;M&quot;+m(d,u)+x(d,f,0)+x(d,h,0)+&quot;Z&quot;:&quot;M&quot;+m(p,u)+x(p,f,0)+x(p,h,0)+&quot;ZM&quot;+m(d,u)+x(d,f,1)+x(d,h,1)+&quot;Z&quot;:null===p?(v=&quot;M&quot;+m(d,u)+x(d,h,0),c&amp;&amp;(v+=&quot;L0,0Z&quot;)):v=&quot;M&quot;+m(p,u)+&quot;L&quot;+m(d,u)+x(d,h,0)+&quot;L&quot;+m(p,h)+x(p,u,1)+&quot;Z&quot;,v}e.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:c,angleDist:function(t,e){return Math.abs(c(t,e))},isFullCircle:l,isAngleInsideSector:u,isPtInsideSector:function(t,e,r,n){return!!u(e,n)&amp;&amp;(r[0]&lt;r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t&gt;=i&amp;&amp;t&lt;=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},{&quot;./mod&quot;:701}],675:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../constants/numerical&quot;).BADNUM,a=/^['&quot;%,$#\s']+|[, ]|['&quot;%,$#\s']+$/g;e.exports=function(t){return&quot;string&quot;==typeof t&amp;&amp;(t=t.replace(a,&quot;&quot;)),n(t)?Number(t):i}},{&quot;../constants/numerical&quot;:670,&quot;fast-isnumeric&quot;:213}],676:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t._fullLayout;e._glcanvas&amp;&amp;e._glcanvas.size()&amp;&amp;e._glcanvas.each(function(t){t.regl&amp;&amp;t.regl.clear({color:!0,depth:!0})})}},{}],677:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){t._responsiveChartHandler&amp;&amp;(window.removeEventListener(&quot;resize&quot;,t._responsiveChartHandler),delete t._responsiveChartHandler)}},{}],678:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;../plots/attributes&quot;),o=t(&quot;../components/colorscale/get_scale&quot;),s=(Object.keys(t(&quot;../components/colorscale/scales&quot;)),t(&quot;./nested_property&quot;)),l=t(&quot;./regex&quot;).counter,c=t(&quot;../constants/interactions&quot;).DESELECTDIM,u=t(&quot;./mod&quot;).modHalf,f=t(&quot;./is_array&quot;).isArrayOrTypedArray;function h(t,e){var n=r.valObjectMeta[e.valType];if(e.arrayOk&amp;&amp;f(t))return!0;if(n.validateFunction)return n.validateFunction(t,e);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,e),a!==i}r.valObjectMeta={data_array:{coerceFunction:function(t,e,r){f(t)?e.set(t):void 0!==r&amp;&amp;e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&amp;&amp;(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&amp;&amp;(t=+t);for(var r=e.values,n=0;n&lt;r.length;n++){var i=String(r[n]);if(&quot;/&quot;===i.charAt(0)&amp;&amp;&quot;/&quot;===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&amp;&amp;t&lt;i.min||void 0!==i.max&amp;&amp;t&gt;i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&amp;&amp;t&lt;i.min||void 0!==i.max&amp;&amp;t&gt;i.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if(&quot;string&quot;!=typeof t){var i=&quot;number&quot;==typeof t;!0!==n.strict&amp;&amp;i?e.set(String(t)):e.set(r)}else n.noBlank&amp;&amp;!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&amp;&amp;t.length&amp;&amp;t.every(function(t){return i(t).isValid()})?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o(t,r))}},angle:{coerceFunction:function(t,e,r){&quot;auto&quot;===t?e.set(&quot;auto&quot;):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||l(r);&quot;string&quot;==typeof t&amp;&amp;i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||&quot;string&quot;==typeof t&amp;&amp;!!l(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(&quot;string&quot;==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var i=t.split(&quot;+&quot;),a=0;a&lt;i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)&lt;a?i.splice(a,1):a++}i.length?e.set(i.join(&quot;+&quot;)):e.set(r)}else e.set(t);else e.set(r)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(t)}},info_array:{coerceFunction:function(t,e,n,i){function a(t,e,n){var i,a={set:function(t){i=t}};return void 0===n&amp;&amp;(n=e.dflt),r.valObjectMeta[e.valType].coerceFunction(t,a,n,e),i}var o=2===i.dimensions||&quot;1-2&quot;===i.dimensions&amp;&amp;Array.isArray(t)&amp;&amp;Array.isArray(t[0]);if(Array.isArray(t)){var s,l,c,u,f,h,p=i.items,d=[],g=Array.isArray(p),m=g&amp;&amp;o&amp;&amp;Array.isArray(p[0]),v=o&amp;&amp;g&amp;&amp;!m,y=g&amp;&amp;!v?p.length:t.length;if(n=Array.isArray(n)?n:[],o)for(s=0;s&lt;y;s++)for(d[s]=[],c=Array.isArray(t[s])?t[s]:[],f=v?p.length:g?p[s].length:c.length,l=0;l&lt;f;l++)u=v?p[l]:g?p[s][l]:p,void 0!==(h=a(c[l],u,(n[s]||[])[l]))&amp;&amp;(d[s][l]=h);else for(s=0;s&lt;y;s++)void 0!==(h=a(t[s],g?p[s]:p,n[s]))&amp;&amp;(d[s]=h);e.set(d)}else e.set(n)},validateFunction:function(t,e){if(!Array.isArray(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&amp;&amp;t.length!==r.length)return!1;for(var a=0;a&lt;t.length;a++)if(i){if(!Array.isArray(t[a])||!e.freeLength&amp;&amp;t[a].length!==r[a].length)return!1;for(var o=0;o&lt;t[a].length;o++)if(!h(t[a][o],n?r[a][o]:r))return!1}else if(!h(t[a],n?r[a]:r))return!1;return!0}}},r.coerce=function(t,e,n,i,a){var o=s(n,i).get(),l=s(t,i),c=s(e,i),u=l.get(),p=e._template;if(void 0===u&amp;&amp;p&amp;&amp;(u=s(p,i).get(),p=0),void 0===a&amp;&amp;(a=o.dflt),o.arrayOk&amp;&amp;f(u))return c.set(u),u;var d=r.valObjectMeta[o.valType].coerceFunction;d(u,c,a,o);var g=c.get();return p&amp;&amp;g===a&amp;&amp;!h(u,o)&amp;&amp;(d(u=s(p,i).get(),c,a,o),g=c.get()),g},r.coerce2=function(t,e,n,i,a){var o=s(t,i),l=r.coerce(t,e,n,i,a),c=o.get();return null!=c&amp;&amp;l},r.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+&quot;.family&quot;,r.family),n.size=t(e+&quot;.size&quot;,r.size),n.color=t(e+&quot;.color&quot;,r.color),n},r.coerceHoverinfo=function(t,e,n){var i,o=e._module.attributes,s=o.hoverinfo?o:a,l=s.hoverinfo;if(1===n._dataLength){var c=&quot;all&quot;===l.dflt?l.flags.slice():l.dflt.split(&quot;+&quot;);c.splice(c.indexOf(&quot;name&quot;),1),i=c.join(&quot;+&quot;)}return r.coerce(t,e,s,&quot;hoverinfo&quot;,i)},r.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;if(void 0!==i)f(i)||t.selected||t.unselected||(r=i,n=c*i),e(&quot;selected.marker.opacity&quot;,r),e(&quot;unselected.marker.opacity&quot;,n)}},r.validate=h},{&quot;../components/colorscale/get_scale&quot;:580,&quot;../components/colorscale/scales&quot;:586,&quot;../constants/interactions&quot;:669,&quot;../plots/attributes&quot;:739,&quot;./is_array&quot;:694,&quot;./mod&quot;:701,&quot;./nested_property&quot;:702,&quot;./regex&quot;:710,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],679:[function(t,e,r){&quot;use strict&quot;;var n,i,a=t(&quot;d3&quot;),o=t(&quot;fast-isnumeric&quot;),s=t(&quot;./loggers&quot;),l=t(&quot;./mod&quot;).mod,c=t(&quot;../constants/numerical&quot;),u=c.BADNUM,f=c.ONEDAY,h=c.ONEHOUR,p=c.ONEMIN,d=c.ONESEC,g=c.EPOCHJD,m=t(&quot;../registry&quot;),v=a.time.format.utc,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(t){return t&amp;&amp;m.componentsRegistry.calendars&amp;&amp;&quot;string&quot;==typeof t&amp;&amp;&quot;gregorian&quot;!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}r.dateTick0=function(t,e){return _(t)?e?m.getComponentMethod(&quot;calendars&quot;,&quot;CANONICAL_SUNDAY&quot;)[t]:m.getComponentMethod(&quot;calendars&quot;,&quot;CANONICAL_TICK&quot;)[t]:e?&quot;2000-01-02&quot;:&quot;2000-01-01&quot;},r.dfltRange=function(t){return _(t)?m.getComponentMethod(&quot;calendars&quot;,&quot;DFLTRANGE&quot;)[t]:[&quot;2000-01-01&quot;,&quot;2001-01-01&quot;]},r.isJSDate=function(t){return&quot;object&quot;==typeof t&amp;&amp;null!==t&amp;&amp;&quot;function&quot;==typeof t.getTime},r.dateTime2ms=function(t,e){if(r.isJSDate(t)){var a=t.getTimezoneOffset()*p,o=(t.getUTCMinutes()-t.getMinutes())*p+(t.getUTCSeconds()-t.getSeconds())*d+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*p;a=a-s/2+l(o-a+s/2,s)}return(t=Number(t)-a)&gt;=n&amp;&amp;t&lt;=i?t:u}if(&quot;string&quot;!=typeof t&amp;&amp;&quot;number&quot;!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||&quot;G&quot;!==v&amp;&amp;&quot;g&quot;!==v||(t=t.substr(1),e=&quot;&quot;);var w=c&amp;&amp;&quot;chinese&quot;===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var M=k[1],A=k[3]||&quot;1&quot;,T=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===M.length)return u;var L;M=Number(M);try{var z=m.getComponentMethod(&quot;calendars&quot;,&quot;getCal&quot;)(e);if(w){var P=&quot;i&quot;===A.charAt(A.length-1);A=parseInt(A,10),L=z.newDate(M,z.toMonthIndex(M,A,P),T)}else L=z.newDate(M,Number(A),T)}catch(t){return u}return L?(L.toJD()-g)*f+S*h+E*p+C*d:u}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),A-=1;var O=new Date(Date.UTC(2e3,A,T,S,E));return O.setUTCFullYear(M),O.getUTCMonth()!==A?u:O.getUTCDate()!==T?u:O.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms(&quot;-9999&quot;),i=r.MAX_MS=r.dateTime2ms(&quot;9999-12-31 23:59:59.9999&quot;),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*f,M=3*h,A=5*p;function T(t,e,r,n,i){if((e||r||n||i)&amp;&amp;(t+=&quot; &quot;+w(e,2)+&quot;:&quot;+w(r,2),(n||i)&amp;&amp;(t+=&quot;:&quot;+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+=&quot;.&quot;+w(i,a)}return t}r.ms2DateTime=function(t,e,r){if(&quot;number&quot;!=typeof t||!(t&gt;=n&amp;&amp;t&lt;=i))return u;e||(e=0);var a,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+g,E=Math.floor(l(t,f));try{a=m.getComponentMethod(&quot;calendars&quot;,&quot;getCal&quot;)(r).fromJD(S).formatDate(&quot;yyyy-mm-dd&quot;)}catch(t){a=v(&quot;G%Y-%m-%d&quot;)(new Date(w))}if(&quot;-&quot;===a.charAt(0))for(;a.length&lt;11;)a=&quot;-0&quot;+a.substr(1);else for(;a.length&lt;10;)a=&quot;0&quot;+a;o=e&lt;k?Math.floor(E/h):0,s=e&lt;k?Math.floor(E%h/p):0,c=e&lt;M?Math.floor(E%p/d):0,y=e&lt;A?E%d*10+b:0}else x=new Date(w),a=v(&quot;%Y-%m-%d&quot;)(x),o=e&lt;k?x.getUTCHours():0,s=e&lt;k?x.getUTCMinutes():0,c=e&lt;M?x.getUTCSeconds():0,y=e&lt;A?10*x.getUTCMilliseconds()+b:0;return T(a,o,s,c,y)},r.ms2DateTimeLocal=function(t){if(!(t&gt;=n+f&amp;&amp;t&lt;=i-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return T(a.time.format(&quot;%Y-%m-%d&quot;)(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(r.isJSDate(t)||&quot;number&quot;==typeof t){if(_(n))return s.error(&quot;JS Dates and milliseconds are incompatible with world calendars&quot;,t),e;if(!(t=r.ms2DateTimeLocal(+t))&amp;&amp;void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error(&quot;unrecognized date&quot;,t),e;return t};var S=/%\d?f/g;function E(t,e,r,n){t=t.replace(S,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,&quot;&quot;)||&quot;0&quot;});var i=new Date(Math.floor(e+.05));if(_(n))try{t=m.getComponentMethod(&quot;calendars&quot;,&quot;worldCalFmt&quot;)(t,e,n)}catch(t){return&quot;Invalid&quot;}return r(t)(i)}var C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,i,a){if(i=_(i)&amp;&amp;i,!e)if(&quot;y&quot;===r)e=a.year;else if(&quot;m&quot;===r)e=a.month;else{if(&quot;d&quot;!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+&quot;:&quot;+w(l(Math.floor(r/p),60),2);if(&quot;M&quot;!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e&gt;0&amp;&amp;(i=i.replace(/0+$/,&quot;&quot;).replace(/[\.]$/,&quot;&quot;)),n+=&quot;:&quot;+i}return n}(t,r)+&quot;\n&quot;+E(a.dayMonthYear,t,n,i);e=a.dayMonth+&quot;\n&quot;+a.year}return E(e,t,n,i)};var L=3*f;r.incrementMonth=function(t,e,r){r=_(r)&amp;&amp;r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+g,a=m.getComponentMethod(&quot;calendars&quot;,&quot;getCal&quot;)(r),o=a.fromJD(i);return e%12?a.add(o,e,&quot;m&quot;):a.add(o,e/12,&quot;y&quot;),(o.toJD()-g)*f+n}catch(e){s.error(&quot;invalid ms &quot;+t+&quot; in calendar &quot;+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&amp;&amp;m.getComponentMethod(&quot;calendars&quot;,&quot;getCal&quot;)(e),u=0;u&lt;t.length;u++)if(n=t[u],o(n)){if(!(n%f))if(c)try{1===(r=c.fromJD(n/f+g)).day()?1===r.month()?i++:a++:s++}catch(t){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?i++:a++:s++}else l++;s+=a+=i;var h=t.length-l;return{exactYears:i/h,exactMonths:a/h,exactDays:s/h}}},{&quot;../constants/numerical&quot;:670,&quot;../registry&quot;:825,&quot;./loggers&quot;:698,&quot;./mod&quot;:701,d3:147,&quot;fast-isnumeric&quot;:213}],680:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return Array.isArray(t)||(t=[]),t.length=e,t}},{}],681:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;events&quot;).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){&quot;undefined&quot;!=typeof jQuery&amp;&amp;jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;&quot;undefined&quot;!=typeof jQuery&amp;&amp;(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o&lt;s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};e.exports=i},{events:91}],682:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is_plain_object.js&quot;),i=Array.isArray;function a(t,e,r,o){var s,l,c,u,f,h,p=t[0],d=t.length;if(2===d&amp;&amp;i(p)&amp;&amp;i(t[1])&amp;&amp;0===p.length){if(function(t,e){var r,n;for(r=0;r&lt;t.length;r++){if(null!==(n=t[r])&amp;&amp;&quot;object&quot;==typeof n)return!1;void 0!==n&amp;&amp;(e[r]=n)}return!0}(t[1],p))return p;p.splice(0,p.length)}for(var g=1;g&lt;d;g++)for(l in s=t[g])c=p[l],u=s[l],o&amp;&amp;i(u)?p[l]=u:e&amp;&amp;u&amp;&amp;(n(u)||(f=i(u)))?(f?(f=!1,h=c&amp;&amp;i(c)?c:[]):h=c&amp;&amp;n(c)?c:{},p[l]=a([h,u],e,r,o)):(&quot;undefined&quot;!=typeof u||r)&amp;&amp;(p[l]=u);return p}r.extendFlat=function(){return a(arguments,!1,!1,!1)},r.extendDeep=function(){return a(arguments,!0,!1,!1)},r.extendDeepAll=function(){return a(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return a(arguments,!0,!1,!0)}},{&quot;./is_plain_object.js&quot;:695}],683:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e={},r=[],n=0,i=0;i&lt;t.length;i++){var a=t[i];1!==e[a]&amp;&amp;(e[a]=1,r[n++]=a)}return r}},{}],684:[function(t,e,r){&quot;use strict&quot;;function n(t){return!0===t.visible}function i(t){return!0===t[0].trace.visible}e.exports=function(t){for(var e,r=(e=t,Array.isArray(e)&amp;&amp;Array.isArray(e[0])&amp;&amp;e[0][0]&amp;&amp;e[0][0].trace?i:n),a=[],o=0;o&lt;t.length;o++){var s=t[o];r(s)&amp;&amp;a.push(s)}return a}},{}],685:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;country-regex&quot;),i=t(&quot;../lib&quot;),a=Object.keys(n),o={&quot;ISO-3&quot;:i.identity,&quot;USA-states&quot;:i.identity,&quot;country names&quot;:function(t){for(var e=0;e&lt;a.length;e++){var r=a[e],o=new RegExp(n[r]);if(o.test(t.trim().toLowerCase()))return r}return i.log(&quot;Unrecognized country name: &quot;+t+&quot;.&quot;),!1}};r.locationToFeature=function(t,e,r){if(!e||&quot;string&quot;!=typeof e)return!1;var n=function(t,e){return(0,o[t])(e)}(t,e);if(n){for(var a=0;a&lt;r.length;a++){var s=r[a];if(s.id===n)return s}i.log([&quot;Location with id&quot;,n,&quot;does not have a matching topojson feature at this resolution.&quot;].join(&quot; &quot;))}return!1}},{&quot;../lib&quot;:693,&quot;country-regex&quot;:121}],686:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../constants/numerical&quot;).BADNUM;r.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a&lt;t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&amp;&amp;i.length&gt;0&amp;&amp;(r.push(i),i=[])}return i.length&gt;0&amp;&amp;r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:&quot;LineString&quot;,coordinates:t[0]}:{type:&quot;MultiLineString&quot;,coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:&quot;Polygon&quot;,coordinates:t};for(var e=new Array(t.length),r=0;r&lt;t.length;r++)e[r]=[t[r]];return{type:&quot;MultiPolygon&quot;,coordinates:e}},r.makeBlank=function(){return{type:&quot;Point&quot;,coordinates:[]}}},{&quot;../constants/numerical&quot;:670}],687:[function(t,e,r){&quot;use strict&quot;;var n,i,a,o=t(&quot;./mod&quot;).mod;function s(t,e,r,n,i,a,o,s){var l=r-t,c=i-t,u=o-i,f=n-e,h=a-e,p=s-a,d=l*p-u*f;if(0===d)return null;var g=(c*p-u*h)/d,m=(c*f-l*h)/d;return m&lt;0||m&gt;1||g&lt;0||g&gt;1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,i){var a=n*t+i*e;if(a&lt;0)return n*n+i*i;if(a&gt;r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,f=n-e,h=o-i,p=c-a,d=u*u+f*f,g=h*h+p*p,m=Math.min(l(u,f,d,i-t,a-e),l(u,f,d,o-t,c-e),l(h,p,g,t-i,e-a),l(h,p,g,r-i,n-a));return Math.sqrt(m)},r.getTextLocation=function(t,e,r,s){if(t===i&amp;&amp;s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=h,h},r.clearLocationCache=function(){i=null},r.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&amp;&amp;(i=r);var c=r.x&lt;a?a-r.x:r.x&gt;o?r.x-o:0,f=r.y&lt;s?s-r.y:r.y&gt;l?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var p=h(c);p;){if((c+=p+r)&gt;f)return;p=h(c)}for(p=h(f);p;){if(c&gt;(f-=p+r))return;p=h(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&amp;&amp;f===u&amp;&amp;Math.abs(n.x-i.x)&lt;.1&amp;&amp;Math.abs(n.y-i.y)&lt;.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]&gt;t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f&lt;c;){if(i=(h+p)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)&lt;l)return a;u*o&gt;0?p=i:h=i,f++}return a}},{&quot;./mod&quot;:701}],688:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e;if(&quot;string&quot;==typeof t){if(null===(e=document.getElementById(t)))throw new Error(&quot;No DOM element with id '&quot;+t+&quot;' exists on the page.&quot;);return e}if(null==t)throw new Error(&quot;DOM element provided is null or undefined&quot;);return t}},{}],689:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;color-normalize&quot;),o=t(&quot;../components/colorscale&quot;),s=t(&quot;../components/color/attributes&quot;).defaultLine,l=t(&quot;./is_array&quot;).isArrayOrTypedArray,c=a(s),u=1;function f(t,e){var r=t;return r[3]*=e,r}function h(t){if(n(t))return c;var e=a(t);return e.length?e:c}function p(t){return n(t)?t:u}e.exports={formatColor:function(t,e,r){var n,i,s,d,g,m=t.color,v=l(m),y=l(e),x=[];if(n=void 0!==t.colorscale?o.makeColorScaleFunc(o.extractScale(t.colorscale,t.cmin,t.cmax)):h,i=v?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:h,s=y?function(t,e){return void 0===t[e]?u:p(t[e])}:p,v||y)for(var b=0;b&lt;r;b++)d=i(m,b),g=s(e,b),x[b]=f(d,g);else x=f(a(m),e);return x},parseColorScale:function(t,e){return void 0===e&amp;&amp;(e=1),t.map(function(t){var r=t[0],n=i(t[1]).toRgb();return{index:r,rgb:[n.r,n.g,n.b,e]}})}}},{&quot;../components/color/attributes&quot;:566,&quot;../components/colorscale&quot;:582,&quot;./is_array&quot;:694,&quot;color-normalize&quot;:107,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],690:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./identity&quot;);function i(t){return[t]}e.exports={keyFun:function(t){return t.key},repeat:i,descend:n,wrap:i,unwrap:function(t){return t[0]}}},{&quot;./identity&quot;:692}],691:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;superscript-text&quot;),i=t(&quot;./svg_text_utils&quot;).convertEntities;e.exports=function(t){return&quot;&quot;+i(function(t){return t.replace(/\&lt;.*\&gt;/g,&quot;&quot;)}(function(t){for(var e=0;(e=t.indexOf(&quot;&lt;sup&gt;&quot;,e))&gt;=0;){var r=t.indexOf(&quot;&lt;/sup&gt;&quot;,e);if(r&lt;e)break;t=t.slice(0,e)+n(t.slice(e+5,r))+t.slice(r+6)}return t}(t.replace(/\&lt;br\&gt;/g,&quot;\n&quot;))))}},{&quot;./svg_text_utils&quot;:718,&quot;superscript-text&quot;:504}],692:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t}},{}],693:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../constants/numerical&quot;),o=a.FP_SAFE,s=a.BADNUM,l=e.exports={};l.nestedProperty=t(&quot;./nested_property&quot;),l.keyedContainer=t(&quot;./keyed_container&quot;),l.relativeAttr=t(&quot;./relative_attr&quot;),l.isPlainObject=t(&quot;./is_plain_object&quot;),l.toLogRange=t(&quot;./to_log_range&quot;),l.relinkPrivateKeys=t(&quot;./relink_private&quot;),l.ensureArray=t(&quot;./ensure_array&quot;);var c=t(&quot;./mod&quot;);l.mod=c.mod,l.modHalf=c.modHalf;var u=t(&quot;./is_array&quot;);l.isTypedArray=u.isTypedArray,l.isArrayOrTypedArray=u.isArrayOrTypedArray,l.isArray1D=u.isArray1D;var f=t(&quot;./coerce&quot;);l.valObjectMeta=f.valObjectMeta,l.coerce=f.coerce,l.coerce2=f.coerce2,l.coerceFont=f.coerceFont,l.coerceHoverinfo=f.coerceHoverinfo,l.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,l.validate=f.validate;var h=t(&quot;./dates&quot;);l.dateTime2ms=h.dateTime2ms,l.isDateTime=h.isDateTime,l.ms2DateTime=h.ms2DateTime,l.ms2DateTimeLocal=h.ms2DateTimeLocal,l.cleanDate=h.cleanDate,l.isJSDate=h.isJSDate,l.formatDate=h.formatDate,l.incrementMonth=h.incrementMonth,l.dateTick0=h.dateTick0,l.dfltRange=h.dfltRange,l.findExactDates=h.findExactDates,l.MIN_MS=h.MIN_MS,l.MAX_MS=h.MAX_MS;var p=t(&quot;./search&quot;);l.findBin=p.findBin,l.sorterAsc=p.sorterAsc,l.sorterDes=p.sorterDes,l.distinctVals=p.distinctVals,l.roundUp=p.roundUp,l.sort=p.sort,l.findIndexOfMin=p.findIndexOfMin;var d=t(&quot;./stats&quot;);l.aggNums=d.aggNums,l.len=d.len,l.mean=d.mean,l.midRange=d.midRange,l.variance=d.variance,l.stdev=d.stdev,l.interp=d.interp;var g=t(&quot;./matrix&quot;);l.init2dArray=g.init2dArray,l.transposeRagged=g.transposeRagged,l.dot=g.dot,l.translationMatrix=g.translationMatrix,l.rotationMatrix=g.rotationMatrix,l.rotationXYMatrix=g.rotationXYMatrix,l.apply2DTransform=g.apply2DTransform,l.apply2DTransform2=g.apply2DTransform2;var m=t(&quot;./angles&quot;);l.deg2rad=m.deg2rad,l.rad2deg=m.rad2deg,l.angleDelta=m.angleDelta,l.angleDist=m.angleDist,l.isFullCircle=m.isFullCircle,l.isAngleInsideSector=m.isAngleInsideSector,l.isPtInsideSector=m.isPtInsideSector,l.pathArc=m.pathArc,l.pathSector=m.pathSector,l.pathAnnulus=m.pathAnnulus;var v=t(&quot;./geometry2d&quot;);l.segmentsIntersect=v.segmentsIntersect,l.segmentDistance=v.segmentDistance,l.getTextLocation=v.getTextLocation,l.clearLocationCache=v.clearLocationCache,l.getVisibleSegment=v.getVisibleSegment,l.findPointOnPath=v.findPointOnPath;var y=t(&quot;./extend&quot;);l.extendFlat=y.extendFlat,l.extendDeep=y.extendDeep,l.extendDeepAll=y.extendDeepAll,l.extendDeepNoArrays=y.extendDeepNoArrays;var x=t(&quot;./loggers&quot;);l.log=x.log,l.warn=x.warn,l.error=x.error;var b=t(&quot;./regex&quot;);l.counterRegex=b.counter;var _=t(&quot;./throttle&quot;);function w(t){var e={};for(var r in t)for(var n=t[r],i=0;i&lt;n.length;i++)e[n[i]]=+r;return e}l.throttle=_.throttle,l.throttleDone=_.done,l.clearThrottle=_.clear,l.getGraphDiv=t(&quot;./get_graph_div&quot;),l.clearResponsive=t(&quot;./clear_responsive&quot;),l.makeTraceGroups=t(&quot;./make_trace_groups&quot;),l._=t(&quot;./localize&quot;),l.notifier=t(&quot;./notifier&quot;),l.filterUnique=t(&quot;./filter_unique&quot;),l.filterVisible=t(&quot;./filter_visible&quot;),l.pushUnique=t(&quot;./push_unique&quot;),l.cleanNumber=t(&quot;./clean_number&quot;),l.ensureNumber=function(t){return i(t)?(t=Number(t))&lt;-o||t&gt;o?s:i(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&amp;&amp;t&gt;=e)&amp;&amp;(i(t)&amp;&amp;t&gt;=0&amp;&amp;t%1==0)},l.noop=t(&quot;./noop&quot;),l.identity=t(&quot;./identity&quot;),l.repeat=function(t,e){for(var r=new Array(e),n=0;n&lt;e;n++)r[n]=t;return r},l.swapAttrs=function(t,e,r,n){r||(r=&quot;x&quot;),n||(n=&quot;y&quot;);for(var i=0;i&lt;e.length;i++){var a=e[i],o=l.nestedProperty(t,a.replace(&quot;?&quot;,r)),s=l.nestedProperty(t,a.replace(&quot;?&quot;,n)),c=o.get();o.set(s.get()),s.set(c)}},l.raiseToTop=function(t){t.parentNode.appendChild(t)},l.cancelTransition=function(t){return t.transition().duration(0)},l.constrain=function(t,e,r){return e&gt;r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left&lt;=e.right+r&amp;&amp;e.left&lt;=t.right+r&amp;&amp;t.top&lt;=e.bottom+r&amp;&amp;e.top&lt;=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o&lt;i;o++)a[o]=e(t[o],r,n);return a},l.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&amp;&amp;(r=24),r&lt;=0)return&quot;0&quot;;var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),c=&quot;&quot;;for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a&lt;Math.floor(s);a++)c=Math.floor(Math.random()*n).toString(n)+c;u&amp;&amp;(o=Math.pow(n,u),c=Math.floor(Math.random()*o).toString(n)+c);var f=parseInt(c,n);return e&amp;&amp;e[c]||f!==1/0&amp;&amp;f&gt;=Math.pow(2,r)?i&gt;10?(l.warn(&quot;randstr failed uniqueness&quot;),c):t(e,r,n,(i||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e=&quot;opt&quot;);var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r[&quot;_&quot;+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)&lt;2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r&lt;l;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r&lt;o;r++){for(a=0,n=0;n&lt;l;n++)(i=r+n+1-e)&lt;-o?i-=s*Math.round(i/s):i&gt;=s&amp;&amp;(i-=s*Math.floor(i/s)),i&lt;0?i=-1-i:i&gt;=o&amp;&amp;(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},l.syncOrAsync=function(t,e,r){var n;function i(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&amp;&amp;n.then)return n.then(i).then(void 0,l.promiseError);return r&amp;&amp;r(e)},l.stripTrailingSlash=function(t){return&quot;/&quot;===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n&lt;r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&amp;&amp;!a)for(n=0;n&lt;r.length;n++)t[r[n]]=e[r[n]]}},l.mergeArray=function(t,e,r){if(l.isArrayOrTypedArray(t))for(var n=Math.min(t.length,e.length),i=0;i&lt;n;i++)e[i][r]=t[i]},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(t))for(var i=0;i&lt;e.length;i++)e[i][r]=n(t[i])},l.castOption=function(t,e,r,n){n=n||l.identity;var i=l.nestedProperty(t,r).get();return l.isArrayOrTypedArray(i)?Array.isArray(e)&amp;&amp;l.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},l.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=l.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},l.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&amp;&amp;(n=w(o));for(var s=0;s&lt;a.length;s++){var c=a[s];if(l.isIndex(c)){var u=n?n[c]:c,f=r?r[u]:u;void 0!==(i=f)&amp;&amp;i&lt;t.length&amp;&amp;(t[f].selected=1)}}},l.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=w(r),i=[],a=0;a&lt;e.length;a++){var o=e[a];if(l.isIndex(o)){var s=n[o];l.isIndex(s)&amp;&amp;i.push(s)}}return i}return e},l.getTargetArray=function(t,e){var r=e.target;if(&quot;string&quot;==typeof r&amp;&amp;r){var n=l.nestedProperty(t,r).get();return!!Array.isArray(n)&amp;&amp;n}return!!Array.isArray(r)&amp;&amp;r},l.minExtend=function(t,e){var r={};&quot;object&quot;!=typeof e&amp;&amp;(e={});var n,i,a,o=Object.keys(t);for(n=0;n&lt;o.length;n++)a=t[i=o[n]],&quot;_&quot;!==i.charAt(0)&amp;&amp;&quot;function&quot;!=typeof a&amp;&amp;(&quot;module&quot;===i?r[i]=a:Array.isArray(a)?r[i]=a.slice(0,3):r[i]=a&amp;&amp;&quot;object&quot;==typeof a?l.minExtend(t[i],e[i]):a);for(o=Object.keys(e),n=0;n&lt;o.length;n++)&quot;object&quot;==typeof(a=e[i=o[n]])&amp;&amp;i in r&amp;&amp;&quot;object&quot;==typeof r[i]||(r[i]=a);return r},l.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},l.containsAny=function(t,e){for(var r=0;r&lt;e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},l.isPlotDiv=function(t){var e=n.select(t);return e.node()instanceof HTMLElement&amp;&amp;e.size()&amp;&amp;e.classed(&quot;js-plotly-plot&quot;)},l.removeElement=function(t){var e=t&amp;&amp;t.parentNode;e&amp;&amp;e.removeChild(t)},l.addStyleRule=function(t,e){if(!l.styleSheet){var r=document.createElement(&quot;style&quot;);r.appendChild(document.createTextNode(&quot;&quot;)),document.head.appendChild(r),l.styleSheet=r.sheet}var n=l.styleSheet;n.insertRule?n.insertRule(t+&quot;{&quot;+e+&quot;}&quot;,0):n.addRule?n.addRule(t,e,0):l.warn(&quot;addStyleRule failed&quot;)},l.isIE=function(){return&quot;undefined&quot;!=typeof window.navigator.msSaveBlob},l.isD3Selection=function(t){return t&amp;&amp;&quot;function&quot;==typeof t.classed},l.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?&quot;.&quot;+r:&quot;&quot;));if(i.size())return i;var a=t.append(e);return r&amp;&amp;a.classed(r,!0),n&amp;&amp;a.call(n),a},l.ensureSingleById=function(t,e,r,n){var i=t.select(e+&quot;#&quot;+r);if(i.size())return i;var a=t.append(e).attr(&quot;id&quot;,r);return n&amp;&amp;a.call(n),a},l.objectFromPath=function(t,e){for(var r,n=t.split(&quot;.&quot;),i=r={},a=0;a&lt;n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var k=/^([^\[\.]+)\.(.+)?/,M=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;l.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if(&quot;object&quot;==typeof t&amp;&amp;!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&amp;&amp;((e=r.match(k))?(i=t[r],n=e[1],delete t[r],t[n]=l.extendDeepNoArrays(t[n]||{},l.objectFromPath(r,l.expandObjectPaths(i))[n])):(e=r.match(M))?(i=t[r],n=e[1],a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],&quot;.&quot;===e[3]?(s=e[4],o=t[n][a]=t[n][a]||{},l.extendDeepNoArrays(o,l.objectFromPath(s,l.expandObjectPaths(i)))):t[n][a]=l.expandObjectPaths(i)):t[r]=l.expandObjectPaths(t[r]));return t},l.numSeparate=function(t,e,r){if(r||(r=!1),&quot;string&quot;!=typeof e||0===e.length)throw new Error(&quot;Separator string required for formatting!&quot;);&quot;number&quot;==typeof t&amp;&amp;(t=String(t));var n=/(\d+)(\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split(&quot;.&quot;),s=o[0],l=o.length&gt;1?i+o[1]:&quot;&quot;;if(a&amp;&amp;(o.length&gt;1||s.length&gt;4||r))for(;n.test(s);)s=s.replace(n,&quot;$1&quot;+a+&quot;$2&quot;);return s+l};var A=/%{([^\s%{}]*)}/g,T=/^\w*$/;l.templateString=function(t,e){var r={};return t.replace(A,function(t,n){return T.test(n)?e[n]||&quot;&quot;:(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||&quot;&quot;)})};l.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a&lt;r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o&gt;=48&amp;&amp;o&lt;=57,c=s&gt;=48&amp;&amp;s&lt;=57;if(l&amp;&amp;(n=10*n+o-48),c&amp;&amp;(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var S=2e9;l.seedPseudoRandom=function(){S=2e9},l.pseudoRandom=function(){var t=S;return S=(69069*S+1)%4294967296,Math.abs(S-t)&lt;429496729?l.pseudoRandom():S/4294967296}},{&quot;../constants/numerical&quot;:670,&quot;./angles&quot;:674,&quot;./clean_number&quot;:675,&quot;./clear_responsive&quot;:677,&quot;./coerce&quot;:678,&quot;./dates&quot;:679,&quot;./ensure_array&quot;:680,&quot;./extend&quot;:682,&quot;./filter_unique&quot;:683,&quot;./filter_visible&quot;:684,&quot;./geometry2d&quot;:687,&quot;./get_graph_div&quot;:688,&quot;./identity&quot;:692,&quot;./is_array&quot;:694,&quot;./is_plain_object&quot;:695,&quot;./keyed_container&quot;:696,&quot;./localize&quot;:697,&quot;./loggers&quot;:698,&quot;./make_trace_groups&quot;:699,&quot;./matrix&quot;:700,&quot;./mod&quot;:701,&quot;./nested_property&quot;:702,&quot;./noop&quot;:703,&quot;./notifier&quot;:704,&quot;./push_unique&quot;:708,&quot;./regex&quot;:710,&quot;./relative_attr&quot;:711,&quot;./relink_private&quot;:712,&quot;./search&quot;:713,&quot;./stats&quot;:716,&quot;./throttle&quot;:719,&quot;./to_log_range&quot;:720,d3:147,&quot;fast-isnumeric&quot;:213}],694:[function(t,e,r){&quot;use strict&quot;;var n=&quot;undefined&quot;!=typeof ArrayBuffer&amp;&amp;ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},i=&quot;undefined&quot;==typeof DataView?function(){}:DataView;function a(t){return n.isView(t)&amp;&amp;!(t instanceof i)}function o(t){return Array.isArray(t)||a(t)}e.exports={isTypedArray:a,isArrayOrTypedArray:o,isArray1D:function(t){return!o(t[0])}}},{}],695:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return window&amp;&amp;window.process&amp;&amp;window.process.versions?&quot;[object Object]&quot;===Object.prototype.toString.call(t):&quot;[object Object]&quot;===Object.prototype.toString.call(t)&amp;&amp;Object.getPrototypeOf(t)===Object.prototype}},{}],696:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./nested_property&quot;),i=/^\w*$/;e.exports=function(t,e,r,a){var o,s,l;r=r||&quot;name&quot;,a=a||&quot;value&quot;;var c={};e&amp;&amp;e.length?(l=n(t,e),s=l.get()):s=t,e=e||&quot;&quot;;var u={};if(s)for(o=0;o&lt;s.length;o++)u[s[o][r]]=o;var f=i.test(a),h={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=u[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,u[t]=o}else e!==(f?s[o][a]:n(s[o],a).get())&amp;&amp;(i|=2);var p=s[o]=s[o]||{};return p[r]=t,f?p[a]=e:n(p,a).set(e),null!==e&amp;&amp;(i&amp;=-5),c[o]=c[o]|i,h},get:function(t){if(s){var e=u[t];return void 0===e?void 0:f?s[e][a]:n(s[e],a).get()}},rename:function(t,e){var n=u[t];return void 0===n?h:(c[n]=1|c[n],u[e]=n,delete u[t],s[n][r]=e,h)},remove:function(t){var e=u[t];if(void 0===e)return h;var i=s[e];if(Object.keys(i).length&gt;2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o&lt;s.length;o++)c[o]=3|c[o];for(o=e;o&lt;s.length;o++)u[s[o][r]]--;s.splice(e,1),delete u[t]}else n(i,a).set(null),c[e]=6|c[e];return h},constructUpdate:function(){for(var t,i,o={},l=Object.keys(c),u=0;u&lt;l.length;u++)i=l[u],t=e+&quot;[&quot;+i+&quot;]&quot;,s[i]?(1&amp;c[i]&amp;&amp;(o[t+&quot;.&quot;+r]=s[i][r]),2&amp;c[i]&amp;&amp;(o[t+&quot;.&quot;+a]=f?4&amp;c[i]?null:s[i][a]:4&amp;c[i]?null:n(s[i],a).get())):o[t]=null;return o}};return h}},{&quot;./nested_property&quot;:702}],697:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../registry&quot;);e.exports=function(t,e){for(var r=t._context.locale,i=0;i&lt;2;i++){for(var a=t._context.locales,o=0;o&lt;2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var c=r.split(&quot;-&quot;)[0];if(c===r)break;r=c}return e}},{&quot;../registry&quot;:825}],698:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../plot_api/plot_config&quot;),i=e.exports={};function a(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r&lt;e.length;r++)t(e[r])}i.log=function(){if(n.logging&gt;1){for(var t=[&quot;LOG:&quot;],e=0;e&lt;arguments.length;e++)t.push(arguments[e]);a(console.trace||console.log,t)}},i.warn=function(){if(n.logging&gt;0){for(var t=[&quot;WARN:&quot;],e=0;e&lt;arguments.length;e++)t.push(arguments[e]);a(console.trace||console.log,t)}},i.error=function(){if(n.logging&gt;0){for(var t=[&quot;ERROR:&quot;],e=0;e&lt;arguments.length;e++)t.push(arguments[e]);a(console.error,t)}}},{&quot;../plot_api/plot_config&quot;:730}],699:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n=t.selectAll(&quot;g.&quot;+r.replace(/\s/g,&quot;.&quot;)).data(e,function(t){return t[0].trace.uid});return n.exit().remove(),n.enter().append(&quot;g&quot;).attr(&quot;class&quot;,r),n.order(),n}},{}],700:[function(t,e,r){&quot;use strict&quot;;r.init2dArray=function(t,e){for(var r=new Array(t),n=0;n&lt;t;n++)r[n]=new Array(e);return r},r.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e&lt;i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e&lt;n;e++)for(a[e]=new Array(i),r=0;r&lt;i;r++)a[e][r]=t[r][e];return a},r.dot=function(t,e){if(!t.length||!e.length||t.length!==e.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i&lt;a;i++)n[i]=r.dot(t[i],e);else if(e[0].length){var o=r.transposeRagged(e);for(n=new Array(o.length),i=0;i&lt;o.length;i++)n[i]=r.dot(t,o[i])}else for(n=0,i=0;i&lt;a;i++)n+=t[i]*e[i];return n},r.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},r.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},r.rotationXYMatrix=function(t,e,n){return r.dot(r.dot(r.translationMatrix(e,n),r.rotationMatrix(t)),r.translationMatrix(-e,-n))},r.apply2DTransform=function(t){return function(){var e=arguments;3===e.length&amp;&amp;(e=e[0]);var n=1===arguments.length?e[0]:[e[0],e[1]];return r.dot(t,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(t){var e=r.apply2DTransform(t);return function(t){return e(t.slice(0,2)).concat(e(t.slice(2,4)))}}},{}],701:[function(t,e,r){&quot;use strict&quot;;e.exports={mod:function(t,e){var r=t%e;return r&lt;0?r+e:r},modHalf:function(t,e){return Math.abs(t)&gt;e/2?t-Math.round(t/e)*e:t}}},{}],702:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;./is_array&quot;).isArrayOrTypedArray;e.exports=function(t,e){if(n(e))e=String(e);else if(&quot;string&quot;!=typeof e||&quot;[-1]&quot;===e.substr(e.length-4))throw&quot;bad property string&quot;;for(var r,a,o,l=0,c=e.split(&quot;.&quot;);l&lt;c.length;){if(r=String(c[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])c[l]=r[1];else{if(0!==l)throw&quot;bad property string&quot;;c.splice(0,1)}for(a=r[2].substr(1,r[2].length-2).split(&quot;][&quot;),o=0;o&lt;a.length;o++)l++,c.splice(l,0,Number(a[o]))}l++}return&quot;object&quot;!=typeof t?function(t,e,r){return{set:function(){throw&quot;bad container&quot;},get:function(){},astr:e,parts:r,obj:t}}(t,e,c):{set:s(t,c,e),get:function t(e,r){return function(){var n,a,o,s,l,c=e;for(s=0;s&lt;r.length-1;s++){if(-1===(n=r[s])){for(a=!0,o=[],l=0;l&lt;c.length;l++)o[l]=t(c[l],r.slice(s+1))(),o[l]!==o[0]&amp;&amp;(a=!1);return a?o[0]:o}if(&quot;number&quot;==typeof n&amp;&amp;!i(c))return;if(&quot;object&quot;!=typeof(c=c[n])||null===c)return}if(&quot;object&quot;==typeof c&amp;&amp;null!==c&amp;&amp;null!==(o=c[r[s]]))return o}}(t,c),astr:e,parts:c,obj:t}};var a=/(^|\.)args\[/;function o(t,e){return void 0===t||null===t&amp;&amp;!e.match(a)}function s(t,e,r){return function(n){var a,s,f=t,h=&quot;&quot;,p=[[t,h]],d=o(n,r);for(s=0;s&lt;e.length-1;s++){if(&quot;number&quot;==typeof(a=e[s])&amp;&amp;!i(f))throw&quot;array index but container is not an array&quot;;if(-1===a){if(d=!c(f,e.slice(s+1),n,r))break;return}if(!u(f,a,e[s+1],d))break;if(&quot;object&quot;!=typeof(f=f[a])||null===f)throw&quot;container is not an object&quot;;h=l(h,a),p.push([f,h])}if(d){if(s===e.length-1&amp;&amp;(delete f[e[s]],Array.isArray(f)&amp;&amp;+e[s]==f.length-1))for(;f.length&amp;&amp;void 0===f[f.length-1];)f.pop()}else f[e[s]]=n}}function l(t,e){var r=e;return n(e)?r=&quot;[&quot;+e+&quot;]&quot;:t&amp;&amp;(r=&quot;.&quot;+e),t+r}function c(t,e,r,n){var a,l=i(r),c=!0,f=r,h=n.replace(&quot;-1&quot;,0),p=!l&amp;&amp;o(r,h),d=e[0];for(a=0;a&lt;t.length;a++)h=n.replace(&quot;-1&quot;,a),l&amp;&amp;(p=o(f=r[a%r.length],h)),p&amp;&amp;(c=!1),u(t,a,d,p)&amp;&amp;s(t[a],e,n.replace(&quot;-1&quot;,a))(f);return c}function u(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]=&quot;number&quot;==typeof r?[]:{}}return!0}},{&quot;./is_array&quot;:694,&quot;fast-isnumeric&quot;:213}],703:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){}},{}],704:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=[];e.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:&quot;long&quot;===e&amp;&amp;(r=3e3);var o=n.select(&quot;body&quot;).selectAll(&quot;.plotly-notifier&quot;).data([0]);o.enter().append(&quot;div&quot;).classed(&quot;plotly-notifier&quot;,!0),o.selectAll(&quot;.notifier-note&quot;).data(a).enter().append(&quot;div&quot;).classed(&quot;notifier-note&quot;,!0).style(&quot;opacity&quot;,0).each(function(t){var e=n.select(this);e.append(&quot;button&quot;).classed(&quot;notifier-close&quot;,!0).html(&quot;&amp;times;&quot;).on(&quot;click&quot;,function(){e.transition().call(s)});for(var i=e.append(&quot;p&quot;),a=t.split(/&lt;br\s*\/?&gt;/g),o=0;o&lt;a.length;o++)o&amp;&amp;i.append(&quot;br&quot;),i.append(&quot;span&quot;).text(a[o]);e.transition().duration(700).style(&quot;opacity&quot;,1).transition().delay(r).call(s)})}function s(t){t.duration(700).style(&quot;opacity&quot;,0).each(&quot;end&quot;,function(t){var e=a.indexOf(t);-1!==e&amp;&amp;a.splice(e,1),n.select(this).remove()})}}},{d3:147,&quot;fast-isnumeric&quot;:213}],705:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./setcursor&quot;),i=&quot;data-savedcursor&quot;;e.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr(&quot;class&quot;)||&quot;&quot;).split(&quot; &quot;),o=0;o&lt;a.length;o++){var s=a[o];0===s.indexOf(&quot;cursor-&quot;)&amp;&amp;t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,&quot;!!&quot;)}n(t,e)}else r&amp;&amp;(t.attr(i,null),&quot;!!&quot;===r?n(t):n(t,r))}},{&quot;./setcursor&quot;:714}],706:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./matrix&quot;).dot,i=t(&quot;../constants/numerical&quot;).BADNUM,a=e.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r.push(r[0]),e=1;e&lt;r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,c=!1;5===r.length&amp;&amp;(r[0][0]===r[1][0]?r[2][0]===r[3][0]&amp;&amp;r[0][1]===r[3][1]&amp;&amp;r[1][1]===r[2][1]&amp;&amp;(c=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&amp;&amp;r[2][1]===r[3][1]&amp;&amp;r[0][0]===r[3][0]&amp;&amp;r[1][0]===r[2][0]&amp;&amp;(c=!0,l=function(t){return t[1]===r[0][1]}));var u=!0,f=r[0];for(e=1;e&lt;r.length;e++)if(f[0]!==r[e][0]||f[1]!==r[e][1]){u=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:c?function(t,e){var r=t[0],c=t[1];return!(r===i||r&lt;n||r&gt;a||c===i||c&lt;o||c&gt;s||e&amp;&amp;l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||l&lt;n||l&gt;a||c===i||c&lt;o||c&gt;s)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;u&lt;g;u++)if(f=m,h=v,m=r[u][0],v=r[u][1],!(l&lt;(p=Math.min(f,m))||l&gt;Math.max(f,m)||c&gt;Math.max(h,v)))if(c&lt;Math.min(h,v))l!==p&amp;&amp;y++;else{if(c===(d=m===f?c:h+(l-f)*(v-h)/(m-f)))return 1!==u||!e;c&lt;=d&amp;&amp;l!==p&amp;&amp;y++}return y%2==1},isRect:c,degenerate:u}};var o=a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],c=[t[r][0]-l[0],t[r][1]-l[1]],u=n(c,c),f=Math.sqrt(u),h=[-c[1]/f,c[0]/f];for(a=e+1;a&lt;r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,c))&lt;0||s&gt;u||Math.abs(n(o,h))&gt;i)return!0;return!1};a.filter=function(t,e){var r=[t[0]],n=0,i=0;function a(a){t.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c&lt;t.length;c++)(c===t.length-1||o(t,l,c+1,e))&amp;&amp;(r.push(t[c]),r.length&lt;s-2&amp;&amp;(n=c,i=r.length-1),l=c)}t.length&gt;1&amp;&amp;a(t.pop());return{addPt:a,raw:t,filtered:r}}},{&quot;../constants/numerical&quot;:670,&quot;./matrix&quot;:700}],707:[function(t,e,r){(function(r){&quot;use strict&quot;;var n=t(&quot;./show_no_webgl_msg&quot;),i=t(&quot;regl&quot;);e.exports=function(t,e){var a=t._fullLayout,o=!0;return a._glcanvas.each(function(n){if(!n.regl&amp;&amp;(!n.pick||a._has(&quot;parcoords&quot;))){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}o&amp;&amp;this.addEventListener(&quot;webglcontextlost&quot;,function(e){t&amp;&amp;t.emit&amp;&amp;t.emit(&quot;plotly_webglcontextlost&quot;,{event:e,layer:n.key})},!1)}}),o||n({container:a._glcontainer.node()}),o}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;./show_no_webgl_msg&quot;:715,regl:475}],708:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;r&lt;t.length;r++)if(t[r]instanceof RegExp&amp;&amp;t[r].toString()===n)return t;t.push(e)}else!e&amp;&amp;0!==e||-1!==t.indexOf(e)||t.push(e);return t}},{}],709:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../plot_api/plot_config&quot;);var a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&amp;&amp;(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length&gt;i.queueLength&amp;&amp;(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&amp;&amp;t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index&lt;=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r&lt;e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(t.framework&amp;&amp;t.framework.isPolar)t.framework.redo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index&gt;=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r&lt;e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}}};a.plotDo=function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a&lt;e.length;a++)r=e[a],i[a]=r===t?r:&quot;object&quot;==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)},e.exports=a},{&quot;../lib&quot;:693,&quot;../plot_api/plot_config&quot;:730}],710:[function(t,e,r){&quot;use strict&quot;;r.counter=function(t,e,r){var n=(e||&quot;&quot;)+(r?&quot;&quot;:&quot;$&quot;);return&quot;xy&quot;===t?new RegExp(&quot;^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?&quot;+n):new RegExp(&quot;^&quot;+t+&quot;([2-9]|[1-9][0-9]+)?&quot;+n)}},{}],711:[function(t,e,r){&quot;use strict&quot;;var n=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,i=/^[^\.\[\]]+$/;e.exports=function(t,e){for(;e;){var r=t.match(n);if(r)t=r[1];else{if(!t.match(i))throw new Error(&quot;bad relativeAttr call:&quot;+[t,e]);t=&quot;&quot;}if(&quot;^&quot;!==e.charAt(0))break;e=e.slice(1)}return t&amp;&amp;&quot;[&quot;!==e.charAt(0)?t+&quot;.&quot;+e:t+e}},{}],712:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is_array&quot;).isArrayOrTypedArray,i=t(&quot;./is_plain_object&quot;);e.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if(&quot;_&quot;===a.charAt(0)||&quot;function&quot;==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&amp;&amp;n(s)&amp;&amp;i(o[0])){if(&quot;customdata&quot;===a||&quot;ids&quot;===a)continue;for(var l=Math.min(o.length,s.length),c=0;c&lt;l;c++)s[c]!==o[c]&amp;&amp;i(o[c])&amp;&amp;i(s[c])&amp;&amp;t(s[c],o[c])}else i(o)&amp;&amp;i(s)&amp;&amp;(t(s,o),Object.keys(s).length||delete e[a])}}},{&quot;./is_array&quot;:694,&quot;./is_plain_object&quot;:695}],713:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;./loggers&quot;),a=t(&quot;./identity&quot;);function o(t,e){return t&lt;e}function s(t,e){return t&lt;=e}function l(t,e){return t&gt;e}function c(t,e){return t&gt;=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,u,f=0,h=e.length,p=0,d=h&gt;1?(e[h-1]-e[0])/(h-1):1;for(u=d&gt;=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d&gt;=0?1:-1);f&lt;h&amp;&amp;p++&lt;100;)u(e[a=Math.floor((f+h)/2)],t)?f=a+1:h=a;return p&gt;90&amp;&amp;i.log(&quot;Long binary search...&quot;),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;s&lt;n;s++)e[s+1]&gt;e[s]+a&amp;&amp;(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i&lt;a&amp;&amp;o++&lt;100;)e[n=c((i+a)/2)]&lt;=t?i=n+s:a=n-l;return e[i]},r.sort=function(t,e){for(var r=0,n=0,i=1;i&lt;t.length;i++){var a=e(t[i],t[i-1]);if(a&lt;0?r=1:a&gt;0&amp;&amp;(n=1),r&amp;&amp;n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;i&lt;t.length;i++){var o=e(t[i]);o&lt;n&amp;&amp;(n=o,r=i)}return r}},{&quot;./identity&quot;:692,&quot;./loggers&quot;:698,&quot;fast-isnumeric&quot;:213}],714:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){(t.attr(&quot;class&quot;)||&quot;&quot;).split(&quot; &quot;).forEach(function(e){0===e.indexOf(&quot;cursor-&quot;)&amp;&amp;t.classed(e,!1)}),e&amp;&amp;t.classed(&quot;cursor-&quot;+e,!0)}},{}],715:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../components/color&quot;),i=function(){};e.exports=function(t){for(var e in t)&quot;function&quot;==typeof t[e]&amp;&amp;(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement(&quot;div&quot;);r.className=&quot;no-webgl&quot;,r.style.cursor=&quot;pointer&quot;,r.style.fontSize=&quot;24px&quot;,r.style.color=n.defaults[0],r.style.position=&quot;absolute&quot;,r.style.left=r.style.top=&quot;0px&quot;,r.style.width=r.style.height=&quot;100%&quot;,r.style[&quot;background-color&quot;]=n.lightLine,r.style[&quot;z-index&quot;]=30;var a=document.createElement(&quot;p&quot;);return a.textContent=&quot;WebGL is not supported by your browser - visit https://get.webgl.org for more info&quot;,a.style.position=&quot;relative&quot;,a.style.top=&quot;50%&quot;,a.style.left=&quot;50%&quot;,a.style.height=&quot;30%&quot;,a.style.width=&quot;50%&quot;,a.style.margin=&quot;-15% 0 0 -25%&quot;,r.appendChild(a),t.container.appendChild(r),t.container.style.background=&quot;#FFFFFF&quot;,t.container.onclick=function(){window.open(&quot;https://get.webgl.org&quot;)},!1}},{&quot;../components/color&quot;:567}],716:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;./is_array&quot;).isArrayOrTypedArray;r.aggNums=function(t,e,a,o){var s,l;if((!o||o&gt;a.length)&amp;&amp;(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;s&lt;o;s++)l[s]=r.aggNums(t,e,a[s]);a=l}for(s=0;s&lt;o;s++)n(e)?n(a[s])&amp;&amp;(e=t(+e,+a[s])):e=a[s];return e},r.len=function(t){return r.aggNums(function(t){return t+1},0,t)},r.mean=function(t,e){return e||(e=r.len(t)),r.aggNums(function(t,e){return t+e},0,t)/e},r.midRange=function(t){if(void 0!==t&amp;&amp;0!==t.length)return(r.aggNums(Math.max,null,t)+r.aggNums(Math.min,null,t))/2},r.variance=function(t,e,i){return e||(e=r.len(t)),n(i)||(i=r.mean(t,e)),r.aggNums(function(t,e){return t+Math.pow(e-i,2)},0,t)/e},r.stdev=function(t,e,n){return Math.sqrt(r.variance(t,e,n))},r.interp=function(t,e){if(!n(e))throw&quot;n should be a finite number&quot;;if((e=e*t.length-.5)&lt;0)return t[0];if(e&gt;t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{&quot;./is_array&quot;:694,&quot;fast-isnumeric&quot;:213}],717:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-normalize&quot;);e.exports=function(t){return t?n(t):[0,0,0,1]}},{&quot;color-normalize&quot;:107}],718:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../lib&quot;),a=t(&quot;../constants/xmlns_namespaces&quot;),o=t(&quot;../constants/alignment&quot;).LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,m){var S=t.text(),E=!t.attr(&quot;data-notex&quot;)&amp;&amp;&quot;undefined&quot;!=typeof MathJax&amp;&amp;S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var z=t.attr(&quot;class&quot;)?t.attr(&quot;class&quot;).split(&quot; &quot;)[0]:&quot;text&quot;;return z+=&quot;-math&quot;,L.selectAll(&quot;svg.&quot;+z).remove(),L.selectAll(&quot;g.&quot;+z+&quot;-group&quot;).remove(),t.style(&quot;display&quot;,null).attr({&quot;data-unformatted&quot;:S,&quot;data-math&quot;:&quot;N&quot;}),E?(e&amp;&amp;e._promises||[]).push(new Promise(function(e){t.style(&quot;display&quot;,&quot;none&quot;);var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var a=&quot;math-output-&quot;+i.randstr({},64),o=n.select(&quot;body&quot;).append(&quot;div&quot;).attr({id:a}).style({visibility:&quot;hidden&quot;,position:&quot;absolute&quot;}).style({&quot;font-size&quot;:e.fontSize+&quot;px&quot;}).text((s=t,s.replace(c,&quot;\\lt &quot;).replace(u,&quot;\\gt &quot;)));var s;MathJax.Hub.Queue([&quot;Typeset&quot;,MathJax.Hub,o.node()],function(){var e=n.select(&quot;body&quot;).select(&quot;#MathJax_SVG_glyphs&quot;);if(o.select(&quot;.MathJax_SVG&quot;).empty()||!o.select(&quot;svg&quot;).node())i.log(&quot;There was an error in the tex syntax.&quot;,t),r();else{var a=o.select(&quot;svg&quot;).node().getBoundingClientRect();r(o.select(&quot;.MathJax_SVG&quot;),e,a)}o.remove()})}(E[2],a,function(n,i,a){L.selectAll(&quot;svg.&quot;+z).remove(),L.selectAll(&quot;g.&quot;+z+&quot;-group&quot;).remove();var o=n&amp;&amp;n.select(&quot;svg&quot;);if(!o||!o.node())return P(),void e();var l=L.append(&quot;g&quot;).classed(z+&quot;-group&quot;,!0).attr({&quot;pointer-events&quot;:&quot;none&quot;,&quot;data-unformatted&quot;:S,&quot;data-math&quot;:&quot;Y&quot;});l.node().appendChild(o.node()),i&amp;&amp;i.node()&amp;&amp;o.node().insertBefore(i.node().cloneNode(!0),o.node().firstChild),o.attr({class:z,height:a.height,preserveAspectRatio:&quot;xMinYMin meet&quot;}).style({overflow:&quot;visible&quot;,&quot;pointer-events&quot;:&quot;none&quot;});var c=t.node().style.fill||&quot;black&quot;;o.select(&quot;g&quot;).attr({fill:c,stroke:c});var u=s(o,&quot;width&quot;),f=s(o,&quot;height&quot;),h=+t.attr(&quot;x&quot;)-u*{start:0,middle:.5,end:1}[t.attr(&quot;text-anchor&quot;)||&quot;start&quot;],p=-(r||s(t,&quot;height&quot;))/4;&quot;y&quot;===z[0]?(l.attr({transform:&quot;rotate(&quot;+[-90,+t.attr(&quot;x&quot;),+t.attr(&quot;y&quot;)]+&quot;) translate(&quot;+[-u/2,p-f/2]+&quot;)&quot;}),o.attr({x:+t.attr(&quot;x&quot;),y:+t.attr(&quot;y&quot;)})):&quot;l&quot;===z[0]?o.attr({x:t.attr(&quot;x&quot;),y:p-f/2}):&quot;a&quot;===z[0]?o.attr({x:0,y:p}):o.attr({x:h,y:+t.attr(&quot;y&quot;)+p-f/2}),m&amp;&amp;m.call(t,l),e(l)})})):P(),t}function P(){L.empty()||(z=t.attr(&quot;class&quot;)+&quot;-math&quot;,L.select(&quot;svg.&quot;+z).remove()),t.text(&quot;&quot;).style(&quot;white-space&quot;,&quot;pre&quot;),function(t,e){e=e.replace(v,&quot; &quot;);var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(a.svg,&quot;tspan&quot;);n.select(e).attr({class:&quot;line&quot;,dy:c*o+&quot;em&quot;}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length&gt;1)for(var s=1;s&lt;i.length;s++)m(i[s])}function m(t){var e,i=t.type,o={};if(&quot;a&quot;===i){e=&quot;a&quot;;var s=t.target,c=t.href,u=t.popup;c&amp;&amp;(o={&quot;xlink:xlink:show&quot;:&quot;_blank&quot;===s||&quot;_&quot;!==s.charAt(0)?&quot;new&quot;:&quot;replace&quot;,target:s,&quot;xlink:xlink:href&quot;:c},u&amp;&amp;(o.onclick='window.open(this.href.baseVal,this.target.baseVal,&quot;'+u+'&quot;);return false;'))}else e=&quot;tspan&quot;;t.style&amp;&amp;(o.style=t.style);var f=document.createElementNS(a.svg,e);if(&quot;sup&quot;===i||&quot;sub&quot;===i){S(r,d),r.appendChild(f);var g=document.createElementNS(a.svg,&quot;tspan&quot;);S(g,d),n.select(g).attr(&quot;dy&quot;,p[i]),o.dy=h[i],r.appendChild(f),r.appendChild(g)}else r.appendChild(f);n.select(f).attr(o),r=t.node=f,l.push(t)}function S(t,e){t.appendChild(document.createTextNode(e))}function E(t){if(1!==l.length){var n=l.pop();t!==n.type&amp;&amp;i.log(&quot;Start tag &lt;&quot;+n.type+&quot;&gt; doesnt match end tag &lt;&quot;+t+&quot;&gt;. Pretending it did match.&quot;,e),r=l[l.length-1].node}else i.log(&quot;Ignoring unexpected end tag &lt;/&quot;+t+&quot;&gt;.&quot;,e)}b.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(y),z=0;z&lt;L.length;z++){var P=L[z],O=P.match(x),I=O&amp;&amp;O[2].toLowerCase(),D=f[I];if(&quot;br&quot;===I)u();else if(void 0===D)S(r,C(P));else if(O[1])E(I);else{var R=O[4],B={type:I},F=A(R,_);if(F?(F=F.replace(T,&quot;$1 fill:&quot;),D&amp;&amp;(F+=&quot;;&quot;+D)):D&amp;&amp;(F=D),F&amp;&amp;(B.style=F),&quot;a&quot;===I){s=!0;var N=A(R,w);if(N){var j=document.createElement(&quot;a&quot;);j.href=N,-1!==g.indexOf(j.protocol)&amp;&amp;(B.href=encodeURI(decodeURI(N)),B.target=A(R,k)||&quot;_blank&quot;,B.popup=A(R,M))}}m(B)}}return s}(t.node(),S)&amp;&amp;t.style(&quot;pointer-events&quot;,&quot;all&quot;),r.positionText(t),m&amp;&amp;m.call(t)}};var c=/(&lt;|&amp;lt;|&amp;#60;)/g,u=/(&gt;|&amp;gt;|&amp;#62;)/g;var f={sup:&quot;font-size:70%&quot;,sub:&quot;font-size:70%&quot;,b:&quot;font-weight:bold&quot;,i:&quot;font-style:italic&quot;,a:&quot;cursor:pointer&quot;,span:&quot;&quot;,em:&quot;font-style:italic;font-weight:bold&quot;},h={sub:&quot;0.3em&quot;,sup:&quot;-0.6em&quot;},p={sub:&quot;-0.21em&quot;,sup:&quot;0.42em&quot;},d=&quot;\u200b&quot;,g=[&quot;http:&quot;,&quot;https:&quot;,&quot;mailto:&quot;,&quot;&quot;,void 0,&quot;:&quot;],m=new RegExp(&quot;&lt;/?(&quot;+Object.keys(f).join(&quot;|&quot;)+&quot;)( [^&gt;]*)?/?&gt;&quot;,&quot;g&quot;),v=/(\r\n?|\n)/g,y=/(&lt;[^&lt;&gt;]*&gt;)/,x=/&lt;(\/?)([^ &gt;]*)(\s+(.*))?&gt;/i,b=/&lt;br(\s+.*)?&gt;/i,_=/(^|[\s&quot;'])style\s*=\s*(&quot;([^&quot;]*);?&quot;|'([^']*);?')/i,w=/(^|[\s&quot;'])href\s*=\s*(&quot;([^&quot;]*)&quot;|'([^']*)')/i,k=/(^|[\s&quot;'])target\s*=\s*(&quot;([^&quot;\s]*)&quot;|'([^'\s]*)')/i,M=/(^|[\s&quot;'])popup\s*=\s*(&quot;([\w=,]*)&quot;|'([\w=,]*)')/i;function A(t,e){if(!t)return null;var r=t.match(e),n=r&amp;&amp;(r[3]||r[4]);return n&amp;&amp;C(n)}var T=/(^|;)\s*color:/;r.plainText=function(t){return(t||&quot;&quot;).replace(m,&quot; &quot;)};var S={mu:&quot;\u03bc&quot;,amp:&quot;&amp;&quot;,lt:&quot;&lt;&quot;,gt:&quot;&gt;&quot;,nbsp:&quot;\xa0&quot;,times:&quot;\xd7&quot;,plusmn:&quot;\xb1&quot;,deg:&quot;\xb0&quot;},E=/&amp;(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(t){return t.replace(E,function(t,e){return(&quot;#&quot;===e.charAt(0)?function(t){if(t&gt;1114111)return;var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t&lt;=65535?r(t):r(55232+(t&gt;&gt;10),t%1024+56320)}(&quot;x&quot;===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t})}function L(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||&quot;top&quot;,l=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return i=&quot;bottom&quot;===s?function(){return l.bottom-n.height}:&quot;middle&quot;===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a=&quot;right&quot;===o?function(){return l.right-n.width}:&quot;center&quot;===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-c.top+&quot;px&quot;,left:a()-c.left+&quot;px&quot;,&quot;z-index&quot;:1e3}),this}}r.convertEntities=C,r.lineCount=function(t){return t.selectAll(&quot;tspan.line&quot;).size()||1},r.positionText=function(t,e,r){return t.each(function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&amp;&amp;(t.attr(e,0),r=0):t.attr(e,r),r}var a=i(&quot;x&quot;,e),o=i(&quot;y&quot;,r);&quot;text&quot;===this.nodeName&amp;&amp;t.selectAll(&quot;tspan.line&quot;).attr({x:a,y:o})})},r.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch(&quot;edit&quot;,&quot;input&quot;,&quot;cancel&quot;),o=i||t;if(t.style({&quot;pointer-events&quot;:i?&quot;none&quot;:&quot;all&quot;}),1!==t.size())throw new Error(&quot;boo&quot;);function s(){!function(){var i=n.select(r).select(&quot;.svg-container&quot;),o=i.append(&quot;div&quot;),s=t.node().style,c=parseFloat(s.fontSize||12),u=e.text;void 0===u&amp;&amp;(u=t.attr(&quot;data-unformatted&quot;));o.classed(&quot;plugin-editable editable&quot;,!0).style({position:&quot;absolute&quot;,&quot;font-family&quot;:s.fontFamily||&quot;Arial&quot;,&quot;font-size&quot;:c,color:e.fill||s.fill||&quot;black&quot;,opacity:1,&quot;background-color&quot;:e.background||&quot;transparent&quot;,outline:&quot;#ffffff33 1px solid&quot;,margin:[-c/8+1,0,0,-1].join(&quot;px &quot;)+&quot;px&quot;,padding:&quot;0&quot;,&quot;box-sizing&quot;:&quot;border-box&quot;}).attr({contenteditable:!0}).text(u).call(L(t,i,e)).on(&quot;blur&quot;,function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr(&quot;class&quot;);(e=i?&quot;.&quot;+i.split(&quot; &quot;)[0]+&quot;-math-group&quot;:&quot;[class*=-math-group]&quot;)&amp;&amp;n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on(&quot;mouseup&quot;,null),a.edit.call(t,o)}).on(&quot;focus&quot;,function(){var t=this;r._editing=!0,n.select(document).on(&quot;mouseup&quot;,function(){if(n.event.target===t)return!1;document.activeElement===o.node()&amp;&amp;o.node().blur()})}).on(&quot;keyup&quot;,function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on(&quot;blur&quot;,function(){return!1}).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(L(t,i,e)))}).on(&quot;keydown&quot;,function(){13===n.event.which&amp;&amp;this.blur()}).call(l)}(),t.style({opacity:0});var i,s=o.attr(&quot;class&quot;);(i=s?&quot;.&quot;+s.split(&quot; &quot;)[0]+&quot;-math-group&quot;:&quot;[class*=-math-group]&quot;)&amp;&amp;n.select(t.node().parentNode).select(i).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on(&quot;click&quot;,s),n.rebind(t,a,&quot;on&quot;)}},{&quot;../constants/alignment&quot;:665,&quot;../constants/xmlns_namespaces&quot;:671,&quot;../lib&quot;:693,d3:147}],719:[function(t,e,r){&quot;use strict&quot;;var n={};function i(t){t&amp;&amp;null!==t.timer&amp;&amp;(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var a=n[t],o=Date.now();if(!a){for(var s in n)n[s].ts&lt;o-6e4&amp;&amp;delete n[s];a=n[t]={ts:0,timer:null}}function l(){r(),a.ts=Date.now(),a.onDone&amp;&amp;(a.onDone(),a.onDone=null)}i(a),o&gt;a.ts+e?l():a.timer=setTimeout(function(){l(),a.timer=null},e)},r.done=function(t){var e=n[t];return e&amp;&amp;e.timer?new Promise(function(t){var r=e.onDone;e.onDone=function(){r&amp;&amp;r(),t(),e.onDone=null}}):Promise.resolve()},r.clear=function(t){if(t)i(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],720:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;);e.exports=function(t,e){if(t&gt;0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{&quot;fast-isnumeric&quot;:213}],721:[function(t,e,r){&quot;use strict&quot;;var n=e.exports={},i=t(&quot;../plots/geo/constants&quot;).locationmodeToLayer,a=t(&quot;topojson-client&quot;).feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,&quot;-&quot;),&quot;_&quot;,t.resolution.toString(),&quot;m&quot;].join(&quot;&quot;)},n.getTopojsonPath=function(t,e){return t+e+&quot;.json&quot;},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{&quot;../plots/geo/constants&quot;:770,&quot;topojson-client&quot;:514}],722:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;locale&quot;,name:&quot;en-US&quot;,dictionary:{&quot;Click to enter Colorscale title&quot;:&quot;Click to enter Colorscale title&quot;},format:{date:&quot;%m/%d/%Y&quot;}}},{}],723:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;locale&quot;,name:&quot;en&quot;,dictionary:{&quot;Click to enter Colorscale title&quot;:&quot;Click to enter Colourscale title&quot;},format:{days:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],shortDays:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],months:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],shortMonths:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],periods:[&quot;AM&quot;,&quot;PM&quot;],dateTime:&quot;%a %b %e %X %Y&quot;,date:&quot;%d/%m/%Y&quot;,time:&quot;%H:%M:%S&quot;,decimal:&quot;.&quot;,thousands:&quot;,&quot;,grouping:[3],currency:[&quot;$&quot;,&quot;&quot;],year:&quot;%Y&quot;,month:&quot;%b %Y&quot;,dayMonth:&quot;%b %-d&quot;,dayMonthYear:&quot;%b %-d, %Y&quot;}}},{}],724:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../registry&quot;);e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split(&quot;[&quot;)[0],s=0;s&lt;a.length;s++)if((r=t.match(a[s]))&amp;&amp;0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&amp;&amp;{array:e,index:Number(r[1]),property:r[3]||&quot;&quot;}:{array:e,index:&quot;&quot;,property:&quot;&quot;}}},{&quot;../registry&quot;:825}],725:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=n.extendFlat,a=n.isPlainObject,o={valType:&quot;flaglist&quot;,extras:[&quot;none&quot;],flags:[&quot;calc&quot;,&quot;clearAxisTypes&quot;,&quot;plot&quot;,&quot;style&quot;,&quot;colorbars&quot;]},s={valType:&quot;flaglist&quot;,extras:[&quot;none&quot;],flags:[&quot;calc&quot;,&quot;plot&quot;,&quot;legend&quot;,&quot;ticks&quot;,&quot;axrange&quot;,&quot;layoutstyle&quot;,&quot;modebar&quot;,&quot;camera&quot;,&quot;arraydraw&quot;]},l=o.flags.slice().concat([&quot;fullReplot&quot;]),c=s.flags.slice().concat(&quot;layoutReplot&quot;);function u(t){for(var e={},r=0;r&lt;t.length;r++)e[t[r]]=!1;return e}function f(t,e,r){var n=i({},t);for(var o in n){var s=n[o];a(s)&amp;&amp;(n[o]=h(s,e,r,o))}return&quot;from-root&quot;===r&amp;&amp;(n.editType=e),n}function h(t,e,r,n){if(t.valType){var a=i({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o&lt;t.items.length;o++)a.items[o]=h(t.items[o],e,&quot;from-root&quot;)}return a}return f(t,e,&quot;_&quot;===n.charAt(0)?&quot;nested&quot;:&quot;from-root&quot;)}e.exports={traces:o,layout:s,traceFlags:function(){return u(l)},layoutFlags:function(){return u(c)},update:function(t,e){var r=e.editType;if(r&amp;&amp;&quot;none&quot;!==r)for(var n=r.split(&quot;+&quot;),i=0;i&lt;n.length;i++)t[n[i]]=!0},overrideAll:f}},{&quot;../lib&quot;:693}],726:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;gl-mat4/fromQuat&quot;),a=t(&quot;../registry&quot;),o=t(&quot;../lib&quot;),s=t(&quot;../plots/plots&quot;),l=t(&quot;../plots/cartesian/axis_ids&quot;),c=l.cleanId,u=l.getFromTrace,f=t(&quot;../components/color&quot;);function h(t,e){var r=t[e],n=e.charAt(0);r&amp;&amp;&quot;paper&quot;!==r&amp;&amp;(t[e]=c(r,n))}function p(t){if(!o.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,(&quot;string&quot;==typeof e||&quot;number&quot;==typeof e)&amp;&amp;String(e)}function d(t,e,r,n){if(r&amp;&amp;!n)return t;if(n&amp;&amp;!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,a=Math.min(t.length,e.length);for(i=0;i&lt;a&amp;&amp;t.charAt(i)===e.charAt(i);i++);return t.substr(0,i).trim()}function g(t){var e=&quot;middle&quot;,r=&quot;center&quot;;return-1!==t.indexOf(&quot;top&quot;)?e=&quot;top&quot;:-1!==t.indexOf(&quot;bottom&quot;)&amp;&amp;(e=&quot;bottom&quot;),-1!==t.indexOf(&quot;left&quot;)?r=&quot;left&quot;:-1!==t.indexOf(&quot;right&quot;)&amp;&amp;(r=&quot;right&quot;),e+&quot; &quot;+r}function m(t,e){return e in t&amp;&amp;&quot;object&quot;==typeof t[e]&amp;&amp;0===Object.keys(t[e]).length}r.clearPromiseQueue=function(t){Array.isArray(t._promises)&amp;&amp;t._promises.length&gt;0&amp;&amp;o.log(&quot;Clearing previous rejected promises from queue.&quot;),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&amp;&amp;(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&amp;&amp;(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&amp;&amp;(t.scene||(t.scene=t.scene1),delete t.scene1);var n=(s.subplotsRegistry.cartesian||{}).attrRegex,a=(s.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(t);for(e=0;e&lt;l.length;e++){var u=l[e];if(n&amp;&amp;n.test(u)){var p=t[u];p.anchor&amp;&amp;&quot;free&quot;!==p.anchor&amp;&amp;(p.anchor=c(p.anchor)),p.overlaying&amp;&amp;(p.overlaying=c(p.overlaying)),p.type||(p.isdate?p.type=&quot;date&quot;:p.islog?p.type=&quot;log&quot;:!1===p.isdate&amp;&amp;!1===p.islog&amp;&amp;(p.type=&quot;linear&quot;)),&quot;withzero&quot;!==p.autorange&amp;&amp;&quot;tozero&quot;!==p.autorange||(p.autorange=!0,p.rangemode=&quot;tozero&quot;),delete p.islog,delete p.isdate,delete p.categories,m(p,&quot;domain&quot;)&amp;&amp;delete p.domain,void 0!==p.autotick&amp;&amp;(void 0===p.tickmode&amp;&amp;(p.tickmode=p.autotick?&quot;auto&quot;:&quot;linear&quot;),delete p.autotick)}else if(a&amp;&amp;a.test(u)){var d=t[u],g=d.cameraposition;if(Array.isArray(g)&amp;&amp;4===g[0].length){var v=g[0],y=g[1],x=g[2],b=i([],v),_=[];for(r=0;r&lt;3;++r)_[r]=y[r]+x*b[2+4*r];d.camera={eye:{x:_[0],y:_[1],z:_[2]},center:{x:y[0],y:y[1],z:y[2]},up:{x:b[1],y:b[5],z:b[9]}},delete d.cameraposition}}}var w=Array.isArray(t.annotations)?t.annotations.length:0;for(e=0;e&lt;w;e++){var k=t.annotations[e];o.isPlainObject(k)&amp;&amp;(k.ref&amp;&amp;(&quot;paper&quot;===k.ref?(k.xref=&quot;paper&quot;,k.yref=&quot;paper&quot;):&quot;data&quot;===k.ref&amp;&amp;(k.xref=&quot;x&quot;,k.yref=&quot;y&quot;),delete k.ref),h(k,&quot;xref&quot;),h(k,&quot;yref&quot;))}var M=Array.isArray(t.shapes)?t.shapes.length:0;for(e=0;e&lt;M;e++){var A=t.shapes[e];o.isPlainObject(A)&amp;&amp;(h(A,&quot;xref&quot;),h(A,&quot;yref&quot;))}var T=t.legend;return T&amp;&amp;(T.x&gt;3?(T.x=1.02,T.xanchor=&quot;left&quot;):T.x&lt;-2&amp;&amp;(T.x=-.02,T.xanchor=&quot;right&quot;),T.y&gt;3?(T.y=1.02,T.yanchor=&quot;bottom&quot;):T.y&lt;-2&amp;&amp;(T.y=-.02,T.yanchor=&quot;top&quot;)),&quot;rotate&quot;===t.dragmode&amp;&amp;(t.dragmode=&quot;orbit&quot;),f.clean(t),t},r.cleanData=function(t){for(var e=0;e&lt;t.length;e++){var n,i=t[e];if(&quot;histogramy&quot;===i.type&amp;&amp;&quot;xbins&quot;in i&amp;&amp;!(&quot;ybins&quot;in i)&amp;&amp;(i.ybins=i.xbins,delete i.xbins),i.error_y&amp;&amp;&quot;opacity&quot;in i.error_y){var l=f.defaults,u=i.error_y.color||(a.traceIs(i,&quot;bar&quot;)?f.defaultLine:l[e%l.length]);i.error_y.color=f.addOpacity(f.rgb(u),f.opacity(u)*i.error_y.opacity),delete i.error_y.opacity}if(&quot;bardir&quot;in i&amp;&amp;(&quot;h&quot;!==i.bardir||!a.traceIs(i,&quot;bar&quot;)&amp;&amp;&quot;histogram&quot;!==i.type.substr(0,9)||(i.orientation=&quot;h&quot;,r.swapXYData(i)),delete i.bardir),&quot;histogramy&quot;===i.type&amp;&amp;r.swapXYData(i),&quot;histogramx&quot;!==i.type&amp;&amp;&quot;histogramy&quot;!==i.type||(i.type=&quot;histogram&quot;),&quot;scl&quot;in i&amp;&amp;(i.colorscale=i.scl,delete i.scl),&quot;reversescl&quot;in i&amp;&amp;(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&amp;&amp;(i.xaxis=c(i.xaxis,&quot;x&quot;)),i.yaxis&amp;&amp;(i.yaxis=c(i.yaxis,&quot;y&quot;)),a.traceIs(i,&quot;gl3d&quot;)&amp;&amp;i.scene&amp;&amp;(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!a.traceIs(i,&quot;pie&quot;)&amp;&amp;!a.traceIs(i,&quot;bar&quot;))if(Array.isArray(i.textposition))for(n=0;n&lt;i.textposition.length;n++)i.textposition[n]=g(i.textposition[n]);else i.textposition&amp;&amp;(i.textposition=g(i.textposition));var h=a.getModule(i);if(h&amp;&amp;h.colorbar){var v=h.colorbar.container,y=v?i[v]:i;y&amp;&amp;y.colorscale&amp;&amp;(&quot;YIGnBu&quot;===y.colorscale&amp;&amp;(y.colorscale=&quot;YlGnBu&quot;),&quot;YIOrRd&quot;===y.colorscale&amp;&amp;(y.colorscale=&quot;YlOrRd&quot;))}if(&quot;surface&quot;===i.type&amp;&amp;o.isPlainObject(i.contours)){var x=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;];for(n=0;n&lt;x.length;n++){var b=i.contours[x[n]];o.isPlainObject(b)&amp;&amp;(b.highlightColor&amp;&amp;(b.highlightcolor=b.highlightColor,delete b.highlightColor),b.highlightWidth&amp;&amp;(b.highlightwidth=b.highlightWidth,delete b.highlightWidth))}}if(&quot;candlestick&quot;===i.type||&quot;ohlc&quot;===i.type){var _=!1!==(i.increasing||{}).showlegend,w=!1!==(i.decreasing||{}).showlegend,k=p(i.increasing),M=p(i.decreasing);if(!1!==k&amp;&amp;!1!==M){var A=d(k,M,_,w);A&amp;&amp;(i.name=A)}else!k&amp;&amp;!M||i.name||(i.name=k||M)}if(Array.isArray(i.transforms)){var T=i.transforms;for(n=0;n&lt;T.length;n++){var S=T[n];if(o.isPlainObject(S))switch(S.type){case&quot;filter&quot;:S.filtersrc&amp;&amp;(S.target=S.filtersrc,delete S.filtersrc),S.calendar&amp;&amp;(S.valuecalendar||(S.valuecalendar=S.calendar),delete S.calendar);break;case&quot;groupby&quot;:if(S.styles=S.styles||S.style,S.styles&amp;&amp;!Array.isArray(S.styles)){var E=S.styles,C=Object.keys(E);S.styles=[];for(var L=0;L&lt;C.length;L++)S.styles.push({target:C[L],value:E[C[L]]})}}}}m(i,&quot;line&quot;)&amp;&amp;delete i.line,&quot;marker&quot;in i&amp;&amp;(m(i.marker,&quot;line&quot;)&amp;&amp;delete i.marker.line,m(i,&quot;marker&quot;)&amp;&amp;delete i.marker),f.clean(i)}},r.swapXYData=function(t){var e;if(o.swapAttrs(t,[&quot;?&quot;,&quot;?0&quot;,&quot;d?&quot;,&quot;?bins&quot;,&quot;nbins?&quot;,&quot;autobin?&quot;,&quot;?src&quot;,&quot;error_?&quot;]),Array.isArray(t.z)&amp;&amp;Array.isArray(t.z[0])&amp;&amp;(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&amp;&amp;t.error_y){var r=t.error_y,n=&quot;copy_ystyle&quot;in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(t,[&quot;error_?.copy_ystyle&quot;]),n&amp;&amp;o.swapAttrs(t,[&quot;error_?.color&quot;,&quot;error_?.thickness&quot;,&quot;error_?.width&quot;])}if(&quot;string&quot;==typeof t.hoverinfo){var i=t.hoverinfo.split(&quot;+&quot;);for(e=0;e&lt;i.length;e++)&quot;x&quot;===i[e]?i[e]=&quot;y&quot;:&quot;y&quot;===i[e]&amp;&amp;(i[e]=&quot;x&quot;);t.hoverinfo=i.join(&quot;+&quot;)}},r.coerceTraceIndices=function(t,e){return n(e)?[e]:Array.isArray(e)&amp;&amp;e.length?e:t.data.map(function(t,e){return e})},r.manageArrayContainers=function(t,e,r){var i=t.obj,a=t.parts,s=a.length,l=a[s-1],c=n(l);if(c&amp;&amp;null===e){var u=a.slice(0,s-1).join(&quot;.&quot;);o.nestedProperty(i,u).get().splice(l,1)}else c&amp;&amp;void 0===t.get()?(void 0===t.get()&amp;&amp;(r[t.astr]=null),t.set(e)):t.set(e)};var v=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function y(t){var e=t.search(v);if(e&gt;0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=y(e);r;){if(r in t)return!0;r=y(r)}return!1};var x=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;];r.clearAxisTypes=function(t,e,r){for(var n=0;n&lt;e.length;n++)for(var i=t._fullData[n],a=0;a&lt;3;a++){var s=u(t,i,x[a]);if(s&amp;&amp;&quot;log&quot;!==s.type){var l=s._name,c=s._id.substr(1);if(&quot;scene&quot;===c.substr(0,5)){if(void 0!==r[c])continue;l=c+&quot;.&quot;+l}var f=l+&quot;.type&quot;;void 0===r[l]&amp;&amp;void 0===r[f]&amp;&amp;o.nestedProperty(t.layout,f).set(null)}}}},{&quot;../components/color&quot;:567,&quot;../lib&quot;:693,&quot;../plots/cartesian/axis_ids&quot;:745,&quot;../plots/plots&quot;:805,&quot;../registry&quot;:825,&quot;fast-isnumeric&quot;:213,&quot;gl-mat4/fromQuat&quot;:250}],727:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./plot_api&quot;);r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.react=n.react,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.setPlotConfig=n.setPlotConfig,r.toImage=t(&quot;./to_image&quot;),r.validate=t(&quot;./validate&quot;),r.downloadImage=t(&quot;../snapshot/download&quot;);var i=t(&quot;./template_api&quot;);r.makeTemplate=i.makeTemplate,r.validateTemplate=i.validateTemplate},{&quot;../snapshot/download&quot;:827,&quot;./plot_api&quot;:729,&quot;./template_api&quot;:734,&quot;./to_image&quot;:735,&quot;./validate&quot;:736}],728:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib/nested_property&quot;),i=t(&quot;../lib/is_plain_object&quot;),a=t(&quot;../lib/noop&quot;),o=t(&quot;../lib/loggers&quot;),s=t(&quot;../lib/search&quot;).sorterAsc,l=t(&quot;../registry&quot;);r.containerArrayMatch=t(&quot;./container_array_match&quot;);var c=r.isAddVal=function(t){return&quot;add&quot;===t||i(t)},u=r.isRemoveVal=function(t){return null===t||&quot;remove&quot;===t};r.applyContainerArrayChanges=function(t,e,r,i){var f=e.astr,h=l.getComponentMethod(f,&quot;supplyLayoutDefaults&quot;),p=l.getComponentMethod(f,&quot;draw&quot;),d=l.getComponentMethod(f,&quot;drawOne&quot;),g=i.replot||i.recalc||h===a||p===a,m=t.layout,v=t._fullLayout;if(r[&quot;&quot;]){Object.keys(r).length&gt;1&amp;&amp;o.warn(&quot;Full array edits are incompatible with other edits&quot;,f);var y=r[&quot;&quot;][&quot;&quot;];if(u(y))e.set(null);else{if(!Array.isArray(y))return o.warn(&quot;Unrecognized full array edit value&quot;,f,y),!0;e.set(y)}return!g&amp;&amp;(h(m,v),p(t),!0)}var x,b,_,w,k,M,A,T=Object.keys(r).map(Number).sort(s),S=e.get(),E=S||[],C=n(v,f).get(),L=[],z=-1,P=E.length;for(x=0;x&lt;T.length;x++)if(w=r[_=T[x]],k=Object.keys(w),M=w[&quot;&quot;],A=c(M),_&lt;0||_&gt;E.length-(A?0:1))o.warn(&quot;index out of range&quot;,f,_);else if(void 0!==M)k.length&gt;1&amp;&amp;o.warn(&quot;Insertion &amp; removal are incompatible with edits to the same index.&quot;,f,_),u(M)?L.push(_):A?(&quot;add&quot;===M&amp;&amp;(M={}),E.splice(_,0,M),C&amp;&amp;C.splice(_,0,{})):o.warn(&quot;Unrecognized full object edit value&quot;,f,_,M),-1===z&amp;&amp;(z=_);else for(b=0;b&lt;k.length;b++)n(E[_],k[b]).set(w[k[b]]);for(x=L.length-1;x&gt;=0;x--)E.splice(L[x],1),C&amp;&amp;C.splice(L[x],1);if(E.length?S||e.set(E):e.set(null),g)return!1;if(h(m,v),d!==a){var O;if(-1===z)O=T;else{for(P=Math.max(E.length,P),O=[],x=0;x&lt;T.length&amp;&amp;!((_=T[x])&gt;=z);x++)O.push(_);for(x=z;x&lt;P;x++)O.push(x)}for(x=0;x&lt;O.length;x++)d(t,O[x])}else p(t);return!0}},{&quot;../lib/is_plain_object&quot;:695,&quot;../lib/loggers&quot;:698,&quot;../lib/nested_property&quot;:702,&quot;../lib/noop&quot;:703,&quot;../lib/search&quot;:713,&quot;../registry&quot;:825,&quot;./container_array_match&quot;:724}],729:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;has-hover&quot;),o=t(&quot;../lib&quot;),s=t(&quot;../lib/events&quot;),l=t(&quot;../lib/queue&quot;),c=t(&quot;../registry&quot;),u=t(&quot;./plot_schema&quot;),f=t(&quot;../plots/plots&quot;),h=t(&quot;../plots/polar/legacy&quot;),p=t(&quot;../plots/cartesian/axes&quot;),d=t(&quot;../components/drawing&quot;),g=t(&quot;../components/color&quot;),m=t(&quot;../components/colorbar/connect&quot;),v=t(&quot;../plots/cartesian/graph_interact&quot;).initInteractions,y=t(&quot;../constants/xmlns_namespaces&quot;),x=t(&quot;../lib/svg_text_utils&quot;),b=t(&quot;./plot_config&quot;),_=t(&quot;./manage_arrays&quot;),w=t(&quot;./helpers&quot;),k=t(&quot;./subroutines&quot;),M=t(&quot;./edit_types&quot;),A=t(&quot;../plots/cartesian/constants&quot;).AX_NAME_PATTERN,T=0;function S(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit(&quot;plotly_afterplot&quot;)}function E(t,e){try{t._fullLayout._paper.style(&quot;background&quot;,e)}catch(t){o.error(t)}}function C(t,e){E(t,g.combine(e,&quot;white&quot;))}function L(t,e){t._context||(t._context=o.extendDeep({},b));var r,n,i,s=t._context;if(e){for(n=Object.keys(e),r=0;r&lt;n.length;r++)&quot;editable&quot;!==(i=n[r])&amp;&amp;&quot;edits&quot;!==i&amp;&amp;i in s&amp;&amp;(&quot;setBackground&quot;===i&amp;&amp;&quot;opaque&quot;===e[i]?s[i]=C:s[i]=e[i]);e.plot3dPixelRatio&amp;&amp;!s.plotGlPixelRatio&amp;&amp;(s.plotGlPixelRatio=s.plot3dPixelRatio);var l=e.editable;if(void 0!==l)for(s.editable=l,n=Object.keys(s.edits),r=0;r&lt;n.length;r++)s.edits[n[r]]=l;if(e.edits)for(n=Object.keys(e.edits),r=0;r&lt;n.length;r++)(i=n[r])in s.edits&amp;&amp;(s.edits[i]=e.edits[i])}s.staticPlot&amp;&amp;(s.editable=!1,s.edits={},s.autosizable=!1,s.scrollZoom=!1,s.doubleClick=!1,s.showTips=!1,s.showLink=!1,s.displayModeBar=!1),&quot;hover&quot;!==s.displayModeBar||a||(s.displayModeBar=!0),&quot;transparent&quot;!==s.setBackground&amp;&amp;&quot;function&quot;==typeof s.setBackground||(s.setBackground=E)}function z(t,e){var r,n,i=e+1,a=[];for(r=0;r&lt;t.length;r++)(n=t[r])&lt;0?a.push(i+n):a.push(n);return a}function P(t,e,r){var n,i;for(n=0;n&lt;e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error(&quot;all values in &quot;+r+&quot; must be integers&quot;);if(i&gt;=t.data.length||i&lt;-t.data.length)throw new Error(r+&quot; must be valid indices for gd.data.&quot;);if(e.indexOf(i,n+1)&gt;-1||i&gt;=0&amp;&amp;e.indexOf(-t.data.length+i)&gt;-1||i&lt;0&amp;&amp;e.indexOf(t.data.length+i)&gt;-1)throw new Error(&quot;each index in &quot;+r+&quot; must be unique.&quot;)}}function O(t,e,r){if(!Array.isArray(t.data))throw new Error(&quot;gd.data must be an array.&quot;);if(&quot;undefined&quot;==typeof e)throw new Error(&quot;currentIndices is a required argument.&quot;);if(Array.isArray(e)||(e=[e]),P(t,e,&quot;currentIndices&quot;),&quot;undefined&quot;==typeof r||Array.isArray(r)||(r=[r]),&quot;undefined&quot;!=typeof r&amp;&amp;P(t,r,&quot;newIndices&quot;),&quot;undefined&quot;!=typeof r&amp;&amp;e.length!==r.length)throw new Error(&quot;current and new indices must be of equal length.&quot;)}function I(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error(&quot;gd.data must be an array&quot;);if(!o.isPlainObject(e))throw new Error(&quot;update must be a key:value object&quot;);if(&quot;undefined&quot;==typeof r)throw new Error(&quot;indices must be an integer or array of integers&quot;);for(var a in P(t,r,&quot;indices&quot;),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error(&quot;attribute &quot;+a+&quot; must be an array of length equal to indices array length&quot;);if(i&amp;&amp;(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error(&quot;when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object&quot;)}}(t,e,r,n);for(var s=function(t,e,r,n){var a,s,l,c,u,f=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=z(r,t.data.length-1),e)for(var d=0;d&lt;r.length;d++){if(a=t.data[r[d]],s=(l=o.nestedProperty(a,p)).get(),c=e[p][d],!o.isArrayOrTypedArray(c))throw new Error(&quot;attribute: &quot;+p+&quot; index: &quot;+d+&quot; must be an array&quot;);if(!o.isArrayOrTypedArray(s))throw new Error(&quot;cannot extend missing or non-array attribute: &quot;+p);if(s.constructor!==c.constructor)throw new Error(&quot;cannot extend array with an array of a different type: &quot;+p);u=f?n[p][d]:n,i(u)||(u=-1),h.push({prop:l,target:s,insert:c,maxp:Math.floor(u)})}return h}(t,e,r,n),l={},c={},u=0;u&lt;s.length;u++){var f=s[u].prop,h=s[u].maxp,p=a(s[u].target,s[u].insert,h);f.set(p[0]),Array.isArray(l[f.astr])||(l[f.astr]=[]),l[f.astr].push(p[1]),Array.isArray(c[f.astr])||(c[f.astr]=[]),c[f.astr].push(s[u].target.length)}return{update:l,maxPoints:c}}function D(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function R(t){return void 0===t?null:t}function B(t,e,r){var n,i,a=t._fullLayout,s=t._fullData,l=t.data,h=M.traceFlags(),d={},g={};function m(){return r.map(function(){})}function v(t){var e=p.id2name(t);-1===i.indexOf(e)&amp;&amp;i.push(e)}function y(t){return&quot;LAYOUT&quot;+t+&quot;.autorange&quot;}function x(t){return&quot;LAYOUT&quot;+t+&quot;.range&quot;}function b(n,i,a){var s;Array.isArray(n)?n.forEach(function(t){b(t,i,a)}):n in e||w.hasParent(e,n)||(s=&quot;LAYOUT&quot;===n.substr(0,6)?o.nestedProperty(t.layout,n.replace(&quot;LAYOUT&quot;,&quot;&quot;)):o.nestedProperty(l[r[a]],n),n in g||(g[n]=m()),void 0===g[n][a]&amp;&amp;(g[n][a]=R(s.get())),void 0!==i&amp;&amp;s.set(i))}for(var _ in e){if(w.hasParent(e,_))throw new Error(&quot;cannot set &quot;+_+&quot;and a parent attribute simultaneously&quot;);var k,A,T,S,E,C,L=e[_];if(d[_]=L,&quot;LAYOUT&quot;!==_.substr(0,6)){for(g[_]=m(),n=0;n&lt;r.length;n++)if(k=l[r[n]],A=s[r[n]],S=(T=o.nestedProperty(k,_)).get(),void 0!==(E=Array.isArray(L)?L[n%L.length]:L)){var z=T.parts[T.parts.length-1],P=_.substr(0,_.length-z.length-1),O=P?P+&quot;.&quot;:&quot;&quot;,I=P?o.nestedProperty(A,P).get():A;if((C=u.getTraceValObject(A,T.parts))&amp;&amp;C.impliedEdits&amp;&amp;null!==E)for(var D in C.impliedEdits)b(o.relativeAttr(_,D),C.impliedEdits[D],n);else if(&quot;thicknessmode&quot;!==z&amp;&amp;&quot;lenmode&quot;!==z||S===E||&quot;fraction&quot;!==E&amp;&amp;&quot;pixels&quot;!==E||!I){if(&quot;type&quot;===_&amp;&amp;&quot;pie&quot;===E!=(&quot;pie&quot;===S)){var B=&quot;x&quot;,F=&quot;y&quot;;&quot;bar&quot;!==E&amp;&amp;&quot;bar&quot;!==S||&quot;h&quot;!==k.orientation||(B=&quot;y&quot;,F=&quot;x&quot;),o.swapAttrs(k,[&quot;?&quot;,&quot;?src&quot;],&quot;labels&quot;,B),o.swapAttrs(k,[&quot;d?&quot;,&quot;?0&quot;],&quot;label&quot;,B),o.swapAttrs(k,[&quot;?&quot;,&quot;?src&quot;],&quot;values&quot;,F),&quot;pie&quot;===S?(o.nestedProperty(k,&quot;marker.color&quot;).set(o.nestedProperty(k,&quot;marker.colors&quot;).get()),a._pielayer.selectAll(&quot;g.trace&quot;).remove()):c.traceIs(k,&quot;cartesian&quot;)&amp;&amp;o.nestedProperty(k,&quot;marker.colors&quot;).set(o.nestedProperty(k,&quot;marker.color&quot;).get())}}else{var N=a._size,j=I.orient,V=&quot;top&quot;===j||&quot;bottom&quot;===j;if(&quot;thicknessmode&quot;===z){var U=V?N.h:N.w;b(O+&quot;thickness&quot;,I.thickness*(&quot;fraction&quot;===E?1/U:U),n)}else{var q=V?N.w:N.h;b(O+&quot;len&quot;,I.len*(&quot;fraction&quot;===E?1/q:q),n)}}g[_][n]=R(S);if(-1!==[&quot;swapxy&quot;,&quot;swapxyaxes&quot;,&quot;orientation&quot;,&quot;orientationaxes&quot;].indexOf(_)){if(&quot;orientation&quot;===_){T.set(E);var H=k.x&amp;&amp;!k.y?&quot;h&quot;:&quot;v&quot;;if((T.get()||H)===A.orientation)continue}else&quot;orientationaxes&quot;===_&amp;&amp;(k.orientation={v:&quot;h&quot;,h:&quot;v&quot;}[A.orientation]);w.swapXYData(k),h.calc=h.clearAxisTypes=!0}else-1!==f.dataArrayContainers.indexOf(T.parts[0])?(w.manageArrayContainers(T,E,g),h.calc=!0):(C?C.arrayOk&amp;&amp;(o.isArrayOrTypedArray(E)||o.isArrayOrTypedArray(S))?h.calc=!0:M.update(h,C):h.calc=!0,T.set(E))}if(-1!==[&quot;swapxyaxes&quot;,&quot;orientationaxes&quot;].indexOf(_)&amp;&amp;p.swap(t,r),&quot;orientationaxes&quot;===_){var G=o.nestedProperty(t.layout,&quot;hovermode&quot;);&quot;x&quot;===G.get()?G.set(&quot;y&quot;):&quot;y&quot;===G.get()&amp;&amp;G.set(&quot;x&quot;)}if(-1!==[&quot;orientation&quot;,&quot;type&quot;].indexOf(_)){for(i=[],n=0;n&lt;r.length;n++){var W=l[r[n]];c.traceIs(W,&quot;cartesian&quot;)&amp;&amp;(v(W.xaxis||&quot;x&quot;),v(W.yaxis||&quot;y&quot;),&quot;type&quot;===_&amp;&amp;b([&quot;autobinx&quot;,&quot;autobiny&quot;],!0,n))}b(i.map(y),!0,0),b(i.map(x),[0,1],0)}}else T=o.nestedProperty(t.layout,_.replace(&quot;LAYOUT&quot;,&quot;&quot;)),g[_]=[R(T.get())],T.set(Array.isArray(L)?L[0]:L),h.calc=!0}return(h.calc||h.plot)&amp;&amp;(h.fullReplot=!0),{flags:h,undoit:g,redoit:d,traces:r,eventData:o.extendDeepNoArrays([],[d,r])}}function F(t,e){var r=e?function(t){return k.doTicksRelayout(t,e)}:k.doTicksRelayout;t.push(k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}r.plot=function(t,e,i,a){var l;if(t=o.getGraphDiv(t),s.init(t),o.isPlainObject(e)){var u=e;e=u.data,i=u.layout,a=u.config,l=u.frames}if(!1===s.triggerHandler(t,&quot;plotly_beforeplot&quot;,[e,i,a]))return Promise.reject();e||i||o.isPlotDiv(t)||o.warn(&quot;Calling Plotly.plot as if redrawing but this container doesn't yet have a plot.&quot;,t),L(t,a),i||(i={}),n.select(t).classed(&quot;js-plotly-plot&quot;,!0),d.makeTester(),delete d.baseUrl,Array.isArray(t._promises)||(t._promises=[]);var g=0===(t.data||[]).length&amp;&amp;Array.isArray(e);if(Array.isArray(e)&amp;&amp;(w.cleanData(e),g?t.data=e:t.data.push.apply(t.data,e),t.empty=!1),t.layout&amp;&amp;!g||(t.layout=w.cleanLayout(i)),t._dragging&amp;&amp;!t._transitioning)return t._replotPending=!0,Promise.reject();t._replotPending=!1,f.supplyDefaults(t);var y=t._fullLayout,b=y._has(&quot;cartesian&quot;);if(!y._has(&quot;polar&quot;)&amp;&amp;e&amp;&amp;e[0]&amp;&amp;e[0].r)return o.log(&quot;Legacy polar charts are deprecated!&quot;),function(t,e,r){var i=n.select(t).selectAll(&quot;.plot-container&quot;).data([0]);i.enter().insert(&quot;div&quot;,&quot;:first-child&quot;).classed(&quot;plot-container plotly&quot;,!0);var a=i.selectAll(&quot;.svg-container&quot;).data([0]);a.enter().append(&quot;div&quot;).classed(&quot;svg-container&quot;,!0).style(&quot;position&quot;,&quot;relative&quot;),a.html(&quot;&quot;),e&amp;&amp;(t.data=e);r&amp;&amp;(t.layout=r);h.manager.fillLayout(t),a.style({width:t._fullLayout.width+&quot;px&quot;,height:t._fullLayout.height+&quot;px&quot;}),t.framework=h.manager.framework(t),t.framework({data:t.data,layout:t.layout},a.node()),t.framework.setUndoPoint();var s=t.framework.svg(),l=1,c=t._fullLayout.title;&quot;&quot;!==c&amp;&amp;c||(l=0);var u=function(){this.call(x.convertToTspans,t)},p=s.select(&quot;.title-group text&quot;).call(u);if(t._context.edits.titleText){var d=o._(t,&quot;Click to enter Plot title&quot;);c&amp;&amp;c!==d||(l=.2,p.attr({&quot;data-unformatted&quot;:d}).text(d).style({opacity:l}).on(&quot;mouseover.opacity&quot;,function(){n.select(this).transition().duration(100).style(&quot;opacity&quot;,1)}).on(&quot;mouseout.opacity&quot;,function(){n.select(this).transition().duration(1e3).style(&quot;opacity&quot;,0)}));var g=function(){this.call(x.makeEditable,{gd:t}).on(&quot;edit&quot;,function(e){t.framework({layout:{title:e}}),this.text(e).call(u),this.call(g)}).on(&quot;cancel&quot;,function(){var t=this.attr(&quot;data-unformatted&quot;);this.text(t).call(u)})};p.call(g)}return t._context.setBackground(t,t._fullLayout.paper_bgcolor),f.addLinks(t),Promise.resolve()}(t,e,i);y._replotting=!0,g&amp;&amp;G(t),t.framework!==G&amp;&amp;(t.framework=G,G(t)),d.initGradients(t),g&amp;&amp;p.saveShowSpikeInitial(t);var _=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;_&amp;&amp;f.doCalcdata(t);for(var M=0;M&lt;t.calcdata.length;M++)t.calcdata[M][0].trace=t._fullData[M];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){f.resize(t)},window.addEventListener(&quot;resize&quot;,t._responsiveChartHandler)):o.clearResponsive(t);var A=JSON.stringify(y._size),T=0;function E(){var e,r,n,i=t.calcdata;for(f.clearAutoMarginIds(t),k.drawMarginPushers(t),p.allowAutoMargin(t),e=0;e&lt;i.length;e++){var a=(n=(r=i[e])[0].trace)._module.colorbar;!0===n.visible&amp;&amp;a?m(t,r,a):f.autoMargin(t,&quot;cb&quot;+n.uid)}return f.doAutoMargin(t),f.previousPromises(t)}function C(){t._transitioning||(k.doAutoRangeAndConstraints(t),g&amp;&amp;p.saveRangeInitial(t))}var z=[f.previousPromises,function(){if(l)return r.addFrames(t,l)},function e(){for(var r=y._basePlotModules,n=0;n&lt;r.length;n++)r[n].drawFramework&amp;&amp;r[n].drawFramework(t);if(!y._glcanvas&amp;&amp;y._has(&quot;gl&quot;)&amp;&amp;(y._glcanvas=y._glcontainer.selectAll(&quot;.gl-canvas&quot;).data([{key:&quot;contextLayer&quot;,context:!0,pick:!1},{key:&quot;focusLayer&quot;,context:!1,pick:!1},{key:&quot;pickLayer&quot;,context:!1,pick:!0}],function(t){return t.key}),y._glcanvas.enter().append(&quot;canvas&quot;).attr(&quot;class&quot;,function(t){return&quot;gl-canvas gl-canvas-&quot;+t.key.replace(&quot;Layer&quot;,&quot;&quot;)}).style({position:&quot;absolute&quot;,top:0,left:0,width:&quot;100%&quot;,height:&quot;100%&quot;,overflow:&quot;visible&quot;,&quot;pointer-events&quot;:&quot;none&quot;})),y._glcanvas){y._glcanvas.attr(&quot;width&quot;,y.width).attr(&quot;height&quot;,y.height);var i=y._glcanvas.data()[0].regl;if(i&amp;&amp;(y.width!==i._gl.drawingBufferWidth||y.height!==i._gl.drawingBufferHeight)){var a=&quot;WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.&quot;;if(!T)return o.log(a+&quot; Clearing graph and plotting again.&quot;),f.cleanPlot([],{},t._fullData,y,t.calcdata),f.supplyDefaults(t),y=t._fullLayout,f.doCalcdata(t),T++,e();o.error(a)}}return f.previousPromises(t)},E,function(){if(JSON.stringify(y._size)!==A)return o.syncOrAsync([E,k.layoutStyles],t)}];b&amp;&amp;z.push(function(){if(_)return o.syncOrAsync([c.getComponentMethod(&quot;shapes&quot;,&quot;calcAutorange&quot;),c.getComponentMethod(&quot;annotations&quot;,&quot;calcAutorange&quot;),C,c.getComponentMethod(&quot;rangeslider&quot;,&quot;calcAutorange&quot;)],t);C()}),z.push(k.layoutStyles),b&amp;&amp;z.push(function(){return p.doTicks(t,g?&quot;&quot;:&quot;redraw&quot;)}),z.push(k.drawData,k.finalDraw,v,f.addLinks,f.rehover,f.doAutoMargin,f.previousPromises);var P=o.syncOrAsync(z,t);return P&amp;&amp;P.then||(P=Promise.resolve()),P.then(function(){return S(t),t})},r.setPlotConfig=function(t){return o.extendFlat(b,t)},r.redraw=function(t){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(&quot;This element is not a Plotly plot: &quot;+t);return w.cleanData(t.data),w.cleanLayout(t.layout),t.calcdata=void 0,r.plot(t).then(function(){return t.emit(&quot;plotly_redraw&quot;),t})},r.newPlot=function(t,e,n,i){return t=o.getGraphDiv(t),f.cleanPlot([],{},t._fullData||[],t._fullLayout||{},t.calcdata||[]),f.purge(t),r.plot(t,e,n,i)},r.extendTraces=function t(e,n,i,a){var s=I(e=o.getGraphDiv(e),n,i,a,function(t,e,r){var n,i;if(o.isTypedArray(t))if(r&lt;0){var a=new t.constructor(0),s=D(t,e);r&lt;0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r&lt;e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var c=r-e.length,u=t.length-c;n.set(t.subarray(u)),n.set(e,c),i.set(t.subarray(0,u))}else n=t.concat(e),i=r&gt;=0&amp;&amp;r&lt;n.length?n.splice(0,n.length-r):[];return[n,i]}),c=r.redraw(e),u=[e,s.update,i,s.maxPoints];return l.add(e,r.prependTraces,u,t,arguments),c},r.prependTraces=function t(e,n,i,a){var s=I(e=o.getGraphDiv(e),n,i,a,function(t,e,r){var n,i;if(o.isTypedArray(t))if(r&lt;=0){var a=new t.constructor(0),s=D(e,t);r&lt;0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r&lt;e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var c=r-e.length;n.set(e),n.set(t.subarray(0,c),e.length),i.set(t.subarray(c))}else n=e.concat(t),i=r&gt;=0&amp;&amp;r&lt;n.length?n.splice(r,n.length):[];return[n,i]}),c=r.redraw(e),u=[e,s.update,i,s.maxPoints];return l.add(e,r.extendTraces,u,t,arguments),c},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,c=[],u=r.deleteTraces,f=t,h=[e,c],p=[e,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error(&quot;gd.data must be an array.&quot;);if(&quot;undefined&quot;==typeof e)throw new Error(&quot;traces must be defined.&quot;);for(Array.isArray(e)||(e=[e]),n=0;n&lt;e.length;n++)if(&quot;object&quot;!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error(&quot;all values in traces array must be non-array objects&quot;);if(&quot;undefined&quot;==typeof r||Array.isArray(r)||(r=[r]),&quot;undefined&quot;!=typeof r&amp;&amp;r.length!==e.length)throw new Error(&quot;if indices is specified, traces.length must equal indices.length&quot;)}(e,n,i),Array.isArray(n)||(n=[n]),n=n.map(function(t){return o.extendFlat({},t)}),w.cleanData(n),a=0;a&lt;n.length;a++)e.data.push(n[a]);for(a=0;a&lt;n.length;a++)c.push(-n.length+a);if(&quot;undefined&quot;==typeof i)return s=r.redraw(e),l.add(e,u,h,f,p),s;Array.isArray(i)||(i=[i]);try{O(e,c,i)}catch(t){throw e.data.splice(e.data.length-n.length,n.length),t}return l.startSequence(e),l.add(e,u,h,f,p),s=r.moveTraces(e,c,i),l.stopSequence(e),s},r.deleteTraces=function t(e,n){e=o.getGraphDiv(e);var i,a,s=[],c=r.addTraces,u=t,f=[e,s,n],h=[e,n];if(&quot;undefined&quot;==typeof n)throw new Error(&quot;indices must be an integer or array of integers.&quot;);for(Array.isArray(n)||(n=[n]),P(e,n,&quot;indices&quot;),(n=z(n,e.data.length-1)).sort(o.sorterDes),i=0;i&lt;n.length;i+=1)a=e.data.splice(n[i],1)[0],s.push(a);var p=r.redraw(e);return l.add(e,c,f,u,h),p},r.moveTraces=function t(e,n,i){var a,s=[],c=[],u=t,f=t,h=[e=o.getGraphDiv(e),i,n],p=[e,n,i];if(O(e,n,i),n=Array.isArray(n)?n:[n],&quot;undefined&quot;==typeof i)for(i=[],a=0;a&lt;n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=z(n,e.data.length-1),i=z(i,e.data.length-1),a=0;a&lt;e.data.length;a++)-1===n.indexOf(a)&amp;&amp;s.push(e.data[a]);for(a=0;a&lt;n.length;a++)c.push({newIndex:i[a],trace:e.data[n[a]]});for(c.sort(function(t,e){return t.newIndex-e.newIndex}),a=0;a&lt;c.length;a+=1)s.splice(c[a].newIndex,0,c[a].trace);e.data=s;var d=r.redraw(e);return l.add(e,u,h,f,p),d},r.restyle=function t(e,n,i,a){e=o.getGraphDiv(e),w.clearPromiseQueue(e);var s={};if(&quot;string&quot;==typeof n)s[n]=i;else{if(!o.isPlainObject(n))return o.warn(&quot;Restyle fail.&quot;,n,i,a),Promise.reject();s=o.extendFlat({},n),void 0===a&amp;&amp;(a=i)}Object.keys(s).length&amp;&amp;(e.changed=!0);var c=w.coerceTraceIndices(e,a),u=B(e,s,c),h=u.flags;h.calc&amp;&amp;(e.calcdata=void 0),h.clearAxisTypes&amp;&amp;w.clearAxisTypes(e,c,{});var p=[];h.fullReplot?p.push(r.plot):(p.push(f.previousPromises),f.supplyDefaults(e),h.style&amp;&amp;p.push(k.doTraceStyle),h.colorbars&amp;&amp;p.push(k.doColorBars),p.push(S)),p.push(f.rehover),l.add(e,t,[e,u.undoit,u.traces],t,[e,u.redoit,u.traces]);var d=o.syncOrAsync(p,e);return d&amp;&amp;d.then||(d=Promise.resolve()),d.then(function(){return e.emit(&quot;plotly_restyle&quot;,u.eventData),e})},r.relayout=function t(e,r,n){if(e=o.getGraphDiv(e),w.clearPromiseQueue(e),e.framework&amp;&amp;e.framework.isPolar)return Promise.resolve(e);var i={};if(&quot;string&quot;==typeof r)i[r]=n;else{if(!o.isPlainObject(r))return o.warn(&quot;Relayout fail.&quot;,r,n),Promise.reject();i=o.extendFlat({},r)}Object.keys(i).length&amp;&amp;(e.changed=!0);var a=U(e,i),s=a.flags;s.calc&amp;&amp;(e.calcdata=void 0);var c=[f.previousPromises];s.layoutReplot?c.push(k.layoutReplot):Object.keys(i).length&amp;&amp;(f.supplyDefaults(e),s.legend&amp;&amp;c.push(k.doLegend),s.layoutstyle&amp;&amp;c.push(k.layoutStyles),s.axrange&amp;&amp;F(c,a.rangesAltered),s.ticks&amp;&amp;c.push(k.doTicksRelayout),s.modebar&amp;&amp;c.push(k.doModeBar),s.camera&amp;&amp;c.push(k.doCamera),c.push(S)),c.push(f.rehover),l.add(e,t,[e,a.undoit],t,[e,a.redoit]);var u=o.syncOrAsync(c,e);return u&amp;&amp;u.then||(u=Promise.resolve(e)),u.then(function(){return e.emit(&quot;plotly_relayout&quot;,a.eventData),e})};var N=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,j=/^[xyz]axis[0-9]*\.autorange$/,V=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function U(t,e){var r,n,i,a=t.layout,s=t._fullLayout,l=Object.keys(e),f=p.list(t),h={};for(n=0;n&lt;l.length;n++)if(0===l[n].indexOf(&quot;allaxes&quot;)){for(i=0;i&lt;f.length;i++){var d=f[i]._id.substr(1),g=-1!==d.indexOf(&quot;scene&quot;)?d+&quot;.&quot;:&quot;&quot;,m=l[n].replace(&quot;allaxes&quot;,g+f[i]._name);e[m]||(e[m]=e[l[n]])}delete e[l[n]]}var v=M.layoutFlags(),y={},x={};function b(t,r){if(Array.isArray(t))t.forEach(function(t){b(t,r)});else if(!(t in e||w.hasParent(e,t))){var n=o.nestedProperty(a,t);t in x||(x[t]=R(n.get())),void 0!==r&amp;&amp;n.set(r)}}var k,T={};function S(t){var e=p.name2id(t.split(&quot;.&quot;)[0]);return T[e]=1,e}for(var E in e){if(w.hasParent(e,E))throw new Error(&quot;cannot set &quot;+E+&quot;and a parent attribute simultaneously&quot;);for(var C=o.nestedProperty(a,E),L=e[E],z=C.parts.length-1;z&gt;0&amp;&amp;&quot;string&quot;!=typeof C.parts[z];)z--;var P=C.parts[z],O=C.parts[z-1]+&quot;.&quot;+P,I=C.parts.slice(0,z).join(&quot;.&quot;),D=o.nestedProperty(t.layout,I).get(),B=o.nestedProperty(s,I).get(),F=C.get();if(void 0!==L){y[E]=L,x[E]=&quot;reverse&quot;===P?L:R(F);var U=u.getLayoutValObject(s,C.parts);if(U&amp;&amp;U.impliedEdits&amp;&amp;null!==L)for(var H in U.impliedEdits)b(o.relativeAttr(E,H),U.impliedEdits[H]);if(-1!==[&quot;width&quot;,&quot;height&quot;].indexOf(E)&amp;&amp;null===L)s[E]=t._initialAutoSize[E];else if(O.match(N))S(O),o.nestedProperty(s,I+&quot;._inputRange&quot;).set(null);else if(O.match(j)){S(O),o.nestedProperty(s,I+&quot;._inputRange&quot;).set(null);var G=o.nestedProperty(s,I).get();G._inputDomain&amp;&amp;(G._input.domain=G._inputDomain.slice())}else O.match(V)&amp;&amp;o.nestedProperty(s,I+&quot;._inputDomain&quot;).set(null);if(&quot;type&quot;===P){var W=D,Y=&quot;linear&quot;===B.type&amp;&amp;&quot;log&quot;===L,X=&quot;log&quot;===B.type&amp;&amp;&quot;linear&quot;===L;if(Y||X){if(W&amp;&amp;W.range)if(B.autorange)Y&amp;&amp;(W.range=W.range[1]&gt;W.range[0]?[1,2]:[2,1]);else{var Z=W.range[0],$=W.range[1];Y?(Z&lt;=0&amp;&amp;$&lt;=0&amp;&amp;b(I+&quot;.autorange&quot;,!0),Z&lt;=0?Z=$/1e6:$&lt;=0&amp;&amp;($=Z/1e6),b(I+&quot;.range[0]&quot;,Math.log(Z)/Math.LN10),b(I+&quot;.range[1]&quot;,Math.log($)/Math.LN10)):(b(I+&quot;.range[0]&quot;,Math.pow(10,Z)),b(I+&quot;.range[1]&quot;,Math.pow(10,$)))}else b(I+&quot;.autorange&quot;,!0);Array.isArray(s._subplots.polar)&amp;&amp;s._subplots.polar.length&amp;&amp;s[C.parts[0]]&amp;&amp;&quot;radialaxis&quot;===C.parts[1]&amp;&amp;delete s[C.parts[0]]._subplot.viewInitial[&quot;radialaxis.range&quot;],c.getComponentMethod(&quot;annotations&quot;,&quot;convertCoords&quot;)(t,B,L,b),c.getComponentMethod(&quot;images&quot;,&quot;convertCoords&quot;)(t,B,L,b)}else b(I+&quot;.autorange&quot;,!0),b(I+&quot;.range&quot;,null);o.nestedProperty(s,I+&quot;._inputRange&quot;).set(null)}else if(P.match(A)){var J=o.nestedProperty(s,E).get(),K=(L||{}).type;K&amp;&amp;&quot;-&quot;!==K||(K=&quot;linear&quot;),c.getComponentMethod(&quot;annotations&quot;,&quot;convertCoords&quot;)(t,J,K,b),c.getComponentMethod(&quot;images&quot;,&quot;convertCoords&quot;)(t,J,K,b)}var Q=_.containerArrayMatch(E);if(Q){r=Q.array,n=Q.index;var tt=Q.property,et=(o.nestedProperty(a,r)||[])[n]||{},rt=U||{editType:&quot;calc&quot;};&quot;&quot;===tt&amp;&amp;(_.isAddVal(L)?x[E]=null:_.isRemoveVal(L)?x[E]=et:o.warn(&quot;unrecognized full object value&quot;,e)),M.update(v,rt),h[r]||(h[r]={});var nt=h[r][n];nt||(nt=h[r][n]={}),nt[tt]=L,delete e[E]}else&quot;reverse&quot;===P?(D.range?D.range.reverse():(b(I+&quot;.autorange&quot;,!0),D.range=[1,0]),B.autorange?v.calc=!0:v.plot=!0):(s._has(&quot;scatter-like&quot;)&amp;&amp;s._has(&quot;regl&quot;)&amp;&amp;&quot;dragmode&quot;===E&amp;&amp;(&quot;lasso&quot;===L||&quot;select&quot;===L)&amp;&amp;&quot;lasso&quot;!==F&amp;&amp;&quot;select&quot;!==F?v.plot=!0:U?M.update(v,U):v.calc=!0,C.set(L))}}for(r in h){_.applyContainerArrayChanges(t,o.nestedProperty(a,r),h[r],v)||(v.plot=!0)}var it=s._axisConstraintGroups||[];for(k in T)for(n=0;n&lt;it.length;n++){var at=it[n];if(at[k])for(var ot in v.calc=!0,at)T[ot]||(p.getFromId(t,ot)._constraintShrinkable=!0)}return(q(t)||e.height||e.width)&amp;&amp;(v.plot=!0),(v.plot||v.calc)&amp;&amp;(v.layoutReplot=!0),{flags:v,rangesAltered:T,undoit:x,redoit:y,eventData:o.extendDeep({},y)}}function q(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&amp;&amp;f.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function H(t,e,r,n){var i,a,s=n.getValObject,l=n.flags,c=n.immutable,u=n.inArray,f=n.arrayIndex;function h(){var t=i.editType;u&amp;&amp;-1!==t.indexOf(&quot;arraydraw&quot;)?o.pushUnique(l.arrays[u],f):M.update(l,i)}function p(t){return&quot;data_array&quot;===t.valType||t.arrayOk}for(a in t){if(l.calc)return;var d=t[a],g=e[a];if(&quot;_&quot;!==a.charAt(0)&amp;&amp;&quot;function&quot;!=typeof d&amp;&amp;d!==g){if((&quot;tick0&quot;===a||&quot;dtick&quot;===a)&amp;&amp;&quot;geo&quot;!==r[0]){var m=e.tickmode;if(&quot;auto&quot;===m||&quot;array&quot;===m||!m)continue}if((&quot;range&quot;!==a||!e.autorange)&amp;&amp;(&quot;zmin&quot;!==a&amp;&amp;&quot;zmax&quot;!==a||&quot;contourcarpet&quot;!==e.type)){var v=r.concat(a);if((i=s(v))&amp;&amp;(!i._compareAsJSON||JSON.stringify(d)!==JSON.stringify(g))){var y,x=i.valType,b=p(i),_=Array.isArray(d),w=Array.isArray(g);if(_&amp;&amp;w){var k=&quot;_input_&quot;+a,A=t[k],T=e[k];if(Array.isArray(A)&amp;&amp;A===T)continue}if(void 0===g)b&amp;&amp;_?l.calc=!0:h();else if(i._isLinkedToArray){var S=[],E=!1;u||(l.arrays[a]=S);var C=Math.min(d.length,g.length),L=Math.max(d.length,g.length);if(C!==L){if(&quot;arraydraw&quot;!==i.editType){h();continue}E=!0}for(y=0;y&lt;C;y++)H(d[y],g[y],v.concat(y),o.extendFlat({inArray:a,arrayIndex:y},n));if(E)for(y=C;y&lt;L;y++)S.push(y)}else!x&amp;&amp;o.isPlainObject(d)?H(d,g,v,n):b?_&amp;&amp;w?c&amp;&amp;(l.calc=!0):_!==w?l.calc=!0:h():_&amp;&amp;w&amp;&amp;d.length===g.length&amp;&amp;String(d)===String(g)||h()}}}}for(a in e)if(!(a in t||&quot;_&quot;===a.charAt(0)||&quot;function&quot;==typeof e[a])){if(p(i=s(r.concat(a)))&amp;&amp;Array.isArray(e[a]))return void(l.calc=!0);h()}}function G(t){var e=n.select(t),r=t._fullLayout;if(r._container=e.selectAll(&quot;.plot-container&quot;).data([0]),r._container.enter().insert(&quot;div&quot;,&quot;:first-child&quot;).classed(&quot;plot-container&quot;,!0).classed(&quot;plotly&quot;,!0),r._paperdiv=r._container.selectAll(&quot;.svg-container&quot;).data([0]),r._paperdiv.enter().append(&quot;div&quot;).classed(&quot;svg-container&quot;,!0).style(&quot;position&quot;,&quot;relative&quot;),r._glcontainer=r._paperdiv.selectAll(&quot;.gl-container&quot;).data([{}]),r._glcontainer.enter().append(&quot;div&quot;).classed(&quot;gl-container&quot;,!0),r._paperdiv.selectAll(&quot;.main-svg&quot;).remove(),r._paper=r._paperdiv.insert(&quot;svg&quot;,&quot;:first-child&quot;).classed(&quot;main-svg&quot;,!0),r._toppaper=r._paperdiv.append(&quot;svg&quot;).classed(&quot;main-svg&quot;,!0),!r._uid){var i={};n.selectAll(&quot;defs&quot;).each(function(){this.id&amp;&amp;(i[this.id.split(&quot;-&quot;)[1]]=1)}),r._uid=o.randstr(i)}r._paperdiv.selectAll(&quot;.main-svg&quot;).attr(y.svgAttrs),r._defs=r._paper.append(&quot;defs&quot;).attr(&quot;id&quot;,&quot;defs-&quot;+r._uid),r._clips=r._defs.append(&quot;g&quot;).classed(&quot;clips&quot;,!0),r._topdefs=r._toppaper.append(&quot;defs&quot;).attr(&quot;id&quot;,&quot;topdefs-&quot;+r._uid),r._topclips=r._topdefs.append(&quot;g&quot;).classed(&quot;clips&quot;,!0),r._bgLayer=r._paper.append(&quot;g&quot;).classed(&quot;bglayer&quot;,!0),r._draggers=r._paper.append(&quot;g&quot;).classed(&quot;draglayer&quot;,!0);var a=r._paper.append(&quot;g&quot;).classed(&quot;layer-below&quot;,!0);r._imageLowerLayer=a.append(&quot;g&quot;).classed(&quot;imagelayer&quot;,!0),r._shapeLowerLayer=a.append(&quot;g&quot;).classed(&quot;shapelayer&quot;,!0),r._cartesianlayer=r._paper.append(&quot;g&quot;).classed(&quot;cartesianlayer&quot;,!0),r._polarlayer=r._paper.append(&quot;g&quot;).classed(&quot;polarlayer&quot;,!0),r._ternarylayer=r._paper.append(&quot;g&quot;).classed(&quot;ternarylayer&quot;,!0),r._geolayer=r._paper.append(&quot;g&quot;).classed(&quot;geolayer&quot;,!0),r._pielayer=r._paper.append(&quot;g&quot;).classed(&quot;pielayer&quot;,!0),r._glimages=r._paper.append(&quot;g&quot;).classed(&quot;glimages&quot;,!0);var s=r._toppaper.append(&quot;g&quot;).classed(&quot;layer-above&quot;,!0);r._imageUpperLayer=s.append(&quot;g&quot;).classed(&quot;imagelayer&quot;,!0),r._shapeUpperLayer=s.append(&quot;g&quot;).classed(&quot;shapelayer&quot;,!0),r._infolayer=r._toppaper.append(&quot;g&quot;).classed(&quot;infolayer&quot;,!0),r._menulayer=r._toppaper.append(&quot;g&quot;).classed(&quot;menulayer&quot;,!0),r._zoomlayer=r._toppaper.append(&quot;g&quot;).classed(&quot;zoomlayer&quot;,!0),r._hoverlayer=r._toppaper.append(&quot;g&quot;).classed(&quot;hoverlayer&quot;,!0),t.emit(&quot;plotly_framework&quot;)}r.update=function t(e,n,i,a){if(e=o.getGraphDiv(e),w.clearPromiseQueue(e),e.framework&amp;&amp;e.framework.isPolar)return Promise.resolve(e);o.isPlainObject(n)||(n={}),o.isPlainObject(i)||(i={}),Object.keys(n).length&amp;&amp;(e.changed=!0),Object.keys(i).length&amp;&amp;(e.changed=!0);var s=w.coerceTraceIndices(e,a),c=B(e,o.extendFlat({},n),s),u=c.flags,h=U(e,o.extendFlat({},i)),p=h.flags;(u.calc||p.calc)&amp;&amp;(e.calcdata=void 0),u.clearAxisTypes&amp;&amp;w.clearAxisTypes(e,s,i);var d=[];if(u.fullReplot&amp;&amp;p.layoutReplot){var g=e.data,m=e.layout;e.data=void 0,e.layout=void 0,d.push(function(){return r.plot(e,g,m)})}else u.fullReplot?d.push(r.plot):p.layoutReplot?d.push(k.layoutReplot):(d.push(f.previousPromises),f.supplyDefaults(e),u.style&amp;&amp;d.push(k.doTraceStyle),u.colorbars&amp;&amp;d.push(k.doColorBars),p.legend&amp;&amp;d.push(k.doLegend),p.layoutstyle&amp;&amp;d.push(k.layoutStyles),p.axrange&amp;&amp;F(d,h.rangesAltered),p.ticks&amp;&amp;d.push(k.doTicksRelayout),p.modebar&amp;&amp;d.push(k.doModeBar),p.camera&amp;&amp;d.push(k.doCamera),d.push(S));d.push(f.rehover),l.add(e,t,[e,c.undoit,h.undoit,c.traces],t,[e,c.redoit,h.redoit,c.traces]);var v=o.syncOrAsync(d,e);return v&amp;&amp;v.then||(v=Promise.resolve(e)),v.then(function(){return e.emit(&quot;plotly_update&quot;,{data:c.eventData,layout:h.eventData}),e})},r.react=function(t,e,n,i){var a,s;var l=(t=o.getGraphDiv(t))._fullData,h=t._fullLayout;if(o.isPlotDiv(t)&amp;&amp;l&amp;&amp;h){if(o.isPlainObject(e)){var p=e;e=p.data,n=p.layout,i=p.config,a=p.frames}var d=!1;if(i){var g=o.extendDeep({},t._context);t._context=void 0,L(t,i),d=function t(e,r){var n;for(n in e){var i=e[n],a=r[n];if(i!==a)if(o.isPlainObject(i)&amp;&amp;o.isPlainObject(a)){if(t(i,a))return!0}else{if(!Array.isArray(i)||!Array.isArray(a))return!0;if(i.length!==a.length)return!0;for(var s=0;s&lt;i.length;s++)if(i[s]!==a[s]){if(!o.isPlainObject(i[s])||!o.isPlainObject(a[s]))return!0;if(t(i[s],a[s]))return!0}}}}(g,t._context)}t.data=e||[],w.cleanData(t.data),t.layout=n||{},w.cleanLayout(t.layout),f.supplyDefaults(t,{skipUpdateCalc:!0});var m=t._fullData,v=t._fullLayout,y=void 0===v.datarevision,x=function(t,e,r,n){if(e.length!==r.length)return{fullReplot:!0,calc:!0};var i,a,o=M.traceFlags();o.arrays={};var s={getValObject:function(t){return u.getTraceValObject(a,t)},flags:o,immutable:n,gd:t},l={};for(i=0;i&lt;e.length;i++)a=r[i]._fullInput,f.hasMakesDataTransform(a)&amp;&amp;(a=r[i]),l[a.uid]||(l[a.uid]=1,H(e[i]._fullInput,a,[],s));(o.calc||o.plot)&amp;&amp;(o.fullReplot=!0);return o}(t,l,m,y),b=function(t,e,r,n){var i=M.layoutFlags();i.arrays={},H(e,r,[],{getValObject:function(t){return u.getLayoutValObject(r,t)},flags:i,immutable:n,gd:t}),(i.plot||i.calc)&amp;&amp;(i.layoutReplot=!0);return i}(t,h,v,y);q(t)&amp;&amp;(b.layoutReplot=!0),x.calc||b.calc?t.calcdata=void 0:f.supplyDefaultsUpdateCalc(t.calcdata,m);var _=[];if(a&amp;&amp;(t._transitionData={},f.createTransitionData(t),_.push(function(){return r.addFrames(t,a)})),x.fullReplot||b.layoutReplot||d)t._fullLayout._skipDefaults=!0,_.push(r.plot);else{for(var A in b.arrays){var T=b.arrays[A];if(T.length){var E=c.getComponentMethod(A,&quot;drawOne&quot;);if(E!==o.noop)for(var C=0;C&lt;T.length;C++)E(t,T[C]);else{var z=c.getComponentMethod(A,&quot;draw&quot;);if(z===o.noop)throw new Error(&quot;cannot draw components: &quot;+A);z(t)}}}_.push(f.previousPromises),x.style&amp;&amp;_.push(k.doTraceStyle),x.colorbars&amp;&amp;_.push(k.doColorBars),b.legend&amp;&amp;_.push(k.doLegend),b.layoutstyle&amp;&amp;_.push(k.layoutStyles),b.axrange&amp;&amp;F(_),b.ticks&amp;&amp;_.push(k.doTicksRelayout),b.modebar&amp;&amp;_.push(k.doModeBar),b.camera&amp;&amp;_.push(k.doCamera),_.push(S)}_.push(f.rehover),(s=o.syncOrAsync(_,t))&amp;&amp;s.then||(s=Promise.resolve(t))}else s=r.newPlot(t,e,n,i);return s.then(function(){return t.emit(&quot;plotly_react&quot;,{data:e,layout:n}),t})},r.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(&quot;This element is not a Plotly plot: &quot;+t+&quot;. It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/&quot;);var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=f.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t&gt;=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t&gt;=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&amp;&amp;++r===e)return t()}}return void 0===n._frameWaitingCnt&amp;&amp;(n._frameWaitingCnt=0),new Promise(function(a,u){function h(){n._currentFrame&amp;&amp;n._currentFrame.onComplete&amp;&amp;n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,w.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&amp;&amp;e.onComplete()}),t.emit(&quot;plotly_animatingframe&quot;,{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit(&quot;plotly_animated&quot;),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit(&quot;plotly_animating&quot;),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt&gt;n._timeToNext&amp;&amp;h()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m&gt;=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&amp;&amp;!b&amp;&amp;o.isPlainObject(e))y.push({type:&quot;object&quot;,data:v(o.extendFlat({},e))});else if(x||-1!==[&quot;string&quot;,&quot;number&quot;].indexOf(typeof e))for(d=0;d&lt;n._frames.length;d++)(g=n._frames[d])&amp;&amp;(x||String(g.group)===String(e))&amp;&amp;y.push({type:&quot;byname&quot;,name:String(g.name),data:v({name:g.name})});else if(b)for(d=0;d&lt;e.length;d++){var _=e[d];-1!==[&quot;number&quot;,&quot;string&quot;].indexOf(typeof _)?(_=String(_),y.push({type:&quot;byname&quot;,name:_,data:v({name:_})})):o.isPlainObject(_)&amp;&amp;y.push({type:&quot;object&quot;,data:v(o.extendFlat({},_))})}for(d=0;d&lt;y.length;d++)if(&quot;byname&quot;===(g=y[d]).type&amp;&amp;!n._frameHash[g.data.name])return o.warn('animate failure: frame not found: &quot;'+g.data.name+'&quot;'),void u();-1!==[&quot;next&quot;,&quot;immediate&quot;].indexOf(r.mode)&amp;&amp;function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var e=n._frameQueue.pop();e.onInterrupt&amp;&amp;e.onInterrupt()}t.emit(&quot;plotly_animationinterrupted&quot;,[])}}(),&quot;reverse&quot;===r.direction&amp;&amp;y.reverse();var k=t._fullLayout._currentFrame;if(k&amp;&amp;r.fromcurrent){var M=-1;for(d=0;d&lt;y.length;d++)if(&quot;byname&quot;===(g=y[d]).type&amp;&amp;g.name===k){M=d;break}if(M&gt;0&amp;&amp;M&lt;y.length-1){var A=[];for(d=0;d&lt;y.length;d++)g=y[d],(&quot;byname&quot;!==y[d].type||d&gt;M)&amp;&amp;A.push(g);y=A}}y.length&gt;0?function(e){if(0!==e.length){for(var i=0;i&lt;e.length;i++){var o;o=&quot;byname&quot;===e[i].type?f.computeFrame(t,e[i].name):e[i].data;var h=l(i),d=s(i);d.duration=Math.min(d.duration,h.duration);var g={frame:o,name:e[i].name,frameOpts:h,transitionOpts:d};i===e.length-1&amp;&amp;(g.onComplete=c(a,2),g.onInterrupt=u),n._frameQueue.push(g)}&quot;immediate&quot;===r.mode&amp;&amp;(n._lastFrameAt=-1/0),n._animationRaf||p()}}(y):(t.emit(&quot;plotly_animated&quot;),a())})},r.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error(&quot;This element is not a Plotly plot: &quot;+t+&quot;. It's likely that you've failed to create a plot before adding frames. For more details, see https://plot.ly/javascript/animations/&quot;);var n,i,a,s,c=t._transitionData._frames,u=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error(&quot;addFrames failure: frameList must be an Array of frame definitions&quot;+e);var h=c.length+2*e.length,p=[],d={};for(n=e.length-1;n&gt;=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&amp;&amp;v&amp;&amp;&quot;number&quot;==typeof v&amp;&amp;y&amp;&amp;T&lt;5&amp;&amp;(T++,o.warn('addFrames: overwriting frame &quot;'+(u[m]||d[m]).name+'&quot; with a frame whose name of type &quot;number&quot; also equates to &quot;'+m+'&quot;. This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===T&amp;&amp;o.warn(&quot;addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.&quot;)),d[g]={name:g},p.push({frame:f.supplyFrameDefaults(e[n]),index:r&amp;&amp;void 0!==r[n]&amp;&amp;null!==r[n]?r[n]:h+n})}p.sort(function(t,e){return t.index&gt;e.index?-1:t.index&lt;e.index?1:0});var x=[],b=[],_=c.length;for(n=p.length-1;n&gt;=0;n--){if(&quot;number&quot;==typeof(i=p[n].frame).name&amp;&amp;o.warn(&quot;Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings&quot;),!i.name)for(;u[i.name=&quot;frame &quot;+t._transitionData._counter++];);if(u[i.name]){for(a=0;a&lt;c.length&amp;&amp;(c[a]||{}).name!==i.name;a++);x.push({type:&quot;replace&quot;,index:a,value:i}),b.unshift({type:&quot;replace&quot;,index:a,value:c[a]})}else s=Math.max(0,Math.min(p[n].index,_)),x.push({type:&quot;insert&quot;,index:s,value:i}),b.unshift({type:&quot;delete&quot;,index:s}),_++}var w=f.modifyFrames,k=f.modifyFrames,M=[t,b],A=[t,x];return l&amp;&amp;l.add(t,w,M,k,A),f.modifyFrames(t,x)},r.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(&quot;This element is not a Plotly plot: &quot;+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r&lt;i.length;r++)e.push(r);for((e=e.slice(0)).sort(),r=e.length-1;r&gt;=0;r--)n=e[r],a.push({type:&quot;delete&quot;,index:n}),s.unshift({type:&quot;insert&quot;,index:n,value:i[n]});var c=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,a];return l&amp;&amp;l.add(t,c,h,u,p),f.modifyFrames(t,a)},r.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[],n=t.calcdata||[];return f.cleanPlot([],{},r,e,n),f.purge(t),s.purge(t),e._container&amp;&amp;e._container.remove(),delete t._context,t}},{&quot;../components/color&quot;:567,&quot;../components/colorbar/connect&quot;:569,&quot;../components/drawing&quot;:592,&quot;../constants/xmlns_namespaces&quot;:671,&quot;../lib&quot;:693,&quot;../lib/events&quot;:681,&quot;../lib/queue&quot;:709,&quot;../lib/svg_text_utils&quot;:718,&quot;../plots/cartesian/axes&quot;:742,&quot;../plots/cartesian/constants&quot;:747,&quot;../plots/cartesian/graph_interact&quot;:751,&quot;../plots/plots&quot;:805,&quot;../plots/polar/legacy&quot;:813,&quot;../registry&quot;:825,&quot;./edit_types&quot;:725,&quot;./helpers&quot;:726,&quot;./manage_arrays&quot;:728,&quot;./plot_config&quot;:730,&quot;./plot_schema&quot;:731,&quot;./subroutines&quot;:733,d3:147,&quot;fast-isnumeric&quot;:213,&quot;has-hover&quot;:391}],730:[function(t,e,r){&quot;use strict&quot;;e.exports={staticPlot:!1,plotlyServerURL:&quot;https://plot.ly&quot;,editable:!1,edits:{annotationPosition:!1,annotationTail:!1,annotationText:!1,axisTitleText:!1,colorbarPosition:!1,colorbarTitleText:!1,legendPosition:!1,legendText:!1,shapePosition:!1,titleText:!1},autosizable:!1,responsive:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:&quot;reset+autosize&quot;,showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:&quot;Edit chart&quot;,showSources:!1,displayModeBar:&quot;hover&quot;,modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,toImageButtonOptions:{},displaylogo:!0,plotGlPixelRatio:2,setBackground:&quot;transparent&quot;,topojsonURL:&quot;https://cdn.plot.ly/&quot;,mapboxAccessToken:null,logging:1,globalTransforms:[],locale:&quot;en-US&quot;,locales:{}}},{}],731:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../registry&quot;),i=t(&quot;../lib&quot;),a=t(&quot;../plots/attributes&quot;),o=t(&quot;../plots/layout_attributes&quot;),s=t(&quot;../plots/frame_attributes&quot;),l=t(&quot;../plots/animation_attributes&quot;),c=t(&quot;../plots/polar/legacy/area_attributes&quot;),u=t(&quot;../plots/polar/legacy/axis_attributes&quot;),f=t(&quot;./edit_types&quot;),h=i.extendFlat,p=i.extendDeepAll,d=i.isPlainObject,g=&quot;_isSubplotObj&quot;,m=&quot;_isLinkedToArray&quot;,v=[g,m,&quot;_arrayAttrRegexps&quot;,&quot;_deprecated&quot;];function y(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(x(e[r]))r++;else if(r&lt;e.length)return!1;for(;r&lt;e.length;r++){var n=t[e[r]];if(!d(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!x(e[++r]))return!1}else if(&quot;info_array&quot;===t.valType){var i=e[++r];if(!x(i))return!1;var a=t.items;if(Array.isArray(a)){if(i&gt;=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!x(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function x(t){return t===Math.round(t)&amp;&amp;t&gt;=0}function b(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?&quot;data_array&quot;===t.valType?(t.role=&quot;data&quot;,n[e+&quot;src&quot;]={valType:&quot;string&quot;,editType:&quot;none&quot;}):!0===t.arrayOk&amp;&amp;(n[e+&quot;src&quot;]={valType:&quot;string&quot;,editType:&quot;none&quot;}):d(t)&amp;&amp;(t.role=&quot;object&quot;)})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[m];if(!n)return;delete t[m],r[e]={items:{}},r[e].items[n]=t,r[e].role=&quot;object&quot;})}(t),function(t){!function t(e){for(var r in e)if(d(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n&lt;e[r].length;n++)t(e[r][n]);else e[r]instanceof RegExp&amp;&amp;(e[r]=e[r].toString())}(t)}(t),t}function _(t,e,r){var n=i.nestedProperty(t,r),a=p({},e.layoutAttributes);a[g]=!0,n.set(a)}function w(t,e,r){var n=i.nestedProperty(t,r);n.set(p(n.get()||{},e))}r.IS_SUBPLOT_OBJ=g,r.IS_LINKED_TO_ARRAY=m,r.DEPRECATED=&quot;_deprecated&quot;,r.UNDERSCORE_ATTRS=v,r.get=function(){var t={};n.allTypes.concat(&quot;area&quot;).forEach(function(e){t[e]=function(t){var e,r;&quot;area&quot;===t?(e={attributes:c},r={}):(e=n.modules[t]._module,r=e.basePlotModule);var i={type:null};p(i,a),p(i,e.attributes),r.attributes&amp;&amp;p(i,r.attributes);i.type=t;var o={meta:e.meta||{},attributes:b(i)};if(e.layoutAttributes){var s={};p(s,e.layoutAttributes),o.layoutAttributes=b(s)}return o}(e)});var e,r={};return Object.keys(n.transformsRegistry).forEach(function(t){r[t]=function(t){var e=n.transformsRegistry[t],r=p({},e.attributes);return Object.keys(n.componentsRegistry).forEach(function(e){var i=n.componentsRegistry[e];i.schema&amp;&amp;i.schema.transforms&amp;&amp;i.schema.transforms[t]&amp;&amp;Object.keys(i.schema.transforms[t]).forEach(function(e){w(r,i.schema.transforms[t][e],e)})}),{attributes:b(r)}}(t)}),{defs:{valObjects:i.valObjectMeta,metaKeys:v.concat([&quot;description&quot;,&quot;role&quot;,&quot;editType&quot;,&quot;impliedEdits&quot;]),editType:{traces:f.traces,layout:f.layout},impliedEdits:{}},traces:t,layout:function(){var t,e,r={};for(t in p(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i&lt;e.attr.length;i++)_(r,e,e.attr[i]);else{var a=&quot;subplot&quot;===e.attr?e.name:e.attr;_(r,e,a)}for(t in r=function(t){return h(t,{radialaxis:u.radialaxis,angularaxis:u.angularaxis}),h(t,u.layout),t}(r),n.componentsRegistry){var s=(e=n.componentsRegistry[t]).schema;if(s&amp;&amp;(s.subplots||s.layout)){var l=s.subplots;if(l&amp;&amp;l.xaxis&amp;&amp;!l.yaxis)for(var c in l.xaxis)delete r.yaxis[c]}else e.layoutAttributes&amp;&amp;w(r,e.layoutAttributes,e.name)}return{layoutAttributes:b(r)}}(),transforms:r,frames:(e={frames:i.extendDeepAll({},s)},b(e),e.frames),animation:b(l)}},r.crawl=function(t,e,n,i){var a=n||0;i=i||&quot;&quot;,Object.keys(t).forEach(function(n){var o=t[n];if(-1===v.indexOf(n)){var s=(i?i+&quot;.&quot;:&quot;&quot;)+n;e(o,n,t,a,s),r.isValObject(o)||d(o)&amp;&amp;&quot;impliedEdits&quot;!==n&amp;&amp;r.crawl(o,e,a+1,s)}})},r.isValObject=function(t){return t&amp;&amp;void 0!==t.valType},r.findArrayAttributes=function(t){var e,n,o=[],s=[],l=[];function c(t,r,a,c){s=s.slice(0,c).concat([r]),l=l.slice(0,c).concat([t&amp;&amp;t._isLinkedToArray]),t&amp;&amp;(&quot;data_array&quot;===t.valType||!0===t.arrayOk)&amp;&amp;!(&quot;colorbar&quot;===s[c-1]&amp;&amp;(&quot;ticktext&quot;===r||&quot;tickvals&quot;===r))&amp;&amp;function t(e,r,a){var c=e[s[r]];var u=a+s[r];if(r===s.length-1)i.isArrayOrTypedArray(c)&amp;&amp;o.push(n+u);else if(l[r]){if(Array.isArray(c))for(var f=0;f&lt;c.length;f++)i.isPlainObject(c[f])&amp;&amp;t(c[f],r+1,u+&quot;[&quot;+f+&quot;].&quot;)}else i.isPlainObject(c)&amp;&amp;t(c,r+1,u+&quot;.&quot;)}(e,0,&quot;&quot;)}e=t,n=&quot;&quot;,r.crawl(a,c),t._module&amp;&amp;t._module.attributes&amp;&amp;r.crawl(t._module.attributes,c);var u=t.transforms;if(u)for(var f=0;f&lt;u.length;f++){var h=u[f],p=h._module;p&amp;&amp;(n=&quot;transforms[&quot;+f+&quot;].&quot;,e=h,r.crawl(p.attributes,c))}return o},r.getTraceValObject=function(t,e){var r,i,o=e[0],s=1;if(&quot;transforms&quot;===o){if(1===e.length)return a.transforms;var l=t.transforms;if(!Array.isArray(l)||!l.length)return!1;var u=e[1];if(!x(u)||u&gt;=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&amp;&amp;r[e[2]],s=3}else if(&quot;area&quot;===t.type)i=c[o];else{var f=t._module;if(f||(f=(n.modules[t.type||a.type.dflt]||{})._module),!f)return!1;if(!(i=(r=f.attributes)&amp;&amp;r[o])){var h=f.basePlotModule;h&amp;&amp;h.attributes&amp;&amp;(i=h.attributes[o])}i||(i=a[o])}return y(i,e,s)},r.getLayoutValObject=function(t,e){return y(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r&lt;l.length;r++){if((a=l[r]).attrRegex&amp;&amp;a.attrRegex.test(e)){if(a.layoutAttrOverrides)return a.layoutAttrOverrides;!c&amp;&amp;a.layoutAttributes&amp;&amp;(c=a.layoutAttributes)}var f=a.baseLayoutAttrOverrides;if(f&amp;&amp;e in f)return f[e]}if(c)return c}var h=t._modules;if(h)for(r=0;r&lt;h.length;r++)if((s=h[r].layoutAttributes)&amp;&amp;e in s)return s[e];for(i in n.componentsRegistry)if(!(a=n.componentsRegistry[i]).schema&amp;&amp;e===a.name)return a.layoutAttributes;if(e in o)return o[e];if(&quot;radialaxis&quot;===e||&quot;angularaxis&quot;===e)return u[e];return u.layout[e]||!1}(t,e[0]),e,1)}},{&quot;../lib&quot;:693,&quot;../plots/animation_attributes&quot;:737,&quot;../plots/attributes&quot;:739,&quot;../plots/frame_attributes&quot;:769,&quot;../plots/layout_attributes&quot;:796,&quot;../plots/polar/legacy/area_attributes&quot;:811,&quot;../plots/polar/legacy/axis_attributes&quot;:812,&quot;../registry&quot;:825,&quot;./edit_types&quot;:725}],732:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../plots/attributes&quot;),a=&quot;templateitemname&quot;,o={name:{valType:&quot;string&quot;,editType:&quot;none&quot;}};function s(t){return t&amp;&amp;&quot;string&quot;==typeof t}function l(t){var e=t.length-1;return&quot;s&quot;!==t.charAt(e)&amp;&amp;n.warn(&quot;bad argument to arrayDefaultKey: &quot;+t),t.substr(0,t.length-1)+&quot;defaults&quot;}o[a]={valType:&quot;string&quot;,editType:&quot;calc&quot;},r.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},r.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&amp;&amp;r.length&amp;&amp;(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,&quot;type&quot;),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},r.newContainer=function(t,e,r){var i=t._template,a=i&amp;&amp;(i[e]||r&amp;&amp;i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},r.arrayTemplater=function(t,e,r){var n=t._template,i=n&amp;&amp;n[l(e)],o=n&amp;&amp;n[e];Array.isArray(o)&amp;&amp;o.length||(o=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l&lt;o.length;l++){var u=o[l];if(u.name===n)return c[n]=1,e._template=u,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e&lt;o.length;e++){var r=o[e],n=r.name;if(s(n)&amp;&amp;!c[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),c[n]=1}}return t}}},r.arrayDefaultKey=l,r.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o&gt;=i&amp;&amp;(r._input||{})._templateitemname;s&amp;&amp;(o=i);var l,c=e+&quot;[&quot;+o+&quot;]&quot;;function u(){l={},s&amp;&amp;(l[c]={},l[c][a]=s)}function f(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+&quot;.&quot;+t]=e}function h(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:f,getUpdateObj:h,applyUpdate:function(e,r){e&amp;&amp;f(e,r);var i=h();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{&quot;../lib&quot;:693,&quot;../plots/attributes&quot;:739}],733:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../registry&quot;),a=t(&quot;../plots/plots&quot;),o=t(&quot;../lib&quot;),s=t(&quot;../lib/clear_gl_canvases&quot;),l=t(&quot;../components/color&quot;),c=t(&quot;../components/drawing&quot;),u=t(&quot;../components/titles&quot;),f=t(&quot;../components/modebar&quot;),h=t(&quot;../plots/cartesian/axes&quot;),p=t(&quot;../constants/alignment&quot;),d=t(&quot;../plots/cartesian/constraints&quot;),g=d.enforce,m=d.clean,v=t(&quot;../plots/cartesian/autorange&quot;).doAutoRange;function y(t){var e,i=t._fullLayout,a=i._size,s=a.p,u=h.list(t,&quot;&quot;,!0),d=i._has(&quot;cartesian&quot;);function g(t,e,r){var n=t._lw/2;return&quot;x&quot;===t._id.charAt(0)?e?&quot;top&quot;===r?e._offset-s-n:e._offset+e._length+s+n:a.t+a.h*(1-(t.position||0))+n%1:e?&quot;right&quot;===r?e._offset+e._length+s+n:e._offset-s-n:a.l+a.w*(t.position||0)+n%1}for(e=0;e&lt;u.length;e++){var m=u[e];m.setScale();var v=m._anchorAxis;m._linepositions={},m._lw=c.crispRound(t,m.linewidth,1),m._mainLinePosition=g(m,v,m.side),m._mainMirrorPosition=m.mirror&amp;&amp;v?g(m,v,p.OPPOSITE_SIDE[m.side]):null,m._mainSubplot=x(m,i)}i._paperdiv.style({width:i.width+&quot;px&quot;,height:i.height+&quot;px&quot;}).selectAll(&quot;.main-svg&quot;).call(c.setSize,i.width,i.height),t._context.setBackground(t,i.paper_bgcolor);var y=i._paper.selectAll(&quot;g.subplot&quot;),_=[],k=[];y.each(function(t){var e=t[0],r=i._plots[e];if(r.mainplot)return r.bg&amp;&amp;r.bg.remove(),void(r.bg=void 0);var n=r.xaxis.domain,a=r.yaxis.domain,s=r.plotgroup;if(function(t,e,r){for(var n=0;n&lt;r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]&gt;=t[1]||i[1]&lt;=t[0])&amp;&amp;a[0]&lt;e[1]&amp;&amp;a[1]&gt;e[0])return!0}return!1}(n,a,k)){var l=s.node(),c=r.bg=o.ensureSingle(s,&quot;rect&quot;,&quot;bg&quot;);l.insertBefore(c.node(),l.childNodes[0])}else s.select(&quot;rect.bg&quot;).remove(),_.push(e),k.push([n,a])});var M=i._bgLayer.selectAll(&quot;.bg&quot;).data(_);return M.enter().append(&quot;rect&quot;).classed(&quot;bg&quot;,!0),M.exit().remove(),M.each(function(t){i._plots[t].bg=n.select(this)}),y.each(function(t){var e=t[0],r=i._plots[e],n=r.xaxis,a=r.yaxis;r.bg&amp;&amp;d&amp;&amp;r.bg.call(c.setRect,n._offset-s,a._offset-s,n._length+2*s,a._length+2*s).call(l.fill,i.plot_bgcolor).style(&quot;stroke-width&quot;,0);var f,h,p=r.clipId=&quot;clip&quot;+i._uid+e+&quot;plot&quot;,m=o.ensureSingleById(i._clips,&quot;clipPath&quot;,p,function(t){t.classed(&quot;plotclip&quot;,!0).append(&quot;rect&quot;)});if(r.clipRect=m.select(&quot;rect&quot;).attr({width:n._length,height:a._length}),c.setTranslate(r.plot,n._offset,a._offset),r._hasClipOnAxisFalse?(f=null,h=p):(f=p,h=null),c.setClipUrl(r.plot,f),r.layerClipId=h,d){var v,y,x,_,k,M,A,T,S,E,C,L,z,P=&quot;M0,0&quot;;b(n,e)&amp;&amp;(k=w(n,&quot;left&quot;,a,u),v=n._offset-(k?s+k:0),M=w(n,&quot;right&quot;,a,u),y=n._offset+n._length+(M?s+M:0),x=g(n,a,&quot;bottom&quot;),_=g(n,a,&quot;top&quot;),!(z=!n._anchorAxis||e!==n._mainSubplot)||&quot;allticks&quot;!==n.mirror&amp;&amp;&quot;all&quot;!==n.mirror||(n._linepositions[e]=[x,_]),P=R(n,I,function(t){return&quot;M&quot;+n._offset+&quot;,&quot;+t+&quot;h&quot;+n._length}),z&amp;&amp;n.showline&amp;&amp;(&quot;all&quot;===n.mirror||&quot;allticks&quot;===n.mirror)&amp;&amp;(P+=I(x)+I(_)),r.xlines.style(&quot;stroke-width&quot;,n._lw+&quot;px&quot;).call(l.stroke,n.showline?n.linecolor:&quot;rgba(0,0,0,0)&quot;)),r.xlines.attr(&quot;d&quot;,P);var O=&quot;M0,0&quot;;b(a,e)&amp;&amp;(C=w(a,&quot;bottom&quot;,n,u),A=a._offset+a._length+(C?s:0),L=w(a,&quot;top&quot;,n,u),T=a._offset-(L?s:0),S=g(a,n,&quot;left&quot;),E=g(a,n,&quot;right&quot;),!(z=!a._anchorAxis||e!==a._mainSubplot)||&quot;allticks&quot;!==a.mirror&amp;&amp;&quot;all&quot;!==a.mirror||(a._linepositions[e]=[S,E]),O=R(a,D,function(t){return&quot;M&quot;+t+&quot;,&quot;+a._offset+&quot;v&quot;+a._length}),z&amp;&amp;a.showline&amp;&amp;(&quot;all&quot;===a.mirror||&quot;allticks&quot;===a.mirror)&amp;&amp;(O+=D(S)+D(E)),r.ylines.style(&quot;stroke-width&quot;,a._lw+&quot;px&quot;).call(l.stroke,a.showline?a.linecolor:&quot;rgba(0,0,0,0)&quot;)),r.ylines.attr(&quot;d&quot;,O)}function I(t){return&quot;M&quot;+v+&quot;,&quot;+t+&quot;H&quot;+y}function D(t){return&quot;M&quot;+t+&quot;,&quot;+T+&quot;V&quot;+A}function R(t,r,n){if(!t.showline||e!==t._mainSubplot)return&quot;&quot;;if(!t._anchorAxis)return n(t._mainLinePosition);var i=r(t._mainLinePosition);return t.mirror&amp;&amp;(i+=r(t._mainMirrorPosition)),i}}),h.makeClipPaths(t),r.drawMainTitle(t),f.manage(t),t._promises.length&amp;&amp;Promise.all(t._promises)}function x(t,e){var r=e._subplots,n=r.cartesian.concat(r.gl2d||[]),i={_fullLayout:e},a=&quot;x&quot;===t._id.charAt(0),o=t._mainAxis._anchorAxis,s=&quot;&quot;,l=&quot;&quot;,c=&quot;&quot;;if(o&amp;&amp;(c=o._mainAxis._id,s=a?t._id+c:c+t._id),!s||!e._plots[s]){s=&quot;&quot;;for(var u=0;u&lt;n.length;u++){var f=n[u],p=f.indexOf(&quot;y&quot;),d=a?f.substr(0,p):f.substr(p),g=a?f.substr(p):f.substr(0,p);if(d===t._id){l||(l=f);var m=h.getFromId(i,g);if(c&amp;&amp;m.overlaying===c){s=f;break}}}}return s||l}function b(t,e){return(t.ticks||t.showline)&amp;&amp;(e===t._mainSubplot||&quot;all&quot;===t.mirror||&quot;allticks&quot;===t.mirror)}function _(t,e,r){if(!r.showline||!r._lw)return!1;if(&quot;all&quot;===r.mirror||&quot;allticks&quot;===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=p.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&amp;&amp;n.domain[1-i]===t.domain[1-i]}function w(t,e,r,n){if(_(t,e,r))return r._lw;for(var i=0;i&lt;n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&amp;&amp;_(t,e,a))return a._lw}return 0}r.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,y],t)},r.drawMainTitle=function(t){var e=t._fullLayout;u.draw(t,&quot;gtitle&quot;,{propContainer:e,propName:&quot;title&quot;,placeholder:e._dfltTitle.plot,attributes:{x:e.width/2,y:e._size.t/2,&quot;text-anchor&quot;:&quot;middle&quot;}})},r.doTraceStyle=function(t){for(var e=0;e&lt;t.calcdata.length;e++){var r=t.calcdata[e],n=(((r[0]||{}).trace||{})._module||{}).arraysToCalcdata;n&amp;&amp;n(r,r[0].trace)}return a.style(t),i.getComponentMethod(&quot;legend&quot;,&quot;draw&quot;)(t),a.previousPromises(t)},r.doColorBars=function(t){for(var e=0;e&lt;t.calcdata.length;e++){var r=t.calcdata[e][0];if((r.t||{}).cb){var n=r.trace,o=r.t.cb;i.traceIs(n,&quot;contour&quot;)&amp;&amp;o.line({width:!1!==n.contours.showlines?n.line.width:0,dash:n.line.dash,color:&quot;line&quot;===n.contours.coloring?o._opts.line.color:n.line.color});var s=n._module.colorbar.container,l=(s?n[s]:n).colorbar;o.options(l)()}}return a.previousPromises(t)},r.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call(&quot;plot&quot;,t,&quot;&quot;,e)},r.doLegend=function(t){return i.getComponentMethod(&quot;legend&quot;,&quot;draw&quot;)(t),a.previousPromises(t)},r.doTicksRelayout=function(t,e){return e?h.doTicks(t,Object.keys(e),!0):h.doTicks(t,&quot;redraw&quot;),t._fullLayout._hasOnlyLargeSploms&amp;&amp;(s(t),i.subplotsRegistry.splom.plot(t)),r.drawMainTitle(t),a.previousPromises(t)},r.doModeBar=function(t){var e=t._fullLayout;f.manage(t);for(var r=0;r&lt;e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&amp;&amp;n(t)}return a.previousPromises(t)},r.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n&lt;r.length;n++){var i=e[r[n]];i._scene.setCamera(i.camera)}},r.drawData=function(t){var e,r=t._fullLayout,n=t.calcdata;for(e=0;e&lt;n.length;e++){var o=n[e][0].trace;!0===o.visible&amp;&amp;o._module.colorbar||r._infolayer.select(&quot;.cb&quot;+o.uid).remove()}s(t);var l=r._basePlotModules;for(e=0;e&lt;l.length;e++)l[e].plot(t);return a.style(t),i.getComponentMethod(&quot;shapes&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;annotations&quot;,&quot;draw&quot;)(t),r._replotting=!1,a.previousPromises(t)},r.doAutoRangeAndConstraints=function(t){for(var e=h.list(t,&quot;&quot;,!0),r=0;r&lt;e.length;r++){var n=e[r];m(t,n),v(t,n)}g(t)},r.finalDraw=function(t){i.getComponentMethod(&quot;shapes&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;images&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;annotations&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;rangeslider&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;rangeselector&quot;,&quot;draw&quot;)(t)},r.drawMarginPushers=function(t){i.getComponentMethod(&quot;legend&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;rangeselector&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;sliders&quot;,&quot;draw&quot;)(t),i.getComponentMethod(&quot;updatemenus&quot;,&quot;draw&quot;)(t)}},{&quot;../components/color&quot;:567,&quot;../components/drawing&quot;:592,&quot;../components/modebar&quot;:630,&quot;../components/titles&quot;:658,&quot;../constants/alignment&quot;:665,&quot;../lib&quot;:693,&quot;../lib/clear_gl_canvases&quot;:676,&quot;../plots/cartesian/autorange&quot;:741,&quot;../plots/cartesian/axes&quot;:742,&quot;../plots/cartesian/constraints&quot;:749,&quot;../plots/plots&quot;:805,&quot;../registry&quot;:825,d3:147}],734:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=n.isPlainObject,a=t(&quot;./plot_schema&quot;),o=t(&quot;../plots/plots&quot;),s=t(&quot;../plots/attributes&quot;),l=t(&quot;./plot_template&quot;),c=t(&quot;./plot_config&quot;);function u(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&amp;&amp;i(e))u(e,r);else if(Array.isArray(r)&amp;&amp;Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a&lt;r.length;a++){var s=r[a],c=o.newItem(s)._template;c&amp;&amp;u(c,s)}var f=o.defaultItems();for(a=0;a&lt;f.length;a++)r.push(f[a]._template);for(a=0;a&lt;r.length;a++)delete r[a].templateitemname}}for(r=0;r&lt;o.length;r++){var c=o[r],h=t[c];if(c in e?s(h,e[c],c):e[c]=h,f(c)===c)for(var p in e){var d=f(p);p===d||d!==c||p in t||s(h,e[p],c)}}}function f(t){return t.replace(/[0-9]+$/,&quot;&quot;)}function h(t,e,r,a,o){var s=o&amp;&amp;r(o);for(var c in t){var u=t[c],d=p(t,c,a),g=p(t,c,o),m=r(g);if(!m){var v=f(c);v!==c&amp;&amp;(m=r(g=p(t,v,o)))}if((!s||s!==m)&amp;&amp;!(!m||m._noTemplating||&quot;data_array&quot;===m.valType||m.arrayOk&amp;&amp;Array.isArray(u)))if(!m.valType&amp;&amp;i(u))h(u,e,r,d,g);else if(m._isLinkedToArray&amp;&amp;Array.isArray(u))for(var y=!1,x=0,b={},_=0;_&lt;u.length;_++){var w=u[_];if(i(w)){var k=w.name;if(k)b[k]||(h(w,e,r,p(u,x,d),p(u,x,g)),x++,b[k]=1);else if(!y){var M=p(t,l.arrayDefaultKey(c),a),A=p(u,x,d);h(w,e,r,A,p(u,x,g));var T=n.nestedProperty(e,A);n.nestedProperty(e,M).set(T.get()),T.set(null),y=!0}}}else{n.nestedProperty(e,d).set(u)}}}function p(t,e,r){return r?Array.isArray(t)?r+&quot;[&quot;+e+&quot;]&quot;:r+&quot;.&quot;+e:e}function d(t){for(var e=0;e&lt;t.length;e++)if(i(t[e]))return!0}function g(t){var e;switch(t.code){case&quot;data&quot;:e=&quot;The template has no key data.&quot;;break;case&quot;layout&quot;:e=&quot;The template has no key layout.&quot;;break;case&quot;missing&quot;:e=t.path?&quot;There are no templates for item &quot;+t.path+&quot; with name &quot;+t.templateitemname:&quot;There are no templates for trace &quot;+t.index+&quot;, of type &quot;+t.traceType+&quot;.&quot;;break;case&quot;unused&quot;:e=t.path?&quot;The template item at &quot;+t.path+&quot; was not used in constructing the plot.&quot;:t.dataCount?&quot;Some of the templates of type &quot;+t.traceType+&quot; were not used. The template has &quot;+t.templateCount+&quot; traces, the data only has &quot;+t.dataCount+&quot; of this type.&quot;:&quot;The template has &quot;+t.templateCount+&quot; traces of type &quot;+t.traceType+&quot; but there are none in the data.&quot;;break;case&quot;reused&quot;:e=&quot;Some of the templates of type &quot;+t.traceType+&quot; were used more than once. The template has &quot;+t.templateCount+&quot; traces, the data has &quot;+t.dataCount+&quot; of this type.&quot;}return t.msg=e,t}r.makeTemplate=function(t){t=n.extendDeep({_context:c},t),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var l={data:{},layout:{}};e.forEach(function(t){var e={};h(t,e,function(t,e){return a.getTraceValObject(t,n.nestedProperty({},e).parts)}.bind(null,t));var r=n.coerce(t,{},s,&quot;type&quot;),i=l.data[r];i||(i=l.data[r]=[]),i.push(e)}),h(r,l.layout,function(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}.bind(null,r)),delete l.layout.template;var f=r.template;if(i(f)){var p,d,g,m,v,y,x=f.layout;i(x)&amp;&amp;u(x,l.layout);var b=f.data;if(i(b)){for(d in l.data)if(g=b[d],Array.isArray(g)){for(y=(v=l.data[d]).length,m=g.length,p=0;p&lt;y;p++)u(g[p%m],v[p]);for(p=y;p&lt;m;p++)v.push(n.extendDeep({},g[p]))}for(d in b)d in l.data||(l.data[d]=n.extendDeep([],b[d]))}}return l},r.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:c,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,u=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var h=r._fullLayout,m=r._fullData,v={};if(i(s)?(!function t(e,r){for(var n in e)if(&quot;_&quot;!==n.charAt(0)&amp;&amp;i(e[n])){var a,o=f(n),s=[];for(a=0;a&lt;r.length;a++)s.push(p(e,n,r[a])),o!==n&amp;&amp;s.push(p(e,o,r[a]));for(a=0;a&lt;s.length;a++)v[s[a]]=1;t(e[n],s)}}(h,[&quot;layout&quot;]),function t(e,r){for(var n in e)if(-1===n.indexOf(&quot;defaults&quot;)&amp;&amp;i(e[n])){var a=p(e,n,r);v[a]?t(e[n],a):u.push({code:&quot;unused&quot;,path:a})}}(s,&quot;layout&quot;)):u.push({code:&quot;layout&quot;}),i(l)){for(var y,x={},b=0;b&lt;m.length;b++){var _=m[b];x[y=_.type]=(x[y]||0)+1,_._fullInput._template||u.push({code:&quot;missing&quot;,index:_._fullInput.index,traceType:y})}for(y in l){var w=l[y].length,k=x[y]||0;w&gt;k?u.push({code:&quot;unused&quot;,traceType:y,templateCount:w,dataCount:k}):k&gt;w&amp;&amp;u.push({code:&quot;reused&quot;,traceType:y,templateCount:w,dataCount:k})}}else u.push({code:&quot;data&quot;});if(function t(e,r){for(var n in e)if(&quot;_&quot;!==n.charAt(0)){var a=e[n],o=p(e,n,r);i(a)?(Array.isArray(e)&amp;&amp;!1===a._template&amp;&amp;a.templateitemname&amp;&amp;u.push({code:&quot;missing&quot;,path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&amp;&amp;d(a)&amp;&amp;t(a,o)}}({data:m,layout:h},&quot;&quot;),u.length)return u.map(g)}},{&quot;../lib&quot;:693,&quot;../plots/attributes&quot;:739,&quot;../plots/plots&quot;:805,&quot;./plot_config&quot;:730,&quot;./plot_schema&quot;:731,&quot;./plot_template&quot;:732}],735:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./plot_api&quot;),i=t(&quot;../lib&quot;),a=t(&quot;../snapshot/helpers&quot;),o=t(&quot;../snapshot/tosvg&quot;),s=t(&quot;../snapshot/svgtoimg&quot;),l={format:{valType:&quot;enumerated&quot;,values:[&quot;png&quot;,&quot;jpeg&quot;,&quot;webp&quot;,&quot;svg&quot;],dflt:&quot;png&quot;},width:{valType:&quot;number&quot;,min:1},height:{valType:&quot;number&quot;,min:1},scale:{valType:&quot;number&quot;,min:0,dflt:1},setBackground:{valType:&quot;any&quot;,dflt:!1},imageDataOnly:{valType:&quot;boolean&quot;,dflt:!1}},c=/^data:image\/\w+;base64,/;e.exports=function(t,e){var r,u,f;function h(t){return!(t in e)||i.validate(e[t],l[t])}if(e=e||{},i.isPlainObject(t)?(r=t.data||[],u=t.layout||{},f=t.config||{}):(t=i.getGraphDiv(t),r=i.extendDeep([],t.data),u=i.extendDeep({},t.layout),f=t._context),!h(&quot;width&quot;)||!h(&quot;height&quot;))throw new Error(&quot;Height and width should be pixel values.&quot;);if(!h(&quot;format&quot;))throw new Error(&quot;Image format is not jpeg, png, svg or webp.&quot;);var p={};function d(t,r){return i.coerce(e,p,l,t,r)}var g=d(&quot;format&quot;),m=d(&quot;width&quot;),v=d(&quot;height&quot;),y=d(&quot;scale&quot;),x=d(&quot;setBackground&quot;),b=d(&quot;imageDataOnly&quot;),_=document.createElement(&quot;div&quot;);_.style.position=&quot;absolute&quot;,_.style.left=&quot;-5000px&quot;,document.body.appendChild(_);var w=i.extendFlat({},u);m&amp;&amp;(w.width=m),v&amp;&amp;(w.height=v);var k=i.extendFlat({},f,{staticPlot:!0,setBackground:x}),M=a.getRedrawFunc(_);function A(){return new Promise(function(t){setTimeout(t,a.getDelay(_._fullLayout))})}function T(){return new Promise(function(t,e){var r=o(_,g,y),a=_._fullLayout.width,l=_._fullLayout.height;if(n.purge(_),document.body.removeChild(_),&quot;svg&quot;===g)return t(b?r:&quot;data:image/svg+xml,&quot;+encodeURIComponent(r));var c=document.createElement(&quot;canvas&quot;);c.id=i.randstr(),s({format:g,width:a,height:l,scale:y,canvas:c,svg:r,promise:!0}).then(t).catch(e)})}return new Promise(function(t,e){n.plot(_,r,w,k).then(M).then(A).then(T).then(function(e){t(function(t){return b?t.replace(c,&quot;&quot;):t}(e))}).catch(function(t){e(t)})})}},{&quot;../lib&quot;:693,&quot;../snapshot/helpers&quot;:829,&quot;../snapshot/svgtoimg&quot;:831,&quot;../snapshot/tosvg&quot;:833,&quot;./plot_api&quot;:729}],736:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../plots/plots&quot;),a=t(&quot;./plot_schema&quot;),o=t(&quot;./plot_config&quot;),s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h&lt;f.length;h++){var m=f[h];if(&quot;transforms&quot;!==m){var v=o.slice();v.push(m);var y=t[m],x=e[m],b=g(r,m),_=&quot;info_array&quot;===(b||{}).valType,w=&quot;colorscale&quot;===(b||{}).valType,k=(b||{}).items;if(d(r,m))if(s(y)&amp;&amp;s(x))u(y,x,b,i,a,v);else if(_&amp;&amp;l(y)){y.length&gt;x.length&amp;&amp;i.push(p(&quot;unused&quot;,a,v.concat(x.length)));var M,A,T,S,E,C=x.length,L=Array.isArray(k);if(L&amp;&amp;(C=Math.min(C,k.length)),2===b.dimensions)for(A=0;A&lt;C;A++)if(l(y[A])){y[A].length&gt;x[A].length&amp;&amp;i.push(p(&quot;unused&quot;,a,v.concat(A,x[A].length)));var z=x[A].length;for(M=0;M&lt;(L?Math.min(z,k[A].length):z);M++)T=L?k[A][M]:k,S=y[A][M],E=x[A][M],n.validate(S,T)?E!==S&amp;&amp;E!==+S&amp;&amp;i.push(p(&quot;dynamic&quot;,a,v.concat(A,M),S,E)):i.push(p(&quot;value&quot;,a,v.concat(A,M),S))}else i.push(p(&quot;array&quot;,a,v.concat(A),y[A]));else for(A=0;A&lt;C;A++)T=L?k[A]:k,S=y[A],E=x[A],n.validate(S,T)?E!==S&amp;&amp;E!==+S&amp;&amp;i.push(p(&quot;dynamic&quot;,a,v.concat(A),S,E)):i.push(p(&quot;value&quot;,a,v.concat(A),S))}else if(b.items&amp;&amp;!_&amp;&amp;l(y)){var P,O,I=k[Object.keys(k)[0]],D=[];for(P=0;P&lt;x.length;P++){var R=x[P]._index||P;if((O=v.slice()).push(R),s(y[R])&amp;&amp;s(x[P])){D.push(R);var B=y[R],F=x[P];s(B)&amp;&amp;!1!==B.visible&amp;&amp;!1===F.visible?i.push(p(&quot;invisible&quot;,a,O)):u(B,F,I,i,a,O)}}for(P=0;P&lt;y.length;P++)(O=v.slice()).push(P),s(y[P])?-1===D.indexOf(P)&amp;&amp;i.push(p(&quot;unused&quot;,a,O)):i.push(p(&quot;object&quot;,a,O,y[P]))}else!s(y)&amp;&amp;s(x)?i.push(p(&quot;object&quot;,a,v,y)):c(y)||!c(x)||_||w?m in e?n.validate(y,b)?&quot;enumerated&quot;===b.valType&amp;&amp;(b.coerceNumber&amp;&amp;y!==+x||y!==x)&amp;&amp;i.push(p(&quot;dynamic&quot;,a,v,y,x)):i.push(p(&quot;value&quot;,a,v,y)):i.push(p(&quot;unused&quot;,a,v,y)):i.push(p(&quot;array&quot;,a,v,y));else i.push(p(&quot;schema&quot;,a,v))}}return i}e.exports=function(t,e){var r,c,f=a.get(),h=[],d={_context:n.extendFlat({},o)};l(t)?(d.data=n.extendDeep([],t),r=t):(d.data=[],r=[],h.push(p(&quot;array&quot;,&quot;data&quot;))),s(e)?(d.layout=n.extendDeep({},e),c=e):(d.layout={},c={},arguments.length&gt;1&amp;&amp;h.push(p(&quot;object&quot;,&quot;layout&quot;))),i.supplyDefaults(d);for(var g=d._fullData,m=r.length,v=0;v&lt;m;v++){var y=r[v],x=[&quot;data&quot;,v];if(s(y)){var b=g[v],_=b.type,w=f.traces[_].attributes;w.type={valType:&quot;enumerated&quot;,values:[_]},!1===b.visible&amp;&amp;!1!==y.visible&amp;&amp;h.push(p(&quot;invisible&quot;,x)),u(y,b,w,h,x);var k=y.transforms,M=b.transforms;if(k){l(k)||h.push(p(&quot;array&quot;,x,[&quot;transforms&quot;])),x.push(&quot;transforms&quot;);for(var A=0;A&lt;k.length;A++){var T=[&quot;transforms&quot;,A],S=k[A].type;if(s(k[A])){var E=f.transforms[S]?f.transforms[S].attributes:{};E.type={valType:&quot;enumerated&quot;,values:Object.keys(f.transforms)},u(k[A],M[A],E,h,x,T)}else h.push(p(&quot;object&quot;,x,T))}}}else h.push(p(&quot;object&quot;,x))}return u(c,d._fullLayout,function(t,e){for(var r=t.layout.layoutAttributes,i=0;i&lt;e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&amp;&amp;(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}(f,g),h,&quot;layout&quot;),0===h.length?void 0:h};var f={object:function(t,e){return(&quot;layout&quot;===t&amp;&amp;&quot;&quot;===e?&quot;The layout argument&quot;:&quot;data&quot;===t[0]&amp;&amp;&quot;&quot;===e?&quot;Trace &quot;+t[1]+&quot; in the data argument&quot;:h(t)+&quot;key &quot;+e)+&quot; must be linked to an object container&quot;},array:function(t,e){return(&quot;data&quot;===t?&quot;The data argument&quot;:h(t)+&quot;key &quot;+e)+&quot; must be linked to an array container&quot;},schema:function(t,e){return h(t)+&quot;key &quot;+e+&quot; is not part of the schema&quot;},unused:function(t,e,r){var n=s(r)?&quot;container&quot;:&quot;key&quot;;return h(t)+n+&quot; &quot;+e+&quot; did not get coerced&quot;},dynamic:function(t,e,r,n){return[h(t)+&quot;key&quot;,e,&quot;(set to '&quot;+r+&quot;')&quot;,&quot;got reset to&quot;,&quot;'&quot;+n+&quot;'&quot;,&quot;during defaults.&quot;].join(&quot; &quot;)},invisible:function(t,e){return(e?h(t)+&quot;item &quot;+e:&quot;Trace &quot;+t[1])+&quot; got defaulted to be not visible&quot;},value:function(t,e,r){return[h(t)+&quot;key &quot;+e,&quot;is set to an invalid value (&quot;+r+&quot;)&quot;].join(&quot; &quot;)}};function h(t){return l(t)?&quot;In data trace &quot;+t[1]+&quot;, &quot;:&quot;In &quot;+t+&quot;, &quot;}function p(t,e,r,i,a){var o,s;r=r||&quot;&quot;,l(e)?(o=e[0],s=e[1]):(o=e,s=null);var c=function(t){if(!l(t))return String(t);for(var e=&quot;&quot;,r=0;r&lt;t.length;r++){var n=t[r];&quot;number&quot;==typeof n?e=e.substr(0,e.length-1)+&quot;[&quot;+n+&quot;]&quot;:e+=n,r&lt;t.length-1&amp;&amp;(e+=&quot;.&quot;)}return e}(r),u=f[t](e,c,i,a);return n.log(u),{code:t,container:o,trace:s,path:r,astr:c,msg:u}}function d(t,e){var r=v(e),n=r.keyMinusId,i=r.id;return!!(n in t&amp;&amp;t[n]._isSubplotObj&amp;&amp;i)||e in t}function g(t,e){return e in t?t[e]:t[v(e).keyMinusId]}var m=n.counterRegex(&quot;([a-z]+)&quot;);function v(t){var e=t.match(m);return{keyMinusId:e&amp;&amp;e[1],id:e&amp;&amp;e[2]}}},{&quot;../lib&quot;:693,&quot;../plots/plots&quot;:805,&quot;./plot_config&quot;:730,&quot;./plot_schema&quot;:731}],737:[function(t,e,r){&quot;use strict&quot;;e.exports={mode:{valType:&quot;enumerated&quot;,dflt:&quot;afterall&quot;,values:[&quot;immediate&quot;,&quot;next&quot;,&quot;afterall&quot;]},direction:{valType:&quot;enumerated&quot;,values:[&quot;forward&quot;,&quot;reverse&quot;],dflt:&quot;forward&quot;},fromcurrent:{valType:&quot;boolean&quot;,dflt:!1},frame:{duration:{valType:&quot;number&quot;,min:0,dflt:500},redraw:{valType:&quot;boolean&quot;,dflt:!0}},transition:{duration:{valType:&quot;number&quot;,min:0,dflt:500},easing:{valType:&quot;enumerated&quot;,dflt:&quot;cubic-in-out&quot;,values:[&quot;linear&quot;,&quot;quad&quot;,&quot;cubic&quot;,&quot;sin&quot;,&quot;exp&quot;,&quot;circle&quot;,&quot;elastic&quot;,&quot;back&quot;,&quot;bounce&quot;,&quot;linear-in&quot;,&quot;quad-in&quot;,&quot;cubic-in&quot;,&quot;sin-in&quot;,&quot;exp-in&quot;,&quot;circle-in&quot;,&quot;elastic-in&quot;,&quot;back-in&quot;,&quot;bounce-in&quot;,&quot;linear-out&quot;,&quot;quad-out&quot;,&quot;cubic-out&quot;,&quot;sin-out&quot;,&quot;exp-out&quot;,&quot;circle-out&quot;,&quot;elastic-out&quot;,&quot;back-out&quot;,&quot;bounce-out&quot;,&quot;linear-in-out&quot;,&quot;quad-in-out&quot;,&quot;cubic-in-out&quot;,&quot;sin-in-out&quot;,&quot;exp-in-out&quot;,&quot;circle-in-out&quot;,&quot;elastic-in-out&quot;,&quot;back-in-out&quot;,&quot;bounce-in-out&quot;]}}}},{}],738:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../plot_api/plot_template&quot;);e.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||&quot;visible&quot;,c=e[s],u=n.isArrayOrTypedArray(t[s])?t[s]:[],f=e[s]=[],h=i.arrayTemplater(e,s,l);for(a=0;a&lt;u.length;a++){var p=u[a];n.isPlainObject(p)?o=h.newItem(p):(o=h.newItem({}))[l]=!1,o._index=a,!1!==o[l]&amp;&amp;r.handleItemDefaults(p,o,e,r),f.push(o)}var d=h.defaultItems();for(a=0;a&lt;d.length;a++)(o=d[a])._index=f.length,r.handleItemDefaults({},o,e,r,{}),f.push(o);if(n.isArrayOrTypedArray(c)){var g=Math.min(c.length,f.length);for(a=0;a&lt;g;a++)n.relinkPrivateKeys(f[a],c[a])}return f}},{&quot;../lib&quot;:693,&quot;../plot_api/plot_template&quot;:732}],739:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../components/fx/attributes&quot;);e.exports={type:{valType:&quot;enumerated&quot;,values:[],dflt:&quot;scatter&quot;,editType:&quot;calc+clearAxisTypes&quot;,_noTemplating:!0},visible:{valType:&quot;enumerated&quot;,values:[!0,!1,&quot;legendonly&quot;],dflt:!0,editType:&quot;calc&quot;},showlegend:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;style&quot;},legendgroup:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;style&quot;},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1,editType:&quot;style&quot;},name:{valType:&quot;string&quot;,editType:&quot;style&quot;},uid:{valType:&quot;string&quot;,editType:&quot;plot&quot;},ids:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},customdata:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},selectedpoints:{valType:&quot;any&quot;,editType:&quot;calc&quot;},hoverinfo:{valType:&quot;flaglist&quot;,flags:[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;,&quot;text&quot;,&quot;name&quot;],extras:[&quot;all&quot;,&quot;none&quot;,&quot;skip&quot;],arrayOk:!0,dflt:&quot;all&quot;,editType:&quot;none&quot;},hoverlabel:n.hoverlabel,stream:{token:{valType:&quot;string&quot;,noBlank:!0,strict:!0,editType:&quot;calc&quot;},maxpoints:{valType:&quot;number&quot;,min:0,max:1e4,dflt:500,editType:&quot;calc&quot;},editType:&quot;calc&quot;},transforms:{_isLinkedToArray:&quot;transform&quot;,editType:&quot;calc&quot;}}},{&quot;../components/fx/attributes&quot;:601}],740:[function(t,e,r){&quot;use strict&quot;;e.exports={xaxis:{valType:&quot;subplotid&quot;,dflt:&quot;x&quot;,editType:&quot;calc+clearAxisTypes&quot;},yaxis:{valType:&quot;subplotid&quot;,dflt:&quot;y&quot;,editType:&quot;calc+clearAxisTypes&quot;}}},{}],741:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../constants/numerical&quot;).FP_SAFE;function o(t,e){var r,n,a=[],o=s(e),c=l(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return i.simpleMap(e.range,e.r2l);var h=u[0].val,p=f[0].val;for(r=1;r&lt;u.length&amp;&amp;h===p;r++)h=Math.min(h,u[r].val);for(r=1;r&lt;f.length&amp;&amp;h===p;r++)p=Math.max(p,f[r].val);var d=!1;if(e.range){var g=i.simpleMap(e.range,e.r2l);d=g[1]&lt;g[0]}&quot;reversed&quot;===e.autorange&amp;&amp;(d=!0,e.autorange=!0);var m,v,y,x,b,_,w=e.rangemode,k=&quot;tozero&quot;===w,M=&quot;nonnegative&quot;===w,A=e._length,T=A/10,S=0;for(r=0;r&lt;u.length;r++)for(m=u[r],n=0;n&lt;f.length;n++)(_=(v=f[n]).val-m.val)&gt;0&amp;&amp;((b=A-o(m)-o(v))&gt;T?_/b&gt;S&amp;&amp;(y=m,x=v,S=_/b):_/A&gt;S&amp;&amp;(y={val:m.val,pad:0},x={val:v.val,pad:0},S=_/A));if(h===p){var E=h-1,C=h+1;if(k)if(0===h)a=[0,1];else{var L=(h&gt;0?f:u).reduce(function(t,e){return Math.max(t,o(e))},0),z=h/(1-Math.min(.5,L/A));a=h&gt;0?[0,z]:[z,0]}else a=M?[Math.max(0,E),Math.max(1,C)]:[E,C]}else k?(y.val&gt;=0&amp;&amp;(y={val:0,pad:0}),x.val&lt;=0&amp;&amp;(x={val:0,pad:0})):M&amp;&amp;(y.val-S*o(y)&lt;0&amp;&amp;(y={val:0,pad:0}),x.val&lt;=0&amp;&amp;(x={val:1,pad:0})),S=(x.val-y.val)/(A-o(y)-o(x)),a=[y.val-S*o(y),x.val+S*o(x)];return d&amp;&amp;a.reverse(),i.simpleMap(a,e.l2r||Number)}function s(t){var e=t._length/20;return&quot;domain&quot;===t.constrain&amp;&amp;t._inputDomain&amp;&amp;(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function l(t,e){var r,n,i,a=e._id,o=t._fullData,s=t._fullLayout,l=[],f=[];function h(t,e){for(r=0;r&lt;e.length;r++){var o=t[e[r]],s=(o._extremes||{})[a];if(!0===o.visible&amp;&amp;s){for(n=0;n&lt;s.min.length;n++)i=s.min[n],c(l,i.val,i.pad,{extrapad:i.extrapad});for(n=0;n&lt;s.max.length;n++)i=s.max[n],u(f,i.val,i.pad,{extrapad:i.extrapad})}}}return h(o,e._traceIndices),h(s.annotations||[],e._annIndices||[]),h(s.shapes||[],e._shapeIndices||[]),{min:l,max:f}}function c(t,e,r,n){f(t,e,r,n,p)}function u(t,e,r,n){f(t,e,r,n,d)}function f(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l&lt;t.length&amp;&amp;s;l++){var c=t[l];if(i(c.val,e)&amp;&amp;c.pad&gt;=r&amp;&amp;(c.extrapad||!o)){s=!1;break}i(e,c.val)&amp;&amp;c.pad&lt;=r&amp;&amp;(o||!c.extrapad)&amp;&amp;(t.splice(l,1),l--)}if(s){var u=a&amp;&amp;0===e;t.push({val:e,pad:u?0:r,extrapad:!u&amp;&amp;o})}}function h(t){return n(t)&amp;&amp;Math.abs(t)&lt;a}function p(t,e){return t&lt;=e}function d(t,e){return t&gt;=e}e.exports={getAutoRange:o,makePadFn:s,doAutoRange:function(t,e){e._length||e.setScale();var r;e.autorange&amp;&amp;(e.range=o(t,e),e._r=e.range.slice(),e._rl=i.simpleMap(e._r,e.r2l),(r=e._input).range=e.range.slice(),r.autorange=e.autorange);if(e._anchorAxis&amp;&amp;e._anchorAxis.rangeslider){var n=e._anchorAxis.rangeslider[e._name];n&amp;&amp;&quot;auto&quot;===n.rangemode&amp;&amp;(n.range=o(t,e)),(r=e._anchorAxis._input).rangeslider[e._name]=i.extendFlat({},n)}},findExtremes:function(t,e,r){r||(r={});t._m||t.setScale();var i,o,s,l,f,p,d,g,m,v=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&amp;&amp;(&quot;linear&quot;===t.type||&quot;-&quot;===t.type),w=&quot;log&quot;===t.type,k=!1;function M(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=M((t._m&gt;0?r.ppadplus:r.ppadminus)||r.ppad||0),T=M((t._m&gt;0?r.ppadminus:r.ppadplus)||r.ppad||0),S=M(r.vpadplus||r.vpad),E=M(r.vpadminus||r.vpad);if(!k){if(g=1/0,m=-1/0,w)for(i=0;i&lt;x;i++)(o=e[i])&lt;g&amp;&amp;o&gt;0&amp;&amp;(g=o),o&gt;m&amp;&amp;o&lt;a&amp;&amp;(m=o);else for(i=0;i&lt;x;i++)(o=e[i])&lt;g&amp;&amp;o&gt;-a&amp;&amp;(g=o),o&gt;m&amp;&amp;o&lt;a&amp;&amp;(m=o);e=[g,m],x=2}var C={tozero:_,extrapad:b};function L(r){s=e[r],n(s)&amp;&amp;(p=A(r),d=T(r),g=s-E(r),m=s+S(r),w&amp;&amp;g&lt;m/10&amp;&amp;(g=m/10),l=t.c2l(g),f=t.c2l(m),_&amp;&amp;(l=Math.min(0,l),f=Math.max(0,f)),h(l)&amp;&amp;c(v,l,d,C),h(f)&amp;&amp;u(y,f,p,C))}var z=Math.min(6,x);for(i=0;i&lt;z;i++)L(i);for(i=x-1;i&gt;=z;i--)L(i);return{min:v,max:y}},concatExtremes:l}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;fast-isnumeric&quot;:213}],742:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../../plots/plots&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../lib/svg_text_utils&quot;),c=t(&quot;../../components/titles&quot;),u=t(&quot;../../components/color&quot;),f=t(&quot;../../components/drawing&quot;),h=t(&quot;./layout_attributes&quot;),p=t(&quot;../../constants/numerical&quot;),d=p.ONEAVGYEAR,g=p.ONEAVGMONTH,m=p.ONEDAY,v=p.ONEHOUR,y=p.ONEMIN,x=p.ONESEC,b=p.MINUS_SIGN,_=p.BADNUM,w=t(&quot;../../constants/alignment&quot;).MID_SHIFT,k=t(&quot;../../constants/alignment&quot;).LINE_SPACING,M=e.exports={};M.setConvert=t(&quot;./set_convert&quot;);var A=t(&quot;./axis_autotype&quot;),T=t(&quot;./axis_ids&quot;);M.id2name=T.id2name,M.name2id=T.name2id,M.cleanId=T.cleanId,M.list=T.list,M.listIds=T.listIds,M.getFromId=T.getFromId,M.getFromTrace=T.getFromTrace;var S=t(&quot;./autorange&quot;);M.getAutoRange=S.getAutoRange,M.findExtremes=S.findExtremes,M.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+&quot;axis&quot;],c=n+&quot;ref&quot;,u={};return i||(i=l[0]||a),a||(a=i),u[c]={valType:&quot;enumerated&quot;,values:l.concat(a?[a]:[]),dflt:i},s.coerce(t,e,u,c)},M.coercePosition=function(t,e,r,n,i,a){var o,l;if(&quot;paper&quot;===n||&quot;pixel&quot;===n)o=s.ensureNumber,l=r(i,a);else{var c=M.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},M.cleanPosition=function(t,e,r){return(&quot;paper&quot;===r||&quot;pixel&quot;===r?s.ensureNumber:M.getFromId(e,r).cleanPos)(t)};var E=M.getDataConversions=function(t,e,r,n){var i,a=&quot;x&quot;===r||&quot;y&quot;===r||&quot;z&quot;===r?r:n;if(Array.isArray(a)){if(i={type:A(n),_categories:[]},M.setConvert(i),&quot;category&quot;===i.type)for(var o=0;o&lt;n.length;o++)i.d2c(n[o])}else i=M.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:&quot;ids&quot;===a?{d2c:L,c2d:L}:{d2c:C,c2d:C}};function C(t){return+t}function L(t){return String(t)}M.getDataToCoordFunc=function(t,e,r,n){return E(t,e,r,n).d2c},M.counterLetter=function(t){var e=t.charAt(0);return&quot;x&quot;===e?&quot;y&quot;:&quot;y&quot;===e?&quot;x&quot;:void 0},M.minDtick=function(t,e,r,n){-1===[&quot;log&quot;,&quot;category&quot;].indexOf(t.type)&amp;&amp;n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&amp;&amp;((t._minDtick/e+1e-6)%1&lt;2e-6&amp;&amp;((r-t._forceTick0)/e%1+1.000001)%1&lt;2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1&gt;2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1&gt;2e-6)&amp;&amp;(t._minDtick=0)):t._minDtick=0},M.saveRangeInitial=function(t,e){for(var r=M.list(t,&quot;&quot;,!0),n=!1,i=0;i&lt;r.length;i++){var a=r[i],o=void 0===a._rangeInitial,s=o||!(a.range[0]===a._rangeInitial[0]&amp;&amp;a.range[1]===a._rangeInitial[1]);(o&amp;&amp;!1===a.autorange||e&amp;&amp;s)&amp;&amp;(a._rangeInitial=a.range.slice(),n=!0)}return n},M.saveShowSpikeInitial=function(t,e){for(var r=M.list(t,&quot;&quot;,!0),n=!1,i=&quot;on&quot;,a=0;a&lt;r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&amp;&amp;l)&amp;&amp;(o._showSpikeInitial=o.showspikes,n=!0),&quot;on&quot;!==i||o.showspikes||(i=&quot;off&quot;)}return t._fullLayout._cartesianSpikesEnabled=i,n},M.autoBin=function(t,e,r,n,a){var o,l,c=s.aggNums(Math.min,null,t),u=s.aggNums(Math.max,null,t);if(a||(a=e.calendar),&quot;category&quot;===e.type)return{start:c-.5,end:u+.5,size:1,_dataSpan:u-c};if(r)o=(u-c)/r;else{var f=s.distinctVals(t),h=Math.pow(10,Math.floor(Math.log(f.minDiff)/Math.LN10)),p=h*s.roundUp(f.minDiff/h,[.9,1.9,4.9,9.9],!0);o=Math.max(p,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(o)||(o=1)}l=&quot;log&quot;===e.type?{type:&quot;linear&quot;,range:[c,u]}:{type:e.type,range:s.simpleMap([c,u],e.c2r,0,a),calendar:a},M.setConvert(l),M.autoTicks(l,o);var d,g=M.tickIncrement(M.tickFirst(l),l.dtick,&quot;reverse&quot;,a);if(&quot;number&quot;==typeof l.dtick)d=(g=function(t,e,r,n,a){var o=0,s=0,l=0,c=0;function u(e){return(1+100*(e-t)/r.dtick)%100&lt;2}for(var f=0;f&lt;e.length;f++)e[f]%1==0?l++:i(e[f])||c++,u(e[f])&amp;&amp;o++,u(e[f]+r.dtick/2)&amp;&amp;s++;var h=e.length-c;if(l===h&amp;&amp;&quot;date&quot;!==r.type)r.dtick&lt;1?t=n-.5*r.dtick:(t-=.5)+r.dtick&lt;n&amp;&amp;(t+=r.dtick);else if(s&lt;.1*h&amp;&amp;(o&gt;.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p&lt;n?p:-p}return t}(g,t,l,c,u))+(1+Math.floor((u-g)/l.dtick))*l.dtick;else for(&quot;M&quot;===l.dtick.charAt(0)&amp;&amp;(g=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays&gt;.8){var o=Number(r.substr(1));a.exactYears&gt;.8&amp;&amp;o%12==0?t=M.tickIncrement(t,&quot;M6&quot;,&quot;reverse&quot;)+1.5*m:a.exactMonths&gt;.8?t=M.tickIncrement(t,&quot;M1&quot;,&quot;reverse&quot;)+15.5*m:t-=m/2;var l=M.tickIncrement(t,r);if(l&lt;=n)return l}return t}(g,t,l.dtick,c,a)),d=g,0;d&lt;=u;)d=M.tickIncrement(d,l.dtick,!1,a),0;return{start:e.c2r(g,0,a),end:e.c2r(d,0,a),size:l.dtick,_dataSpan:u-c}},M.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if(&quot;auto&quot;===t.tickmode||!t.dtick){var r,n=t.nticks;n||(&quot;category&quot;===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r=&quot;y&quot;===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),&quot;radialaxis&quot;===t._name&amp;&amp;(n*=2)),&quot;array&quot;===t.tickmode&amp;&amp;(n*=100),M.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick&gt;0&amp;&amp;t.dtick&lt;2*t._minDtick&amp;&amp;(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0=&quot;date&quot;===t.type?&quot;2000-01-01&quot;:0),&quot;date&quot;===t.type&amp;&amp;t.dtick&lt;.1&amp;&amp;(t.dtick=.1),N(t)},M.calcTicks=function(t){M.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if(&quot;array&quot;===t.tickmode)return function(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=s.simpleMap(t.range,t.r2l),l=1.0001*o[0]-1e-4*o[1],c=1.0001*o[1]-1e-4*o[0],u=Math.min(l,c),f=Math.max(l,c),h=0;Array.isArray(i)||(i=[]);var p=&quot;category&quot;===t.type?t.d2l_noadd:t.d2l;&quot;log&quot;===t.type&amp;&amp;&quot;L&quot;!==String(t.dtick).charAt(0)&amp;&amp;(t.dtick=&quot;L&quot;+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(r=0;r&lt;n.length;r++)(e=p(n[r]))&gt;u&amp;&amp;e&lt;f&amp;&amp;(void 0===i[r]?a[h]=M.tickText(t,e):a[h]=j(t,e,String(i[r])),h++);h&lt;n.length&amp;&amp;a.splice(h,n.length-h);return a}(t);t._tmin=M.tickFirst(t);var r=1.0001*e[0]-1e-4*e[1],n=1.0001*e[1]-1e-4*e[0],i=e[1]&lt;e[0];if(t._tmin&lt;r!==i)return[];var a=[];&quot;category&quot;===t.type&amp;&amp;(n=i?Math.max(-.5,n):Math.min(t._categories.length-.5,n));for(var o=null,l=Math.max(1e3,t._length||0),c=t._tmin;(i?c&gt;=n:c&lt;=n)&amp;&amp;!(a.length&gt;l||c===o);c=M.tickIncrement(c,t.dtick,i,t.calendar))o=c,a.push(c);Z(t)&amp;&amp;360===Math.abs(e[1]-e[0])&amp;&amp;a.pop(),t._tmax=a[a.length-1],t._prevDateHead=&quot;&quot;,t._inCalcTicks=!0;for(var u=new Array(a.length),f=0;f&lt;a.length;f++)u[f]=M.tickText(t,a[f]);return t._inCalcTicks=!1,u};var z=[2,5,10],P=[1,2,3,6,12],O=[1,2,5,10,15,30],I=[1,2,3,7,14],D=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],R=[-.301,0,.301,.699,1],B=[15,30,45,90,180];function F(t,e,r){return e*s.roundUp(t/e,r)}function N(t){var e=t.dtick;if(t._tickexponent=0,i(e)||&quot;string&quot;==typeof e||(e=1),&quot;category&quot;===t.type&amp;&amp;(t._tickround=null),&quot;date&quot;===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,&quot;&quot;),a=n.length;if(&quot;M&quot;===String(e).charAt(0))a&gt;10||&quot;01-01&quot;!==n.substr(5)?t._tickround=&quot;d&quot;:t._tickround=+e.substr(1)%12==0?&quot;y&quot;:&quot;m&quot;;else if(e&gt;=m&amp;&amp;a&lt;=10||e&gt;=15*m)t._tickround=&quot;d&quot;;else if(e&gt;=y&amp;&amp;a&lt;=16||e&gt;=v)t._tickround=&quot;M&quot;;else if(e&gt;=x&amp;&amp;a&lt;=19||e&gt;=y)t._tickround=&quot;S&quot;;else{var o=t.l2r(r+e).replace(/^-/,&quot;&quot;).length;t._tickround=Math.max(a,o)-20,t._tickround&lt;0&amp;&amp;(t._tickround=4)}}else if(i(e)||&quot;L&quot;===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)&gt;3&amp;&amp;(U(t.exponentformat)&amp;&amp;!q(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function j(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||&quot;&quot;,fontSize:n.size,font:n.family,fontColor:n.color}}M.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if(&quot;date&quot;===t.type){t.tick0=s.dateTick0(t.calendar);var a=2*e;a&gt;d?(e/=d,r=n(10),t.dtick=&quot;M&quot;+12*F(e,r,z)):a&gt;g?(e/=g,t.dtick=&quot;M&quot;+F(e,1,P)):a&gt;m?(t.dtick=F(e,m,I),t.tick0=s.dateTick0(t.calendar,!0)):a&gt;v?t.dtick=F(e,v,P):a&gt;y?t.dtick=F(e,y,O):a&gt;x?t.dtick=F(e,x,O):(r=n(10),t.dtick=F(e,r,z))}else if(&quot;log&quot;===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e&gt;.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])&lt;1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick=&quot;L&quot;+F(e,r,z)}else t.dtick=e&gt;.3?&quot;D2&quot;:&quot;D1&quot;}else&quot;category&quot;===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Z(t)?(t.tick0=0,r=1,t.dtick=F(e,r,B)):(t.tick0=0,r=n(10),t.dtick=F(e,r,z));if(0===t.dtick&amp;&amp;(t.dtick=1),!i(t.dtick)&amp;&amp;&quot;string&quot;!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,&quot;ax.dtick error: &quot;+String(c)}},M.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if(&quot;M&quot;===l)return s.incrementMonth(t,c,a);if(&quot;L&quot;===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if(&quot;D&quot;===l){var u=&quot;D2&quot;===e?R:D,f=t+.01*o,h=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw&quot;unrecognized dtick &quot;+String(e)},M.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),a=r[1]&lt;r[0],o=a?Math.floor:Math.ceil,l=1.0001*r[0]-1e-4*r[1],c=t.dtick,u=e(t.tick0);if(i(c)){var f=o((l-u)/c)*c+u;return&quot;category&quot;===t.type&amp;&amp;(f=s.constrain(f,0,t._categories.length-1)),f}var h=c.charAt(0),p=Number(c.substr(1));if(&quot;M&quot;===h){for(var d,g,m,v=0,y=u;v&lt;10;){if(((d=M.tickIncrement(y,c,a,t.calendar))-l)*(y-l)&lt;=0)return a?Math.min(y,d):Math.max(y,d);g=(l-(y+d)/2)/(d-y),m=h+(Math.abs(Math.round(g))||1)*p,y=M.tickIncrement(y,m,g&lt;0?!a:a,t.calendar),v++}return s.error(&quot;tickFirst did not converge&quot;,t),y}if(&quot;L&quot;===h)return Math.log(o((Math.pow(10,l)-u)/p)*p+u)/Math.LN10;if(&quot;D&quot;===h){var x=&quot;D2&quot;===c?R:D,b=s.roundUp(s.mod(l,1),x,a);return Math.floor(l)+Math.log(n.round(Math.pow(10,b),1))/Math.LN10}throw&quot;unrecognized dtick &quot;+String(c)},M.tickText=function(t,e,r){var n,a,o=j(t,e),l=&quot;array&quot;===t.tickmode,c=r||l,u=&quot;category&quot;===t.type?t.d2l_noadd:t.d2l;if(l&amp;&amp;Array.isArray(t.ticktext)){var f=s.simpleMap(t.range,t.r2l),h=Math.abs(f[1]-f[0])/1e4;for(a=0;a&lt;t.ticktext.length&amp;&amp;!(Math.abs(e-u(t.tickvals[a]))&lt;h);a++);if(a&lt;t.ticktext.length)return o.text=String(t.ticktext[a]),o}function p(n){var i;return void 0===n||(r?&quot;none&quot;===n:(i={first:t._tmin,last:t._tmax}[n],&quot;all&quot;!==n&amp;&amp;e!==i))}return n=r?&quot;never&quot;:&quot;none&quot;!==t.exponentformat&amp;&amp;p(t.showexponent)?&quot;hide&quot;:&quot;&quot;,&quot;date&quot;===t.type?function(t,e,r,n){var a=t._tickround,o=r&amp;&amp;t.hoverformat||M.getTickFormat(t);n&amp;&amp;(a=i(a)?4:{y:&quot;m&quot;,m:&quot;d&quot;,d:&quot;M&quot;,M:&quot;S&quot;,S:4}[a]);var l,c=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),u=c.indexOf(&quot;\n&quot;);-1!==u&amp;&amp;(l=c.substr(u+1),c=c.substr(0,u));n&amp;&amp;(&quot;00:00:00&quot;===c||&quot;00:00&quot;===c?(c=l,l=&quot;&quot;):8===c.length&amp;&amp;(c=c.replace(/:00$/,&quot;&quot;)));l&amp;&amp;(r?&quot;d&quot;===a?c+=&quot;, &quot;+l:c=l+(c?&quot;, &quot;+c:&quot;&quot;):t._inCalcTicks&amp;&amp;l===t._prevDateHead||(c+=&quot;&lt;br&gt;&quot;+l,t._prevDateHead=l));e.text=c}(t,o,r,c):&quot;log&quot;===t.type?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u=&quot;string&quot;==typeof o&amp;&amp;o.charAt(0);&quot;never&quot;===a&amp;&amp;(a=&quot;&quot;);n&amp;&amp;&quot;L&quot;!==u&amp;&amp;(o=&quot;L3&quot;,u=&quot;L&quot;);if(c||&quot;L&quot;===u)e.text=H(Math.pow(10,l),t,a,n);else if(i(o)||&quot;D&quot;===u&amp;&amp;s.mod(l+.01,1)&lt;.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;&quot;power&quot;===p||U(p)&amp;&amp;q(f)?(e.text=0===f?1:1===f?&quot;10&quot;:&quot;10&lt;sup&gt;&quot;+(f&gt;1?&quot;&quot;:b)+h+&quot;&lt;/sup&gt;&quot;,e.fontSize*=1.25):(&quot;e&quot;===p||&quot;E&quot;===p)&amp;&amp;h&gt;2?e.text=&quot;1&quot;+p+(f&gt;0?&quot;+&quot;:b)+h:(e.text=H(Math.pow(10,l),t,&quot;&quot;,&quot;fakehover&quot;),&quot;D1&quot;===o&amp;&amp;&quot;y&quot;===t._id.charAt(0)&amp;&amp;(e.dy-=e.fontSize/6))}else{if(&quot;D&quot;!==u)throw&quot;unrecognized dtick &quot;+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if(&quot;D1&quot;===t.dtick){var d=String(e.text).charAt(0);&quot;0&quot;!==d&amp;&amp;&quot;1&quot;!==d||(&quot;y&quot;===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]&gt;t.range[0]?1:-1)*e.fontSize*(l&lt;0?.5:.25)))}}(t,o,0,c,n):&quot;category&quot;===t.type?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&amp;&amp;(r=&quot;&quot;);e.text=String(r)}(t,o):Z(t)?function(t,e,r,n,i){if(&quot;radians&quot;!==t.thetaunit||r)e.text=H(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text=&quot;0&quot;;else{var o=function(t){function e(t,e){return Math.abs(t-e)&lt;=1e-6}var r=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]&gt;=100)e.text=H(s.deg2rad(e.x),t,i,n);else{var l=e.x&lt;0;1===o[1]?1===o[0]?e.text=&quot;\u03c0&quot;:e.text=o[0]+&quot;\u03c0&quot;:e.text=[&quot;&lt;sup&gt;&quot;,o[0],&quot;&lt;/sup&gt;&quot;,&quot;\u2044&quot;,&quot;&lt;sub&gt;&quot;,o[1],&quot;&lt;/sub&gt;&quot;,&quot;\u03c0&quot;].join(&quot;&quot;),l&amp;&amp;(e.text=b+e.text)}}}}(t,o,r,c,n):function(t,e,r,n,i){&quot;never&quot;===i?i=&quot;&quot;:&quot;all&quot;===t.showexponent&amp;&amp;Math.abs(e.x/t.dtick)&lt;1e-6&amp;&amp;(i=&quot;hide&quot;);e.text=H(e.x,t,i,n)}(t,o,0,c,n),t.tickprefix&amp;&amp;!p(t.showtickprefix)&amp;&amp;(o.text=t.tickprefix+o.text),t.ticksuffix&amp;&amp;!p(t.showticksuffix)&amp;&amp;(o.text+=t.ticksuffix),o},M.hoverLabelText=function(t,e,r){if(r!==_&amp;&amp;r!==e)return M.hoverLabelText(t,e)+&quot; - &quot;+M.hoverLabelText(t,r);var n=&quot;log&quot;===t.type&amp;&amp;e&lt;=0,i=M.tickText(t,t.c2l(n?-e:e),&quot;hover&quot;).text;return n?0===e?&quot;0&quot;:b+i:i};var V=[&quot;f&quot;,&quot;p&quot;,&quot;n&quot;,&quot;\u03bc&quot;,&quot;m&quot;,&quot;&quot;,&quot;k&quot;,&quot;M&quot;,&quot;G&quot;,&quot;T&quot;];function U(t){return&quot;SI&quot;===t||&quot;B&quot;===t}function q(t){return t&gt;14||t&lt;-15}function H(t,e,r,n){var a=t&lt;0,o=e._tickround,l=r||e.exponentformat||&quot;B&quot;,c=e._tickexponent,u=M.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,dtick:&quot;none&quot;===e.showexponent?e.dtick:i(t)&amp;&amp;Math.abs(t)||1,range:&quot;none&quot;===e.showexponent?e.range.map(e.r2d):[0,t||1]};N(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&amp;&amp;(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,b);var p,d=Math.pow(10,-o)/2;if(&quot;none&quot;===l&amp;&amp;(c=0),(t=Math.abs(t))&lt;d)t=&quot;0&quot;,a=!1;else{if(t+=d,c&amp;&amp;(t*=Math.pow(10,-c),o+=c),0===o)t=String(Math.floor(t));else if(o&lt;0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var g=o;g&lt;0;g++)t+=&quot;0&quot;}else{var m=(t=String(t)).indexOf(&quot;.&quot;)+1;m&amp;&amp;(t=t.substr(0,m+o).replace(/\.?0+$/,&quot;&quot;))}t=s.numSeparate(t,e._separators,f)}c&amp;&amp;&quot;hide&quot;!==l&amp;&amp;(U(l)&amp;&amp;q(c)&amp;&amp;(l=&quot;power&quot;),p=c&lt;0?b+-c:&quot;power&quot;!==l?&quot;+&quot;+c:String(c),&quot;e&quot;===l||&quot;E&quot;===l?t+=l+p:&quot;power&quot;===l?t+=&quot;\xd710&lt;sup&gt;&quot;+p+&quot;&lt;/sup&gt;&quot;:&quot;B&quot;===l&amp;&amp;9===c?t+=&quot;B&quot;:U(l)&amp;&amp;(t+=V[c/3+5]));return a?b+t:t}function G(t,e){var r=t.l2p(e);return r&gt;1&amp;&amp;r&lt;t._length-1}function W(t,e){for(var r=0;r&lt;e.length;r++)-1===t.indexOf(e[r])&amp;&amp;t.push(e[r])}function Y(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n&lt;e.length;n++)a.push(M.getFromId(t,e[n]));for(n=0;n&lt;r.length;n++)o.push(M.getFromId(t,r[n]));var c=Object.keys(h),u=[&quot;anchor&quot;,&quot;domain&quot;,&quot;overlaying&quot;,&quot;position&quot;,&quot;side&quot;,&quot;tickangle&quot;,&quot;editType&quot;],f=[&quot;linear&quot;,&quot;log&quot;];for(n=0;n&lt;c.length;n++){var p=c[n],d=a[0][p],g=o[0][p],m=!0,v=!1,y=!1;if(&quot;_&quot;!==p.charAt(0)&amp;&amp;&quot;function&quot;!=typeof d&amp;&amp;-1===u.indexOf(p)){for(i=1;i&lt;a.length&amp;&amp;m;i++){var x=a[i][p];&quot;type&quot;===p&amp;&amp;-1!==f.indexOf(d)&amp;&amp;-1!==f.indexOf(x)&amp;&amp;d!==x?v=!0:x!==d&amp;&amp;(m=!1)}for(i=1;i&lt;o.length&amp;&amp;m;i++){var b=o[i][p];&quot;type&quot;===p&amp;&amp;-1!==f.indexOf(g)&amp;&amp;-1!==f.indexOf(b)&amp;&amp;g!==b?y=!0:o[i][p]!==g&amp;&amp;(m=!1)}m&amp;&amp;(v&amp;&amp;(l[a[0]._name].type=&quot;linear&quot;),y&amp;&amp;(l[o[0]._name].type=&quot;linear&quot;),X(l,p,a,o,t._fullLayout._dfltTitle))}}for(n=0;n&lt;t._fullLayout.annotations.length;n++){var _=t._fullLayout.annotations[n];-1!==e.indexOf(_.xref)&amp;&amp;-1!==r.indexOf(_.yref)&amp;&amp;s.swapAttrs(l.annotations[n],[&quot;?&quot;])}}function X(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),c=o(t[n[0]._name],e).get();for(&quot;title&quot;===e&amp;&amp;(l===i.x&amp;&amp;(l=i.y),c===i.y&amp;&amp;(c=i.x)),a=0;a&lt;r.length;a++)o(t,r[a]._name+&quot;.&quot;+e).set(c);for(a=0;a&lt;n.length;a++)o(t,n[a]._name+&quot;.&quot;+e).set(l)}function Z(t){return&quot;angularaxis&quot;===t._id}M.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function c(t){return&quot;string&quot;!=typeof t?t:Number(t.replace(&quot;M&quot;,&quot;&quot;))*g}function u(t,e){var r=[&quot;L&quot;,&quot;D&quot;];if(typeof t==typeof e){if(&quot;number&quot;==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,&quot;&quot;))-Number(e.replace(/(L|D)/g,&quot;&quot;)):n-i}return&quot;number&quot;==typeof t?1:-1}function f(t,e){var r=null===e[0],n=null===e[1],i=u(t,e[0])&gt;=0,a=u(t,e[1])&lt;=0;return(r||i)&amp;&amp;(n||a)}if(t.tickformatstops&amp;&amp;t.tickformatstops.length&gt;0)switch(t.type){case&quot;date&quot;:case&quot;linear&quot;:for(e=0;e&lt;t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&amp;&amp;(i=t.dtick,a=n.dtickrange,o=void 0,void 0,void 0,o=c||function(t){return t},s=a[0],l=a[1],(!s&amp;&amp;&quot;number&quot;!=typeof s||o(s)&lt;=o(i))&amp;&amp;(!l&amp;&amp;&quot;number&quot;!=typeof l||o(l)&gt;=o(i)))){r=n;break}break;case&quot;log&quot;:for(e=0;e&lt;t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&amp;&amp;f(t.dtick,n.dtickrange)){r=n;break}}return r?r.value:t.tickformat},M.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?M.findSubplotsWithAxis(n,e):n;return i.sort(function(t,e){var r=t.substr(1).split(&quot;y&quot;),n=e.substr(1).split(&quot;y&quot;);return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]}),i},M.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(&quot;x&quot;===e._id.charAt(0)?&quot;^&quot;+e._id+&quot;y&quot;:e._id+&quot;$&quot;),n=[],i=0;i&lt;t.length;i++){var a=t[i];r.test(a)&amp;&amp;n.push(a)}return n},M.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:&quot;&quot;},o={_offset:0,_length:e.height,_id:&quot;&quot;},s=M.list(t,&quot;x&quot;,!0),l=M.list(t,&quot;y&quot;,!0),c=[];for(r=0;r&lt;s.length;r++)for(c.push({x:s[r],y:o}),i=0;i&lt;l.length;i++)0===r&amp;&amp;c.push({x:a,y:l[i]}),c.push({x:s[r],y:l[i]});var u=e._clips.selectAll(&quot;.axesclip&quot;).data(c,function(t){return t.x._id+t.y._id});u.enter().append(&quot;clipPath&quot;).classed(&quot;axesclip&quot;,!0).attr(&quot;id&quot;,function(t){return&quot;clip&quot;+e._uid+t.x._id+t.y._id}).append(&quot;rect&quot;),u.exit().remove(),u.each(function(t){n.select(this).select(&quot;rect&quot;).attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})})}},M.doTicks=function(t,e,r){var n=t._fullLayout;&quot;redraw&quot;===e&amp;&amp;n._paper.selectAll(&quot;g.subplot&quot;).each(function(t){var e=t[0],r=n._plots[e],i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll(&quot;.&quot;+i._id+&quot;tick&quot;).remove(),r.yaxislayer.selectAll(&quot;.&quot;+a._id+&quot;tick&quot;).remove(),r.gridlayer&amp;&amp;r.gridlayer.selectAll(&quot;path&quot;).remove(),r.zerolinelayer&amp;&amp;r.zerolinelayer.selectAll(&quot;path&quot;).remove(),n._infolayer.select(&quot;.g-&quot;+i._id+&quot;title&quot;).remove(),n._infolayer.select(&quot;.g-&quot;+a._id+&quot;title&quot;).remove()});var i=e&amp;&amp;&quot;redraw&quot;!==e?e:M.listIds(t);s.syncOrAsync(i.map(function(e){return function(){if(e){var n=M.doTicksSingle(t,e,r),i=M.getFromId(t,e);return i._r=i.range.slice(),i._rl=s.simpleMap(i._r,i.r2l),n}}}))},M.doTicksSingle=function(t,e,r){var o,h=t._fullLayout,p=!1;s.isPlainObject(e)?(o=e,p=!0):o=M.getFromId(t,e),o.setScale();var d,g,m,v,y,x,b=o._id,_=b.charAt(0),A=M.counterLetter(b),S=o._vals=M.calcTicks(o),E=function(t){return[t.text,t.x,o.mirror,t.font,t.fontSize,t.fontColor].join(&quot;_&quot;)},C=b+&quot;tick&quot;,L=b+&quot;grid&quot;,z=b+&quot;zl&quot;,P=(o.linewidth||1)/2,O=&quot;outside&quot;===o.ticks?o.ticklen:0,I=0,D=f.crispRound(t,o.gridwidth,1),R=f.crispRound(t,o.zerolinewidth,D),B=f.crispRound(t,o.tickwidth,1);if(o._counterangle&amp;&amp;&quot;outside&quot;===o.ticks){var F=o._counterangle*Math.PI/180;O=o.ticklen*Math.cos(F)+1,I=o.ticklen*Math.sin(F)}if(o.showticklabels&amp;&amp;(&quot;outside&quot;===o.ticks||o.showline)&amp;&amp;(O+=.2*o.tickfont.size),&quot;x&quot;===_)d=[&quot;bottom&quot;,&quot;top&quot;],g=o._transfn||function(t){return&quot;translate(&quot;+(o._offset+o.l2p(t.x))+&quot;,0)&quot;},m=function(t,e){if(o._counterangle){var r=o._counterangle*Math.PI/180;return&quot;M0,&quot;+t+&quot;l&quot;+Math.sin(r)*e+&quot;,&quot;+Math.cos(r)*e}return&quot;M0,&quot;+t+&quot;v&quot;+e};else if(&quot;y&quot;===_)d=[&quot;left&quot;,&quot;right&quot;],g=o._transfn||function(t){return&quot;translate(0,&quot;+(o._offset+o.l2p(t.x))+&quot;)&quot;},m=function(t,e){if(o._counterangle){var r=o._counterangle*Math.PI/180;return&quot;M&quot;+t+&quot;,0l&quot;+Math.cos(r)*e+&quot;,&quot;+-Math.sin(r)*e}return&quot;M&quot;+t+&quot;,0h&quot;+e};else{if(!Z(o))return void s.warn(&quot;Unrecognized doTicks axis:&quot;,b);d=[&quot;left&quot;,&quot;right&quot;],g=o._transfn,m=function(t,e){return&quot;M&quot;+t+&quot;,0h&quot;+e}}var N=o.side||d[0],j=[-1,1,N===d[1]?1:-1];if(&quot;inside&quot;!==o.ticks==(&quot;x&quot;===_)&amp;&amp;(j=j.map(function(t){return-t})),o.visible){o._tickFilter&amp;&amp;(S=S.filter(o._tickFilter));var V=o._valsClipped=Z(o)?S:S.filter(function(t){return G(o,t.x)});if(p){if($(o._axislayer,m(o._pos+P*j[2],j[2]*o.ticklen)),o._counteraxis)Q({gridlayer:o._gridlayer,zerolinelayer:o._zerolinelayer},o._counteraxis);return J(o._axislayer,o._pos)}if(h._has(&quot;cartesian&quot;)){v=M.getSubplots(t,o);var U={};v.map(function(t){var e=h._plots[t],r=e[A+&quot;axis&quot;],n=r._mainAxis._id;U[n]||(U[n]=1,Q(e,r))});var q=o._mainSubplot,H=h._plots[q],W=[];if(o.ticks){var Y=j[2],X=m(o._mainLinePosition+P*Y,Y*o.ticklen);o._anchorAxis&amp;&amp;o.mirror&amp;&amp;!0!==o.mirror&amp;&amp;(X+=m(o._mainMirrorPosition-P*Y,-Y*o.ticklen)),$(H[_+&quot;axislayer&quot;],X),W=Object.keys(o._linepositions||{})}return W.map(function(t){var e=h._plots[t][_+&quot;axislayer&quot;],r=o._linepositions[t]||[];function n(t){var e=j[t];return m(r[t]+P*e,e*o.ticklen)}$(e,n(0)+n(1))}),J(H[_+&quot;axislayer&quot;],o._mainLinePosition)}}function $(t,e){var r=t.selectAll(&quot;path.&quot;+C).data(&quot;inside&quot;===o.ticks?V:S,E);e&amp;&amp;o.ticks?(r.enter().append(&quot;path&quot;).classed(C,1).classed(&quot;ticks&quot;,1).classed(&quot;crisp&quot;,1).call(u.stroke,o.tickcolor).style(&quot;stroke-width&quot;,B+&quot;px&quot;).attr(&quot;d&quot;,e),r.attr(&quot;transform&quot;,g),r.exit().remove()):r.remove()}function J(e,r){if(y=e.selectAll(&quot;g.&quot;+C).data(S,E),!i(r))return y.remove(),void K();if(!o.showticklabels)return y.remove(),K(),void z();var c,u,p,d,m;&quot;x&quot;===_?(c=function(t){return t.dx+I*m},d=r+(O+P)*(m=&quot;bottom&quot;===N?1:-1),u=function(t){return t.dy+d+t.fontSize*(&quot;bottom&quot;===N?1:-.2)},p=function(t){return i(t)&amp;&amp;0!==t&amp;&amp;180!==t?t*m&lt;0?&quot;end&quot;:&quot;start&quot;:&quot;middle&quot;}):&quot;y&quot;===_?(m=&quot;right&quot;===N?1:-1,u=function(t){return t.dy+t.fontSize*w-I*m},c=function(t){return t.dx+r+(O+P+(90===Math.abs(o.tickangle)?t.fontSize/2:0))*m},p=function(t){return i(t)&amp;&amp;90===Math.abs(t)?&quot;middle&quot;:&quot;right&quot;===N?&quot;start&quot;:&quot;end&quot;}):Z(o)&amp;&amp;(o._labelShift=I,o._labelStandoff=O,o._pad=P,c=o._labelx,u=o._labely,p=o._labelanchor);var M=0,A=0,T=[];function L(t,e){t.each(function(t){var r=p(e,t),a=n.select(this),o=a.select(&quot;.text-math-group&quot;),s=g.call(a.node(),t)+(i(e)&amp;&amp;0!=+e?&quot; rotate(&quot;+e+&quot;,&quot;+c(t)+&quot;,&quot;+(u(t)-t.fontSize/2)+&quot;)&quot;:&quot;&quot;),h=function(t,e,r){var n=(t-1)*e;if(&quot;x&quot;===_){if(r&lt;-60||60&lt;r)return-.5*n;if(&quot;top&quot;===N)return-n}else{if((r*=&quot;left&quot;===N?1:-1)&lt;-30)return-n;if(r&lt;30)return-.5*n}return 0}(l.lineCount(a),k*t.fontSize,i(e)?+e:0);if(h&amp;&amp;(s+=&quot; translate(0, &quot;+h+&quot;)&quot;),o.empty())a.select(&quot;text&quot;).attr({transform:s,&quot;text-anchor&quot;:r});else{var d=f.bBox(o.node()).width*{end:-.5,start:.5}[r];o.attr(&quot;transform&quot;,s+(d?&quot;translate(&quot;+d+&quot;,0)&quot;:&quot;&quot;))}})}function z(){if(o.showticklabels){var r=t.getBoundingClientRect(),n=e.node().getBoundingClientRect();o._boundingBox={width:n.width,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,bottom:n.bottom-r.top}}else{var i,a=h._size;&quot;x&quot;===_?(i=&quot;free&quot;===o.anchor?a.t+a.h*(1-o.position):a.t+a.h*(1-o._anchorAxis.domain[{bottom:0,top:1}[o.side]]),o._boundingBox={top:i,bottom:i,left:o._offset,right:o._offset+o._length,width:o._length,height:0}):(i=&quot;free&quot;===o.anchor?a.l+a.w*o.position:a.l+a.w*o._anchorAxis.domain[{left:0,right:1}[o.side]],o._boundingBox={left:i,right:i,bottom:o._offset+o._length,top:o._offset,height:o._length,width:0})}if(v){var s=o._counterSpan=[1/0,-1/0];for(x=0;x&lt;v.length;x++){var l=h._plots[v[x]][&quot;x&quot;===_?&quot;yaxis&quot;:&quot;xaxis&quot;];c(s,[l._offset,l._offset+l._length])}&quot;free&quot;===o.anchor&amp;&amp;c(s,&quot;x&quot;===_?[o._boundingBox.bottom,o._boundingBox.top]:[o._boundingBox.right,o._boundingBox.left])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}}y.enter().append(&quot;g&quot;).classed(C,1).append(&quot;text&quot;).attr(&quot;text-anchor&quot;,&quot;middle&quot;).each(function(e){var r=n.select(this),i=t._promises.length;r.call(l.positionText,c(e),u(e)).call(f.font,e.font,e.fontSize,e.fontColor).text(e.text).call(l.convertToTspans,t),(i=t._promises[i])?T.push(t._promises.pop().then(function(){L(r,o.tickangle)})):L(r,o.tickangle)}),y.exit().remove(),y.each(function(t){M=Math.max(M,t.fontSize)}),Z(o)&amp;&amp;y.each(function(t){n.select(this).select(&quot;text&quot;).call(l.positionText,c(t),u(t))}),L(y,o._lastangle||o.tickangle);var D=s.syncOrAsync([function(){return T.length&amp;&amp;Promise.all(T)},function(){if(L(y,o.tickangle),&quot;x&quot;===_&amp;&amp;!i(o.tickangle)&amp;&amp;(&quot;log&quot;!==o.type||&quot;D&quot;!==String(o.dtick).charAt(0))){var t=[];for(y.each(function(e){var r=n.select(this),i=r.select(&quot;.text-math-group&quot;),a=o.l2p(e.x);i.empty()&amp;&amp;(i=r.select(&quot;text&quot;));var s=f.bBox(i.node());t.push({top:0,bottom:10,height:10,left:a-s.width/2,right:a+s.width/2+2,width:s.width+2})}),x=0;x&lt;t.length-1;x++)if(s.bBoxIntersect(t[x],t[x+1])){A=30;break}A&amp;&amp;(Math.abs((S[S.length-1].x-S[0].x)*o._m)/(S.length-1)&lt;2.5*M&amp;&amp;(A=90),L(y,A)),o._lastangle=A}return K(),b+&quot; done&quot;},z,function(){var e=o._name+&quot;.automargin&quot;;if(&quot;x&quot;===_||&quot;y&quot;===_)if(o.automargin){var r=o.side[0],n={x:0,y:0,r:0,l:0,t:0,b:0};&quot;x&quot;===_?(n.y=&quot;free&quot;===o.anchor?o.position:o._anchorAxis.domain[&quot;t&quot;===r?1:0],n[r]+=o._boundingBox.height):(n.x=&quot;free&quot;===o.anchor?o.position:o._anchorAxis.domain[&quot;r&quot;===r?1:0],n[r]+=o._boundingBox.width),o.title!==h._dfltTitle[_]&amp;&amp;(n[r]+=o.titlefont.size),a.autoMargin(t,e,n)}else a.autoMargin(t,e)}]);return D&amp;&amp;D.then&amp;&amp;t._promises.push(D),D}function K(){if(!(r||o.rangeslider&amp;&amp;o.rangeslider.visible&amp;&amp;o._boundingBox&amp;&amp;&quot;bottom&quot;===o.side)){var e,n,i,a,s={selection:y,side:o.side},l=b.charAt(0),u=t._fullLayout._size,p=o.titlefont.size;if(y.size()){var d=f.getTranslate(y.node().parentNode);s.offsetLeft=d.x,s.offsetTop=d.y}var g=10+1.5*p+(o.linewidth?o.linewidth-1:0);&quot;x&quot;===l?(n=&quot;free&quot;===o.anchor?{_offset:u.t+(1-(o.position||0))*u.h,_length:0}:T.getFromId(t,o.anchor),i=o._offset+o._length/2,a=&quot;top&quot;===o.side?-g-p*(o.showticklabels?1:0):n._length+g+p*(o.showticklabels?1.5:.5),a+=n._offset,s.side||(s.side=&quot;bottom&quot;)):(n=&quot;free&quot;===o.anchor?{_offset:u.l+(o.position||0)*u.w,_length:0}:T.getFromId(t,o.anchor),a=o._offset+o._length/2,i=&quot;right&quot;===o.side?n._length+g+p*(o.showticklabels?1:.5):-g-p*(o.showticklabels?.5:0),i+=n._offset,e={rotate:&quot;-90&quot;,offset:0},s.side||(s.side=&quot;left&quot;)),c.draw(t,b+&quot;title&quot;,{propContainer:o,propName:o._name+&quot;.title&quot;,placeholder:h._dfltTitle[l],avoid:s,transform:e,attributes:{x:i,y:a,&quot;text-anchor&quot;:&quot;middle&quot;}})}}function Q(e,r){if(!h._hasOnlyLargeSploms){var i=e.gridlayer.selectAll(&quot;.&quot;+b),a=e.zerolinelayer,s=o._gridpath||(&quot;x&quot;===_?&quot;M0,&quot;+r._offset+&quot;v&quot;:&quot;M&quot;+r._offset+&quot;,0h&quot;)+r._length,l=i.selectAll(&quot;path.&quot;+L).data(!1===o.showgrid?[]:V,E);if(l.enter().append(&quot;path&quot;).classed(L,1).classed(&quot;crisp&quot;,1).attr(&quot;d&quot;,s).each(function(t){o.zeroline&amp;&amp;(&quot;linear&quot;===o.type||&quot;-&quot;===o.type)&amp;&amp;Math.abs(t.x)&lt;o.dtick/100&amp;&amp;n.select(this).remove()}),l.attr(&quot;transform&quot;,g).call(u.stroke,o.gridcolor||&quot;#ddd&quot;).style(&quot;stroke-width&quot;,D+&quot;px&quot;),&quot;function&quot;==typeof s&amp;&amp;l.attr(&quot;d&quot;,s),l.exit().remove(),a){var c={x:0,id:b},f=M.shouldShowZeroLine(t,o,r),p=a.selectAll(&quot;path.&quot;+z).data(f?[c]:[]);p.enter().append(&quot;path&quot;).classed(z,1).classed(&quot;zl&quot;,1).classed(&quot;crisp&quot;,1).attr(&quot;d&quot;,s).each(function(){a.selectAll(&quot;path&quot;).sort(function(t,e){return T.idSort(t.id,e.id)})}),p.attr(&quot;transform&quot;,g).call(u.stroke,o.zerolinecolor||u.defaultLine).style(&quot;stroke-width&quot;,R+&quot;px&quot;),p.exit().remove()}}}},M.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]&lt;=0&amp;&amp;e.zeroline&amp;&amp;(&quot;linear&quot;===e.type||&quot;-&quot;===e.type)&amp;&amp;e._valsClipped.length&amp;&amp;(G(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(!i)return;var a=t._fullLayout,o=e._id.charAt(0),s=M.counterLetter(e._id),l=e._offset+(Math.abs(n[0])&lt;Math.abs(n[1])==(&quot;x&quot;===o)?0:e._length);function c(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return&quot;number&quot;==typeof t&amp;&amp;Math.abs(t-l)&lt;r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}var u=a._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return c(r);for(var f=M.list(t,s),h=0;h&lt;f.length;h++){var p=f[h];if(p._mainAxis===i&amp;&amp;c(p))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a&lt;r.length;a++){var s=r[a];if(!0===s.visible&amp;&amp;s.xaxis+s.yaxis===n&amp;&amp;(o.traceIs(s,&quot;bar&quot;)&amp;&amp;s.orientation==={x:&quot;h&quot;,y:&quot;v&quot;}[i]||s.fill&amp;&amp;s.fill.charAt(s.fill.length-1)===i))return!0}return!1}(t,e))},M.allowAutoMargin=function(t){for(var e=M.list(t,&quot;&quot;,!0),r=0;r&lt;e.length;r++){var n=e[r];n.automargin&amp;&amp;a.allowAutoMargin(t,n._name+&quot;.automargin&quot;),n.rangeslider&amp;&amp;n.rangeslider.visible&amp;&amp;a.allowAutoMargin(t,&quot;rangeslider&quot;+n._id)}},M.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r&lt;e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&amp;&amp;s){for(n=0;n&lt;i.length;n++)-1===i[n].x.indexOf(o)&amp;&amp;-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,c=i[a[0]];if(a.length&gt;1)for(n=1;n&lt;a.length;n++)l=i[a[n]],W(c.x,l.x),W(c.y,l.y);W(c.x,[o]),W(c.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n&lt;r.length;n++)Y(t,r[n].x,r[n].y)}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,&quot;../../components/titles&quot;:658,&quot;../../constants/alignment&quot;:665,&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plots/plots&quot;:805,&quot;../../registry&quot;:825,&quot;./autorange&quot;:741,&quot;./axis_autotype&quot;:743,&quot;./axis_ids&quot;:745,&quot;./layout_attributes&quot;:754,&quot;./set_convert&quot;:760,d3:147,&quot;fast-isnumeric&quot;:213}],743:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../constants/numerical&quot;).BADNUM;e.exports=function(t,e){return function(t,e){for(var r,a=0,o=0,s=Math.max(1,(t.length-1)/1e3),l=0;l&lt;t.length;l+=s)r=t[Math.round(l)],i.isDateTime(r,e)&amp;&amp;(a+=1),n(r)&amp;&amp;(o+=1);return a&gt;2*o}(t,e)?&quot;date&quot;:function(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,o=0,s=0;s&lt;t.length;s+=r)e=t[Math.round(s)],i.cleanNumber(e)!==a?n++:&quot;string&quot;==typeof e&amp;&amp;&quot;&quot;!==e&amp;&amp;&quot;None&quot;!==e&amp;&amp;o++;return o&gt;2*n}(t)?&quot;category&quot;:function(t){if(!t)return!1;for(var e=0;e&lt;t.length;e++)if(n(t[e]))return!0;return!1}(t)?&quot;linear&quot;:&quot;-&quot;}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;fast-isnumeric&quot;:213}],744:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;./layout_attributes&quot;),o=t(&quot;./tick_value_defaults&quot;),s=t(&quot;./tick_mark_defaults&quot;),l=t(&quot;./tick_label_defaults&quot;),c=t(&quot;./category_order_defaults&quot;),u=t(&quot;./line_grid_defaults&quot;),f=t(&quot;./set_convert&quot;);e.exports=function(t,e,r,h,p){var d=h.letter,g=h.font||{},m=h.splomStash||{},v=r(&quot;visible&quot;,!h.cheateronly),y=e.type;&quot;date&quot;===y&amp;&amp;n.getComponentMethod(&quot;calendars&quot;,&quot;handleDefaults&quot;)(t,e,&quot;calendar&quot;,h.calendar);if(f(e,p),!r(&quot;autorange&quot;,!e.isValidRange(t.range))||&quot;linear&quot;!==y&amp;&amp;&quot;-&quot;!==y||r(&quot;rangemode&quot;),r(&quot;range&quot;),e.cleanRange(),c(t,e,r,h),&quot;category&quot;===y||h.noHover||r(&quot;hoverformat&quot;),!v)return e;var x=r(&quot;color&quot;),b=x!==a.color.dflt?x:g.color;return r(&quot;title&quot;,m.label||p._dfltTitle[d]),i.coerceFont(r,&quot;titlefont&quot;,{family:g.family,size:Math.round(1.2*g.size),color:b}),o(t,e,r,y),l(t,e,r,y,h),s(t,e,r,h),u(t,e,r,{dfltColor:x,bgColor:h.bgColor,showGrid:h.showGrid,attributes:a}),(e.showline||e.ticks)&amp;&amp;r(&quot;mirror&quot;),h.automargin&amp;&amp;r(&quot;automargin&quot;),e}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./category_order_defaults&quot;:746,&quot;./layout_attributes&quot;:754,&quot;./line_grid_defaults&quot;:756,&quot;./set_convert&quot;:760,&quot;./tick_label_defaults&quot;:761,&quot;./tick_mark_defaults&quot;:762,&quot;./tick_value_defaults&quot;:763}],745:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;./constants&quot;);r.id2name=function(t){if(&quot;string&quot;==typeof t&amp;&amp;t.match(i.AX_ID_PATTERN)){var e=t.substr(1);return&quot;1&quot;===e&amp;&amp;(e=&quot;&quot;),t.charAt(0)+&quot;axis&quot;+e}},r.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return&quot;1&quot;===e&amp;&amp;(e=&quot;&quot;),t.charAt(0)+e}},r.cleanId=function(t,e){if(t.match(i.AX_ID_PATTERN)&amp;&amp;(!e||t.charAt(0)===e)){var r=t.substr(1).replace(/^0+/,&quot;&quot;);return&quot;1&quot;===r&amp;&amp;(r=&quot;&quot;),t.charAt(0)+r}},r.list=function(t,e,n){var i=t._fullLayout;if(!i)return[];var a,o=r.listIds(t,e),s=new Array(o.length);for(a=0;a&lt;o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+&quot;axis&quot;+l.substr(1)]}if(!n){var c=i._subplots.gl3d||[];for(a=0;a&lt;c.length;a++){var u=i[c[a]];e?s.push(u[e+&quot;axis&quot;]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},r.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+&quot;axis&quot;]:n.xaxis.concat(n.yaxis)},r.getFromId=function(t,e,n){var i=t._fullLayout;return&quot;x&quot;===n?e=e.replace(/y[0-9]*/,&quot;&quot;):&quot;y&quot;===n&amp;&amp;(e=e.replace(/x[0-9]*/,&quot;&quot;)),i[r.id2name(e)]},r.getFromTrace=function(t,e,i){var a=t._fullLayout,o=null;if(n.traceIs(e,&quot;gl3d&quot;)){var s=e.scene;&quot;scene&quot;===s.substr(0,5)&amp;&amp;(o=a[s][i+&quot;axis&quot;])}else o=r.getFromId(t,e[i+&quot;axis&quot;]||i);return o},r.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r&gt;n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)}},{&quot;../../registry&quot;:825,&quot;./constants&quot;:747}],746:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){if(&quot;category&quot;===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&amp;&amp;a.length&gt;0;o&amp;&amp;(i=&quot;array&quot;);var s,l=r(&quot;categoryorder&quot;,i);&quot;array&quot;===l&amp;&amp;(s=r(&quot;categoryarray&quot;)),o||&quot;array&quot;!==l||(l=e.categoryorder=&quot;trace&quot;),&quot;trace&quot;===l?e._initialCategories=[]:&quot;array&quot;===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n&lt;e.data.length;n++){var s=e.data[n];s[a+&quot;axis&quot;]===t._id&amp;&amp;r.push(s)}for(n=0;n&lt;r.length;n++){var l=r[n][a];for(i=0;i&lt;l.length;i++){var c=l[i];null!=c&amp;&amp;(o[c]=1)}}return Object.keys(o)}(e,n).sort(),&quot;category ascending&quot;===l?e._initialCategories=s:&quot;category descending&quot;===l&amp;&amp;(e._initialCategories=s.reverse()))}}},{}],747:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib/regex&quot;).counter;e.exports={idRegex:{x:n(&quot;x&quot;),y:n(&quot;y&quot;)},attrRegex:n(&quot;[xy]axis&quot;),xAxisMatch:n(&quot;xaxis&quot;),yAxisMatch:n(&quot;yaxis&quot;),AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:&quot;-select&quot;,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[&quot;heatmaplayer&quot;,&quot;contourcarpetlayer&quot;,&quot;contourlayer&quot;,&quot;barlayer&quot;,&quot;carpetlayer&quot;,&quot;violinlayer&quot;,&quot;boxlayer&quot;,&quot;ohlclayer&quot;,&quot;scattercarpetlayer&quot;,&quot;scatterlayer&quot;],layerValue2layerClass:{&quot;above traces&quot;:&quot;above&quot;,&quot;below traces&quot;:&quot;below&quot;}}},{&quot;../../lib/regex&quot;:710}],748:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./axis_ids&quot;).id2name;e.exports=function(t,e,r,a,o){var s=o._axisConstraintGroups,l=e._id,c=l.charAt(0);if(!e.fixedrange&amp;&amp;(r(&quot;constrain&quot;),n.coerce(t,e,{constraintoward:{valType:&quot;enumerated&quot;,values:&quot;x&quot;===c?[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;]:[&quot;bottom&quot;,&quot;middle&quot;,&quot;top&quot;],dflt:&quot;x&quot;===c?&quot;center&quot;:&quot;middle&quot;}},&quot;constraintoward&quot;),t.scaleanchor)){var u=function(t,e,r,n){var a,o,s,l,c=n[i(e)].type,u=[];for(o=0;o&lt;r.length;o++)(s=r[o])!==e&amp;&amp;((l=n[i(s)]).type!==c||l.fixedrange||u.push(s));for(a=0;a&lt;t.length;a++)if(t[a][e]){var f=t[a],h=[];for(o=0;o&lt;u.length;o++)s=u[o],f[s]||h.push(s);return{linkableAxes:h,thisGroup:f}}return{linkableAxes:u,thisGroup:null}}(s,l,a,o),f=n.coerce(t,e,{scaleanchor:{valType:&quot;enumerated&quot;,values:u.linkableAxes}},&quot;scaleanchor&quot;);if(f){var h=r(&quot;scaleratio&quot;);h||(h=e.scaleratio=1),function(t,e,r,n,i){var a,o,s,l,c;null===e?((e={})[r]=1,c=t.length,t.push(e)):c=t.indexOf(e);var u=Object.keys(e);for(a=0;a&lt;t.length;a++)if(s=t[a],a!==c&amp;&amp;s[n]){var f=s[n];for(o=0;o&lt;u.length;o++)l=u[o],s[l]=f*i*e[l];return void t.splice(c,1)}if(1!==i)for(o=0;o&lt;u.length;o++)e[u[o]]*=i;e[n]=1}(s,u.thisGroup,l,f,h)}else-1!==a.indexOf(t.scaleanchor)&amp;&amp;n.warn(&quot;ignored &quot;+e._name+'.scaleanchor: &quot;'+t.scaleanchor+'&quot; to avoid either an infinite loop and possibly inconsistent scaleratios, or because the targetaxis has fixed range.')}}},{&quot;../../lib&quot;:693,&quot;./axis_ids&quot;:745}],749:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./axis_ids&quot;).id2name,i=t(&quot;./scale_zoom&quot;),a=t(&quot;./autorange&quot;).makePadFn,o=t(&quot;./autorange&quot;).concatExtremes,s=t(&quot;../../constants/numerical&quot;).ALMOST_EQUAL,l=t(&quot;../../constants/alignment&quot;).FROM_BL;function c(t,e){var r=t._inputDomain,n=l[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e]}r.enforce=function(t){var e,r,l,u,f,h,p,d=t._fullLayout,g=d._axisConstraintGroups||[];for(e=0;e&lt;g.length;e++){var m=g[e],v=Object.keys(m),y=1/0,x=0,b=1/0,_={},w={},k=!1;for(r=0;r&lt;v.length;r++)w[l=v[r]]=u=d[n(l)],u._inputDomain?u.domain=u._inputDomain.slice():u._inputDomain=u.domain.slice(),u._inputRange||(u._inputRange=u.range.slice()),u.setScale(),_[l]=f=Math.abs(u._m)/m[l],y=Math.min(y,f),&quot;domain&quot;!==u.constrain&amp;&amp;u._constraintShrinkable||(b=Math.min(b,f)),delete u._constraintShrinkable,x=Math.max(x,f),&quot;domain&quot;===u.constrain&amp;&amp;(k=!0);if(!(y&gt;s*x)||k)for(r=0;r&lt;v.length;r++)if(f=_[l=v[r]],h=(u=w[l]).constrain,f!==b||&quot;domain&quot;===h)if(p=f/b,&quot;range&quot;===h)i(u,p);else{var M=u._inputDomain,A=(u.domain[1]-u.domain[0])/(M[1]-M[0]),T=(u.r2l(u.range[1])-u.r2l(u.range[0]))/(u.r2l(u._inputRange[1])-u.r2l(u._inputRange[0]));if((p/=A)*T&lt;1){u.domain=u._input.domain=M.slice(),i(u,p);continue}if(T&lt;1&amp;&amp;(u.range=u._input.range=u._inputRange.slice(),p*=T),u.autorange){var S=u.r2l(u.range[0]),E=u.r2l(u.range[1]),C=(S+E)/2,L=C,z=C,P=Math.abs(E-C),O=C-P*p*1.0001,I=C+P*p*1.0001,D=a(u);c(u,p),u.setScale();var R,B,F=Math.abs(u._m),N=o(t,u),j=N.min,V=N.max;for(B=0;B&lt;j.length;B++)(R=j[B].val-D(j[B])/F)&gt;O&amp;&amp;R&lt;L&amp;&amp;(L=R);for(B=0;B&lt;V.length;B++)(R=V[B].val+D(V[B])/F)&lt;I&amp;&amp;R&gt;z&amp;&amp;(z=R);p/=(z-L)/(2*P),L=u.l2r(L),z=u.l2r(z),u.range=u._input.range=S&lt;E?[L,z]:[z,L]}c(u,p)}}},r.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a&lt;i.length;a++)if(i[a][n]){r=!0;break}r&amp;&amp;&quot;domain&quot;===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},{&quot;../../constants/alignment&quot;:665,&quot;../../constants/numerical&quot;:670,&quot;./autorange&quot;:741,&quot;./axis_ids&quot;:745,&quot;./scale_zoom&quot;:758}],750:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;has-passive-events&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../lib/svg_text_utils&quot;),c=t(&quot;../../lib/clear_gl_canvases&quot;),u=t(&quot;../../components/color&quot;),f=t(&quot;../../components/drawing&quot;),h=t(&quot;../../components/fx&quot;),p=t(&quot;../../lib/setcursor&quot;),d=t(&quot;../../components/dragelement&quot;),g=t(&quot;../../constants/alignment&quot;).FROM_TL,m=t(&quot;../plots&quot;),v=t(&quot;./axes&quot;).doTicksSingle,y=t(&quot;./axis_ids&quot;).getFromId,x=t(&quot;./select&quot;).prepSelect,b=t(&quot;./select&quot;).clearSelect,_=t(&quot;./select&quot;).selectOnClick,w=t(&quot;./scale_zoom&quot;),k=t(&quot;./constants&quot;),M=k.MINDRAG,A=k.MINZOOM,T=!0;function S(t,e,r,n){var i=s.ensureSingle(t.draglayer,e,r,function(e){e.classed(&quot;drag&quot;,!0).style({fill:&quot;transparent&quot;,&quot;stroke-width&quot;:0}).attr(&quot;data-subplot&quot;,t.id)});return i.call(p,n),i.node()}function E(t,e,r,i,a,o,s){var l=S(t,&quot;rect&quot;,e,r);return n.select(l).call(f.setRect,i,a,o,s),l}function C(t,e){for(var r=0;r&lt;t.length;r++)if(!t[r].fixedrange)return e;return&quot;&quot;}function L(t,e,r,n,i){var a,o,s,l;for(a=0;a&lt;t.length;a++)(o=t[a]).fixedrange||(s=o._rl[0],l=o._rl[1]-s,o.range=[o.l2r(s+l*e),o.l2r(s+l*r)],n[o._name+&quot;.range[0]&quot;]=o.range[0],n[o._name+&quot;.range[1]&quot;]=o.range[1]);if(i&amp;&amp;i.length){var c=(e+(1-r))/2;L(i,c,1-c,n)}}function z(t,e){for(var r=0;r&lt;t.length;r++){var n=t[r];n.fixedrange||(n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)])}}function P(t){return 1-(t&gt;=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function O(t,e,r,n,i){return t.append(&quot;path&quot;).attr(&quot;class&quot;,&quot;zoombox&quot;).style({fill:e&gt;.2?&quot;rgba(0,0,0,0)&quot;:&quot;rgba(255,255,255,0)&quot;,&quot;stroke-width&quot;:0}).attr(&quot;transform&quot;,&quot;translate(&quot;+r+&quot;, &quot;+n+&quot;)&quot;).attr(&quot;d&quot;,i+&quot;Z&quot;)}function I(t,e,r){return t.append(&quot;path&quot;).attr(&quot;class&quot;,&quot;zoombox-corners&quot;).style({fill:u.background,stroke:u.defaultLine,&quot;stroke-width&quot;:1,opacity:0}).attr(&quot;transform&quot;,&quot;translate(&quot;+e+&quot;, &quot;+r+&quot;)&quot;).attr(&quot;d&quot;,&quot;M0,0Z&quot;)}function D(t,e,r,n,i,a){t.attr(&quot;d&quot;,n+&quot;M&quot;+r.l+&quot;,&quot;+r.t+&quot;v&quot;+r.h+&quot;h&quot;+r.w+&quot;v-&quot;+r.h+&quot;h-&quot;+r.w+&quot;Z&quot;),R(t,e,i,a)}function R(t,e,r,n){r||(t.transition().style(&quot;fill&quot;,n&gt;.2?&quot;rgba(0,0,0,0.4)&quot;:&quot;rgba(255,255,255,0.3)&quot;).duration(200),e.transition().style(&quot;opacity&quot;,1).duration(200))}function B(t){n.select(t).selectAll(&quot;.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners&quot;).remove()}function F(t){T&amp;&amp;t.data&amp;&amp;t._context.showTips&amp;&amp;(s.notifier(s._(t,&quot;Double-click to zoom back out&quot;),&quot;long&quot;),T=!1)}function N(t){return&quot;lasso&quot;===t||&quot;select&quot;===t}function j(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,A)/2);return&quot;M&quot;+(t.l-3.5)+&quot;,&quot;+(t.t-.5+e)+&quot;h3v&quot;+-e+&quot;h&quot;+e+&quot;v-3h-&quot;+(e+3)+&quot;ZM&quot;+(t.r+3.5)+&quot;,&quot;+(t.t-.5+e)+&quot;h-3v&quot;+-e+&quot;h&quot;+-e+&quot;v-3h&quot;+(e+3)+&quot;ZM&quot;+(t.r+3.5)+&quot;,&quot;+(t.b+.5-e)+&quot;h-3v&quot;+e+&quot;h&quot;+-e+&quot;v3h&quot;+(e+3)+&quot;ZM&quot;+(t.l-3.5)+&quot;,&quot;+(t.b+.5-e)+&quot;h3v&quot;+e+&quot;h&quot;+e+&quot;v3h-&quot;+(e+3)+&quot;Z&quot;}function V(t,e){if(a){var r=void 0!==t.onwheel?&quot;wheel&quot;:&quot;mousewheel&quot;;t._onwheel&amp;&amp;t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel&amp;&amp;(t.onmousewheel=e)}function U(t){var e=[];for(var r in t)e.push(t[r]);return e}e.exports={makeDragBox:function(t,e,r,a,u,p,T,S){var R,q,H,G,W,Y,X,Z,$,J,K,Q,tt,et,rt,nt,it,at,ot,st,lt,ct,ut=t._fullLayout._zoomlayer,ft=T+S===&quot;nsew&quot;,ht=1===(T+S).length;function pt(){if(R=e.xaxis,q=e.yaxis,$=R._length,J=q._length,X=R._offset,Z=q._offset,(H={})[R._id]=R,(G={})[q._id]=q,T&amp;&amp;S)for(var r=e.overlays,n=0;n&lt;r.length;n++){var i=r[n].xaxis;H[i._id]=i;var a=r[n].yaxis;G[a._id]=a}W=U(H),Y=U(G),Q=C(W,S),tt=C(Y,T),et=!tt&amp;&amp;!Q,K=function(t,e,r){for(var n,i,a,o,l=t._fullLayout._axisConstraintGroups,c=!1,u={},f={},h=0;h&lt;l.length;h++){var p=l[h];for(n in e)if(p[n]){for(a in p)(&quot;x&quot;===a.charAt(0)?e:r)[a]||(u[a]=1);for(i in r)p[i]&amp;&amp;(c=!0)}for(i in r)if(p[i])for(o in p)(&quot;x&quot;===o.charAt(0)?e:r)[o]||(f[o]=1)}c&amp;&amp;(s.extendFlat(u,f),f={});var d={},g=[];for(a in u){var m=y(t,a);g.push(m),d[m._id]=m}var v={},x=[];for(o in f){var b=y(t,o);x.push(b),v[b._id]=b}return{xaHash:d,yaHash:v,xaxes:g,yaxes:x,isSubplotConstrained:c}}(t,H,G),rt=K.isSubplotConstrained,nt=S||rt,it=T||rt;var o=t._fullLayout;at=o._has(&quot;scattergl&quot;),ot=o._hasOnlyLargeSploms,st=ot||o._has(&quot;splom&quot;),lt=o._has(&quot;svg&quot;)}pt();var dt=function(t,e,r){return t?&quot;nsew&quot;===t?r?&quot;&quot;:&quot;pan&quot;===e?&quot;move&quot;:&quot;crosshair&quot;:t.toLowerCase()+&quot;-resize&quot;:&quot;pointer&quot;}(tt+Q,t._fullLayout.dragmode,ft),gt=E(e,T+S+&quot;drag&quot;,dt,r,a,u,p);if(et&amp;&amp;!ft)return gt.onmousedown=null,gt.style.pointerEvents=&quot;none&quot;,gt;var mt,vt,yt,xt,bt,_t,wt,kt,Mt,At,Tt={element:gt,gd:t,plotinfo:e};function St(){Tt.plotinfo.selection=!1,b(ut)}function Et(r,i){var a=t._fullLayout.clickmode;if(B(t),2!==r||ht||function(){if(!t._transitioningWithDuration){var e,r,n,i=t._context.doubleClick,a=(Q?W:[]).concat(tt?Y:[]),s={};if(&quot;reset+autosize&quot;===i)for(i=&quot;autosize&quot;,r=0;r&lt;a.length;r++)if((e=a[r])._rangeInitial&amp;&amp;(e.range[0]!==e._rangeInitial[0]||e.range[1]!==e._rangeInitial[1])||!e._rangeInitial&amp;&amp;!e.autorange){i=&quot;reset&quot;;break}if(&quot;autosize&quot;===i)for(r=0;r&lt;a.length;r++)(e=a[r]).fixedrange||(s[e._name+&quot;.autorange&quot;]=!0);else if(&quot;reset&quot;===i)for((Q||rt)&amp;&amp;(a=a.concat(K.xaxes)),tt&amp;&amp;!rt&amp;&amp;(a=a.concat(K.yaxes)),rt&amp;&amp;(Q?tt||(a=a.concat(Y)):a=a.concat(W)),r=0;r&lt;a.length;r++)(e=a[r])._rangeInitial?(n=e._rangeInitial,s[e._name+&quot;.range[0]&quot;]=n[0],s[e._name+&quot;.range[1]&quot;]=n[1]):s[e._name+&quot;.autorange&quot;]=!0;t.emit(&quot;plotly_doubleclick&quot;,null),o.call(&quot;relayout&quot;,t,s)}}(),ft)a.indexOf(&quot;select&quot;)&gt;-1&amp;&amp;_(i,t,W,Y,e.id,Tt),a.indexOf(&quot;event&quot;)&gt;-1&amp;&amp;h.click(t,i,e.id);else if(1===r&amp;&amp;ht){var s=T?q:R,c=&quot;s&quot;===T||&quot;w&quot;===S?0:1,u=s._name+&quot;.range[&quot;+c+&quot;]&quot;,f=function(t,e){var r,i=t.range[e],a=Math.abs(i-t.range[1-e]);return&quot;date&quot;===t.type?i:&quot;log&quot;===t.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,n.format(&quot;.&quot;+r+&quot;g&quot;)(Math.pow(10,i))):(r=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,n.format(&quot;.&quot;+String(r)+&quot;g&quot;)(i))}(s,c),p=&quot;left&quot;,d=&quot;middle&quot;;if(s.fixedrange)return;T?(d=&quot;n&quot;===T?&quot;top&quot;:&quot;bottom&quot;,&quot;right&quot;===s.side&amp;&amp;(p=&quot;right&quot;)):&quot;e&quot;===S&amp;&amp;(p=&quot;right&quot;),t._context.showAxisRangeEntryBoxes&amp;&amp;n.select(gt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:&quot;#444&quot;,horizontalAlign:p,verticalAlign:d}).on(&quot;edit&quot;,function(e){var r=s.d2r(e);void 0!==r&amp;&amp;o.call(&quot;relayout&quot;,t,u,r)})}}function Ct(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,e+mt)),i=Math.max(0,Math.min(J,r+vt)),a=Math.abs(n-mt),o=Math.abs(i-vt);function s(){wt=&quot;&quot;,yt.r=yt.l,yt.t=yt.b,Mt.attr(&quot;d&quot;,&quot;M0,0Z&quot;)}yt.l=Math.min(mt,n),yt.r=Math.max(mt,n),yt.t=Math.min(vt,i),yt.b=Math.max(vt,i),rt?a&gt;A||o&gt;A?(wt=&quot;xy&quot;,a/$&gt;o/J?(o=a*J/$,vt&gt;i?yt.t=vt-o:yt.b=vt+o):(a=o*$/J,mt&gt;n?yt.l=mt-a:yt.r=mt+a),Mt.attr(&quot;d&quot;,j(yt))):s():!tt||o&lt;Math.min(Math.max(.6*a,M),A)?a&lt;M||!Q?s():(yt.t=0,yt.b=J,wt=&quot;x&quot;,Mt.attr(&quot;d&quot;,function(t,e){return&quot;M&quot;+(t.l-.5)+&quot;,&quot;+(e-A-.5)+&quot;h-3v&quot;+(2*A+1)+&quot;h3ZM&quot;+(t.r+.5)+&quot;,&quot;+(e-A-.5)+&quot;h3v&quot;+(2*A+1)+&quot;h-3Z&quot;}(yt,vt))):!Q||a&lt;Math.min(.6*o,A)?(yt.l=0,yt.r=$,wt=&quot;y&quot;,Mt.attr(&quot;d&quot;,function(t,e){return&quot;M&quot;+(e-A-.5)+&quot;,&quot;+(t.t-.5)+&quot;v-3h&quot;+(2*A+1)+&quot;v3ZM&quot;+(e-A-.5)+&quot;,&quot;+(t.b+.5)+&quot;v3h&quot;+(2*A+1)+&quot;v-3Z&quot;}(yt,mt))):(wt=&quot;xy&quot;,Mt.attr(&quot;d&quot;,j(yt))),yt.w=yt.r-yt.l,yt.h=yt.b-yt.t,wt&amp;&amp;(At=!0),t._dragged=At,D(kt,Mt,yt,bt,_t,xt),_t=!0}function Lt(){if(ct={},Math.min(yt.h,yt.w)&lt;2*M)return B(t);&quot;xy&quot;!==wt&amp;&amp;&quot;x&quot;!==wt||L(W,yt.l/$,yt.r/$,ct,K.xaxes),&quot;xy&quot;!==wt&amp;&amp;&quot;y&quot;!==wt||L(Y,(J-yt.b)/J,(J-yt.t)/J,ct,K.yaxes),B(t),Nt(),F(t)}Tt.prepFn=function(e,r,n){var a=Tt.dragmode,o=t._fullLayout.dragmode;o!==a&amp;&amp;(Tt.dragmode=o),pt(),et||(ft?e.shiftKey?&quot;pan&quot;===o?o=&quot;zoom&quot;:N(o)||(o=&quot;pan&quot;):e.ctrlKey&amp;&amp;(o=&quot;pan&quot;):o=&quot;pan&quot;),Tt.minDrag=&quot;lasso&quot;===o?1:void 0,N(o)?(Tt.xaxes=W,Tt.yaxes=Y,x(e,r,n,Tt,o)):(Tt.clickFn=Et,N(a)&amp;&amp;St(),et||(&quot;zoom&quot;===o?(Tt.moveFn=Ct,Tt.doneFn=Lt,Tt.minDrag=1,function(e,r,n){var a=gt.getBoundingClientRect();mt=r-a.left,vt=n-a.top,yt={l:mt,r:mt,w:0,t:vt,b:vt,h:0},xt=t._hmpixcount?t._hmlumcount/t._hmpixcount:i(t._fullLayout.plot_bgcolor).getLuminance(),_t=!1,wt=&quot;xy&quot;,At=!1,kt=O(ut,xt,X,Z,bt=&quot;M0,0H&quot;+$+&quot;V&quot;+J+&quot;H0V0&quot;),Mt=I(ut,X,Z)}(0,r,n)):&quot;pan&quot;===o&amp;&amp;(Tt.moveFn=Bt,Tt.doneFn=Nt)))},d.init(Tt);var zt,Pt,Ot=[0,0,$,J],It=null,Dt=k.REDRAWDELAY,Rt=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Bt(e,r){if(!t._transitioningWithDuration){if(&quot;ew&quot;===Q||&quot;ns&quot;===tt)return Q&amp;&amp;z(W,e),tt&amp;&amp;z(Y,r),jt([Q?-e:0,tt?-r:0,$,J]),void Ft(tt,Q);if(rt&amp;&amp;Q&amp;&amp;tt){var n=&quot;w&quot;===Q==(&quot;n&quot;===tt)?1:-1,i=(e/$+n*r/J)/2;e=i*$,r=n*i*J}&quot;w&quot;===Q?e=l(W,0,e):&quot;e&quot;===Q?e=l(W,1,-e):Q||(e=0),&quot;n&quot;===tt?r=l(Y,1,r):&quot;s&quot;===tt?r=l(Y,0,-r):tt||(r=0);var a=&quot;w&quot;===Q?e:0,o=&quot;n&quot;===tt?r:0;if(rt){var s;if(!Q&amp;&amp;1===tt.length){for(s=0;s&lt;W.length;s++)W[s].range=W[s]._r.slice(),w(W[s],1-r/J);a=(e=r*$/J)/2}if(!tt&amp;&amp;1===Q.length){for(s=0;s&lt;Y.length;s++)Y[s].range=Y[s]._r.slice(),w(Y[s],1-e/$);o=(r=e*J/$)/2}}jt([a,o,$-e,J-r]),Ft(tt,Q)}function l(t,e,r){for(var n,i,a=1-e,o=0;o&lt;t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/P(r/s._length);var l=s.l2r(i);!1!==l&amp;&amp;void 0!==l&amp;&amp;(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function Ft(e,r){var n,i=[];function a(t){for(n=0;n&lt;t.length;n++)t[n].fixedrange||i.push(t[n]._id)}for(nt&amp;&amp;(a(W),a(K.xaxes)),it&amp;&amp;(a(Y),a(K.yaxes)),ct={},n=0;n&lt;i.length;n++){var s=i[n];v(t,s,!0);var l=y(t,s);ct[l._name+&quot;.range[0]&quot;]=l.range[0],ct[l._name+&quot;.range[1]&quot;]=l.range[1]}function c(a,o,s){for(n=0;n&lt;a.length;n++){var l=a[n];if((r&amp;&amp;-1!==i.indexOf(l.xref)||e&amp;&amp;-1!==i.indexOf(l.yref))&amp;&amp;(o(t,n),s))return}}c(t._fullLayout.annotations||[],o.getComponentMethod(&quot;annotations&quot;,&quot;drawOne&quot;)),c(t._fullLayout.shapes||[],o.getComponentMethod(&quot;shapes&quot;,&quot;drawOne&quot;)),c(t._fullLayout.images||[],o.getComponentMethod(&quot;images&quot;,&quot;draw&quot;),!0)}function Nt(){jt([0,0,$,J]),s.syncOrAsync([m.previousPromises,function(){o.call(&quot;relayout&quot;,t,ct)}],t)}function jt(e){var r,n,i,a,l=t._fullLayout,u=l._plots,h=l._subplots.cartesian;if((st||at)&amp;&amp;c(t),!st||(o.subplotsRegistry.splom.drag(t),!ot)){if(at)for(r=0;r&lt;h.length;r++){i=(n=u[h[r]]).xaxis,a=n.yaxis;var p=n._scene;if(p){var d=s.simpleMap(i.range,i.r2l),g=s.simpleMap(a.range,a.r2l);p.update({range:[d[0],g[0],d[1],g[1]]})}}if(lt){var m=e[2]/R._length,v=e[3]/q._length;for(r=0;r&lt;h.length;r++){i=(n=u[h[r]]).xaxis,a=n.yaxis;var y,x,b,_,w=nt&amp;&amp;!i.fixedrange&amp;&amp;H[i._id],k=it&amp;&amp;!a.fixedrange&amp;&amp;G[a._id];if(w?(y=m,b=S?e[0]:qt(i,y)):b=Ut(i,y=Vt(i,m,v)),k?(x=v,_=T?e[1]:qt(a,x)):_=Ut(a,x=Vt(a,m,v)),y||x){y||(y=1),x||(x=1);var M=i._offset-b/y,A=a._offset-_/x;n.clipRect.call(f.setTranslate,b,_).call(f.setScale,y,x),n.plot.call(f.setTranslate,M,A).call(f.setScale,1/y,1/x),y===zt&amp;&amp;x===Pt||(f.setPointGroupScale(n.zoomScalePts,y,x),f.setTextPointsScale(n.zoomScaleTxt,y,x)),f.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),zt=y,Pt=x}}}}}function Vt(t,e,r){return t.fixedrange?0:nt&amp;&amp;K.xaHash[t._id]?e:it&amp;&amp;(rt?K.xaHash:K.yaHash)[t._id]?r:0}function Ut(t,e){return e?(t.range=t._r.slice(),w(t,e),qt(t,e)):0}function qt(t,e){return t._length*(1-e)*g[t.constraintoward||&quot;middle&quot;]}return T.length*S.length!=1&amp;&amp;V(gt,function(e){if(t._context.scrollZoom||t._fullLayout._enablescrollzoom){if(St(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();var r=t.querySelector(&quot;.plotly&quot;);if(pt(),!(r.scrollHeight-r.clientHeight&gt;10||r.scrollWidth-r.clientWidth&gt;10)){clearTimeout(It);var n=-e.deltaY;if(isFinite(n)||(n=e.wheelDelta/10),isFinite(n)){var i,a=Math.exp(-Math.min(Math.max(n,-20),20)/200),o=Rt.draglayer.select(&quot;.nsewdrag&quot;).node().getBoundingClientRect(),l=(e.clientX-o.left)/o.width,c=(o.bottom-e.clientY)/o.height;if(nt){for(S||(l=.5),i=0;i&lt;W.length;i++)u(W[i],l,a);Ot[2]*=a,Ot[0]+=Ot[2]*l*(1/a-1)}if(it){for(T||(c=.5),i=0;i&lt;Y.length;i++)u(Y[i],c,a);Ot[3]*=a,Ot[1]+=Ot[3]*(1-c)*(1/a-1)}jt(Ot),Ft(T,S),It=setTimeout(function(){Ot=[0,0,$,J],Nt()},Dt),e.preventDefault()}else s.log(&quot;Did not find wheel motion attributes: &quot;,e)}}function u(t,e,r){if(!t.fixedrange){var n=s.simpleMap(t.range,t.r2l),i=n[0]+(n[1]-n[0])*e;t.range=n.map(function(e){return t.l2r(i+(e-i)*r)})}}}),gt},makeDragger:S,makeRectDragger:E,makeZoombox:O,makeCorners:I,updateZoombox:D,xyCorners:j,transitionZoombox:R,removeZoombox:B,showDoubleClickNotifier:F,attachWheelEventHandler:V}},{&quot;../../components/color&quot;:567,&quot;../../components/dragelement&quot;:589,&quot;../../components/drawing&quot;:592,&quot;../../components/fx&quot;:609,&quot;../../constants/alignment&quot;:665,&quot;../../lib&quot;:693,&quot;../../lib/clear_gl_canvases&quot;:676,&quot;../../lib/setcursor&quot;:714,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../registry&quot;:825,&quot;../plots&quot;:805,&quot;./axes&quot;:742,&quot;./axis_ids&quot;:745,&quot;./constants&quot;:747,&quot;./scale_zoom&quot;:758,&quot;./select&quot;:759,d3:147,&quot;has-passive-events&quot;:392,tinycolor2:511}],751:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/fx&quot;),a=t(&quot;../../components/dragelement&quot;),o=t(&quot;../../lib/setcursor&quot;),s=t(&quot;./dragbox&quot;).makeDragBox,l=t(&quot;./constants&quot;).DRAGGERSIZE;r.initInteractions=function(t){var e=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(&quot;.drag&quot;).remove();else if(e._has(&quot;cartesian&quot;)||e._has(&quot;splom&quot;)){Object.keys(e._plots||{}).sort(function(t,r){if((e._plots[t].mainplot&amp;&amp;!0)===(e._plots[r].mainplot&amp;&amp;!0)){var n=t.split(&quot;y&quot;),i=r.split(&quot;y&quot;);return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return e._plots[t].mainplot?1:-1}).forEach(function(r){var n=e._plots[r],o=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(t,n,o._offset,c._offset,o._length,c._length,&quot;ns&quot;,&quot;ew&quot;);u.onmousemove=function(e){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===r&amp;&amp;i.hover(t,e,r)},i.hover(t,e,r),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=r},u.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&amp;&amp;(s(t,n,o._offset-l,c._offset-l,l,l,&quot;n&quot;,&quot;w&quot;),s(t,n,o._offset+o._length,c._offset-l,l,l,&quot;n&quot;,&quot;e&quot;),s(t,n,o._offset-l,c._offset+c._length,l,l,&quot;s&quot;,&quot;w&quot;),s(t,n,o._offset+o._length,c._offset+c._length,l,l,&quot;s&quot;,&quot;e&quot;))}if(t._context.showAxisDragHandles){if(r===o._mainSubplot){var f=o._mainLinePosition;&quot;top&quot;===o.side&amp;&amp;(f-=l),s(t,n,o._offset+.1*o._length,f,.8*o._length,l,&quot;&quot;,&quot;ew&quot;),s(t,n,o._offset,f,.1*o._length,l,&quot;&quot;,&quot;w&quot;),s(t,n,o._offset+.9*o._length,f,.1*o._length,l,&quot;&quot;,&quot;e&quot;)}if(r===c._mainSubplot){var h=c._mainLinePosition;&quot;right&quot;!==c.side&amp;&amp;(h-=l),s(t,n,h,c._offset+.1*c._length,l,.8*c._length,&quot;ns&quot;,&quot;&quot;),s(t,n,h,c._offset+.9*c._length,l,.1*c._length,&quot;s&quot;,&quot;&quot;),s(t,n,h,c._offset,l,.1*c._length,&quot;n&quot;,&quot;&quot;)}}});var o=e._hoverlayer.node();o.onmousemove=function(r){r.target=t._fullLayout._lasthover,i.hover(t,r,e._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},r.updateFx(t)}},r.updateFx=function(t){var e=t._fullLayout,r=&quot;pan&quot;===e.dragmode?&quot;move&quot;:&quot;crosshair&quot;;o(e._draggers,r)}},{&quot;../../components/dragelement&quot;:589,&quot;../../components/fx&quot;:609,&quot;../../lib/setcursor&quot;:714,&quot;./constants&quot;:747,&quot;./dragbox&quot;:750,d3:147}],752:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;);e.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var o=n.subplotsRegistry.cartesian,s=o.idRegex,l=r._subplots,c=l.xaxis,u=l.yaxis,f=l.cartesian,h=r._has(&quot;cartesian&quot;)||r._has(&quot;gl2d&quot;),p=0;p&lt;a.length;p++){var d=a[p];if(i.isPlainObject(d)){var g=d.xref,m=d.yref,v=s.x.test(g),y=s.y.test(m);if(v||y){h||i.pushUnique(r._basePlotModules,o);var x=!1;v&amp;&amp;-1===c.indexOf(g)&amp;&amp;(c.push(g),x=!0),y&amp;&amp;-1===u.indexOf(m)&amp;&amp;(u.push(m),x=!0),x&amp;&amp;v&amp;&amp;y&amp;&amp;f.push(g+m)}}}}}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825}],753:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../plots&quot;),s=t(&quot;../../components/drawing&quot;),l=t(&quot;../get_data&quot;).getModuleCalcData,c=t(&quot;./axis_ids&quot;),u=t(&quot;./constants&quot;),f=t(&quot;../../constants/xmlns_namespaces&quot;),h=a.ensureSingle;function p(t,e,r){return a.ensureSingle(t,e,r,function(t){t.datum(r)})}function d(t,e,r,a,o){for(var c,f,h,p=u.traceLayerClasses,d=t._fullLayout,g=d._modules,m=[],v=[],y=0;y&lt;g.length;y++){var x=(c=g[y]).name,b=i.modules[x].categories;if(b.svg){var _=c.layerName||x+&quot;layer&quot;,w=c.plot;h=(f=l(r,w))[0],r=f[1],h.length&amp;&amp;m.push({i:p.indexOf(_),className:_,plotMethod:w,cdModule:h}),b.zoomScale&amp;&amp;v.push(&quot;.&quot;+_)}}m.sort(function(t,e){return t.i-e.i});var k=e.plot.selectAll(&quot;g.mlayer&quot;).data(m,function(t){return t.className});if(k.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return t.className}).classed(&quot;mlayer&quot;,!0),k.exit().remove(),k.order(),k.each(function(r){var i=n.select(this),l=r.className;r.plotMethod(t,e,r.cdModule,i,a,o),&quot;scatterlayer&quot;!==l&amp;&amp;&quot;barlayer&quot;!==l&amp;&amp;s.setClipUrl(i,e.layerClipId)}),d._has(&quot;scattergl&quot;)&amp;&amp;(c=i.getModule(&quot;scattergl&quot;),h=l(r,c)[0],c.plot(t,e,h)),!t._context.staticPlot&amp;&amp;(e._hasClipOnAxisFalse&amp;&amp;(e.clipOnAxisFalseTraces=e.plot.selectAll(&quot;.scatterlayer, .barlayer&quot;).selectAll(&quot;.trace&quot;)),v.length)){var M=e.plot.selectAll(v.join(&quot;,&quot;)).selectAll(&quot;.trace&quot;);e.zoomScalePts=M.selectAll(&quot;path.point&quot;),e.zoomScaleTxt=M.selectAll(&quot;.textpoint&quot;)}}function g(t,e){var r=e.plotgroup,n=e.id,i=u.layerValue2layerClass[e.xaxis.layer],a=u.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,l=s.plotgroup,f=n+&quot;-x&quot;,d=n+&quot;-y&quot;;e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,h(s.overlinesBelow,&quot;path&quot;,f),h(s.overlinesBelow,&quot;path&quot;,d),h(s.overaxesBelow,&quot;g&quot;,f),h(s.overaxesBelow,&quot;g&quot;,d),e.plot=h(s.overplot,&quot;g&quot;,n),h(s.overlinesAbove,&quot;path&quot;,f),h(s.overlinesAbove,&quot;path&quot;,d),h(s.overaxesAbove,&quot;g&quot;,f),h(s.overaxesAbove,&quot;g&quot;,d),e.xlines=l.select(&quot;.overlines-&quot;+i).select(&quot;.&quot;+f),e.ylines=l.select(&quot;.overlines-&quot;+a).select(&quot;.&quot;+d),e.xaxislayer=l.select(&quot;.overaxes-&quot;+i).select(&quot;.&quot;+f),e.yaxislayer=l.select(&quot;.overaxes-&quot;+a).select(&quot;.&quot;+d)}else if(o)e.plot=h(r,&quot;g&quot;,&quot;plot&quot;),e.xlines=h(r,&quot;path&quot;,&quot;xlines-above&quot;),e.ylines=h(r,&quot;path&quot;,&quot;ylines-above&quot;),e.xaxislayer=h(r,&quot;g&quot;,&quot;xaxislayer-above&quot;),e.yaxislayer=h(r,&quot;g&quot;,&quot;yaxislayer-above&quot;);else{var g=h(r,&quot;g&quot;,&quot;layer-subplot&quot;);e.shapelayer=h(g,&quot;g&quot;,&quot;shapelayer&quot;),e.imagelayer=h(g,&quot;g&quot;,&quot;imagelayer&quot;),e.gridlayer=h(r,&quot;g&quot;,&quot;gridlayer&quot;),e.zerolinelayer=h(r,&quot;g&quot;,&quot;zerolinelayer&quot;),h(r,&quot;path&quot;,&quot;xlines-below&quot;),h(r,&quot;path&quot;,&quot;ylines-below&quot;),e.overlinesBelow=h(r,&quot;g&quot;,&quot;overlines-below&quot;),h(r,&quot;g&quot;,&quot;xaxislayer-below&quot;),h(r,&quot;g&quot;,&quot;yaxislayer-below&quot;),e.overaxesBelow=h(r,&quot;g&quot;,&quot;overaxes-below&quot;),e.plot=h(r,&quot;g&quot;,&quot;plot&quot;),e.overplot=h(r,&quot;g&quot;,&quot;overplot&quot;),e.xlines=h(r,&quot;path&quot;,&quot;xlines-above&quot;),e.ylines=h(r,&quot;path&quot;,&quot;ylines-above&quot;),e.overlinesAbove=h(r,&quot;g&quot;,&quot;overlines-above&quot;),h(r,&quot;g&quot;,&quot;xaxislayer-above&quot;),h(r,&quot;g&quot;,&quot;yaxislayer-above&quot;),e.overaxesAbove=h(r,&quot;g&quot;,&quot;overaxes-above&quot;),e.xlines=r.select(&quot;.xlines-&quot;+i),e.ylines=r.select(&quot;.ylines-&quot;+a),e.xaxislayer=r.select(&quot;.xaxislayer-&quot;+i),e.yaxislayer=r.select(&quot;.yaxislayer-&quot;+a)}o||(p(e.gridlayer,&quot;g&quot;,e.xaxis._id),p(e.gridlayer,&quot;g&quot;,e.yaxis._id),e.gridlayer.selectAll(&quot;g&quot;).map(function(t){return t[0]}).sort(c.idSort)),e.xlines.style(&quot;fill&quot;,&quot;none&quot;).classed(&quot;crisp&quot;,!0),e.ylines.style(&quot;fill&quot;,&quot;none&quot;).classed(&quot;crisp&quot;,!0)}function m(t,e){if(t){var r={};for(var i in t.each(function(t){var i=t[0];n.select(this).remove(),v(i,e),r[i]=!0}),e._plots)for(var a=e._plots[i].overlays||[],o=0;o&lt;a.length;o++){var s=a[o];r[s.id]&amp;&amp;s.plot.selectAll(&quot;.trace&quot;).remove()}}}function v(t,e){e._draggers.selectAll(&quot;g.&quot;+t).remove(),e._defs.select(&quot;#clip&quot;+e._uid+t+&quot;plot&quot;).remove()}r.name=&quot;cartesian&quot;,r.attr=[&quot;xaxis&quot;,&quot;yaxis&quot;],r.idRoot=[&quot;x&quot;,&quot;y&quot;],r.idRegex=u.idRegex,r.attrRegex=u.attrRegex,r.attributes=t(&quot;./attributes&quot;),r.layoutAttributes=t(&quot;./layout_attributes&quot;),r.supplyLayoutDefaults=t(&quot;./layout_defaults&quot;),r.transitionAxes=t(&quot;./transition_axes&quot;),r.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,f=o.cartesian,h=f.concat(o.gl2d||[]),p={},d={};for(r=0;r&lt;h.length;r++){var g=h[r].split(&quot;y&quot;);p[g[0]]=1,d[&quot;y&quot;+g[1]]=1}for(r=0;r&lt;s.length;r++)p[n=s[r]]||(i=(t[c.id2name(n)]||{}).anchor,u.idRegex.y.test(i)||(i=&quot;y&quot;),f.push(n+i),h.push(n+i),d[i]||(d[i]=1,a.pushUnique(l,i)));for(r=0;r&lt;l.length;r++)d[i=l[r]]||(n=(t[c.id2name(i)]||{}).anchor,u.idRegex.x.test(n)||(n=&quot;x&quot;),f.push(n+i),h.push(n+i),p[n]||(p[n]=1,a.pushUnique(s,n)));if(!h.length){for(var m in n=&quot;&quot;,i=&quot;&quot;,t){if(u.attrRegex.test(m))&quot;x&quot;===m.charAt(0)?(!n||+m.substr(5)&lt;+n.substr(5))&amp;&amp;(n=m):(!i||+m.substr(5)&lt;+i.substr(5))&amp;&amp;(i=m)}n=n?c.name2id(n):&quot;x&quot;,i=i?c.name2id(i):&quot;y&quot;,s.push(n),l.push(i),f.push(n+i)}},r.plot=function(t,e,r,n){var i,a=t._fullLayout,o=a._subplots.cartesian,s=t.calcdata;if(null!==e){if(!Array.isArray(e))for(e=[],i=0;i&lt;s.length;i++)e.push(i);for(i=0;i&lt;o.length;i++){for(var l,c=o[i],u=a._plots[c],f=[],h=0;h&lt;s.length;h++){var p=s[h],g=p[0].trace;g.xaxis+g.yaxis===c&amp;&amp;((-1!==e.indexOf(g.index)||g.carpet)&amp;&amp;(l&amp;&amp;l[0].trace.xaxis+l[0].trace.yaxis===c&amp;&amp;-1!==[&quot;tonextx&quot;,&quot;tonexty&quot;,&quot;tonext&quot;].indexOf(g.fill)&amp;&amp;-1===f.indexOf(l)&amp;&amp;f.push(l),f.push(p)),l=p)}d(t,u,f,r,n)}}},r.clean=function(t,e,r,n){var i,a,o,s=n._plots||{},l=e._plots||{},u=n._subplots||{};if(n._hasOnlyLargeSploms&amp;&amp;!e._hasOnlyLargeSploms)for(o in s)(i=s[o]).plotgroup&amp;&amp;i.plotgroup.remove();var f=n._has&amp;&amp;n._has(&quot;gl&quot;),h=e._has&amp;&amp;e._has(&quot;gl&quot;);if(f&amp;&amp;!h)for(o in s)(i=s[o])._scene&amp;&amp;i._scene.destroy();if(u.xaxis&amp;&amp;u.yaxis){var p=c.listIds({_fullLayout:n});for(a=0;a&lt;p.length;a++){var d=p[a];e[c.id2name(d)]||n._infolayer.selectAll(&quot;.g-&quot;+d+&quot;title&quot;).remove()}}var g=n._has&amp;&amp;n._has(&quot;cartesian&quot;),y=e._has&amp;&amp;e._has(&quot;cartesian&quot;);if(g&amp;&amp;!y)m(n._cartesianlayer.selectAll(&quot;.subplot&quot;),n),n._defs.selectAll(&quot;.axesclip&quot;).remove(),delete n._axisConstraintGroups;else if(u.cartesian)for(a=0;a&lt;u.cartesian.length;a++){var x=u.cartesian[a];if(!l[x]){var b=&quot;.&quot;+x+&quot;,.&quot;+x+&quot;-x,.&quot;+x+&quot;-y&quot;;n._cartesianlayer.selectAll(b).remove(),v(x,n)}}},r.drawFramework=function(t){var e=t._fullLayout,r=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._subplots.cartesian,c=l.length,u=[],f=[];for(e=0;e&lt;c;e++){n=l[e],i=s._plots[n],a=i.xaxis,o=i.yaxis;var h=a._mainAxis,p=o._mainAxis,d=h._id+p._id,g=s._plots[d];i.overlays=[],d!==n&amp;&amp;g?(i.mainplot=d,i.mainplotinfo=g,f.push(n)):(i.mainplot=void 0,i.mainPlotinfo=void 0,u.push(n))}for(e=0;e&lt;f.length;e++)n=f[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var m=u.concat(f),v=new Array(c);for(e=0;e&lt;c;e++){n=m[e],i=s._plots[n],a=i.xaxis,o=i.yaxis;var y=[n,a.layer,o.layer,a.overlaying||&quot;&quot;,o.overlaying||&quot;&quot;];for(r=0;r&lt;i.overlays.length;r++)y.push(i.overlays[r].id);v[e]=y}return v}(t),i=e._cartesianlayer.selectAll(&quot;.subplot&quot;).data(r,String);i.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return&quot;subplot &quot;+t[0]}),i.order(),i.exit().call(m,e),i.each(function(r){var i=r[0],a=e._plots[i];a.plotgroup=n.select(this),g(t,a),a.draglayer=h(e._draggers,&quot;g&quot;,i)})},r.rangePlot=function(t,e,r){g(t,e),d(t,e,r),o.style(t)},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(&quot;.svg-container&quot;);r.filter(function(t,e){return e===r.size()-1}).selectAll(&quot;.gl-canvas-context, .gl-canvas-focus&quot;).each(function(){var t=this.toDataURL(&quot;image/png&quot;);e.append(&quot;svg:image&quot;).attr({xmlns:f.svg,&quot;xlink:href&quot;:t,preserveAspectRatio:&quot;none&quot;,x:0,y:0,width:this.width,height:this.height})})},r.updateFx=t(&quot;./graph_interact&quot;).updateFx},{&quot;../../components/drawing&quot;:592,&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;../get_data&quot;:778,&quot;../plots&quot;:805,&quot;./attributes&quot;:740,&quot;./axis_ids&quot;:745,&quot;./constants&quot;:747,&quot;./graph_interact&quot;:751,&quot;./layout_attributes&quot;:754,&quot;./layout_defaults&quot;:755,&quot;./transition_axes&quot;:764,d3:147}],754:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../font_attributes&quot;),i=t(&quot;../../components/color/attributes&quot;),a=t(&quot;../../components/drawing/attributes&quot;).dash,o=t(&quot;../../lib/extend&quot;).extendFlat,s=t(&quot;../../plot_api/plot_template&quot;).templatedArray,l=t(&quot;./constants&quot;);e.exports={visible:{valType:&quot;boolean&quot;,editType:&quot;plot&quot;},color:{valType:&quot;color&quot;,dflt:i.defaultLine,editType:&quot;ticks&quot;},title:{valType:&quot;string&quot;,editType:&quot;ticks&quot;},titlefont:n({editType:&quot;ticks&quot;}),type:{valType:&quot;enumerated&quot;,values:[&quot;-&quot;,&quot;linear&quot;,&quot;log&quot;,&quot;date&quot;,&quot;category&quot;],dflt:&quot;-&quot;,editType:&quot;calc&quot;,_noTemplating:!0},autorange:{valType:&quot;enumerated&quot;,values:[!0,!1,&quot;reversed&quot;],dflt:!0,editType:&quot;axrange&quot;,impliedEdits:{&quot;range[0]&quot;:void 0,&quot;range[1]&quot;:void 0}},rangemode:{valType:&quot;enumerated&quot;,values:[&quot;normal&quot;,&quot;tozero&quot;,&quot;nonnegative&quot;],dflt:&quot;normal&quot;,editType:&quot;plot&quot;},range:{valType:&quot;info_array&quot;,items:[{valType:&quot;any&quot;,editType:&quot;axrange&quot;,impliedEdits:{&quot;^autorange&quot;:!1}},{valType:&quot;any&quot;,editType:&quot;axrange&quot;,impliedEdits:{&quot;^autorange&quot;:!1}}],editType:&quot;axrange&quot;,impliedEdits:{autorange:!1}},fixedrange:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},scaleanchor:{valType:&quot;enumerated&quot;,values:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:&quot;plot&quot;},scaleratio:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;plot&quot;},constrain:{valType:&quot;enumerated&quot;,values:[&quot;range&quot;,&quot;domain&quot;],dflt:&quot;range&quot;,editType:&quot;plot&quot;},constraintoward:{valType:&quot;enumerated&quot;,values:[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;,&quot;top&quot;,&quot;middle&quot;,&quot;bottom&quot;],editType:&quot;plot&quot;},tickmode:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;linear&quot;,&quot;array&quot;],editType:&quot;ticks&quot;,impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;ticks&quot;},tick0:{valType:&quot;any&quot;,editType:&quot;ticks&quot;,impliedEdits:{tickmode:&quot;linear&quot;}},dtick:{valType:&quot;any&quot;,editType:&quot;ticks&quot;,impliedEdits:{tickmode:&quot;linear&quot;}},tickvals:{valType:&quot;data_array&quot;,editType:&quot;ticks&quot;},ticktext:{valType:&quot;data_array&quot;,editType:&quot;ticks&quot;},ticks:{valType:&quot;enumerated&quot;,values:[&quot;outside&quot;,&quot;inside&quot;,&quot;&quot;],editType:&quot;ticks&quot;},mirror:{valType:&quot;enumerated&quot;,values:[!0,&quot;ticks&quot;,!1,&quot;all&quot;,&quot;allticks&quot;],dflt:!1,editType:&quot;ticks+layoutstyle&quot;},ticklen:{valType:&quot;number&quot;,min:0,dflt:5,editType:&quot;ticks&quot;},tickwidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;ticks&quot;},tickcolor:{valType:&quot;color&quot;,dflt:i.defaultLine,editType:&quot;ticks&quot;},showticklabels:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;ticks&quot;},automargin:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;ticks&quot;},showspikes:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;modebar&quot;},spikecolor:{valType:&quot;color&quot;,dflt:null,editType:&quot;none&quot;},spikethickness:{valType:&quot;number&quot;,dflt:3,editType:&quot;none&quot;},spikedash:o({},a,{dflt:&quot;dash&quot;,editType:&quot;none&quot;}),spikemode:{valType:&quot;flaglist&quot;,flags:[&quot;toaxis&quot;,&quot;across&quot;,&quot;marker&quot;],dflt:&quot;toaxis&quot;,editType:&quot;none&quot;},spikesnap:{valType:&quot;enumerated&quot;,values:[&quot;data&quot;,&quot;cursor&quot;],dflt:&quot;data&quot;,editType:&quot;none&quot;},tickfont:n({editType:&quot;ticks&quot;}),tickangle:{valType:&quot;angle&quot;,dflt:&quot;auto&quot;,editType:&quot;ticks&quot;},tickprefix:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;ticks&quot;},showtickprefix:{valType:&quot;enumerated&quot;,values:[&quot;all&quot;,&quot;first&quot;,&quot;last&quot;,&quot;none&quot;],dflt:&quot;all&quot;,editType:&quot;ticks&quot;},ticksuffix:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;ticks&quot;},showticksuffix:{valType:&quot;enumerated&quot;,values:[&quot;all&quot;,&quot;first&quot;,&quot;last&quot;,&quot;none&quot;],dflt:&quot;all&quot;,editType:&quot;ticks&quot;},showexponent:{valType:&quot;enumerated&quot;,values:[&quot;all&quot;,&quot;first&quot;,&quot;last&quot;,&quot;none&quot;],dflt:&quot;all&quot;,editType:&quot;ticks&quot;},exponentformat:{valType:&quot;enumerated&quot;,values:[&quot;none&quot;,&quot;e&quot;,&quot;E&quot;,&quot;power&quot;,&quot;SI&quot;,&quot;B&quot;],dflt:&quot;B&quot;,editType:&quot;ticks&quot;},separatethousands:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;ticks&quot;},tickformat:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;ticks&quot;},tickformatstops:s(&quot;tickformatstop&quot;,{enabled:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;ticks&quot;},dtickrange:{valType:&quot;info_array&quot;,items:[{valType:&quot;any&quot;,editType:&quot;ticks&quot;},{valType:&quot;any&quot;,editType:&quot;ticks&quot;}],editType:&quot;ticks&quot;},value:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;ticks&quot;},editType:&quot;ticks&quot;}),hoverformat:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;none&quot;},showline:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;ticks+layoutstyle&quot;},linecolor:{valType:&quot;color&quot;,dflt:i.defaultLine,editType:&quot;layoutstyle&quot;},linewidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;ticks+layoutstyle&quot;},showgrid:{valType:&quot;boolean&quot;,editType:&quot;ticks&quot;},gridcolor:{valType:&quot;color&quot;,dflt:i.lightLine,editType:&quot;ticks&quot;},gridwidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;ticks&quot;},zeroline:{valType:&quot;boolean&quot;,editType:&quot;ticks&quot;},zerolinecolor:{valType:&quot;color&quot;,dflt:i.defaultLine,editType:&quot;ticks&quot;},zerolinewidth:{valType:&quot;number&quot;,dflt:1,editType:&quot;ticks&quot;},anchor:{valType:&quot;enumerated&quot;,values:[&quot;free&quot;,l.idRegex.x.toString(),l.idRegex.y.toString()],editType:&quot;plot&quot;},side:{valType:&quot;enumerated&quot;,values:[&quot;top&quot;,&quot;bottom&quot;,&quot;left&quot;,&quot;right&quot;],editType:&quot;plot&quot;},overlaying:{valType:&quot;enumerated&quot;,values:[&quot;free&quot;,l.idRegex.x.toString(),l.idRegex.y.toString()],editType:&quot;plot&quot;},layer:{valType:&quot;enumerated&quot;,values:[&quot;above traces&quot;,&quot;below traces&quot;],dflt:&quot;above traces&quot;,editType:&quot;plot&quot;},domain:{valType:&quot;info_array&quot;,items:[{valType:&quot;number&quot;,min:0,max:1,editType:&quot;plot&quot;},{valType:&quot;number&quot;,min:0,max:1,editType:&quot;plot&quot;}],dflt:[0,1],editType:&quot;plot&quot;},position:{valType:&quot;number&quot;,min:0,max:1,dflt:0,editType:&quot;plot&quot;},categoryorder:{valType:&quot;enumerated&quot;,values:[&quot;trace&quot;,&quot;category ascending&quot;,&quot;category descending&quot;,&quot;array&quot;],dflt:&quot;trace&quot;,editType:&quot;calc&quot;},categoryarray:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},editType:&quot;calc&quot;,_deprecated:{autotick:{valType:&quot;boolean&quot;,editType:&quot;ticks&quot;}}}},{&quot;../../components/color/attributes&quot;:566,&quot;../../components/drawing/attributes&quot;:591,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/plot_template&quot;:732,&quot;../font_attributes&quot;:768,&quot;./constants&quot;:747}],755:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../../plot_api/plot_template&quot;),o=t(&quot;../layout_attributes&quot;),s=t(&quot;./layout_attributes&quot;),l=t(&quot;./type_defaults&quot;),c=t(&quot;./axis_defaults&quot;),u=t(&quot;./constraint_defaults&quot;),f=t(&quot;./position_defaults&quot;),h=t(&quot;./axis_ids&quot;),p=h.id2name,d=h.name2id,g=t(&quot;../../registry&quot;),m=g.traceIs,v=g.getComponentMethod;function y(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}e.exports=function(t,e,r){var h,g,x={},b={},_={},w={},k={};for(h=0;h&lt;r.length;h++){var M=r[h];if(m(M,&quot;cartesian&quot;)||m(M,&quot;gl2d&quot;)){var A,T;if(M.xaxis)y(x,A=p(M.xaxis),M);else if(M.xaxes)for(g=0;g&lt;M.xaxes.length;g++)y(x,p(M.xaxes[g]),M);if(M.yaxis)y(x,T=p(M.yaxis),M);else if(M.yaxes)for(g=0;g&lt;M.yaxes.length;g++)y(x,p(M.yaxes[g]),M);if(m(M,&quot;carpet&quot;)&amp;&amp;(&quot;carpet&quot;!==M.type||M._cheater)||A&amp;&amp;(_[A]=1),&quot;carpet&quot;===M.type&amp;&amp;M._cheater&amp;&amp;A&amp;&amp;(b[A]=1),m(M,&quot;2dMap&quot;)&amp;&amp;(w[A]=1,w[T]=1),m(M,&quot;oriented&quot;))k[&quot;h&quot;===M.orientation?T:A]=1}}var S=e._subplots,E=S.xaxis,C=S.yaxis,L=n.simpleMap(E,p),z=n.simpleMap(C,p),P=L.concat(z),O=i.background;E.length&amp;&amp;C.length&amp;&amp;(O=n.coerce(t,e,o,&quot;plot_bgcolor&quot;));var I,D,R,B,F=i.combine(O,e.paper_bgcolor);function N(t,e){return n.coerce(R,B,s,t,e)}function j(t,e){return n.coerce2(R,B,s,t,e)}function V(t){return&quot;x&quot;===t?C:E}var U={x:V(&quot;x&quot;),y:V(&quot;y&quot;)};function q(e,r){for(var n=&quot;x&quot;===e?L:z,i=[],a=0;a&lt;n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(d(o))}return i}for(h=0;h&lt;P.length;h++){D=(I=P[h]).charAt(0),n.isPlainObject(t[I])||(t[I]={}),R=t[I],B=a.newContainer(e,I,D+&quot;axis&quot;);var H=x[I]||[];B._traceIndices=H.map(function(t){return t._expandedIndex}),B._annIndices=[],B._shapeIndices=[],B._name=I;var G=B._id=d(I),W=q(D,I),Y={letter:D,font:e.font,outerTicks:w[I],showGrid:!k[I],data:H,bgColor:F,calendar:e.calendar,automargin:!0,cheateronly:&quot;x&quot;===D&amp;&amp;b[I]&amp;&amp;!_[I],splomStash:((e._splomAxes||{})[D]||{})[G]};l(R,B,N,Y),c(R,B,N,Y,e);var X=j(&quot;spikecolor&quot;),Z=j(&quot;spikethickness&quot;),$=j(&quot;spikedash&quot;),J=j(&quot;spikemode&quot;),K=j(&quot;spikesnap&quot;);N(&quot;showspikes&quot;,!!(X||Z||$||J||K))||(delete B.spikecolor,delete B.spikethickness,delete B.spikedash,delete B.spikemode,delete B.spikesnap);var Q={letter:D,counterAxes:U[D],overlayableAxes:W,grid:e.grid};f(R,B,N,Q),B._input=R}var tt=v(&quot;rangeslider&quot;,&quot;handleDefaults&quot;),et=v(&quot;rangeselector&quot;,&quot;handleDefaults&quot;);for(h=0;h&lt;L.length;h++)I=L[h],R=t[I],B=e[I],tt(t,e,I),&quot;date&quot;===B.type&amp;&amp;et(R,B,e,z,B.calendar),N(&quot;fixedrange&quot;);for(h=0;h&lt;z.length;h++){I=z[h],R=t[I],B=e[I];var rt=e[p(B.anchor)];N(&quot;fixedrange&quot;,rt&amp;&amp;rt.rangeslider&amp;&amp;rt.rangeslider.visible)}e._axisConstraintGroups=[];var nt=U.x.concat(U.y);for(h=0;h&lt;P.length;h++)D=(I=P[h]).charAt(0),R=t[I],B=e[I],u(R,B,N,nt,e)}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../../registry&quot;:825,&quot;../layout_attributes&quot;:796,&quot;./axis_defaults&quot;:744,&quot;./axis_ids&quot;:745,&quot;./constraint_defaults&quot;:748,&quot;./layout_attributes&quot;:754,&quot;./position_defaults&quot;:757,&quot;./type_defaults&quot;:765}],756:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;tinycolor2&quot;).mix,i=t(&quot;../../components/color/attributes&quot;).lightFraction,a=t(&quot;../../lib&quot;);e.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var c=l(&quot;linecolor&quot;,s),u=l(&quot;linewidth&quot;);r(&quot;showline&quot;,o.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var f=l(&quot;gridcolor&quot;,n(s,o.bgColor,o.blend||i).toRgbString()),h=l(&quot;gridwidth&quot;);if(r(&quot;showgrid&quot;,o.showGrid||!!f||!!h)||(delete e.gridcolor,delete e.gridwidth),!o.noZeroLine){var p=l(&quot;zerolinecolor&quot;,s),d=l(&quot;zerolinewidth&quot;);r(&quot;zeroline&quot;,o.showGrid||!!p||!!d)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{&quot;../../components/color/attributes&quot;:566,&quot;../../lib&quot;:693,tinycolor2:511}],757:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;);e.exports=function(t,e,r,a){var o,s,l,c,u=a.counterAxes||[],f=a.overlayableAxes||[],h=a.letter,p=a.grid;p&amp;&amp;(s=p._domains[h][p._axisMap[e._id]],o=p._anchors[e._id],s&amp;&amp;(l=p[h+&quot;side&quot;].split(&quot; &quot;)[0],c=p.domain[h][&quot;right&quot;===l||&quot;top&quot;===l?1:0])),s=s||[0,1],o=o||(n(t.position)?&quot;free&quot;:u[0]||&quot;free&quot;),l=l||(&quot;x&quot;===h?&quot;bottom&quot;:&quot;left&quot;),c=c||0,&quot;free&quot;===i.coerce(t,e,{anchor:{valType:&quot;enumerated&quot;,values:[&quot;free&quot;].concat(u),dflt:o}},&quot;anchor&quot;)&amp;&amp;r(&quot;position&quot;,c),i.coerce(t,e,{side:{valType:&quot;enumerated&quot;,values:&quot;x&quot;===h?[&quot;bottom&quot;,&quot;top&quot;]:[&quot;left&quot;,&quot;right&quot;],dflt:l}},&quot;side&quot;);var d=!1;if(f.length&amp;&amp;(d=i.coerce(t,e,{overlaying:{valType:&quot;enumerated&quot;,values:[!1].concat(f),dflt:!1}},&quot;overlaying&quot;)),!d){var g=r(&quot;domain&quot;,s);g[0]&gt;g[1]-.01&amp;&amp;(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(&quot;layer&quot;),e}},{&quot;../../lib&quot;:693,&quot;fast-isnumeric&quot;:213}],758:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../constants/alignment&quot;).FROM_BL;e.exports=function(t,e,r){void 0===r&amp;&amp;(r=n[t.constraintoward||&quot;center&quot;]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)]}},{&quot;../../constants/alignment&quot;:665}],759:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;polybooljs&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;../../components/fx&quot;),s=t(&quot;../../lib/polygon&quot;),l=t(&quot;../../lib/throttle&quot;),c=t(&quot;../../components/fx/helpers&quot;).makeEventData,u=t(&quot;./axis_ids&quot;).getFromId,f=t(&quot;../sort_modules&quot;).sortModules,h=t(&quot;./constants&quot;),p=h.MINSELECT,d=s.filter,g=s.tester;function m(t){return t._id}function v(t,e,r,n,i,a,o){var s,l,c,u,f,h,p,d,g,m=e._hoverdata,v=e._fullLayout.clickmode.indexOf(&quot;event&quot;)&gt;-1,y=[];if(function(t){return t&amp;&amp;Array.isArray(t)&amp;&amp;!0!==t[0].hoverOnBox}(m)){_(t,e,a);var x=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n&lt;e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&amp;&amp;(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(m,s=k(e,r,n,i));if(x.pointNumbers.length&gt;0?function(t,e){var r,n,i,a=[];for(i=0;i&lt;t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&amp;&amp;r.cd[0].trace.selectedpoints.length&gt;0&amp;&amp;a.push(r);if(1===a.length&amp;&amp;a[0]===e.searchInfo&amp;&amp;(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i&lt;e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])&lt;0)return!1;return!0}return!1}(s,x):function(t){var e,r,n,i=0;for(n=0;n&lt;t.length;n++)if(e=t[n],(r=e.cd[0].trace).selectedpoints){if(r.selectedpoints.length&gt;1)return!1;if((i+=r.selectedpoints.length)&gt;1)return!1}return 1===i}(s)&amp;&amp;(h=A(x))){for(o&amp;&amp;o.remove(),g=0;g&lt;s.length;g++)(l=s[g])._module.selectPoints(l,!1);T(e,s),w(a),v&amp;&amp;e.emit(&quot;plotly_deselect&quot;,null)}else{for(p=t.shiftKey&amp;&amp;(void 0!==h?h:A(x)),c=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:r}}(x.pointNumber,x.searchInfo,p),u=b(a.selectionDefs.concat([c])),g=0;g&lt;s.length;g++)if(f=S(s[g]._module.selectPoints(s[g],u),s[g]),y.length)for(var E=0;E&lt;f.length;E++)y.push(f[E]);else y=f;T(e,s,d={points:y}),c&amp;&amp;a&amp;&amp;a.selectionDefs.push(c),o&amp;&amp;M(a.mergedPolygons,o),v&amp;&amp;e.emit(&quot;plotly_selected&quot;,d)}}}function y(t){return&quot;pointNumber&quot;in t&amp;&amp;&quot;searchInfo&quot;in t}function x(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&amp;&amp;n===t.pointNumber},isRect:!1,degenerate:!1,subtract:t.subtract}}function b(t){for(var e=[],r=y(t[0])?0:t[0][0][0],n=r,i=y(t[0])?0:t[0][0][1],a=i,o=0;o&lt;t.length;o++)if(y(t[o]))e.push(x(t[o]));else{var l=s.tester(t[o]);l.subtract=t[o].subtract,e.push(l),r=Math.min(r,l.xmin),n=Math.max(n,l.xmax),i=Math.min(i,l.ymin),a=Math.max(a,l.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o&lt;e.length;o++)e[o].contains(t,r,n,i)&amp;&amp;(a=!1===e[o].subtract);return a},isRect:!1,degenerate:!1}}function _(t,e,r){var n=e._fullLayout,i=n._zoomlayer,a=r.plotinfo,o=n._lastSelectedSubplot&amp;&amp;n._lastSelectedSubplot===a.id,s=t.shiftKey||t.altKey;o&amp;&amp;s&amp;&amp;a.selection&amp;&amp;a.selection.selectionDefs&amp;&amp;!r.selectionDefs?(r.selectionDefs=a.selection.selectionDefs,r.mergedPolygons=a.selection.mergedPolygons):s&amp;&amp;a.selection||w(r),o||(E(i),n._lastSelectedSubplot=a.id)}function w(t){var e=t.plotinfo;e.selection={},e.selection.selectionDefs=t.selectionDefs=[],e.selection.mergedPolygons=t.mergedPolygons=[]}function k(t,e,r,n){var i,a,o,s=[],l=e.map(m),c=r.map(m);for(o=0;o&lt;t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&amp;&amp;a._module&amp;&amp;a._module.selectPoints)if(!n||a.subplot!==n&amp;&amp;a.geo!==n)if(&quot;splom&quot;===a.type&amp;&amp;a._xaxes[l[0]]&amp;&amp;a._yaxes[c[0]])s.push(f(a._module,i,e[0],r[0]));else{if(-1===l.indexOf(a.xaxis))continue;if(-1===c.indexOf(a.yaxis))continue;s.push(f(a._module,i,u(t,a.xaxis),u(t,a.yaxis)))}else s.push(f(a._module,i,e[0],r[0]));return s;function f(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}}function M(t,e){var r,n,i=[];for(r=0;r&lt;t.length;r++){var a=t[r];i.push(a.join(&quot;L&quot;)+&quot;L&quot;+a[0])}n=t.length&gt;0?&quot;M&quot;+i.join(&quot;M&quot;)+&quot;Z&quot;:&quot;M0,0Z&quot;,e.attr(&quot;d&quot;,n)}function A(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length&gt;0?n[0]:r;return!!e.selectedpoints&amp;&amp;e.selectedpoints.indexOf(i)&gt;-1}function T(t,e,r){var n,a,o,s;if(r){var l=r.points||[];for(n=0;n&lt;e.length;n++)(s=e[n].cd[0].trace).selectedpoints=[],s._input.selectedpoints=[];for(n=0;n&lt;l.length;n++){var c=l[n],u=c.data,h=c.fullData;c.pointIndices?([].push.apply(u.selectedpoints,c.pointIndices),[].push.apply(h.selectedpoints,c.pointIndices)):(u.selectedpoints.push(c.pointIndex),h.selectedpoints.push(c.pointIndex))}}else for(n=0;n&lt;e.length;n++)delete(s=e[n].cd[0].trace).selectedpoints,delete s._input.selectedpoints;var p={};for(n=0;n&lt;e.length;n++){var d=(o=e[n])._module.name;p[d]?p[d].push(o):p[d]=[o]}var g=Object.keys(p).sort(f);for(n=0;n&lt;g.length;n++){var m=p[g[n]],v=m.length,y=m[0],x=y.cd[0].trace,b=y._module,_=b.styleOnSelect||b.style;if(i.traceIs(x,&quot;regl&quot;)){var w=new Array(v);for(a=0;a&lt;v;a++)w[a]=m[a].cd;_(t,w)}else for(a=0;a&lt;v;a++)_(t,m[a].cd)}}function S(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i&lt;t.length;i++)t[i]=c(t[i],n,r);return t}function E(t){t.selectAll(&quot;.select-outline&quot;).remove()}e.exports={prepSelect:function(t,e,r,i,s){var c,u,f,m,y,x,A,E=i.gd,C=E._fullLayout,L=C._zoomlayer,z=i.element.getBoundingClientRect(),P=i.plotinfo,O=P.xaxis._offset,I=P.yaxis._offset,D=e-z.left,R=r-z.top,B=D,F=R,N=&quot;M&quot;+D+&quot;,&quot;+R,j=i.xaxes[0]._length,V=i.yaxes[0]._length,U=i.xaxes.concat(i.yaxes),q=t.altKey;_(t,E,i),&quot;lasso&quot;===s&amp;&amp;(c=d([[D,R]],h.BENDPX));var H=L.selectAll(&quot;path.select-outline-&quot;+P.id).data([1,2]);H.enter().append(&quot;path&quot;).attr(&quot;class&quot;,function(t){return&quot;select-outline select-outline-&quot;+t+&quot; select-outline-&quot;+P.id}).attr(&quot;transform&quot;,&quot;translate(&quot;+O+&quot;, &quot;+I+&quot;)&quot;).attr(&quot;d&quot;,N+&quot;Z&quot;);var G,W=L.append(&quot;path&quot;).attr(&quot;class&quot;,&quot;zoombox-corners&quot;).style({fill:a.background,stroke:a.defaultLine,&quot;stroke-width&quot;:1}).attr(&quot;transform&quot;,&quot;translate(&quot;+O+&quot;, &quot;+I+&quot;)&quot;).attr(&quot;d&quot;,&quot;M0,0Z&quot;),Y=C._uid+h.SELECTID,X=[],Z=k(E,i.xaxes,i.yaxes,i.subplot);function $(t){var e=&quot;y&quot;===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function J(t,e){return t-e}G=P.fillRangeItems?P.fillRangeItems:&quot;select&quot;===s?function(t,e){var r=t.range={};for(y=0;y&lt;U.length;y++){var n=U[y],i=n._id.charAt(0);r[n._id]=[n.p2d(e[i+&quot;min&quot;]),n.p2d(e[i+&quot;max&quot;])].sort(J)}}:function(t,e,r){var n=t.lassoPoints={};for(y=0;y&lt;U.length;y++){var i=U[y];n[i._id]=r.filtered.map($(i))}},i.moveFn=function(t,e){B=Math.max(0,Math.min(j,t+D)),F=Math.max(0,Math.min(V,e+R));var r=Math.abs(B-D),a=Math.abs(F-R);if(&quot;select&quot;===s){var o=C.selectdirection;&quot;h&quot;===(o=&quot;any&quot;===C.selectdirection?a&lt;Math.min(.6*r,p)?&quot;h&quot;:r&lt;Math.min(.6*a,p)?&quot;v&quot;:&quot;d&quot;:C.selectdirection)?((m=[[D,0],[D,V],[B,V],[B,0]]).xmin=Math.min(D,B),m.xmax=Math.max(D,B),m.ymin=Math.min(0,V),m.ymax=Math.max(0,V),W.attr(&quot;d&quot;,&quot;M&quot;+m.xmin+&quot;,&quot;+(R-p)+&quot;h-4v&quot;+2*p+&quot;h4ZM&quot;+(m.xmax-1)+&quot;,&quot;+(R-p)+&quot;h4v&quot;+2*p+&quot;h-4Z&quot;)):&quot;v&quot;===o?((m=[[0,R],[0,F],[j,F],[j,R]]).xmin=Math.min(0,j),m.xmax=Math.max(0,j),m.ymin=Math.min(R,F),m.ymax=Math.max(R,F),W.attr(&quot;d&quot;,&quot;M&quot;+(D-p)+&quot;,&quot;+m.ymin+&quot;v-4h&quot;+2*p+&quot;v4ZM&quot;+(D-p)+&quot;,&quot;+(m.ymax-1)+&quot;v4h&quot;+2*p+&quot;v-4Z&quot;)):&quot;d&quot;===o&amp;&amp;((m=[[D,R],[D,F],[B,F],[B,R]]).xmin=Math.min(D,B),m.xmax=Math.max(D,B),m.ymin=Math.min(R,F),m.ymax=Math.max(R,F),W.attr(&quot;d&quot;,&quot;M0,0Z&quot;))}else&quot;lasso&quot;===s&amp;&amp;(c.addPt([B,F]),m=c.filtered);i.selectionDefs&amp;&amp;i.selectionDefs.length?(f=function(t,e,r){return r?n.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions:n.union({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions}(i.mergedPolygons,m,q),m.subtract=q,u=b(i.selectionDefs.concat([m]))):(f=[m],u=g(m)),M(f,H),l.throttle(Y,h.SELECTDELAY,function(){X=[];var t,e,r=[];for(y=0;y&lt;Z.length;y++)if(e=(x=Z[y])._module.selectPoints(x,u),r.push(e),t=S(e,x),X.length)for(var n=0;n&lt;t.length;n++)X.push(t[n]);else X=t;T(E,Z,A={points:X}),G(A,m,c),i.gd.emit(&quot;plotly_selecting&quot;,A)})},i.clickFn=function(t,e){var r=C.clickmode;W.remove(),l.done(Y).then(function(){if(l.clear(Y),2===t){for(H.remove(),y=0;y&lt;Z.length;y++)(x=Z[y])._module.selectPoints(x,!1);T(E,Z),w(i),E.emit(&quot;plotly_deselect&quot;,null)}else r.indexOf(&quot;select&quot;)&gt;-1&amp;&amp;v(e,E,i.xaxes,i.yaxes,i.subplot,i,H),&quot;event&quot;===r&amp;&amp;E.emit(&quot;plotly_selected&quot;,void 0);o.click(E,e)})},i.doneFn=function(){W.remove(),l.done(Y).then(function(){l.clear(Y),i.gd.emit(&quot;plotly_selected&quot;,A),m&amp;&amp;i.selectionDefs&amp;&amp;(m.subtract=q,i.selectionDefs.push(m),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,f))})}},clearSelect:E,selectOnClick:v}},{&quot;../../components/color&quot;:567,&quot;../../components/fx&quot;:609,&quot;../../components/fx/helpers&quot;:606,&quot;../../lib/polygon&quot;:706,&quot;../../lib/throttle&quot;:719,&quot;../../registry&quot;:825,&quot;../sort_modules&quot;:819,&quot;./axis_ids&quot;:745,&quot;./constants&quot;:747,polybooljs:453}],760:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../../lib&quot;),o=a.cleanNumber,s=a.ms2DateTime,l=a.dateTime2ms,c=a.ensureNumber,u=t(&quot;../../constants/numerical&quot;),f=u.FP_SAFE,h=u.BADNUM,p=u.LOG_CLIP,d=t(&quot;./constants&quot;),g=t(&quot;./axis_ids&quot;);function m(t){return Math.pow(10,t)}e.exports=function(t,e){e=e||{};var r=(t._id||&quot;x&quot;).charAt(0);function u(e,r){if(e&gt;0)return Math.log(e)/Math.LN10;if(e&lt;=0&amp;&amp;r&amp;&amp;t.range&amp;&amp;2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*p*Math.abs(n-i))}return h}function v(e,r,n){var o=l(e,n||t.calendar);if(o===h){if(!i(e))return h;e=+e;var s=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function y(e,r,n){return s(e,r,n||t.calendar)}function x(e){return t._categories[Math.round(e)]}function b(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if(i(e))return+e}function _(e){return i(e)?n.round(t._b+t._m*e,2):h}function w(e){return(e-t._b)/t._m}t.c2l=&quot;log&quot;===t.type?u:c,t.l2c=&quot;log&quot;===t.type?m:c,t.l2p=_,t.p2l=w,t.c2p=&quot;log&quot;===t.type?function(t,e){return _(u(t,e))}:_,t.p2c=&quot;log&quot;===t.type?function(t){return m(w(t))}:w,-1!==[&quot;linear&quot;,&quot;-&quot;].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=w,t.cleanPos=c):&quot;log&quot;===t.type?(t.d2r=t.d2l=function(t,e){return u(o(t),e)},t.r2d=t.r2c=function(t){return m(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=u,t.l2d=m,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return m(w(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=w,t.cleanPos=c):&quot;date&quot;===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=v,t.c2d=t.c2r=t.l2d=t.l2r=y,t.d2p=t.r2p=function(e,r,n){return t.l2p(v(e,0,n))},t.p2d=t.p2r=function(t,e,r){return y(w(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,h,t.calendar)}):&quot;category&quot;===t.type&amp;&amp;(t.d2c=t.d2l=function(e){if(null!=e){if(void 0===t._categoriesMap&amp;&amp;(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return h},t.r2d=t.c2d=t.l2d=x,t.d2r=t.d2l_noadd=b,t.r2c=function(e){var r=b(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=b,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return x(w(t))},t.r2p=t.d2p,t.p2r=w,t.cleanPos=function(t){return&quot;string&quot;==typeof t&amp;&amp;&quot;&quot;!==t?t:c(t)}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e,n){n||(n={}),e||(e=&quot;range&quot;);var o,s,l=a.nestedProperty(t,e).get();if(s=(s=&quot;date&quot;===t.type?a.dfltRange(t.calendar):&quot;y&quot;===r?d.DFLTRANGEY:n.dfltRange||d.DFLTRANGEX).slice(),l&amp;&amp;2===l.length)for(&quot;date&quot;===t.type&amp;&amp;(l[0]=a.cleanDate(l[0],h,t.calendar),l[1]=a.cleanDate(l[1],h,t.calendar)),o=0;o&lt;2;o++)if(&quot;date&quot;===t.type){if(!a.isDateTime(l[o],t.calendar)){t[e]=s;break}if(t.r2l(l[0])===t.r2l(l[1])){var c=a.constrain(t.r2l(l[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);l[0]=t.l2r(c-1e3),l[1]=t.l2r(c+1e3);break}}else{if(!i(l[o])){if(!i(l[1-o])){t[e]=s;break}l[o]=l[1-o]*(o?10:.1)}if(l[o]&lt;-f?l[o]=-f:l[o]&gt;f&amp;&amp;(l[o]=f),l[0]===l[1]){var u=Math.max(1,Math.abs(1e-6*l[0]));l[0]-=u,l[1]+=u}}else a.nestedProperty(t,e).set(s)},t.setScale=function(n){var i=e._size;if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var a=g.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=n&amp;&amp;t._r?&quot;_r&quot;:&quot;range&quot;,s=t.calendar;t.cleanRange(o);var l=t.r2l(t[o][0],s),c=t.r2l(t[o][1],s);if(&quot;y&quot;===r?(t._offset=i.t+(1-t.domain[1])*i.h,t._length=i.h*(t.domain[1]-t.domain[0]),t._m=t._length/(l-c),t._b=-t._m*c):(t._offset=i.l+t.domain[0]*i.w,t._length=i.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-l),t._b=-t._m*l),!isFinite(t._m)||!isFinite(t._b))throw e._replotting=!1,new Error(&quot;Something went wrong with axis scaling&quot;)},t.makeCalcdata=function(e,r){var n,i,o,s,l=t.type,c=&quot;date&quot;===l&amp;&amp;e[r+&quot;calendar&quot;];if(r in e){if(n=e[r],s=e._length||n.length,a.isTypedArray(n)&amp;&amp;(&quot;linear&quot;===l||&quot;log&quot;===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}for(i=new Array(s),o=0;o&lt;s;o++)i[o]=t.d2c(n[o],0,c)}else{var u=r+&quot;0&quot;in e?t.d2c(e[r+&quot;0&quot;],0,c):0,f=e[&quot;d&quot;+r]?Number(e[&quot;d&quot;+r]):1;for(n=e[{x:&quot;y&quot;,y:&quot;x&quot;}[r]],s=e._length||n.length,i=new Array(s),o=0;o&lt;s;o++)i[o]=u+o*f}return i},t.isValidRange=function(e){return Array.isArray(e)&amp;&amp;2===e.length&amp;&amp;i(t.r2l(e[0]))&amp;&amp;i(t.r2l(e[1]))},t.isPtWithinRange=function(e,n){var i=t.c2l(e[r],null,n),a=t.r2l(t.range[0]),o=t.r2l(t.range[1]);return a&lt;o?a&lt;=i&amp;&amp;i&lt;=o:o&lt;=i&amp;&amp;i&lt;=a},t.clearCalc=function(){t._categories=(t._initialCategories||[]).slice(),t._categoriesMap={};for(var e=0;e&lt;t._categories.length;e++)t._categoriesMap[t._categories[e]]=e};var k=e._d3locale;&quot;date&quot;===t.type&amp;&amp;(t._dateFormat=k?k.timeFormat.utc:n.time.format.utc,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=k?k.numberFormat:n.format,delete t._minDtick,delete t._forceTick0}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;./axis_ids&quot;:745,&quot;./constants&quot;:747,d3:147,&quot;fast-isnumeric&quot;:213}],761:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./layout_attributes&quot;),a=t(&quot;../array_container_defaults&quot;);function o(t,e){function r(r,a){return n.coerce(t,e,i.tickformatstops,r,a)}r(&quot;enabled&quot;)&amp;&amp;(r(&quot;dtickrange&quot;),r(&quot;value&quot;))}e.exports=function(t,e,r,s,l){var c=function(t){var e=[&quot;showexponent&quot;,&quot;showtickprefix&quot;,&quot;showticksuffix&quot;].filter(function(e){return void 0!==t[e]});if(e.every(function(r){return t[r]===t[e[0]]})||1===e.length)return t[e[0]]}(t);if(r(&quot;tickprefix&quot;)&amp;&amp;r(&quot;showtickprefix&quot;,c),r(&quot;ticksuffix&quot;,l.tickSuffixDflt)&amp;&amp;r(&quot;showticksuffix&quot;,c),r(&quot;showticklabels&quot;)){var u=l.font||{},f=e.color,h=f&amp;&amp;f!==i.color.dflt?f:u.color;if(n.coerceFont(r,&quot;tickfont&quot;,{family:u.family,size:u.size,color:h}),r(&quot;tickangle&quot;),&quot;category&quot;!==s){var p=r(&quot;tickformat&quot;),d=t.tickformatstops;Array.isArray(d)&amp;&amp;d.length&amp;&amp;a(t,e,{name:&quot;tickformatstops&quot;,inclusionAttr:&quot;enabled&quot;,handleItemDefaults:o}),p||&quot;date&quot;===s||(r(&quot;showexponent&quot;,c),r(&quot;exponentformat&quot;),r(&quot;separatethousands&quot;))}}}},{&quot;../../lib&quot;:693,&quot;../array_container_defaults&quot;:738,&quot;./layout_attributes&quot;:754}],762:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./layout_attributes&quot;);e.exports=function(t,e,r,a){var o=n.coerce2(t,e,i,&quot;ticklen&quot;),s=n.coerce2(t,e,i,&quot;tickwidth&quot;),l=n.coerce2(t,e,i,&quot;tickcolor&quot;,e.color);r(&quot;ticks&quot;,a.outerTicks||o||s||l?&quot;outside&quot;:&quot;&quot;)||(delete e.ticklen,delete e.tickwidth,delete e.tickcolor)}},{&quot;../../lib&quot;:693,&quot;./layout_attributes&quot;:754}],763:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../constants/numerical&quot;).ONEDAY;e.exports=function(t,e,r,o){var s;&quot;array&quot;!==t.tickmode||&quot;log&quot;!==o&amp;&amp;&quot;date&quot;!==o?s=r(&quot;tickmode&quot;,Array.isArray(t.tickvals)?&quot;array&quot;:t.dtick?&quot;linear&quot;:&quot;auto&quot;):s=e.tickmode=&quot;auto&quot;;if(&quot;auto&quot;===s)r(&quot;nticks&quot;);else if(&quot;linear&quot;===s){var l=&quot;date&quot;===o?a:1,c=r(&quot;dtick&quot;,l);if(n(c))e.dtick=c&gt;0?Number(c):l;else if(&quot;string&quot;!=typeof c)e.dtick=l;else{var u=c.charAt(0),f=c.substr(1);((f=n(f)?Number(f):0)&lt;=0||!(&quot;date&quot;===o&amp;&amp;&quot;M&quot;===u&amp;&amp;f===Math.round(f)||&quot;log&quot;===o&amp;&amp;&quot;L&quot;===u||&quot;log&quot;===o&amp;&amp;&quot;D&quot;===u&amp;&amp;(1===f||2===f)))&amp;&amp;(e.dtick=l)}var h=&quot;date&quot;===o?i.dateTick0(e.calendar):0,p=r(&quot;tick0&quot;,h);&quot;date&quot;===o?e.tick0=i.cleanDate(p,h):n(p)&amp;&amp;&quot;D1&quot;!==c&amp;&amp;&quot;D2&quot;!==c?e.tick0=Number(p):e.tick0=h}else{void 0===r(&quot;tickvals&quot;)?e.tickmode=&quot;auto&quot;:r(&quot;ticktext&quot;)}}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;fast-isnumeric&quot;:213}],764:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../components/drawing&quot;),o=t(&quot;./axes&quot;),s=t(&quot;./constants&quot;).attrRegex;e.exports=function(t,e,r,l){var c=t._fullLayout,u=[];var f,h,p,d,g=function(t){var e,r,n,i,a={};for(e in t)if((r=e.split(&quot;.&quot;))[0].match(s)){var o=e.charAt(0),l=r[0];if(n=c[l],i={},Array.isArray(t[e])?i.to=t[e].slice(0):Array.isArray(t[e].range)&amp;&amp;(i.to=t[e].range.slice(0)),!i.to)continue;i.axisName=l,i.length=n._length,u.push(o),a[o]=i}return a}(e),m=Object.keys(g),v=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(-1===s.indexOf(l)){var c=l.xaxis._id,u=l.yaxis._id,f=l.xaxis.range,h=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[c]?r[c].to:f,a=r[u]?r[u].to:h,f[0]===i[0]&amp;&amp;f[1]===i[1]&amp;&amp;h[0]===a[0]&amp;&amp;h[1]===a[1]||-1===e.indexOf(c)&amp;&amp;-1===e.indexOf(u)||s.push(l)}}return s}(c,m,g);if(!v.length)return function(){function e(e,r,n){for(var i=0;i&lt;e.length;i++)if(r(t,i),n)return}e(c.annotations||[],i.getComponentMethod(&quot;annotations&quot;,&quot;drawOne&quot;)),e(c.shapes||[],i.getComponentMethod(&quot;shapes&quot;,&quot;drawOne&quot;)),e(c.images||[],i.getComponentMethod(&quot;images&quot;,&quot;draw&quot;),!0)}(),!1;function y(t){var e=t.xaxis,r=t.yaxis;c._defs.select(&quot;#&quot;+t.clipId+&quot;&gt; rect&quot;).call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(&quot;.scatterlayer .trace&quot;);n.selectAll(&quot;.point&quot;).call(a.setPointGroupScale,1,1),n.selectAll(&quot;.textpoint&quot;).call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function x(e,r){var n,s,l,u=g[e.xaxis._id],f=g[e.yaxis._id],h=[];if(u){s=(n=t._fullLayout[u.axisName])._r,l=u.to,h[0]=(s[0]*(1-r)+r*l[0]-s[0])/(s[1]-s[0])*e.xaxis._length;var p=s[1]-s[0],d=l[1]-l[0];n.range[0]=s[0]*(1-r)+r*l[0],n.range[1]=s[1]*(1-r)+r*l[1],h[2]=e.xaxis._length*(1-r+r*d/p)}else h[0]=0,h[2]=e.xaxis._length;if(f){s=(n=t._fullLayout[f.axisName])._r,l=f.to,h[1]=(s[1]*(1-r)+r*l[1]-s[1])/(s[0]-s[1])*e.yaxis._length;var m=s[1]-s[0],v=l[1]-l[0];n.range[0]=s[0]*(1-r)+r*l[0],n.range[1]=s[1]*(1-r)+r*l[1],h[3]=e.yaxis._length*(1-r+r*v/m)}else h[1]=0,h[3]=e.yaxis._length;!function(e,r){var n,a=[];for(a=[e._id,r._id],n=0;n&lt;a.length;n++)o.doTicksSingle(t,a[n],!0);function s(e,r,i){for(n=0;n&lt;e.length;n++){var o=e[n];if(-1===a.indexOf(o.xref)&amp;&amp;-1===a.indexOf(o.yref)||r(t,n),i)return}}s(c.annotations||[],i.getComponentMethod(&quot;annotations&quot;,&quot;drawOne&quot;)),s(c.shapes||[],i.getComponentMethod(&quot;shapes&quot;,&quot;drawOne&quot;)),s(c.images||[],i.getComponentMethod(&quot;images&quot;,&quot;draw&quot;),!0)}(e.xaxis,e.yaxis);var y=e.xaxis,x=e.yaxis,b=!!u,_=!!f,w=b?y._length/h[2]:1,k=_?x._length/h[3]:1,M=b?h[0]:0,A=_?h[1]:0,T=b?h[0]/h[2]*y._length:0,S=_?h[1]/h[3]*x._length:0,E=y._offset-T,C=x._offset-S;e.clipRect.call(a.setTranslate,M,A).call(a.setScale,1/w,1/k),e.plot.call(a.setTranslate,E,C).call(a.setScale,w,k),a.setPointGroupScale(e.zoomScalePts,1/w,1/k),a.setTextPointsScale(e.zoomScaleTxt,1/w,1/k)}l&amp;&amp;(f=l());var b=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,function(){for(var e={},r=0;r&lt;m.length;r++){var n=t._fullLayout[m[r]+&quot;axis&quot;];e[n._name+&quot;.range[0]&quot;]=n.range[0],e[n._name+&quot;.range[1]&quot;]=n.range[1],n.range=n._r.slice()}return i.call(&quot;relayout&quot;,t,e).then(function(){for(var t=0;t&lt;v.length;t++)y(v[t])})}()}),h=Date.now(),d=window.requestAnimationFrame(function e(){p=Date.now();for(var n=Math.min(1,(p-h)/r.duration),a=b(n),o=0;o&lt;v.length;o++)x(v[o],a);p-h&gt;r.duration?(function(){for(var e={},r=0;r&lt;m.length;r++){var n=t._fullLayout[g[m[r]].axisName],a=g[m[r]].to;e[n._name+&quot;.range[0]&quot;]=a[0],e[n._name+&quot;.range[1]&quot;]=a[1],n.range=a.slice()}f&amp;&amp;f(),i.call(&quot;relayout&quot;,t,e).then(function(){for(var t=0;t&lt;v.length;t++)y(v[t])})}(),d=window.cancelAnimationFrame(e)):d=window.requestAnimationFrame(e)}),Promise.resolve()}},{&quot;../../components/drawing&quot;:592,&quot;../../registry&quot;:825,&quot;./axes&quot;:742,&quot;./constants&quot;:747,d3:147}],765:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;./axis_autotype&quot;);function a(t){return{v:&quot;x&quot;,h:&quot;y&quot;}[t.orientation||&quot;v&quot;]}function o(t,e){var r=a(t),i=n.traceIs(t,&quot;box-violin&quot;),o=n.traceIs(t._fullInput||{},&quot;candlestick&quot;);return i&amp;&amp;!o&amp;&amp;e===r&amp;&amp;void 0===t[r]&amp;&amp;void 0===t[r+&quot;0&quot;]}e.exports=function(t,e,r,s){&quot;-&quot;===r(&quot;type&quot;,(s.splomStash||{}).type)&amp;&amp;(!function(t,e){if(&quot;-&quot;!==t.type)return;var r=t._id,s=r.charAt(0);-1!==r.indexOf(&quot;scene&quot;)&amp;&amp;(r=s);var l=function(t,e,r){for(var n=0;n&lt;t.length;n++){var i=t[n];if(&quot;splom&quot;===i.type&amp;&amp;i._length&gt;0&amp;&amp;(i[&quot;_&quot;+r+&quot;axes&quot;]||{})[e])return i;if((i[r+&quot;axis&quot;]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+&quot;0&quot;])return i}}}(e,r,s);if(!l)return;if(&quot;histogram&quot;===l.type&amp;&amp;s==={v:&quot;y&quot;,h:&quot;x&quot;}[l.orientation||&quot;v&quot;])return void(t.type=&quot;linear&quot;);var c,u=s+&quot;calendar&quot;,f=l[u];if(o(l,s)){var h=a(l),p=[];for(c=0;c&lt;e.length;c++){var d=e[c];n.traceIs(d,&quot;box-violin&quot;)&amp;&amp;(d[s+&quot;axis&quot;]||s)===r&amp;&amp;(void 0!==d[h]?p.push(d[h][0]):void 0!==d.name?p.push(d.name):p.push(&quot;text&quot;),d[u]!==f&amp;&amp;(f=void 0))}t.type=i(p,f)}else if(&quot;splom&quot;===l.type){var g=l.dimensions,m=l._diag;for(c=0;c&lt;g.length;c++){var v=g[c];if(v.visible&amp;&amp;(m[c][0]===r||m[c][1]===r)){t.type=i(v.values,f);break}}}else t.type=i(l[s]||[l[s+&quot;0&quot;]],f)}(e,s.data),&quot;-&quot;===e.type?e.type=&quot;linear&quot;:t.type=e.type)}},{&quot;../../registry&quot;:825,&quot;./axis_autotype&quot;:743}],766:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../registry&quot;),i=t(&quot;../lib&quot;);function a(t,e,r){var n,a,o,s=!1;if(&quot;data&quot;===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if(&quot;layout&quot;!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&amp;&amp;o[e.prop]!==a&amp;&amp;(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if(&quot;string&quot;==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,function(t,e,n){r.push({type:&quot;layout&quot;,prop:t,value:n})},&quot;&quot;,0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},&quot;string&quot;==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&amp;&amp;(r=a)}return void 0===r&amp;&amp;(r=null),l(o,function(e,n,i){var a;if(Array.isArray(i)){var o=Math.min(i.length,t.data.length);r&amp;&amp;(o=Math.min(o,r.length)),a=[];for(var l=0;l&lt;o;l++)a[l]=r?r[l]:l}else a=r?r.slice(0):null;if(null===a)Array.isArray(i)&amp;&amp;(i=i[0]);else if(Array.isArray(a)){if(!Array.isArray(i)){var c=i;i=[];for(var u=0;u&lt;a.length;u++)i[u]=c}i.length=Math.min(a.length,i.length)}s.push({type:&quot;data&quot;,prop:e,traces:a,value:i})},&quot;&quot;,0),s}function l(t,e,r,n){Object.keys(t).forEach(function(a){var o=t[a];if(&quot;_&quot;!==a[0]){var s=r+(n&gt;0?&quot;.&quot;:&quot;&quot;)+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}})}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&amp;&amp;e._commandObserver&amp;&amp;(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&amp;&amp;e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&amp;&amp;o&amp;&amp;void 0!==s.lookupTable[e.value]&amp;&amp;(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=[&quot;plotly_relayout&quot;,&quot;plotly_redraw&quot;,&quot;plotly_restyle&quot;,&quot;plotly_update&quot;,&quot;plotly_animatingframe&quot;,&quot;plotly_afterplot&quot;],f=0;f&lt;u.length;f++)t._internalOn(u[f],s.check);s.remove=function(){for(var e=0;e&lt;u.length;e++)t._removeInternalListener(u[e],s.check)}}else i.log(&quot;Unable to automatically bind plot updates to API command&quot;),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},e&amp;&amp;(e._commandObserver=s),s},r.hasSimpleAPICommandBindings=function(t,e,n){var i,a,o=e.length;for(i=0;i&lt;o;i++){var s,l=e[i],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var f=r.computeAPICommandBindings(t,c,u);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h&lt;a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&amp;&amp;a.traces.sort();var p=(s=f[0]).value;if(Array.isArray(p)){if(1!==p.length)return!1;p=p[0]}n&amp;&amp;(n[p]=i)}return a},r.executeAPICommand=function(t,e,r){if(&quot;skip&quot;===e)return Promise.resolve();var a=n.apiMethodRegistry[e],o=[t];Array.isArray(r)||(r=[]);for(var s=0;s&lt;r.length;s++)o.push(r[s]);return a.apply(null,o).catch(function(t){return i.warn(&quot;API call to Plotly.&quot;+e+&quot; rejected.&quot;,t),Promise.reject(t)})},r.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case&quot;restyle&quot;:n=s(t,r);break;case&quot;relayout&quot;:n=o(t,r);break;case&quot;update&quot;:n=s(t,[r[0],r[2]]).concat(o(t,[r[1]]));break;case&quot;animate&quot;:n=function(t,e){return Array.isArray(e[0])&amp;&amp;1===e[0].length&amp;&amp;-1!==[&quot;string&quot;,&quot;number&quot;].indexOf(typeof e[0][0])?[{type:&quot;layout&quot;,prop:&quot;_currentFrame&quot;,value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},{&quot;../lib&quot;:693,&quot;../registry&quot;:825}],767:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib/extend&quot;).extendFlat;r.attributes=function(t,e){e=e||{};var r={valType:&quot;info_array&quot;,editType:(t=t||{}).editType,items:[{valType:&quot;number&quot;,min:0,max:1,editType:t.editType},{valType:&quot;number&quot;,min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&amp;&amp;t.name,t.trace,e.description&amp;&amp;e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:&quot;integer&quot;,min:0,dflt:0,editType:t.editType},i.column={valType:&quot;integer&quot;,min:0,dflt:0,editType:t.editType}),i},r.defaults=function(t,e,r,n){var i=n&amp;&amp;n.x||[0,1],a=n&amp;&amp;n.y||[0,1],o=e.grid;if(o){var s=r(&quot;domain.column&quot;);void 0!==s&amp;&amp;(s&lt;o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r(&quot;domain.row&quot;);void 0!==l&amp;&amp;(l&lt;o.rows?a=o._domains.y[l]:delete t.domain.row)}r(&quot;domain.x&quot;,i),r(&quot;domain.y&quot;,a)}},{&quot;../lib/extend&quot;:682}],768:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&amp;&amp;(r=e);var n={family:{valType:&quot;string&quot;,noBlank:!0,strict:!0,editType:e},size:{valType:&quot;number&quot;,min:1,editType:e},color:{valType:&quot;color&quot;,editType:r},editType:e};return t.arrayOk&amp;&amp;(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],769:[function(t,e,r){&quot;use strict&quot;;e.exports={_isLinkedToArray:&quot;frames_entry&quot;,group:{valType:&quot;string&quot;},name:{valType:&quot;string&quot;},traces:{valType:&quot;any&quot;},baseframe:{valType:&quot;string&quot;},data:{valType:&quot;any&quot;},layout:{valType:&quot;any&quot;}}},{}],770:[function(t,e,r){&quot;use strict&quot;;r.projNames={equirectangular:&quot;equirectangular&quot;,mercator:&quot;mercator&quot;,orthographic:&quot;orthographic&quot;,&quot;natural earth&quot;:&quot;naturalEarth&quot;,kavrayskiy7:&quot;kavrayskiy7&quot;,miller:&quot;miller&quot;,robinson:&quot;robinson&quot;,eckert4:&quot;eckert4&quot;,&quot;azimuthal equal area&quot;:&quot;azimuthalEqualArea&quot;,&quot;azimuthal equidistant&quot;:&quot;azimuthalEquidistant&quot;,&quot;conic equal area&quot;:&quot;conicEqualArea&quot;,&quot;conic conformal&quot;:&quot;conicConformal&quot;,&quot;conic equidistant&quot;:&quot;conicEquidistant&quot;,gnomonic:&quot;gnomonic&quot;,stereographic:&quot;stereographic&quot;,mollweide:&quot;mollweide&quot;,hammer:&quot;hammer&quot;,&quot;transverse mercator&quot;:&quot;transverseMercator&quot;,&quot;albers usa&quot;:&quot;albersUsa&quot;,&quot;winkel tripel&quot;:&quot;winkel3&quot;,aitoff:&quot;aitoff&quot;,sinusoidal:&quot;sinusoidal&quot;},r.axesNames=[&quot;lonaxis&quot;,&quot;lataxis&quot;],r.lonaxisSpan={orthographic:180,&quot;azimuthal equal area&quot;:360,&quot;azimuthal equidistant&quot;:360,&quot;conic conformal&quot;:180,gnomonic:160,stereographic:180,&quot;transverse mercator&quot;:180,&quot;*&quot;:360},r.lataxisSpan={&quot;conic conformal&quot;:150,stereographic:179.5,&quot;*&quot;:180},r.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:&quot;equirectangular&quot;,projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:&quot;albers usa&quot;},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:&quot;conic conformal&quot;,projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:&quot;mercator&quot;,projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:&quot;mercator&quot;,projRotate:[0,0,0]},&quot;north america&quot;:{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:&quot;conic conformal&quot;,projRotate:[-100,0,0],projParallels:[29.5,45.5]},&quot;south america&quot;:{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:&quot;mercator&quot;,projRotate:[0,0,0]}},r.clipPad=.001,r.precision=.1,r.landColor=&quot;#F0DC82&quot;,r.waterColor=&quot;#3399FF&quot;,r.locationmodeToLayer={&quot;ISO-3&quot;:&quot;countries&quot;,&quot;USA-states&quot;:&quot;subunits&quot;,&quot;country names&quot;:&quot;countries&quot;},r.sphereSVG={type:&quot;Sphere&quot;},r.fillLayers={ocean:1,land:1,lakes:1},r.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},r.layers=[&quot;bg&quot;,&quot;ocean&quot;,&quot;land&quot;,&quot;lakes&quot;,&quot;subunits&quot;,&quot;countries&quot;,&quot;coastlines&quot;,&quot;rivers&quot;,&quot;lataxis&quot;,&quot;lonaxis&quot;,&quot;frame&quot;,&quot;backplot&quot;,&quot;frontplot&quot;],r.layersForChoropleth=[&quot;bg&quot;,&quot;ocean&quot;,&quot;land&quot;,&quot;subunits&quot;,&quot;countries&quot;,&quot;coastlines&quot;,&quot;lataxis&quot;,&quot;lonaxis&quot;,&quot;frame&quot;,&quot;backplot&quot;,&quot;rivers&quot;,&quot;lakes&quot;,&quot;frontplot&quot;],r.layerNameToAdjective={ocean:&quot;ocean&quot;,land:&quot;land&quot;,lakes:&quot;lake&quot;,subunits:&quot;subunit&quot;,countries:&quot;country&quot;,coastlines:&quot;coastline&quot;,rivers:&quot;river&quot;,frame:&quot;frame&quot;}},{}],771:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../../components/color&quot;),s=t(&quot;../../components/drawing&quot;),l=t(&quot;../../components/fx&quot;),c=t(&quot;../plots&quot;),u=t(&quot;../cartesian/axes&quot;),f=t(&quot;../../components/dragelement&quot;),h=t(&quot;../cartesian/select&quot;).prepSelect,p=t(&quot;../cartesian/select&quot;).selectOnClick,d=t(&quot;./zoom&quot;),g=t(&quot;./constants&quot;),m=t(&quot;../../lib/topojson_utils&quot;),v=t(&quot;topojson-client&quot;).feature;function y(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}t(&quot;./projections&quot;)(n);var x=y.prototype;e.exports=function(t){return new y(t)},x.plot=function(t,e,r){var n=this,i=e[this.id],a=m.getTopojsonName(i);null===n.topojson||a!==n.topojsonName?(n.topojsonName=a,void 0===PlotlyGeoAssets.topojson[n.topojsonName]?r.push(n.fetchTopojson().then(function(r){PlotlyGeoAssets.topojson[n.topojsonName]=r,n.topojson=r,n.update(t,e)})):(n.topojson=PlotlyGeoAssets.topojson[n.topojsonName],n.update(t,e))):n.update(t,e)},x.fetchTopojson=function(){var t=m.getTopojsonPath(this.topojsonURL,this.topojsonName);return new Promise(function(e,r){n.json(t,function(n,i){if(n)return 404===n.status?r(new Error([&quot;plotly.js could not find topojson file at&quot;,t,&quot;.&quot;,&quot;Make sure the *topojsonURL* plot config option&quot;,&quot;is set properly.&quot;].join(&quot; &quot;))):r(new Error([&quot;unexpected error while fetching topojson file at&quot;,t].join(&quot; &quot;)));e(i)})})},x.update=function(t,e){var r=e[this.id];if(!this.updateProjection(e,r)){this.hasChoropleth=!1;for(var n=0;n&lt;t.length;n++)if(&quot;choropleth&quot;===t[n][0].trace.type){this.hasChoropleth=!0;break}this.viewInitial||this.saveViewInitial(r),this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),c.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var i=this.layers.frontplot.select(&quot;.scatterlayer&quot;);this.dataPoints.point=i.selectAll(&quot;.point&quot;),this.dataPoints.text=i.selectAll(&quot;text&quot;),this.dataPaths.line=i.selectAll(&quot;.js-line&quot;);var a=this.layers.backplot.select(&quot;.choroplethlayer&quot;);this.dataPaths.choropleth=a.selectAll(&quot;path&quot;),this.render()}},x.updateProjection=function(t,e){var r=t._size,o=e.domain,s=e.projection,l=s.rotation||{},c=e.center||{},u=this.projection=function(t){for(var e=t.projection.type,r=n.geo[g.projNames[e]](),i=t._isClipped?g.lonaxisSpan[e]/2:null,a=[&quot;center&quot;,&quot;rotate&quot;,&quot;parallels&quot;,&quot;clipExtent&quot;],o=function(t){return t?r:[]},s=0;s&lt;a.length;s++){var l=a[s];&quot;function&quot;!=typeof r[l]&amp;&amp;(r[l]=o)}r.isLonLatOverEdges=function(t){if(null===r(t))return!0;if(i){var e=r.rotate();return n.geo.distance(t,[-e[0],-e[1]])&gt;i*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&amp;&amp;r.clipExtent();r.scale(150).translate([0,0]),a&amp;&amp;r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&amp;&amp;r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(g.precision),i&amp;&amp;r.clipAngle(i-g.clipPad);return r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var f=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],h=e.lonaxis,p=e.lataxis,d=function(t,e){var r=g.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n&gt;0&amp;&amp;i&lt;0&amp;&amp;(i+=360);var s=(i-n)/4;return{type:&quot;Polygon&quot;,coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}(h.range,p.range);u.fitExtent(f,d);var m=this.bounds=u.getBounds(d),v=this.fitScale=u.scale(),y=u.translate();if(!isFinite(m[0][0])||!isFinite(m[0][1])||!isFinite(m[1][0])||!isFinite(m[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=[&quot;projection.rotation&quot;,&quot;center&quot;,&quot;lonaxis.range&quot;,&quot;lataxis.range&quot;],_=&quot;Invalid geo settings, relayout'ing to default view.&quot;,w={},k=0;k&lt;b.length;k++)w[this.id+&quot;.&quot;+b[k]]=null;return this.viewInitial=null,a.warn(_),x._promises.push(i.call(&quot;relayout&quot;,x,w)),_}var M=this.midPt=[(m[0][0]+m[1][0])/2,(m[0][1]+m[1][1])/2];if(u.scale(s.scale*v).translate([y[0]+(M[0]-y[0]),y[1]+(M[1]-y[1])]).clipExtent(m),e._isAlbersUsa){var A=u([c.lon,c.lat]),T=u.translate();u.translate([T[0]-(A[0]-T[0]),T[1]-(A[1]-T[1])])}},x.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,l=r.basePaths;function c(t){return&quot;lonaxis&quot;===t||&quot;lataxis&quot;===t}function u(t){return Boolean(g.lineLayers[t])}function f(t){return Boolean(g.fillLayers[t])}var h=(this.hasChoropleth?g.layersForChoropleth:g.layers).filter(function(t){return u(t)||f(t)?e[&quot;show&quot;+t]:!c(t)||e[t].showgrid}),p=r.framework.selectAll(&quot;.layer&quot;).data(h,String);p.exit().each(function(t){delete a[t],delete l[t],n.select(this).remove()}),p.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return&quot;layer &quot;+t}).each(function(t){var e=a[t]=n.select(this);&quot;bg&quot;===t?r.bgRect=e.append(&quot;rect&quot;).style(&quot;pointer-events&quot;,&quot;all&quot;):c(t)?l[t]=e.append(&quot;path&quot;).style(&quot;fill&quot;,&quot;none&quot;):&quot;backplot&quot;===t?e.append(&quot;g&quot;).classed(&quot;choroplethlayer&quot;,!0):&quot;frontplot&quot;===t?e.append(&quot;g&quot;).classed(&quot;scatterlayer&quot;,!0):u(t)?l[t]=e.append(&quot;path&quot;).style(&quot;fill&quot;,&quot;none&quot;).style(&quot;stroke-miterlimit&quot;,2):f(t)&amp;&amp;(l[t]=e.append(&quot;path&quot;).style(&quot;stroke&quot;,&quot;none&quot;))}),p.order(),p.each(function(t){var r=l[t],a=g.layerNameToAdjective[t];&quot;frame&quot;===t?r.datum(g.sphereSVG):u(t)||f(t)?r.datum(v(i,i.objects[t])):c(t)&amp;&amp;r.datum(function(t,e){var r=e[t].dtick,i=g.scopeDefaults[e.scope],a=i.lonaxisRange,o=i.lataxisRange,s=&quot;lonaxis&quot;===t?[r]:[0,r];return n.geo.graticule().extent([[a[0],o[0]],[a[1],o[1]]]).step(s)}(t,e)).call(o.stroke,e[t].gridcolor).call(s.dashLine,&quot;&quot;,e[t].gridwidth),u(t)?r.call(o.stroke,e[a+&quot;color&quot;]).call(s.dashLine,&quot;&quot;,e[a+&quot;width&quot;]):f(t)&amp;&amp;r.call(o.fill,e[a+&quot;color&quot;])})},x.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,l=r[1][0]-i+n,c=r[1][1]-a+n;s.setRect(this.clipRect,i,a,l,c),this.bgRect.call(s.setRect,i,a,l,c).call(o.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=l,this.yaxis._offset=a,this.yaxis._length=c},x.updateFx=function(t,e){var r=this,a=r.graphDiv,o=r.bgRect,s=t.dragmode,c=t.clickmode;if(!r.isStatic){var u;&quot;select&quot;===s?u=function(t,e){(t.range={})[r.id]=[m([e.xmin,e.ymin]),m([e.xmax,e.ymax])]}:&quot;lasso&quot;===s&amp;&amp;(u=function(t,e,n){(t.lassoPoints={})[r.id]=n.filtered.map(m)});var g={element:r.bgRect.node(),gd:a,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(e){2===e&amp;&amp;t._zoomlayer.selectAll(&quot;.select-outline&quot;).remove()}};&quot;pan&quot;===s?(o.node().onmousedown=null,o.call(d(r,e)),o.on(&quot;dblclick.zoom&quot;,function(){var t=r.viewInitial,e={};for(var n in t)e[r.id+&quot;.&quot;+n]=t[n];i.call(&quot;relayout&quot;,a,e),a.emit(&quot;plotly_doubleclick&quot;,null)})):&quot;select&quot;!==s&amp;&amp;&quot;lasso&quot;!==s||(o.on(&quot;.zoom&quot;,null),g.prepFn=function(t,e,r){h(t,e,r,g,s)},f.init(g)),o.on(&quot;mousemove&quot;,function(){var t=r.projection.invert(n.mouse(this));if(!t||isNaN(t[0])||isNaN(t[1]))return f.unhover(a,n.event);r.xaxis.p2c=function(){return t[0]},r.yaxis.p2c=function(){return t[1]},l.hover(a,n.event,r.id)}),o.on(&quot;mouseout&quot;,function(){a._dragging||f.unhover(a,n.event)}),o.on(&quot;click&quot;,function(){&quot;select&quot;!==s&amp;&amp;&quot;lasso&quot;!==s&amp;&amp;(c.indexOf(&quot;select&quot;)&gt;-1&amp;&amp;p(n.event,a,[r.xaxis],[r.yaxis],r.id,g),c.indexOf(&quot;event&quot;)&gt;-1&amp;&amp;l.click(a,n.event))})}function m(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},x.makeFramework=function(){var t=this,e=t.graphDiv._fullLayout,r=&quot;clip&quot;+e._uid+t.id;t.clipDef=e._clips.append(&quot;clipPath&quot;).attr(&quot;id&quot;,r),t.clipRect=t.clipDef.append(&quot;rect&quot;),t.framework=n.select(t.container).append(&quot;g&quot;).attr(&quot;class&quot;,&quot;geo &quot;+t.id).call(s.setClipUrl,r),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:&quot;x&quot;,c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:&quot;y&quot;,c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:&quot;linear&quot;,showexponent:&quot;all&quot;,exponentformat:&quot;B&quot;},u.setConvert(t.mockAxis,e)},x.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={&quot;center.lon&quot;:e.lon,&quot;center.lat&quot;:e.lat,&quot;projection.scale&quot;:r.scale}:t._isClipped?this.viewInitial={&quot;projection.scale&quot;:r.scale,&quot;projection.rotation.lon&quot;:n.lon,&quot;projection.rotation.lat&quot;:n.lat}:this.viewInitial={&quot;center.lon&quot;:e.lon,&quot;center.lat&quot;:e.lat,&quot;projection.scale&quot;:r.scale,&quot;projection.rotation.lon&quot;:n.lon}},x.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?&quot;translate(&quot;+r[0]+&quot;,&quot;+r[1]+&quot;)&quot;:null}function i(t){return e.isLonLatOverEdges(t.lonlat)?&quot;none&quot;:null}for(t in this.basePaths)this.basePaths[t].attr(&quot;d&quot;,r);for(t in this.dataPaths)this.dataPaths[t].attr(&quot;d&quot;,function(t){return r(t.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr(&quot;display&quot;,i).attr(&quot;transform&quot;,n)}},{&quot;../../components/color&quot;:567,&quot;../../components/dragelement&quot;:589,&quot;../../components/drawing&quot;:592,&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../../lib/topojson_utils&quot;:721,&quot;../../registry&quot;:825,&quot;../cartesian/axes&quot;:742,&quot;../cartesian/select&quot;:759,&quot;../plots&quot;:805,&quot;./constants&quot;:770,&quot;./projections&quot;:776,&quot;./zoom&quot;:777,d3:147,&quot;topojson-client&quot;:514}],772:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./geo&quot;),i=t(&quot;../../plots/get_data&quot;).getSubplotCalcData,a=t(&quot;../../lib&quot;).counterRegex,o=&quot;geo&quot;;r.name=o,r.attr=o,r.idRoot=o,r.idRegex=r.attrRegex=a(o),r.attributes=t(&quot;./layout/attributes&quot;),r.layoutAttributes=t(&quot;./layout/layout_attributes&quot;),r.supplyLayoutDefaults=t(&quot;./layout/defaults&quot;),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.geo;void 0===window.PlotlyGeoAssets&amp;&amp;(window.PlotlyGeoAssets={topojson:{}});for(var s=0;s&lt;a.length;s++){var l=a[s],c=i(r,o,l),u=e[l]._subplot;u||(u=n({id:l,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[l]._subplot=u),u.plot(c,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.geo||[],a=0;a&lt;i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&amp;&amp;s&amp;&amp;(s.framework.remove(),s.clipDef.remove())}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.geo,n=0;n&lt;r.length;n++){var i=e[r[n]];i._subplot.updateFx(e,i)}}},{&quot;../../lib&quot;:693,&quot;../../plots/get_data&quot;:778,&quot;./geo&quot;:771,&quot;./layout/attributes&quot;:773,&quot;./layout/defaults&quot;:774,&quot;./layout/layout_attributes&quot;:775}],773:[function(t,e,r){&quot;use strict&quot;;e.exports={geo:{valType:&quot;subplotid&quot;,dflt:&quot;geo&quot;,editType:&quot;calc&quot;}}},{}],774:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../subplot_defaults&quot;),i=t(&quot;../constants&quot;),a=t(&quot;./layout_attributes&quot;),o=i.axesNames;function s(t,e,r){var n=r(&quot;resolution&quot;),a=r(&quot;scope&quot;),s=i.scopeDefaults[a],l=r(&quot;projection.type&quot;,s.projType),c=e._isAlbersUsa=&quot;albers usa&quot;===l;c&amp;&amp;(a=e.scope=&quot;usa&quot;);var u=e._isScoped=&quot;world&quot;!==a,f=e._isConic=-1!==l.indexOf(&quot;conic&quot;);e._isClipped=!!i.lonaxisSpan[l];for(var h=0;h&lt;o.length;h++){var p,d=o[h],g=[30,10][h];if(u)p=s[d+&quot;Range&quot;];else{var m=i[d+&quot;Span&quot;],v=(m[l]||m[&quot;*&quot;])/2,y=r(&quot;projection.rotation.&quot;+d.substr(0,3),s.projRotate[h]);p=[y-v,y+v]}var x=r(d+&quot;.range&quot;,p);r(d+&quot;.tick0&quot;,x[0]),r(d+&quot;.dtick&quot;,g),r(d+&quot;.showgrid&quot;)&amp;&amp;(r(d+&quot;.gridcolor&quot;),r(d+&quot;.gridwidth&quot;))}var b=e.lonaxis.range,_=e.lataxis.range,w=b[0],k=b[1];w&gt;0&amp;&amp;k&lt;0&amp;&amp;(k+=360);var M,A,T,S=(w+k)/2;if(!c){var E=u?s.projRotate:[S,0,0];M=r(&quot;projection.rotation.lon&quot;,E[0]),r(&quot;projection.rotation.lat&quot;,E[1]),r(&quot;projection.rotation.roll&quot;,E[2]),r(&quot;showcoastlines&quot;,!u)&amp;&amp;(r(&quot;coastlinecolor&quot;),r(&quot;coastlinewidth&quot;)),r(&quot;showocean&quot;)&amp;&amp;r(&quot;oceancolor&quot;)}(c?(A=-96.6,T=38.7):(A=u?S:M,T=(_[0]+_[1])/2),r(&quot;center.lon&quot;,A),r(&quot;center.lat&quot;,T),f)&amp;&amp;r(&quot;projection.parallels&quot;,s.projParallels||[0,60]);r(&quot;projection.scale&quot;),r(&quot;showland&quot;)&amp;&amp;r(&quot;landcolor&quot;),r(&quot;showlakes&quot;)&amp;&amp;r(&quot;lakecolor&quot;),r(&quot;showrivers&quot;)&amp;&amp;(r(&quot;rivercolor&quot;),r(&quot;riverwidth&quot;)),r(&quot;showcountries&quot;,u&amp;&amp;&quot;usa&quot;!==a)&amp;&amp;(r(&quot;countrycolor&quot;),r(&quot;countrywidth&quot;)),(&quot;usa&quot;===a||&quot;north america&quot;===a&amp;&amp;50===n)&amp;&amp;(r(&quot;showsubunits&quot;,!0),r(&quot;subunitcolor&quot;),r(&quot;subunitwidth&quot;)),u||r(&quot;showframe&quot;,!0)&amp;&amp;(r(&quot;framecolor&quot;),r(&quot;framewidth&quot;)),r(&quot;bgcolor&quot;)}e.exports=function(t,e,r){n(t,e,r,{type:&quot;geo&quot;,attributes:a,handleDefaults:s,partition:&quot;y&quot;})}},{&quot;../../subplot_defaults&quot;:820,&quot;../constants&quot;:770,&quot;./layout_attributes&quot;:775}],775:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../../components/color/attributes&quot;),i=t(&quot;../../domain&quot;).attributes,a=t(&quot;../constants&quot;),o=t(&quot;../../../plot_api/edit_types&quot;).overrideAll,s={range:{valType:&quot;info_array&quot;,items:[{valType:&quot;number&quot;},{valType:&quot;number&quot;}]},showgrid:{valType:&quot;boolean&quot;,dflt:!1},tick0:{valType:&quot;number&quot;},dtick:{valType:&quot;number&quot;},gridcolor:{valType:&quot;color&quot;,dflt:n.lightLine},gridwidth:{valType:&quot;number&quot;,min:0,dflt:1}};e.exports=o({domain:i({name:&quot;geo&quot;},{}),resolution:{valType:&quot;enumerated&quot;,values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:&quot;enumerated&quot;,values:Object.keys(a.scopeDefaults),dflt:&quot;world&quot;},projection:{type:{valType:&quot;enumerated&quot;,values:Object.keys(a.projNames)},rotation:{lon:{valType:&quot;number&quot;},lat:{valType:&quot;number&quot;},roll:{valType:&quot;number&quot;}},parallels:{valType:&quot;info_array&quot;,items:[{valType:&quot;number&quot;},{valType:&quot;number&quot;}]},scale:{valType:&quot;number&quot;,min:0,dflt:1}},center:{lon:{valType:&quot;number&quot;},lat:{valType:&quot;number&quot;}},showcoastlines:{valType:&quot;boolean&quot;},coastlinecolor:{valType:&quot;color&quot;,dflt:n.defaultLine},coastlinewidth:{valType:&quot;number&quot;,min:0,dflt:1},showland:{valType:&quot;boolean&quot;,dflt:!1},landcolor:{valType:&quot;color&quot;,dflt:a.landColor},showocean:{valType:&quot;boolean&quot;,dflt:!1},oceancolor:{valType:&quot;color&quot;,dflt:a.waterColor},showlakes:{valType:&quot;boolean&quot;,dflt:!1},lakecolor:{valType:&quot;color&quot;,dflt:a.waterColor},showrivers:{valType:&quot;boolean&quot;,dflt:!1},rivercolor:{valType:&quot;color&quot;,dflt:a.waterColor},riverwidth:{valType:&quot;number&quot;,min:0,dflt:1},showcountries:{valType:&quot;boolean&quot;},countrycolor:{valType:&quot;color&quot;,dflt:n.defaultLine},countrywidth:{valType:&quot;number&quot;,min:0,dflt:1},showsubunits:{valType:&quot;boolean&quot;},subunitcolor:{valType:&quot;color&quot;,dflt:n.defaultLine},subunitwidth:{valType:&quot;number&quot;,min:0,dflt:1},showframe:{valType:&quot;boolean&quot;},framecolor:{valType:&quot;color&quot;,dflt:n.defaultLine},framewidth:{valType:&quot;number&quot;,min:0,dflt:1},bgcolor:{valType:&quot;color&quot;,dflt:n.background},lonaxis:s,lataxis:s},&quot;plot&quot;,&quot;from-root&quot;)},{&quot;../../../components/color/attributes&quot;:566,&quot;../../../plot_api/edit_types&quot;:725,&quot;../../domain&quot;:767,&quot;../constants&quot;:770}],776:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){function e(t,e){return{type:&quot;Feature&quot;,id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if(&quot;GeometryCollection&quot;===e.type)return{type:&quot;GeometryCollection&quot;,geometries:object.geometries.map(function(t){return r(t,n)})};if(!c.hasOwnProperty(e.type))return null;var i=c[e.type];return t.geo.stream(e,n(i)),i.result()}t.geo.project=function(t,e){var i=e.stream;if(!i)throw new Error(&quot;not yet supported&quot;);return(t&amp;&amp;n.hasOwnProperty(t.type)?n[t.type]:r)(t,i)};var n={Feature:e,FeatureCollection:function(t,r){return{type:&quot;FeatureCollection&quot;,features:t.features.map(function(t){return e(t,r)})}}},i=[],a=[],o={point:function(t,e){i.push([t,e])},result:function(){var t=i.length?i.length&lt;2?{type:&quot;Point&quot;,coordinates:i[0]}:{type:&quot;MultiPoint&quot;,coordinates:i}:null;return i=[],t}},s={lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){i.length&amp;&amp;(a.push(i),i=[])},result:function(){var t=a.length?a.length&lt;2?{type:&quot;LineString&quot;,coordinates:a[0]}:{type:&quot;MultiLineString&quot;,coordinates:a}:null;return a=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){var t=i.length;if(t){do{i.push(i[0].slice())}while(++t&lt;4);a.push(i),i=[]}},polygonEnd:u,result:function(){if(!a.length)return null;var t=[],e=[];return a.forEach(function(r){!function(t){if((e=t.length)&lt;4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++r&lt;e;)n+=t[r-1][1]*t[r][0]-t[r-1][0]*t[r][1];return n&lt;=0}(r)?e.push(r):t.push([r])}),e.forEach(function(e){var r=e[0];t.some(function(t){if(function(t,e){for(var r=e[0],n=e[1],i=!1,a=0,o=t.length,s=o-1;a&lt;o;s=a++){var l=t[a],c=l[0],u=l[1],f=t[s],h=f[0],p=f[1];u&gt;n^p&gt;n&amp;&amp;r&lt;(h-c)*(n-u)/(p-u)+c&amp;&amp;(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),a=[],t.length?t.length&gt;1?{type:&quot;MultiPolygon&quot;,coordinates:t}:{type:&quot;Polygon&quot;,coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var f=1e-6,h=f*f,p=Math.PI,d=p/2,g=(Math.sqrt(p),p/180),m=180/p;function v(t){return t&gt;1?d:t&lt;-1?-d:Math.asin(t)}function y(t){return t&gt;1?0:t&lt;-1?p:Math.acos(t)}var x=t.geo.projection,b=t.geo.projectionMutator;function _(t,e){var r=(2+d)*Math.sin(e);e/=2;for(var n=0,i=1/0;n&lt;10&amp;&amp;Math.abs(i)&gt;f;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,d],[p,0]]],[[[-p,0],[0,-d],[p,0]]]];function i(t,r){for(var i=r&lt;0?-1:1,a=n[+(r&lt;0)],o=0,s=a.length-1;o&lt;s&amp;&amp;t&gt;a[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r&gt;i*a[o][0][1]?a[o][0][1]:r)[0],l}e.invert&amp;&amp;(i.invert=function(t,a){for(var o=r[+(a&lt;0)],s=n[+(a&lt;0)],c=0,u=o.length;c&lt;u;++c){var f=o[c];if(f[0][0]&lt;=t&amp;&amp;t&lt;f[1][0]&amp;&amp;f[0][1]&lt;=a&amp;&amp;a&lt;f[1][1]){var h=e.invert(t-e(s[c][1][0],0)[0],a);return h[0]+=s[c][1][0],l(i(h[0],h[1]),[t,a])?h:null}}});var a=t.geo.projection(i),o=a.stream;function s(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++a&lt;o;){n=((r=t[a])[0]-s[0])/e,i=(r[1]-s[1])/e;for(var c=0;c&lt;e;++c)l.push([s[0]+c*n,s[1]+c*i]);s=r}return l.push(r),l}function l(t,e){return Math.abs(t[0]-e[0])&lt;f&amp;&amp;Math.abs(t[1]-e[1])&lt;f}return a.stream=function(e){var r=a.rotate(),i=o(e),l=(a.rotate([0,0]),o(e));return a.rotate(r),i.sphere=function(){t.geo.stream(function(){for(var e=1e-6,r=[],i=0,a=n[0].length;i&lt;a;++i){var o=n[0][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,f=180*o[2][0]/p,h=180*o[2][1]/p;r.push(s([[l+e,c+e],[l+e,u-e],[f-e,u-e],[f-e,h+e]],30))}for(var i=n[1].length-1;i&gt;=0;--i){var o=n[1][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,f=180*o[2][0]/p,h=180*o[2][1]/p;r.push(s([[f-e,h-e],[f-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:&quot;Polygon&quot;,coordinates:[t.merge(r)]}}(),l)},i},a.lobes=function(t){return arguments.length?(n=t.map(function(t){return t.map(function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]})}),r=n.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a&gt;o&amp;&amp;(r=a,a=o,o=r),[[n,a],[i,o]]})}),a):n.map(function(t){return t.map(function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]})})},a},_.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=v(r),i=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+i)),v((n+r*(i+2))/(2+d))]},(t.geo.eckert4=function(){return x(_)}).raw=_;var w=t.geo.azimuthalEqualArea.raw;function k(t,e){if(arguments.length&lt;2&amp;&amp;(e=t),1===e)return w;if(e===1/0)return M;function r(r,n){var i=w(r/e,n);return i[0]*=t,i}return r.invert=function(r,n){var i=w.invert(r/t,n);return i[0]*=e,i},r}function M(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function A(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function T(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function S(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)&gt;f&amp;&amp;--i&gt;0);return e/2}}M.invert=function(t,e){var r=2*v(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=b(k),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=k,A.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return x(A)}).raw=A,T.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return x(T)}).raw=T,S(p);var E=function(t,e,r){var n=S(r);function i(r,i){return[t*r*Math.cos(i=n(i)),e*Math.sin(i)]}return i.invert=function(n,i){var a=v(i/e);return[n/(t*Math.cos(a)),v((2*a+Math.sin(2*a))/r)]},i}(Math.SQRT2/d,Math.SQRT2,p);function C(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return x(E)}).raw=E,C.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)&gt;f&amp;&amp;--i&gt;0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return x(C)}).raw=C;var L=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function z(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),i=Math.floor(n),a=n-i,o=(r=L[i])[0],s=r[1],l=(r=L[++i])[0],c=r[1],u=(r=L[Math.min(19,++i)])[0],f=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e&gt;0?d:-d)*(c+a*(f-s)/2+a*a*(f-2*c+s)/2)]}function P(t,e){return[t*Math.cos(e),e]}function O(t,e){var r,n=Math.cos(e),i=(r=y(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*i,Math.sin(e)*i]}function I(t,e){var r=O(t,e);return[(r[0]+t/d)/2,(r[1]+e)/2]}L.forEach(function(t){t[1]*=1.0144}),z.invert=function(t,e){var r=e/d,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,p=u/c,v=f*(1-p*f*(1-2*p*f));if(v&gt;=0||1===a){n=(e&gt;=0?5:-5)*(v+i);var y,x=50;do{v=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],n-=(y=(e&gt;=0?d:-d)*(s+v*(l-o)/2+v*v*(l-2*s+o)/2)-e)*m}while(Math.abs(y)&gt;h&amp;&amp;--x&gt;0);break}}while(--a&gt;=0);var b=L[a][0],_=L[a+1][0],w=L[Math.min(19,a+2)][0];return[t/(_+v*(w-b)/2+v*v*(w-2*_+b)/2),n*g]},(t.geo.robinson=function(){return x(z)}).raw=z,P.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return x(P)}).raw=P,O.invert=function(t,e){if(!(t*t+4*e*e&gt;p*p+f)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),h=Math.sin(2*n),d=c*c,g=u*u,m=s*s,v=1-g*l*l,x=v?y(u*l)*Math.sqrt(a=1/v):a=0,b=2*x*u*s-t,_=x*c-e,w=a*(g*m+x*u*l*d),k=a*(.5*o*h-2*x*c*s),M=.25*a*(h*s-x*c*g*o),A=a*(d*l+x*m*u),T=k*M-A*w;if(!T)break;var S=(_*k-b*A)/T,E=(b*M-_*w)/T;r-=S,n-=E}while((Math.abs(S)&gt;f||Math.abs(E)&gt;f)&amp;&amp;--i&gt;0);return[r,n]}},(t.geo.aitoff=function(){return x(O)}).raw=O,I.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,h=Math.sin(r),p=Math.cos(r/2),g=Math.sin(r/2),m=g*g,v=1-u*p*p,x=v?y(o*p)*Math.sqrt(a=1/v):a=0,b=.5*(2*x*o*g+r/d)-t,_=.5*(x*s+n)-e,w=.5*a*(u*m+x*o*p*c)+.5/d,k=a*(h*l/4-x*s*g),M=.125*a*(l*g-x*s*u*h),A=.5*a*(c*p+x*m*o)+.5,T=k*M-A*w,S=(_*k-b*A)/T,E=(b*M-_*w)/T;r-=S,n-=E}while((Math.abs(S)&gt;f||Math.abs(E)&gt;f)&amp;&amp;--i&gt;0);return[r,n]},(t.geo.winkel3=function(){return x(I)}).raw=I}},{}],777:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=Math.PI/180,o=180/Math.PI,s={cursor:&quot;pointer&quot;},l={cursor:&quot;auto&quot;};function c(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function u(t,e,r){var n=t.id,a=t.graphDiv,o=a.layout[n],s=a._fullLayout[n],l={};function c(t,e){var r=i.nestedProperty(s,t);r.get()!==e&amp;&amp;(r.set(e),i.nestedProperty(o,t).set(e),l[n+&quot;.&quot;+t]=e)}r(c),c(&quot;projection.scale&quot;,e.scale()/t.fitScale),a.emit(&quot;plotly_relayout&quot;,l)}function f(t,e){var r=c(0,e);function i(r){var n=e.invert(t.midPt);r(&quot;center.lon&quot;,n[0]),r(&quot;center.lat&quot;,n[1])}return r.on(&quot;zoomstart&quot;,function(){n.select(this).style(s)}).on(&quot;zoom&quot;,function(){e.scale(n.event.scale).translate(n.event.translate),t.render()}).on(&quot;zoomend&quot;,function(){n.select(this).style(l),u(t,e,i)}),r}function h(t,e){var r,i,a,o,f,h,p,d,g,m=c(0,e),v=2;function y(t){return e.invert(t)}function x(r){var n=e.rotate(),i=e.invert(t.midPt);r(&quot;projection.rotation.lon&quot;,-n[0]),r(&quot;center.lon&quot;,i[0]),r(&quot;center.lat&quot;,i[1])}return m.on(&quot;zoomstart&quot;,function(){n.select(this).style(s),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,f=y(r)}).on(&quot;zoom&quot;,function(){if(h=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])&gt;v||Math.abs(n[1]-t[1])&gt;v}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),f?y(h)&amp;&amp;(d=y(h),p=[o[0]+(d[0]-f[0]),i[1],i[2]],e.rotate(p),o=p):f=y(r=h),g=!0,t.render()}).on(&quot;zoomend&quot;,function(){n.select(this).style(l),g&amp;&amp;u(t,e,x)}),m}function p(t,e){var r,i={r:e.rotate(),k:e.scale()},f=c(0,e),h=function(t){var e=0,r=arguments.length,i=[];for(;++e&lt;r;)i.push(arguments[e]);var a=n.dispatch.apply(null,i);return a.of=function(e,r){return function(i){var o;try{o=i.sourceEvent=n.event,i.target=t,n.event=i,a[i.type].apply(e,r)}finally{n.event=o}}},a}(f,&quot;zoomstart&quot;,&quot;zoom&quot;,&quot;zoomend&quot;),p=0,m=f.on;function x(t){var r=e.rotate();t(&quot;projection.rotation.lon&quot;,-r[0]),t(&quot;projection.rotation.lat&quot;,-r[1])}return f.on(&quot;zoomstart&quot;,function(){n.select(this).style(s);var t,l,c,u,x,b,_,w,k,M,A,T=n.mouse(this),S=e.rotate(),E=S,C=e.translate(),L=(l=.5*(t=S)[0]*a,c=.5*t[1]*a,u=.5*t[2]*a,x=Math.sin(l),b=Math.cos(l),_=Math.sin(c),w=Math.cos(c),k=Math.sin(u),M=Math.cos(u),[b*w*M+x*_*k,x*w*M-b*_*k,b*_*M+x*w*k,b*w*k-x*_*M]);r=d(e,T),m.call(f,&quot;zoom&quot;,function(){var t,a,s,l,c,u,f,p,m,x,b=n.mouse(this);if(e.scale(i.k=n.event.scale),r){if(d(e,b)){e.rotate(S).translate(C);var _=d(e,b),w=function(t,e){if(!t||!e)return;var r=function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&amp;&amp;[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}(r,_),k=function(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*o,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*o,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*o]}((a=w,s=(t=L)[0],l=t[1],c=t[2],u=t[3],f=a[0],p=a[1],m=a[2],x=a[3],[s*f-l*p-c*m-u*x,s*p+l*f+c*x-u*m,s*m-l*x+c*f+u*p,s*x+l*m-c*p+u*f])),M=i.r=function(t,e,r){var n=v(e,2,t[0]);n=v(n,1,t[1]),n=v(n,0,t[2]-r[2]);var i,a,s=e[0],l=e[1],c=e[2],u=n[0],f=n[1],h=n[2],p=Math.atan2(l,s)*o,d=Math.sqrt(s*s+l*l);Math.abs(f)&gt;d?(a=(f&gt;0?90:-90)-p,i=0):(a=Math.asin(f/d)*o-p,i=Math.sqrt(d*d-f*f));var m=180-a-2*p,y=(Math.atan2(h,u)-Math.atan2(c,i))*o,x=(Math.atan2(h,u)-Math.atan2(c,-i))*o,b=g(r[0],r[1],a,y),_=g(r[0],r[1],m,x);return b&lt;=_?[a,y,r[2]]:[m,x,r[2]]}(k,r,E);isFinite(M[0])&amp;&amp;isFinite(M[1])&amp;&amp;isFinite(M[2])||(M=E),e.rotate(M),E=M}}else r=d(e,T=b);h.of(this,arguments)({type:&quot;zoom&quot;})}),A=h.of(this,arguments),p++||A({type:&quot;zoomstart&quot;})}).on(&quot;zoomend&quot;,function(){var r;n.select(this).style(l),m.call(f,&quot;zoom&quot;,null),r=h.of(this,arguments),--p||r({type:&quot;zoomend&quot;}),u(t,e,x)}).on(&quot;zoom.redraw&quot;,function(){t.render()}),n.rebind(f,h,&quot;on&quot;)}function d(t,e){var r=t.invert(e);return r&amp;&amp;isFinite(r[0])&amp;&amp;isFinite(r[1])&amp;&amp;function(t){var e=t[0]*a,r=t[1]*a,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function g(t,e,r,n){var i=m(r-t),a=m(n-e);return Math.sqrt(i*i+a*a)}function m(t){return(t%360+540)%360-180}function v(t,e,r){var n=r*a,i=t.slice(),o=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=t[o]*l-t[s]*c,i[s]=t[s]*l+t[o]*c,i}function y(t,e){for(var r=0,n=0,i=t.length;n&lt;i;++n)r+=t[n]*e[n];return r}e.exports=function(t,e){var r=t.projection;return(e._isScoped?f:e._isClipped?p:h)(t,r)}},{&quot;../../lib&quot;:693,d3:147}],778:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../registry&quot;),i=t(&quot;./cartesian/constants&quot;).SUBPLOT_PATTERN;r.getSubplotCalcData=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s&lt;t.length;s++){var l=t[s];l[0].trace[a]===r&amp;&amp;o.push(l)}return o},r.getModuleCalcData=function(t,e){var r,i=[],a=[];if(!(r=&quot;string&quot;==typeof e?n.getModule(e).plot:&quot;function&quot;==typeof e?e:e.plot))return[i,t];for(var o=0;o&lt;t.length;o++){var s=t[o],l=s[0].trace;!0===l.visible&amp;&amp;(l._module.plot===r?i.push(s):a.push(s))}return[i,a]},r.getSubplotData=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,c=[];if(&quot;gl2d&quot;===e){var u=r.match(i);o=&quot;x&quot;+u[1],s=&quot;y&quot;+u[2]}for(var f=0;f&lt;t.length;f++)a=t[f],&quot;gl2d&quot;===e&amp;&amp;n.traceIs(a,&quot;gl2d&quot;)?a[l[0]]===o&amp;&amp;a[l[1]]===s&amp;&amp;c.push(a):a[l]===r&amp;&amp;c.push(a);return c}},{&quot;../registry&quot;:825,&quot;./cartesian/constants&quot;:747}],779:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;mouse-change&quot;),i=t(&quot;mouse-wheel&quot;),a=t(&quot;mouse-event-offset&quot;),o=t(&quot;../cartesian/constants&quot;),s=t(&quot;has-passive-events&quot;);function l(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}e.exports=function(t){var e=t.mouseContainer,r=t.glplot,c=new l(e,r);function u(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function f(e,n,i){var a,s,l=t.calcDataBox(),f=r.viewBox,h=c.lastPos[0],p=c.lastPos[1],d=o.MINDRAG*r.pixelRatio,g=o.MINZOOM*r.pixelRatio;function m(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(l[e]=i,l[e+2]=a,c.dataBox=l,t.setRanges(l)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=f[3]-f[1]-i,t.fullLayout.dragmode){case&quot;zoom&quot;:if(e){var v=n/(f[2]-f[0])*(l[2]-l[0])+l[0],y=i/(f[3]-f[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=v,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=v,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&amp;&amp;c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)&lt;g,b=Math.abs(c.dragStart[1]-i)&lt;g;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i&lt;e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&amp;&amp;b)x&amp;&amp;(c.boxEnd[0]=c.boxStart[0]),b&amp;&amp;(c.boxEnd[1]=c.boxStart[1]);else{a=c.boxEnd[0]-c.boxStart[0],s=c.boxEnd[1]-c.boxStart[1];var _=(l[3]-l[1])/(l[2]-l[0]);Math.abs(a*_)&gt;Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s&gt;=0?1:-1),c.boxEnd[1]&lt;l[1]?(c.boxEnd[1]=l[1],c.boxEnd[0]=c.boxStart[0]+(l[1]-c.boxStart[1])/Math.abs(_)):c.boxEnd[1]&gt;l[3]&amp;&amp;(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a&gt;=0?1:-1),c.boxEnd[0]&lt;l[0]?(c.boxEnd[0]=l[0],c.boxEnd[1]=c.boxStart[1]+(l[0]-c.boxStart[0])*Math.abs(_)):c.boxEnd[0]&gt;l[2]&amp;&amp;(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&amp;&amp;(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&amp;&amp;(m(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&amp;&amp;(c.boxInited=!1);break;case&quot;pan&quot;:c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n)&lt;d&amp;&amp;(n=c.dragStart[0]),Math.abs(c.dragStart[1]-i)&lt;d&amp;&amp;(i=c.dragStart[1]),a=(h-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(p-i)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=a,l[2]+=a,l[1]+=s,l[3]+=s,t.setRanges(l),c.panning=!0,c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations()):c.panning&amp;&amp;(c.panning=!1,t.relayoutCallback())}c.lastPos[0]=n,c.lastPos[1]=i}return c.mouseListener=n(e,f),e.addEventListener(&quot;touchstart&quot;,function(t){var r=a(t.changedTouches[0],e);f(0,r[0],r[1]),f(1,r[0],r[1]),t.preventDefault()},!!s&amp;&amp;{passive:!1}),e.addEventListener(&quot;touchmove&quot;,function(t){t.preventDefault();var r=a(t.changedTouches[0],e);f(1,r[0],r[1]),t.preventDefault()},!!s&amp;&amp;{passive:!1}),e.addEventListener(&quot;touchend&quot;,function(t){f(0,c.lastPos[0],c.lastPos[1]),t.preventDefault()},!!s&amp;&amp;{passive:!1}),c.wheelListener=i(e,function(e,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=r.viewBox,o=c.lastPos[0],s=c.lastPos[1],l=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*l+f,i[2]=(i[2]-f)*l+f,i[1]=(i[1]-h)*l+h,i[3]=(i[3]-h)*l+h,t.setRanges(i),c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0},!0),c}},{&quot;../cartesian/constants&quot;:747,&quot;has-passive-events&quot;:392,&quot;mouse-change&quot;:415,&quot;mouse-event-offset&quot;:416,&quot;mouse-wheel&quot;:418}],780:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../cartesian/axes&quot;),i=t(&quot;../../lib/html2unicode&quot;),a=t(&quot;../../lib/str2rgbarray&quot;);function o(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=[&quot;x&quot;,&quot;y&quot;],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=[&quot;sans-serif&quot;,&quot;sans-serif&quot;],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title=&quot;&quot;,this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont=&quot;sans-serif&quot;,this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=!1,this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var s=o.prototype,l=[&quot;xaxis&quot;,&quot;yaxis&quot;];s.merge=function(t){var e,r,n,o,s,c,u,f,h,p,d;for(this.titleEnable=!1,this.backgroundColor=a(t.plot_bgcolor),p=0;p&lt;2;++p){var g=(e=l[p]).charAt(0);for(n=(r=t[this.scene[e]._name]).title===this.scene.fullLayout._dfltTitle[g]?&quot;&quot;:r.title,d=0;d&lt;=2;d+=2)this.labelEnable[p+d]=!1,this.labels[p+d]=i(n),this.labelColor[p+d]=a(r.titlefont.color),this.labelFont[p+d]=r.titlefont.family,this.labelSize[p+d]=r.titlefont.size,this.labelPad[p+d]=this.getLabelPad(e,r),this.tickEnable[p+d]=!1,this.tickColor[p+d]=a((r.tickfont||{}).color),this.tickAngle[p+d]=&quot;auto&quot;===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[p+d]=this.getTickPad(r),this.tickMarkLength[p+d]=0,this.tickMarkWidth[p+d]=r.tickwidth||0,this.tickMarkColor[p+d]=a(r.tickcolor),this.borderLineEnable[p+d]=!1,this.borderLineColor[p+d]=a(r.linecolor),this.borderLineWidth[p+d]=r.linewidth||0;u=this.hasSharedAxis(r),s=this.hasAxisInDfltPos(e,r)&amp;&amp;!u,c=this.hasAxisInAltrPos(e,r)&amp;&amp;!u,o=r.mirror||!1,f=u?-1!==String(o).indexOf(&quot;all&quot;):!!o,h=u?&quot;allticks&quot;===o:-1!==String(o).indexOf(&quot;ticks&quot;),s?this.labelEnable[p]=!0:c&amp;&amp;(this.labelEnable[p+2]=!0),s?this.tickEnable[p]=r.showticklabels:c&amp;&amp;(this.tickEnable[p+2]=r.showticklabels),(s||f)&amp;&amp;(this.borderLineEnable[p]=r.showline),(c||f)&amp;&amp;(this.borderLineEnable[p+2]=r.showline),(s||h)&amp;&amp;(this.tickMarkLength[p]=this.getTickMarkLength(r)),(c||h)&amp;&amp;(this.tickMarkLength[p+2]=this.getTickMarkLength(r)),this.gridLineEnable[p]=r.showgrid,this.gridLineColor[p]=a(r.gridcolor),this.gridLineWidth[p]=r.gridwidth,this.zeroLineEnable[p]=r.zeroline,this.zeroLineColor[p]=a(r.zerolinecolor),this.zeroLineWidth[p]=r.zerolinewidth}},s.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,t).indexOf(e.id)},s.hasAxisInDfltPos=function(t,e){var r=e.side;return&quot;xaxis&quot;===t?&quot;bottom&quot;===r:&quot;yaxis&quot;===t?&quot;left&quot;===r:void 0},s.hasAxisInAltrPos=function(t,e){var r=e.side;return&quot;xaxis&quot;===t?&quot;top&quot;===r:&quot;yaxis&quot;===t?&quot;right&quot;===r:void 0},s.getLabelPad=function(t,e){var r=e.titlefont.size,n=e.showticklabels;return&quot;xaxis&quot;===t?&quot;top&quot;===e.side?r*(1.5+(n?1:0))-10:r*(1.5+(n?.5:0))-10:&quot;yaxis&quot;===t?&quot;right&quot;===e.side?10+r*(1.5+(n?1:.5)):10+r*(1.5+(n?.5:0)):void 0},s.getTickPad=function(t){return&quot;outside&quot;===t.ticks?10+t.ticklen:15},s.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return&quot;inside&quot;===t.ticks?-e:e},e.exports=function(t){return new o(t)}},{&quot;../../lib/html2unicode&quot;:691,&quot;../../lib/str2rgbarray&quot;:717,&quot;../cartesian/axes&quot;:742}],781:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plot_api/edit_types&quot;).overrideAll,i=t(&quot;./scene2d&quot;),a=t(&quot;../layout_attributes&quot;),o=t(&quot;../../constants/xmlns_namespaces&quot;),s=t(&quot;../cartesian/constants&quot;),l=t(&quot;../cartesian&quot;),c=t(&quot;../../components/fx/layout_attributes&quot;),u=t(&quot;../get_data&quot;).getSubplotData;r.name=&quot;gl2d&quot;,r.attr=[&quot;xaxis&quot;,&quot;yaxis&quot;],r.idRoot=[&quot;x&quot;,&quot;y&quot;],r.idRegex=s.idRegex,r.attrRegex=s.attrRegex,r.attributes=t(&quot;../cartesian/attributes&quot;),r.supplyLayoutDefaults=function(t,e,r){e._has(&quot;cartesian&quot;)||l.supplyLayoutDefaults(t,e,r)},r.layoutAttrOverrides=n(l.layoutAttributes,&quot;plot&quot;,&quot;from-root&quot;),r.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:c.hoverlabel},&quot;plot&quot;,&quot;nested&quot;),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a&lt;n.length;a++){var o=n[a],s=e._plots[o],l=u(r,&quot;gl2d&quot;,o),c=s._scene2d;void 0===c&amp;&amp;(c=new i({id:o,graphDiv:t,container:t.querySelector(&quot;.gl-container&quot;),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=c),c.plot(l,t.calcdata,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a&lt;i.length;a++){var o=i[a],s=n._plots[o];if(s._scene2d)0===u(t,&quot;gl2d&quot;,o).length&amp;&amp;(s._scene2d.destroy(),delete n._plots[o])}l.clean.apply(this,arguments)},r.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n&lt;r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage(&quot;png&quot;);e._glimages.append(&quot;svg:image&quot;).attr({xmlns:o.svg,&quot;xlink:href&quot;:a,x:0,y:0,width:&quot;100%&quot;,height:&quot;100%&quot;,preserveAspectRatio:&quot;none&quot;}),i.destroy()}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n&lt;r.length;n++){e._plots[r[n]]._scene2d.updateFx(e.dragmode)}}},{&quot;../../components/fx/layout_attributes&quot;:610,&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../plot_api/edit_types&quot;:725,&quot;../cartesian&quot;:753,&quot;../cartesian/attributes&quot;:740,&quot;../cartesian/constants&quot;:747,&quot;../get_data&quot;:778,&quot;../layout_attributes&quot;:796,&quot;./scene2d&quot;:782}],782:[function(t,e,r){&quot;use strict&quot;;var n,i,a=t(&quot;../../registry&quot;),o=t(&quot;../../plots/cartesian/axes&quot;),s=t(&quot;../../components/fx&quot;),l=t(&quot;gl-plot2d&quot;),c=t(&quot;gl-spikes2d&quot;),u=t(&quot;gl-select-box&quot;),f=t(&quot;webgl-context&quot;),h=t(&quot;./convert&quot;),p=t(&quot;./camera&quot;),d=t(&quot;../../lib/html2unicode&quot;),g=t(&quot;../../lib/show_no_webgl_msg&quot;),m=t(&quot;../cartesian/constraints&quot;),v=m.enforce,y=m.clean,x=t(&quot;../cartesian/autorange&quot;).doAutoRange,b=[&quot;xaxis&quot;,&quot;yaxis&quot;],_=t(&quot;../cartesian/constants&quot;).SUBPLOT_PATTERN;function w(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context.scrollZoom,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.stopped||(this.glplotOptions=h(this),this.glplotOptions.merge(e),this.glplot=l(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}e.exports=w;var k=w.prototype;k.makeFramework=function(){if(this.staticPlot){if(!(i||(n=document.createElement(&quot;canvas&quot;),i=f({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error(&quot;Error creating static canvas/context for image server&quot;);this.canvas=n,this.gl=i}else{var t=this.container.querySelector(&quot;.gl-canvas-focus&quot;),e=f({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!e)return g(this),void(this.stopped=!0);this.canvas=t,this.gl=e}var r=this.canvas;r.style.width=&quot;100%&quot;,r.style.height=&quot;100%&quot;,r.style.position=&quot;absolute&quot;,r.style.top=&quot;0px&quot;,r.style.left=&quot;0px&quot;,r.style[&quot;pointer-events&quot;]=&quot;none&quot;,this.updateSize(r),r.className+=&quot; user-select-none&quot;;var a=this.svgContainer=document.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;svg&quot;);a.style.position=&quot;absolute&quot;,a.style.top=a.style.left=&quot;0px&quot;,a.style.width=a.style.height=&quot;100%&quot;,a.style[&quot;z-index&quot;]=20,a.style[&quot;pointer-events&quot;]=&quot;none&quot;;var o=this.mouseContainer=document.createElement(&quot;div&quot;);o.style.position=&quot;absolute&quot;,o.style[&quot;pointer-events&quot;]=&quot;auto&quot;,this.pickCanvas=this.container.querySelector(&quot;.gl-canvas-pick&quot;);var s=this.container;s.appendChild(a),s.appendChild(o);var l=this;o.addEventListener(&quot;mouseout&quot;,function(){l.isMouseOver=!1,l.unhover()}),o.addEventListener(&quot;mouseover&quot;,function(){l.isMouseOver=!0})},k.toImage=function(t){t||(t=&quot;png&quot;),this.stopped=!0,this.staticPlot&amp;&amp;this.container.appendChild(n),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o&lt;s;++o,--s)for(var l=0;l&lt;r;++l)for(var c=0;c&lt;4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(&quot;canvas&quot;);f.width=r,f.height=i;var h,p=f.getContext(&quot;2d&quot;),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case&quot;jpeg&quot;:h=f.toDataURL(&quot;image/jpeg&quot;);break;case&quot;webp&quot;:h=f.toDataURL(&quot;image/webp&quot;);break;default:h=f.toDataURL(&quot;image/png&quot;)}return this.staticPlot&amp;&amp;this.container.removeChild(n),h},k.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&amp;&amp;t.height===o||(t.width=a,t.height=o),t},k.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],e=0;e&lt;2;++e)for(var r=0;r&lt;t[e].length;++r)t[e][r].text=d(t[e][r].text+&quot;&quot;);return t},k.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(_),r=&quot;xaxis&quot;+e[1],n=&quot;yaxis&quot;+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},k.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout;n.xaxis.autorange=e.autorange,n.xaxis.range=e.range.slice(0),n.yaxis.autorange=r.autorange,n.yaxis.range=r.range.slice(0);var i={lastInputTime:this.camera.lastInputTime};i[e._name]=e.range.slice(0),i[r._name]=r.range.slice(0),t.emit(&quot;plotly_relayout&quot;,i)},k.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r&lt;2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a&lt;n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&amp;&amp;(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},k.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r&lt;e.length;r++){var n=e[r];n.xref===this.xaxis._id&amp;&amp;n.yref===this.yaxis._id&amp;&amp;a.getComponentMethod(&quot;annotations&quot;,&quot;drawOne&quot;)(t,r)}},k.destroy=function(){if(this.glplot){var t=this.traces;t&amp;&amp;Object.keys(t).map(function(e){t[e].dispose(),delete t[e]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener(&quot;wheel&quot;,this.camera.wheelListener),this.camera=null}},k.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var s={_fullLayout:{_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis}};y(s,this.xaxis),y(s,this.yaxis);var l,c,u=r._size,f=this.xaxis.domain,h=this.yaxis.domain;for(o.viewBox=[u.l+f[0]*u.w,u.b+h[0]*u.h,i-u.r-(1-f[1])*u.w,a-u.t-(1-h[1])*u.h],this.mouseContainer.style.width=u.w*(f[1]-f[0])+&quot;px&quot;,this.mouseContainer.style.height=u.h*(h[1]-h[0])+&quot;px&quot;,this.mouseContainer.height=u.h*(h[1]-h[0]),this.mouseContainer.style.left=u.l+f[0]*u.w+&quot;px&quot;,this.mouseContainer.style.top=u.t+(1-h[1])*u.h+&quot;px&quot;,c=0;c&lt;2;++c)(l=this[b[c]])._length=o.viewBox[c+2]-o.viewBox[c],x(this.graphDiv,l),l.setScale();v(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},k.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},k.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},k.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r&lt;a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n&lt;t.length;n++)if((i=t[n]).uid===o&amp;&amp;i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r&lt;t.length;r++){i=t[r];var l=e[r],c=this.traces[i.uid];c?c.update(i,l):(c=i._module.plot(this,i,l),this.traces[i.uid]=c)}this.glplot.objects.sort(function(t,e){return t._trace.index-e._trace.index})},k.updateFx=function(t){&quot;lasso&quot;===t||&quot;select&quot;===t?(this.pickCanvas.style[&quot;pointer-events&quot;]=&quot;none&quot;,this.mouseContainer.style[&quot;pointer-events&quot;]=&quot;none&quot;):(this.pickCanvas.style[&quot;pointer-events&quot;]=&quot;auto&quot;,this.mouseContainer.style[&quot;pointer-events&quot;]=&quot;auto&quot;),this.mouseContainer.style.cursor=&quot;pan&quot;===t?&quot;move&quot;:&quot;zoom&quot;===t?&quot;crosshair&quot;:null},k.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a&lt;this.fullData.length;a++)this.fullData[a].uid===n&amp;&amp;(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},k.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&amp;&amp;0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,l=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&amp;&amp;&quot;zoom&quot;===i.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],u=0;u&lt;2;u++)e.boxStart[u]===e.boxEnd[u]&amp;&amp;(c[u]=t.dataBox[u],c[u+2]=t.dataBox[u+2]);t.setDirty()}else if(!e.panning&amp;&amp;this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,p=this.yaxis.domain,d=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,l/t.pixelRatio-(f.t+(1-p[1])*f.h)))&amp;&amp;a.object._trace.handlePick(a);if(d&amp;&amp;n&amp;&amp;this.emitPointAction(d,&quot;plotly_click&quot;),a&amp;&amp;&quot;skip&quot;!==a.object._trace.hoverinfo&amp;&amp;i.hovermode&amp;&amp;d&amp;&amp;(!this.lastPickResult||this.lastPickResult.traceUid!==d.trace.uid||this.lastPickResult.dataCoord[0]!==d.dataCoord[0]||this.lastPickResult.dataCoord[1]!==d.dataCoord[1])){var g=d;this.lastPickResult={traceUid:d.trace?d.trace.uid:null,dataCoord:d.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),g.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(d,&quot;plotly_hover&quot;);var m=this.fullData[g.trace.index]||{},v=g.pointIndex,y=s.castHoverinfo(m,i,v);if(y&amp;&amp;&quot;all&quot;!==y){var x=y.split(&quot;+&quot;);-1===x.indexOf(&quot;x&quot;)&amp;&amp;(g.traceCoord[0]=void 0),-1===x.indexOf(&quot;y&quot;)&amp;&amp;(g.traceCoord[1]=void 0),-1===x.indexOf(&quot;z&quot;)&amp;&amp;(g.traceCoord[2]=void 0),-1===x.indexOf(&quot;text&quot;)&amp;&amp;(g.textLabel=void 0),-1===x.indexOf(&quot;name&quot;)&amp;&amp;(g.name=void 0)}s.loneHover({x:g.screenCoord[0],y:g.screenCoord[1],xLabel:this.hoverFormatter(&quot;xaxis&quot;,g.traceCoord[0]),yLabel:this.hoverFormatter(&quot;yaxis&quot;,g.traceCoord[1]),zLabel:g.traceCoord[2],text:g.textLabel,name:g.name,color:s.castHoverOption(m,v,&quot;bgcolor&quot;)||g.color,borderColor:s.castHoverOption(m,v,&quot;bordercolor&quot;),fontFamily:s.castHoverOption(m,v,&quot;font.family&quot;),fontSize:s.castHoverOption(m,v,&quot;font.size&quot;),fontColor:s.castHoverOption(m,v,&quot;font.color&quot;)},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},k.unhover=function(){this.lastPickResult&amp;&amp;(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit(&quot;plotly_unhover&quot;),s.loneUnhover(this.svgContainer))},k.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return o.tickText(r,r.c2l(e),&quot;hover&quot;).text}}},{&quot;../../components/fx&quot;:609,&quot;../../lib/html2unicode&quot;:691,&quot;../../lib/show_no_webgl_msg&quot;:715,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;../cartesian/autorange&quot;:741,&quot;../cartesian/constants&quot;:747,&quot;../cartesian/constraints&quot;:749,&quot;./camera&quot;:779,&quot;./convert&quot;:780,&quot;gl-plot2d&quot;:274,&quot;gl-select-box&quot;:284,&quot;gl-spikes2d&quot;:293,&quot;webgl-context&quot;:530}],783:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){t=t||document.body,e=e||{};var r=[.01,1/0];&quot;distanceLimits&quot;in e&amp;&amp;(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]);&quot;zoomMin&quot;in e&amp;&amp;(r[0]=e.zoomMin);&quot;zoomMax&quot;in e&amp;&amp;(r[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||&quot;orbit&quot;,distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={keyBindingMode:&quot;rotate&quot;,view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay,i=e-2*r;c.idle(e-r),c.recalcMatrix(i),c.flush(e-(100+2*r));for(var a=!0,o=c.computedMatrix,s=0;s&lt;16;++s)a=a&amp;&amp;u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&amp;&amp;t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(d,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){var e=c.computedUp.slice(),r=c.computedEye.slice(),i=c.computedCenter.slice();if(c.setMode(t),&quot;turntable&quot;===t){var a=n();c._active.lookAt(a,r,i,e),c._active.lookAt(a+500,r,i,[0,0,1]),c._active.flush(a)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(&quot;contextmenu&quot;,function(t){return t.preventDefault(),!1});var g=0,m=0,v={shift:!1,control:!1,alt:!1,meta:!1};function y(e,r,i,a){var o=d.keyBindingMode;if(!1!==o){var s=&quot;rotate&quot;===o,l=&quot;pan&quot;===o,u=&quot;zoom&quot;===o,h=!!a.control,p=!!a.alt,y=!!a.shift,x=!!(1&amp;e),b=!!(2&amp;e),_=!!(4&amp;e),w=1/t.clientHeight,k=w*(r-g),M=w*(i-m),A=d.flipX?1:-1,T=d.flipY?1:-1,S=n(),E=Math.PI*d.rotateSpeed;if((s&amp;&amp;x&amp;&amp;!h&amp;&amp;!p&amp;&amp;!y||x&amp;&amp;!h&amp;&amp;!p&amp;&amp;y)&amp;&amp;c.rotate(S,A*E*k,-T*E*M,0),(l&amp;&amp;x&amp;&amp;!h&amp;&amp;!p&amp;&amp;!y||b||x&amp;&amp;h&amp;&amp;!p&amp;&amp;!y)&amp;&amp;c.pan(S,-d.translateSpeed*k*f,d.translateSpeed*M*f,0),u&amp;&amp;x&amp;&amp;!h&amp;&amp;!p&amp;&amp;!y||_||x&amp;&amp;!h&amp;&amp;p&amp;&amp;!y){var C=-d.zoomSpeed*M/window.innerHeight*(S-c.lastT())*100;c.pan(S,0,0,f*(Math.exp(C)-1))}return g=r,m=i,v=a,!0}}return d.mouseListener=a(t,y),t.addEventListener(&quot;touchstart&quot;,function(e){var r=s(e.changedTouches[0],t);y(0,r[0],r[1],v),y(1,r[0],r[1],v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),t.addEventListener(&quot;touchmove&quot;,function(e){var r=s(e.changedTouches[0],t);y(1,r[0],r[1],v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),t.addEventListener(&quot;touchend&quot;,function(t){y(0,g,m,v),t.preventDefault()},!!l&amp;&amp;{passive:!1}),d.wheelListener=o(t,function(t,e){if(!1!==d.keyBindingMode){var r=d.flipX?1:-1,i=d.flipY?1:-1,a=n();if(Math.abs(t)&gt;Math.abs(e))c.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else{var o=-d.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,f*(Math.exp(o)-1))}}},!0),d};var n=t(&quot;right-now&quot;),i=t(&quot;3d-view&quot;),a=t(&quot;mouse-change&quot;),o=t(&quot;mouse-wheel&quot;),s=t(&quot;mouse-event-offset&quot;),l=t(&quot;has-passive-events&quot;)},{&quot;3d-view&quot;:44,&quot;has-passive-events&quot;:392,&quot;mouse-change&quot;:415,&quot;mouse-event-offset&quot;:416,&quot;mouse-wheel&quot;:418,&quot;right-now&quot;:477}],784:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plot_api/edit_types&quot;).overrideAll,i=t(&quot;../../components/fx/layout_attributes&quot;),a=t(&quot;./scene&quot;),o=t(&quot;../get_data&quot;).getSubplotData,s=t(&quot;../../lib&quot;),l=t(&quot;../../constants/xmlns_namespaces&quot;);r.name=&quot;gl3d&quot;,r.attr=&quot;scene&quot;,r.idRoot=&quot;scene&quot;,r.idRegex=r.attrRegex=s.counterRegex(&quot;scene&quot;),r.attributes=t(&quot;./layout/attributes&quot;),r.layoutAttributes=t(&quot;./layout/layout_attributes&quot;),r.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},&quot;plot&quot;,&quot;nested&quot;),r.supplyLayoutDefaults=t(&quot;./layout/defaults&quot;),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl3d,i=0;i&lt;n.length;i++){var l=n[i],c=o(r,&quot;gl3d&quot;,l),u=e[l],f=u._scene;f||(f=new a({id:l,graphDiv:t,container:t.querySelector(&quot;.gl-container&quot;),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),u._scene=f),f.cameraInitial||(f.cameraInitial=s.extendDeep({},u.camera)),f.plot(c,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl3d||[],a=0;a&lt;i.length;a++){var o=i[a];!e[o]&amp;&amp;n[o]._scene&amp;&amp;(n[o]._scene.destroy(),n._infolayer&amp;&amp;n._infolayer.selectAll(&quot;.annotation-&quot;+o).remove())}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=e._size,i=0;i&lt;r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,c=s.toImage(&quot;png&quot;);e._glimages.append(&quot;svg:image&quot;).attr({xmlns:l.svg,&quot;xlink:href&quot;:c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:&quot;none&quot;}),s.destroy()}},r.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return&quot;1&quot;===e&amp;&amp;(e=&quot;&quot;),&quot;scene&quot;+e}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n&lt;r.length;n++){e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}}},{&quot;../../components/fx/layout_attributes&quot;:610,&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../lib&quot;:693,&quot;../../plot_api/edit_types&quot;:725,&quot;../get_data&quot;:778,&quot;./layout/attributes&quot;:785,&quot;./layout/defaults&quot;:789,&quot;./layout/layout_attributes&quot;:790,&quot;./scene&quot;:794}],785:[function(t,e,r){&quot;use strict&quot;;e.exports={scene:{valType:&quot;subplotid&quot;,dflt:&quot;scene&quot;,editType:&quot;calc+clearAxisTypes&quot;}}},{}],786:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../../components/color&quot;),i=t(&quot;../../cartesian/layout_attributes&quot;),a=t(&quot;../../../lib/extend&quot;).extendFlat,o=t(&quot;../../../plot_api/edit_types&quot;).overrideAll;e.exports=o({visible:i.visible,showspikes:{valType:&quot;boolean&quot;,dflt:!0},spikesides:{valType:&quot;boolean&quot;,dflt:!0},spikethickness:{valType:&quot;number&quot;,min:0,dflt:2},spikecolor:{valType:&quot;color&quot;,dflt:n.defaultLine},showbackground:{valType:&quot;boolean&quot;,dflt:!1},backgroundcolor:{valType:&quot;color&quot;,dflt:&quot;rgba(204, 204, 204, 0.5)&quot;},showaxeslabels:{valType:&quot;boolean&quot;,dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:i.title,titlefont:i.titlefont,type:i.type,autorange:i.autorange,rangemode:i.rangemode,range:i.range,tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:&quot;rgb(204, 204, 204)&quot;}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},&quot;plot&quot;,&quot;from-root&quot;)},{&quot;../../../components/color&quot;:567,&quot;../../../lib/extend&quot;:682,&quot;../../../plot_api/edit_types&quot;:725,&quot;../../cartesian/layout_attributes&quot;:754}],787:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;tinycolor2&quot;).mix,i=t(&quot;../../../lib&quot;),a=t(&quot;../../../plot_api/plot_template&quot;),o=t(&quot;./axis_attributes&quot;),s=t(&quot;../../cartesian/type_defaults&quot;),l=t(&quot;../../cartesian/axis_defaults&quot;),c=[&quot;xaxis&quot;,&quot;yaxis&quot;,&quot;zaxis&quot;];e.exports=function(t,e,r){var u,f;function h(t,e){return i.coerce(u,f,o,t,e)}for(var p=0;p&lt;c.length;p++){var d=c[p];u=t[d]||{},(f=a.newContainer(e,d))._id=d[0]+r.scene,f._name=d,s(u,f,h,r),l(u,f,h,{font:r.font,letter:d[0],data:r.data,showGrid:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),h(&quot;gridcolor&quot;,n(f.color,r.bgColor,13600/187).toRgbString()),h(&quot;title&quot;,d[0]),f.setScale=i.noop,h(&quot;showspikes&quot;)&amp;&amp;(h(&quot;spikesides&quot;),h(&quot;spikethickness&quot;),h(&quot;spikecolor&quot;,f.color)),h(&quot;showaxeslabels&quot;),h(&quot;showbackground&quot;)&amp;&amp;h(&quot;backgroundcolor&quot;)}}},{&quot;../../../lib&quot;:693,&quot;../../../plot_api/plot_template&quot;:732,&quot;../../cartesian/axis_defaults&quot;:744,&quot;../../cartesian/type_defaults&quot;:765,&quot;./axis_attributes&quot;:786,tinycolor2:511}],788:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../../lib/html2unicode&quot;),i=t(&quot;../../../lib/str2rgbarray&quot;),a=[&quot;xaxis&quot;,&quot;yaxis&quot;,&quot;zaxis&quot;];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[&quot;sans-serif&quot;,&quot;sans-serif&quot;,&quot;sans-serif&quot;],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],this.labelEnable=[!0,!0,!0],this.labelFont=[&quot;Open Sans&quot;,&quot;Open Sans&quot;,&quot;Open Sans&quot;],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(t){for(var e=0;e&lt;3;++e){var r=t[a[e]];r.visible?(this.labels[e]=n(r.title),&quot;titlefont&quot;in r&amp;&amp;(r.titlefont.color&amp;&amp;(this.labelColor[e]=i(r.titlefont.color)),r.titlefont.family&amp;&amp;(this.labelFont[e]=r.titlefont.family),r.titlefont.size&amp;&amp;(this.labelSize[e]=r.titlefont.size)),&quot;showline&quot;in r&amp;&amp;(this.lineEnable[e]=r.showline),&quot;linecolor&quot;in r&amp;&amp;(this.lineColor[e]=i(r.linecolor)),&quot;linewidth&quot;in r&amp;&amp;(this.lineWidth[e]=r.linewidth),&quot;showgrid&quot;in r&amp;&amp;(this.gridEnable[e]=r.showgrid),&quot;gridcolor&quot;in r&amp;&amp;(this.gridColor[e]=i(r.gridcolor)),&quot;gridwidth&quot;in r&amp;&amp;(this.gridWidth[e]=r.gridwidth),&quot;log&quot;===r.type?this.zeroEnable[e]=!1:&quot;zeroline&quot;in r&amp;&amp;(this.zeroEnable[e]=r.zeroline),&quot;zerolinecolor&quot;in r&amp;&amp;(this.zeroLineColor[e]=i(r.zerolinecolor)),&quot;zerolinewidth&quot;in r&amp;&amp;(this.zeroLineWidth[e]=r.zerolinewidth),&quot;ticks&quot;in r&amp;&amp;r.ticks?this.lineTickEnable[e]=!0:this.lineTickEnable[e]=!1,&quot;ticklen&quot;in r&amp;&amp;(this.lineTickLength[e]=this._defaultLineTickLength[e]=r.ticklen),&quot;tickcolor&quot;in r&amp;&amp;(this.lineTickColor[e]=i(r.tickcolor)),&quot;tickwidth&quot;in r&amp;&amp;(this.lineTickWidth[e]=r.tickwidth),&quot;tickangle&quot;in r&amp;&amp;(this.tickAngle[e]=&quot;auto&quot;===r.tickangle?0:Math.PI*-r.tickangle/180),&quot;showticklabels&quot;in r&amp;&amp;(this.tickEnable[e]=r.showticklabels),&quot;tickfont&quot;in r&amp;&amp;(r.tickfont.color&amp;&amp;(this.tickColor[e]=i(r.tickfont.color)),r.tickfont.family&amp;&amp;(this.tickFont[e]=r.tickfont.family),r.tickfont.size&amp;&amp;(this.tickSize[e]=r.tickfont.size)),&quot;mirror&quot;in r?-1!==[&quot;ticks&quot;,&quot;all&quot;,&quot;allticks&quot;].indexOf(r.mirror)?(this.lineTickMirror[e]=!0,this.lineMirror[e]=!0):!0===r.mirror?(this.lineTickMirror[e]=!1,this.lineMirror[e]=!0):(this.lineTickMirror[e]=!1,this.lineMirror[e]=!1):this.lineMirror[e]=!1,&quot;showbackground&quot;in r&amp;&amp;!1!==r.showbackground?(this.backgroundEnable[e]=!0,this.backgroundColor[e]=i(r.backgroundcolor)):this.backgroundEnable[e]=!1):(this.tickEnable[e]=!1,this.labelEnable[e]=!1,this.lineEnable[e]=!1,this.lineTickEnable[e]=!1,this.gridEnable[e]=!1,this.zeroEnable[e]=!1,this.backgroundEnable[e]=!1)}},e.exports=function(t){var e=new o;return e.merge(t),e}},{&quot;../../../lib/html2unicode&quot;:691,&quot;../../../lib/str2rgbarray&quot;:717}],789:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../../lib&quot;),i=t(&quot;../../../components/color&quot;),a=t(&quot;../../../registry&quot;),o=t(&quot;../../subplot_defaults&quot;),s=t(&quot;./axis_defaults&quot;),l=t(&quot;./layout_attributes&quot;);function c(t,e,r,n){for(var o=r(&quot;bgcolor&quot;),l=i.combine(o,n.paper_bgcolor),c=[&quot;up&quot;,&quot;center&quot;,&quot;eye&quot;],u=0;u&lt;c.length;u++)r(&quot;camera.&quot;+c[u]+&quot;.x&quot;),r(&quot;camera.&quot;+c[u]+&quot;.y&quot;),r(&quot;camera.&quot;+c[u]+&quot;.z&quot;);var f=!!r(&quot;aspectratio.x&quot;)&amp;&amp;!!r(&quot;aspectratio.y&quot;)&amp;&amp;!!r(&quot;aspectratio.z&quot;),h=r(&quot;aspectmode&quot;,f?&quot;manual&quot;:&quot;auto&quot;);f||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},&quot;manual&quot;===h&amp;&amp;(e.aspectmode=&quot;auto&quot;),t.aspectmode=e.aspectmode),s(t,e,{font:n.font,scene:n.id,data:n.fullData,bgColor:l,calendar:n.calendar,fullLayout:n.fullLayout}),a.getComponentMethod(&quot;annotations3d&quot;,&quot;handleDefaults&quot;)(t,e,n),r(&quot;dragmode&quot;,n.getDfltFromLayout(&quot;dragmode&quot;)),r(&quot;hovermode&quot;,n.getDfltFromLayout(&quot;hovermode&quot;))}e.exports=function(t,e,r){var i=e._basePlotModules.length&gt;1;o(t,e,r,{type:&quot;gl3d&quot;,attributes:l,handleDefaults:c,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{&quot;../../../components/color&quot;:567,&quot;../../../lib&quot;:693,&quot;../../../registry&quot;:825,&quot;../../subplot_defaults&quot;:820,&quot;./axis_defaults&quot;:787,&quot;./layout_attributes&quot;:790}],790:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./axis_attributes&quot;),i=t(&quot;../../domain&quot;).attributes,a=t(&quot;../../../lib/extend&quot;).extendFlat,o=t(&quot;../../../lib&quot;).counterRegex;function s(t,e,r){return{x:{valType:&quot;number&quot;,dflt:t,editType:&quot;camera&quot;},y:{valType:&quot;number&quot;,dflt:e,editType:&quot;camera&quot;},z:{valType:&quot;number&quot;,dflt:r,editType:&quot;camera&quot;},editType:&quot;camera&quot;}}e.exports={_arrayAttrRegexps:[o(&quot;scene&quot;,&quot;.annotations&quot;,!0)],bgcolor:{valType:&quot;color&quot;,dflt:&quot;rgba(0,0,0,0)&quot;,editType:&quot;plot&quot;},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),editType:&quot;camera&quot;},domain:i({name:&quot;scene&quot;,editType:&quot;plot&quot;}),aspectmode:{valType:&quot;enumerated&quot;,values:[&quot;auto&quot;,&quot;cube&quot;,&quot;data&quot;,&quot;manual&quot;],dflt:&quot;auto&quot;,editType:&quot;plot&quot;,impliedEdits:{&quot;aspectratio.x&quot;:void 0,&quot;aspectratio.y&quot;:void 0,&quot;aspectratio.z&quot;:void 0}},aspectratio:{x:{valType:&quot;number&quot;,min:0,editType:&quot;plot&quot;,impliedEdits:{&quot;^aspectmode&quot;:&quot;manual&quot;}},y:{valType:&quot;number&quot;,min:0,editType:&quot;plot&quot;,impliedEdits:{&quot;^aspectmode&quot;:&quot;manual&quot;}},z:{valType:&quot;number&quot;,min:0,editType:&quot;plot&quot;,impliedEdits:{&quot;^aspectmode&quot;:&quot;manual&quot;}},editType:&quot;plot&quot;,impliedEdits:{aspectmode:&quot;manual&quot;}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:&quot;enumerated&quot;,values:[&quot;orbit&quot;,&quot;turntable&quot;,&quot;zoom&quot;,&quot;pan&quot;,!1],dflt:&quot;turntable&quot;,editType:&quot;plot&quot;},hovermode:{valType:&quot;enumerated&quot;,values:[&quot;closest&quot;,!1],dflt:&quot;closest&quot;,editType:&quot;modebar&quot;},editType:&quot;plot&quot;,_deprecated:{cameraposition:{valType:&quot;info_array&quot;,editType:&quot;camera&quot;}}}},{&quot;../../../lib&quot;:693,&quot;../../../lib/extend&quot;:682,&quot;../../domain&quot;:767,&quot;./axis_attributes&quot;:786}],791:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../../lib/str2rgbarray&quot;),i=[&quot;xaxis&quot;,&quot;yaxis&quot;,&quot;zaxis&quot;];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e&lt;3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new a;return e.merge(t),e}},{&quot;../../../lib/str2rgbarray&quot;:717}],792:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,l=t.fullSceneLayout,c=[[],[],[]],u=0;u&lt;3;++u){var f=l[o[u]];if(f._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(f._length)===1/0)c[u]=[];else{f._input_range=f.range.slice(),f.range[0]=r[u].lo/t.dataScale[u],f.range[1]=r[u].hi/t.dataScale[u],f._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),f.range[0]===f.range[1]&amp;&amp;(f.range[0]-=1,f.range[1]+=1);var h=f.tickmode;if(&quot;auto&quot;===f.tickmode){f.tickmode=&quot;linear&quot;;var p=f.nticks||i.constrain(f._length/40,4,9);n.autoTicks(f,Math.abs(f.range[1]-f.range[0])/p)}for(var d=n.calcTicks(f),g=0;g&lt;d.length;++g)d[g].x=d[g].x*t.dataScale[u],d[g].text=a(d[g].text);c[u]=d,f.tickmode=h}}e.ticks=c;for(var u=0;u&lt;3;++u){s[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]);for(var g=0;g&lt;2;++g)e.bounds[g][u]=t.glplot.bounds[g][u]}t.contourLevels=function(t){for(var e=new Array(3),r=0;r&lt;3;++r){for(var n=t[r],i=new Array(n.length),a=0;a&lt;n.length;++a)i[a]=n[a].x;e[r]=i}return e}(c)};var n=t(&quot;../../cartesian/axes&quot;),i=t(&quot;../../../lib&quot;),a=t(&quot;../../../lib/html2unicode&quot;),o=[&quot;xaxis&quot;,&quot;yaxis&quot;,&quot;zaxis&quot;],s=[0,0,0]},{&quot;../../../lib&quot;:693,&quot;../../../lib/html2unicode&quot;:691,&quot;../../cartesian/axes&quot;:742}],793:[function(t,e,r){&quot;use strict&quot;;function n(t,e){var r,n,i=[0,0,0,0];for(r=0;r&lt;4;++r)for(n=0;n&lt;4;++n)i[n]+=t[4*r+n]*e[r];return i}e.exports=function(t,e){return n(t.projection,n(t.view,n(t.model,[e[0],e[1],e[2],1])))}},{}],794:[function(t,e,r){&quot;use strict&quot;;var n,i,a=t(&quot;gl-plot3d&quot;),o=t(&quot;webgl-context&quot;),s=t(&quot;has-passive-events&quot;),l=t(&quot;../../registry&quot;),c=t(&quot;../../lib&quot;),u=t(&quot;../../plots/cartesian/axes&quot;),f=t(&quot;../../components/fx&quot;),h=t(&quot;../../lib/str2rgbarray&quot;),p=t(&quot;../../lib/show_no_webgl_msg&quot;),d=t(&quot;./camera&quot;),g=t(&quot;./project&quot;),m=t(&quot;./layout/convert&quot;),v=t(&quot;./layout/spikes&quot;),y=t(&quot;./layout/tick_marks&quot;);function x(t,e,r,l){var c=t.graphDiv,h={canvas:r,gl:l,container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1};if(t.staticMode){if(!(i||(n=document.createElement(&quot;canvas&quot;),i=o({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error(&quot;error creating static canvas/context for image server&quot;);h.pixelRatio=t.pixelRatio,h.gl=i,h.canvas=n}try{t.glplot=a(h)}catch(e){return p(t)}var m=function(t){if(!1!==t.fullSceneLayout.dragmode){var e={};e[t.id+&quot;.camera&quot;]=M(t.camera),t.saveCamera(c.layout),t.graphDiv.emit(&quot;plotly_relayout&quot;,e)}};if(t.glplot.canvas.addEventListener(&quot;mouseup&quot;,m.bind(null,t)),t.glplot.canvas.addEventListener(&quot;wheel&quot;,m.bind(null,t),!!s&amp;&amp;{passive:!1}),t.staticMode||t.glplot.canvas.addEventListener(&quot;webglcontextlost&quot;,function(e){c&amp;&amp;c.emit&amp;&amp;c.emit(&quot;plotly_webglcontextlost&quot;,{event:e,layer:t.id})},!1),!t.camera){var v=t.fullSceneLayout.camera;t.camera=d(t.container,{center:[v.center.x,v.center.y,v.center.z],eye:[v.eye.x,v.eye.y,v.eye.z],up:[v.up.x,v.up.y,v.up.z],zoomMin:.1,zoomMax:100,mode:&quot;orbit&quot;})}return t.glplot.camera=t.camera,t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(t){var e,r=t.svgContainer,n=t.container.getBoundingClientRect(),i=n.width,a=n.height;r.setAttributeNS(null,&quot;viewBox&quot;,&quot;0 0 &quot;+i+&quot; &quot;+a),r.setAttributeNS(null,&quot;width&quot;,i),r.setAttributeNS(null,&quot;height&quot;,a),y(t),t.glplot.axes.update(t.axesOptions);for(var o,s=Object.keys(t.traces),l=null,c=t.glplot.selection,h=0;h&lt;s.length;++h)&quot;skip&quot;!==(e=t.traces[s[h]]).data.hoverinfo&amp;&amp;e.handlePick(c)&amp;&amp;(l=e),e.setContourLevels&amp;&amp;e.setContourLevels();function p(e,r){var n=t.fullSceneLayout[e];return u.tickText(n,n.d2l(r),&quot;hover&quot;).text}if(null!==l){var d=g(t.glplot.cameraParams,c.dataCoordinate);e=l.data;var m,v=c.index,x=f.castHoverinfo(e,t.fullLayout,v),b=x.split(&quot;+&quot;),_=&quot;all&quot;===x,w=p(&quot;xaxis&quot;,c.traceCoordinate[0]),k=p(&quot;yaxis&quot;,c.traceCoordinate[1]),M=p(&quot;zaxis&quot;,c.traceCoordinate[2]);if(_||(-1===b.indexOf(&quot;x&quot;)&amp;&amp;(w=void 0),-1===b.indexOf(&quot;y&quot;)&amp;&amp;(k=void 0),-1===b.indexOf(&quot;z&quot;)&amp;&amp;(M=void 0),-1===b.indexOf(&quot;text&quot;)&amp;&amp;(c.textLabel=void 0),-1===b.indexOf(&quot;name&quot;)&amp;&amp;(l.name=void 0)),&quot;cone&quot;===e.type||&quot;streamtube&quot;===e.type){var A=[];(_||-1!==b.indexOf(&quot;u&quot;))&amp;&amp;A.push(&quot;u: &quot;+p(&quot;xaxis&quot;,c.traceCoordinate[3])),(_||-1!==b.indexOf(&quot;v&quot;))&amp;&amp;A.push(&quot;v: &quot;+p(&quot;yaxis&quot;,c.traceCoordinate[4])),(_||-1!==b.indexOf(&quot;w&quot;))&amp;&amp;A.push(&quot;w: &quot;+p(&quot;zaxis&quot;,c.traceCoordinate[5])),(_||-1!==b.indexOf(&quot;norm&quot;))&amp;&amp;A.push(&quot;norm: &quot;+c.traceCoordinate[6].toPrecision(3)),&quot;streamtube&quot;!==e.type||!_&amp;&amp;-1===b.indexOf(&quot;divergence&quot;)||A.push(&quot;divergence: &quot;+c.traceCoordinate[7].toPrecision(3)),c.textLabel&amp;&amp;A.push(c.textLabel),m=A.join(&quot;&lt;br&gt;&quot;)}else m=c.textLabel;t.fullSceneLayout.hovermode&amp;&amp;f.loneHover({x:(.5+.5*d[0]/d[3])*i,y:(.5-.5*d[1]/d[3])*a,xLabel:w,yLabel:k,zLabel:M,text:m,name:l.name,color:f.castHoverOption(e,v,&quot;bgcolor&quot;)||l.color,borderColor:f.castHoverOption(e,v,&quot;bordercolor&quot;),fontFamily:f.castHoverOption(e,v,&quot;font.family&quot;),fontSize:f.castHoverOption(e,v,&quot;font.size&quot;),fontColor:f.castHoverOption(e,v,&quot;font.color&quot;)},{container:r,gd:t.graphDiv});var T={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:e._input,fullData:e,curveNumber:e.index,pointNumber:v};e._module.eventData&amp;&amp;(T=e._module.eventData(T,c,e,{},v)),f.appendArrayPointValue(T,e,v);var S={points:[T]};c.buttons&amp;&amp;c.distance&lt;5?t.graphDiv.emit(&quot;plotly_click&quot;,S):t.graphDiv.emit(&quot;plotly_hover&quot;,S),o=S}else f.loneUnhover(r),t.graphDiv.emit(&quot;plotly_unhover&quot;,o);t.drawAnnotations(t)}.bind(null,t),t.traces={},!0}function b(t,e){var r=document.createElement(&quot;div&quot;),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;svg&quot;);i.style.position=&quot;absolute&quot;,i.style.top=i.style.left=&quot;0px&quot;,i.style.width=i.style.height=&quot;100%&quot;,i.style[&quot;z-index&quot;]=20,i.style[&quot;pointer-events&quot;]=&quot;none&quot;,r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position=&quot;absolute&quot;,r.style.top=r.style.left=&quot;0px&quot;,r.style.width=r.style.height=&quot;100%&quot;,n.appendChild(r),this.fullLayout=e,this.id=t.id||&quot;scene&quot;,this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(e[this.id]),this.spikeOptions=v(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=l.getComponentMethod(&quot;annotations3d&quot;,&quot;convert&quot;),this.drawAnnotations=l.getComponentMethod(&quot;annotations3d&quot;,&quot;draw&quot;),x(this)}var _=b.prototype;_.recoverContext=function(){var t=this,e=this.glplot.gl,r=this.glplot.canvas;this.glplot.dispose(),requestAnimationFrame(function n(){e.isContextLost()?requestAnimationFrame(n):x(t,t.fullLayout,r,e)?t.plot.apply(t,t.plotArgs):c.error(&quot;Catastrophic and unrecoverable WebGL error. Context lost.&quot;)})};var w=[&quot;xaxis&quot;,&quot;yaxis&quot;,&quot;zaxis&quot;];function k(t,e,r){for(var n=t.fullSceneLayout,i=0;i&lt;3;i++){var a=w[i],o=a.charAt(0),s=n[a],l=e[o],u=e[o+&quot;calendar&quot;],f=e[&quot;_&quot;+o+&quot;length&quot;];if(c.isArrayOrTypedArray(l))for(var h,p=0;p&lt;(f||l.length);p++)if(c.isArrayOrTypedArray(l[p]))for(var d=0;d&lt;l[p].length;++d)h=s.d2l(l[p][d],0,u),!isNaN(h)&amp;&amp;isFinite(h)&amp;&amp;(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else h=s.d2l(l[p],0,u),!isNaN(h)&amp;&amp;isFinite(h)&amp;&amp;(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],f-1)}}function M(t){return{up:{x:t.up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]}}}_.plot=function(t,e,r){if(this.plotArgs=[t,e,r],!this.glplot.contextLost){var n,i,a,o,s,l,c=e[this.id],u=r[this.id];c.bgcolor?this.glplot.clearColor=h(c.bgcolor):this.glplot.clearColor=[0,0,0,0],this.glplot.snapToData=!0,this.fullLayout=e,this.fullSceneLayout=c,this.glplotLayout=c,this.axesOptions.merge(c),this.spikeOptions.merge(c),this.setCamera(c.camera),this.updateFx(c.dragmode,c.hovermode),this.glplot.update({}),this.setConvert(s),t?Array.isArray(t)||(t=[t]):t=[];var f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;a&lt;t.length;++a)!0===(n=t[a]).visible&amp;&amp;k(this,n,f);var p=[1,1,1];for(o=0;o&lt;3;++o)f[0][o]&gt;f[1][o]?p[o]=1:f[1][o]===f[0][o]?p[o]=1:p[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=p,this.convertAnnotations(this),a=0;a&lt;t.length;++a)!0===(n=t[a]).visible&amp;&amp;((i=this.traces[n.uid])?i.data.type===n.type?i.update(n):(i.dispose(),i=n._module.plot(this,n),this.traces[n.uid]=i):(i=n._module.plot(this,n),this.traces[n.uid]=i),i.name=n.name);var d=Object.keys(this.traces);t:for(a=0;a&lt;d.length;++a){for(o=0;o&lt;t.length;++o)if(t[o].uid===d[a]&amp;&amp;!0===t[o].visible)continue t;(i=this.traces[d[a]]).dispose(),delete this.traces[d[a]]}this.glplot.objects.sort(function(t,e){return t._trace.data.index-e._trace.data.index});var g=[[0,0,0],[0,0,0]],m=[],v={};for(a=0;a&lt;3;++a){if((l=(s=c[w[a]]).type)in v?(v[l].acc*=p[a],v[l].count+=1):v[l]={acc:p[a],count:1},s.autorange){g[0][a]=1/0,g[1][a]=-1/0;var y=this.glplot.objects,x=this.fullSceneLayout.annotations||[],b=s._name.charAt(0);for(o=0;o&lt;y.length;o++){var _=y[o],M=_.bounds,A=_._trace.data._pad||0;&quot;ErrorBars&quot;===_.constructor.name&amp;&amp;s._lowerLogErrorBound?g[0][a]=Math.min(g[0][a],s._lowerLogErrorBound):g[0][a]=Math.min(g[0][a],M[0][a]/p[a]-A),g[1][a]=Math.max(g[1][a],M[1][a]/p[a]+A)}for(o=0;o&lt;x.length;o++){var T=x[o];if(T.visible){var S=s.r2l(T[b]);g[0][a]=Math.min(g[0][a],S),g[1][a]=Math.max(g[1][a],S)}}if(&quot;rangemode&quot;in s&amp;&amp;&quot;tozero&quot;===s.rangemode&amp;&amp;(g[0][a]=Math.min(g[0][a],0),g[1][a]=Math.max(g[1][a],0)),g[0][a]&gt;g[1][a])g[0][a]=-1,g[1][a]=1;else{var E=g[1][a]-g[0][a];g[0][a]-=E/32,g[1][a]+=E/32}}else{var C=s.range;g[0][a]=s.r2l(C[0]),g[1][a]=s.r2l(C[1])}g[0][a]===g[1][a]&amp;&amp;(g[0][a]-=1,g[1][a]+=1),m[a]=g[1][a]-g[0][a],this.glplot.bounds[0][a]=g[0][a]*p[a],this.glplot.bounds[1][a]=g[1][a]*p[a]}var L=[1,1,1];for(a=0;a&lt;3;++a){var z=v[l=(s=c[w[a]]).type];L[a]=Math.pow(z.acc,1/z.count)/p[a]}var P;if(&quot;auto&quot;===c.aspectmode)P=Math.max.apply(null,L)/Math.min.apply(null,L)&lt;=4?L:[1,1,1];else if(&quot;cube&quot;===c.aspectmode)P=[1,1,1];else if(&quot;data&quot;===c.aspectmode)P=L;else{if(&quot;manual&quot;!==c.aspectmode)throw new Error(&quot;scene.js aspectRatio was not one of the enumerated types&quot;);var O=c.aspectratio;P=[O.x,O.y,O.z]}c.aspectratio.x=u.aspectratio.x=P[0],c.aspectratio.y=u.aspectratio.y=P[1],c.aspectratio.z=u.aspectratio.z=P[2],this.glplot.aspect=P;var I=c.domain||null,D=e._size||null;if(I&amp;&amp;D){var R=this.container.style;R.position=&quot;absolute&quot;,R.left=D.l+I.x[0]*D.w+&quot;px&quot;,R.top=D.t+(1-I.y[1])*D.h+&quot;px&quot;,R.width=D.w*(I.x[1]-I.x[0])+&quot;px&quot;,R.height=D.h*(I.y[1]-I.y[0])+&quot;px&quot;}this.glplot.redraw()}},_.destroy=function(){this.glplot&amp;&amp;(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(&quot;wheel&quot;,this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),M(this.glplot.camera)},_.setCamera=function(t){var e;this.glplot.camera.lookAt.apply(this,[[(e=t).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]])},_.saveCamera=function(t){var e=this.getCamera(),r=c.nestedProperty(t,this.id+&quot;.camera&quot;),n=r.get(),i=!1;function a(t,e,r,n){var i=[&quot;up&quot;,&quot;center&quot;,&quot;eye&quot;],a=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;];return e[i[r]]&amp;&amp;t[i[r]][a[n]]===e[i[r]][a[n]]}if(void 0===n)i=!0;else for(var o=0;o&lt;3;o++)for(var s=0;s&lt;3;s++)if(!a(e,n,o,s)){i=!0;break}return i&amp;&amp;r.set(e),i},_.updateFx=function(t,e){var r=this.camera;r&amp;&amp;(&quot;orbit&quot;===t?(r.mode=&quot;orbit&quot;,r.keyBindingMode=&quot;rotate&quot;):&quot;turntable&quot;===t?(r.up=[0,0,1],r.mode=&quot;turntable&quot;,r.keyBindingMode=&quot;rotate&quot;):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},_.toImage=function(t){t||(t=&quot;png&quot;),this.staticMode&amp;&amp;this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o&lt;s;++o,--s)for(var l=0;l&lt;r;++l)for(var c=0;c&lt;4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(&quot;canvas&quot;);f.width=r,f.height=i;var h,p=f.getContext(&quot;2d&quot;),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case&quot;jpeg&quot;:h=f.toDataURL(&quot;image/jpeg&quot;);break;case&quot;webp&quot;:h=f.toDataURL(&quot;image/webp&quot;);break;default:h=f.toDataURL(&quot;image/png&quot;)}return this.staticMode&amp;&amp;this.container.removeChild(n),h},_.setConvert=function(){for(var t=0;t&lt;3;t++){var e=this.fullSceneLayout[w[t]];u.setConvert(e,this.fullLayout),e.setScale=c.noop}},e.exports=b},{&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../../lib/show_no_webgl_msg&quot;:715,&quot;../../lib/str2rgbarray&quot;:717,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;./camera&quot;:783,&quot;./layout/convert&quot;:788,&quot;./layout/spikes&quot;:791,&quot;./layout/tick_marks&quot;:792,&quot;./project&quot;:793,&quot;gl-plot3d&quot;:276,&quot;has-passive-events&quot;:392,&quot;webgl-context&quot;:530}],795:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a&lt;n;a++)i[a]=[t[a],e[a],r[a]];return i}},{}],796:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./font_attributes&quot;),i=t(&quot;../components/color/attributes&quot;),a=n({editType:&quot;calc&quot;});a.family.dflt='&quot;Open Sans&quot;, verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=i.defaultLine,e.exports={font:a,title:{valType:&quot;string&quot;,editType:&quot;layoutstyle&quot;},titlefont:n({editType:&quot;layoutstyle&quot;}),autosize:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;none&quot;},width:{valType:&quot;number&quot;,min:10,dflt:700,editType:&quot;plot&quot;},height:{valType:&quot;number&quot;,min:10,dflt:450,editType:&quot;plot&quot;},margin:{l:{valType:&quot;number&quot;,min:0,dflt:80,editType:&quot;plot&quot;},r:{valType:&quot;number&quot;,min:0,dflt:80,editType:&quot;plot&quot;},t:{valType:&quot;number&quot;,min:0,dflt:100,editType:&quot;plot&quot;},b:{valType:&quot;number&quot;,min:0,dflt:80,editType:&quot;plot&quot;},pad:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;plot&quot;},autoexpand:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;plot&quot;},editType:&quot;plot&quot;},paper_bgcolor:{valType:&quot;color&quot;,dflt:i.background,editType:&quot;plot&quot;},plot_bgcolor:{valType:&quot;color&quot;,dflt:i.background,editType:&quot;layoutstyle&quot;},separators:{valType:&quot;string&quot;,editType:&quot;plot&quot;},hidesources:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;plot&quot;},showlegend:{valType:&quot;boolean&quot;,editType:&quot;legend&quot;},colorway:{valType:&quot;colorlist&quot;,dflt:i.defaults,editType:&quot;calc&quot;},datarevision:{valType:&quot;any&quot;,editType:&quot;calc&quot;},template:{valType:&quot;any&quot;,editType:&quot;calc&quot;}}},{&quot;../components/color/attributes&quot;:566,&quot;./font_attributes&quot;:768}],797:[function(t,e,r){&quot;use strict&quot;;e.exports={requiredVersion:&quot;0.45.0&quot;,styleUrlPrefix:&quot;mapbox://styles/mapbox/&quot;,styleUrlSuffix:&quot;v9&quot;,controlContainerClassName:&quot;mapboxgl-control-container&quot;,wrongVersionErrorMsg:[&quot;Your custom plotly.js bundle is not using the correct mapbox-gl version&quot;,&quot;Please install mapbox-gl@0.45.0.&quot;].join(&quot;\n&quot;),noAccessTokenErrorMsg:[&quot;Missing Mapbox access token.&quot;,&quot;Mapbox trace type require a Mapbox access token to be registered.&quot;,&quot;For example:&quot;,&quot;  Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });&quot;,&quot;More info here: https://www.mapbox.com/help/define-access-token/&quot;].join(&quot;\n&quot;),mapOnErrorMsg:&quot;Mapbox error.&quot;,styleRules:{map:&quot;overflow:hidden;position:relative;&quot;,&quot;missing-css&quot;:&quot;display:none&quot;}}},{}],798:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t,e){var r=t.split(&quot; &quot;),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=[&quot;&quot;,&quot;&quot;],u=[0,0];switch(i){case&quot;top&quot;:c[0]=&quot;top&quot;,u[1]=-l;break;case&quot;bottom&quot;:c[0]=&quot;bottom&quot;,u[1]=l}switch(a){case&quot;left&quot;:c[1]=&quot;right&quot;,u[0]=-s;break;case&quot;right&quot;:c[1]=&quot;left&quot;,u[0]=s}return{anchor:c[0]&amp;&amp;c[1]?c.join(&quot;-&quot;):c[0]?c[0]:c[1]?c[1]:&quot;center&quot;,offset:u}}},{&quot;../../lib&quot;:693}],799:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;mapbox-gl&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plots/get_data&quot;).getSubplotCalcData,o=t(&quot;../../constants/xmlns_namespaces&quot;),s=t(&quot;./mapbox&quot;),l=t(&quot;./constants&quot;);for(var c in l.styleRules)i.addStyleRule(&quot;.mapboxgl-&quot;+c,l.styleRules[c]);r.name=&quot;mapbox&quot;,r.attr=&quot;subplot&quot;,r.idRoot=&quot;mapbox&quot;,r.idRegex=r.attrRegex=i.counterRegex(&quot;mapbox&quot;),r.attributes={subplot:{valType:&quot;subplotid&quot;,dflt:&quot;mapbox&quot;,editType:&quot;calc&quot;}},r.layoutAttributes=t(&quot;./layout_attributes&quot;),r.supplyLayoutDefaults=t(&quot;./layout_defaults&quot;),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==l.requiredVersion)throw new Error(l.wrongVersionErrorMsg);var c=function(t,e){var r=t._fullLayout;if(&quot;&quot;===t._context.mapboxAccessToken)return&quot;&quot;;for(var n=0;n&lt;e.length;n++){var i=r[e[n]];if(i.accesstoken)return i.accesstoken}throw new Error(l.noAccessTokenErrorMsg)}(t,o);n.accessToken=c;for(var u=0;u&lt;o.length;u++){var f=o[u],h=a(r,&quot;mapbox&quot;,f),p=e[f],d=p._subplot;d||(d=s({gd:t,container:e._glcontainer.node(),id:f,fullLayout:e,staticPlot:t._context.staticPlot}),e[f]._subplot=d),d.viewInitial||(d.viewInitial={center:i.extendFlat({},p.center),zoom:p.zoom,bearing:p.bearing,pitch:p.pitch}),d.plot(h,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.mapbox||[],a=0;a&lt;i.length;a++){var o=i[a];!e[o]&amp;&amp;n[o]._subplot&amp;&amp;n[o]._subplot.destroy()}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=e._size,i=0;i&lt;r.length;i++){var a=e[r[i]],s=a.domain,l=a._subplot,c=l.toImage(&quot;png&quot;);e._glimages.append(&quot;svg:image&quot;).attr({xmlns:o.svg,&quot;xlink:href&quot;:c,x:n.l+n.w*s.x[0],y:n.t+n.h*(1-s.y[1]),width:n.w*(s.x[1]-s.x[0]),height:n.h*(s.y[1]-s.y[0]),preserveAspectRatio:&quot;none&quot;}),l.destroy()}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n&lt;r.length;n++){e[r[n]]._subplot.updateFx(e)}}},{&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../lib&quot;:693,&quot;../../plots/get_data&quot;:778,&quot;./constants&quot;:797,&quot;./layout_attributes&quot;:801,&quot;./layout_defaults&quot;:802,&quot;./mapbox&quot;:803,&quot;mapbox-gl&quot;:406}],800:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./convert_text_opts&quot;);function a(t,e){this.mapbox=t,this.map=t.map,this.uid=t.uid+&quot;-layer&quot;+e,this.idSource=this.uid+&quot;-source&quot;,this.idLayer=this.uid+&quot;-layer&quot;,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var o=a.prototype;function s(t){var e=t.source;return t.visible&amp;&amp;(n.isPlainObject(e)||&quot;string&quot;==typeof e&amp;&amp;e.length&gt;0)}function l(t){var e={},r={};switch(t.type){case&quot;circle&quot;:n.extendFlat(r,{&quot;circle-radius&quot;:t.circle.radius,&quot;circle-color&quot;:t.color,&quot;circle-opacity&quot;:t.opacity});break;case&quot;line&quot;:n.extendFlat(r,{&quot;line-width&quot;:t.line.width,&quot;line-color&quot;:t.color,&quot;line-opacity&quot;:t.opacity});break;case&quot;fill&quot;:n.extendFlat(r,{&quot;fill-color&quot;:t.color,&quot;fill-outline-color&quot;:t.fill.outlinecolor,&quot;fill-opacity&quot;:t.opacity});break;case&quot;symbol&quot;:var a=t.symbol,o=i(a.textposition,a.iconsize);n.extendFlat(e,{&quot;icon-image&quot;:a.icon+&quot;-15&quot;,&quot;icon-size&quot;:a.iconsize/10,&quot;text-field&quot;:a.text,&quot;text-size&quot;:a.textfont.size,&quot;text-anchor&quot;:o.anchor,&quot;text-offset&quot;:o.offset}),n.extendFlat(r,{&quot;icon-color&quot;:t.color,&quot;text-color&quot;:a.textfont.color,&quot;text-opacity&quot;:t.opacity})}return{layout:e,paint:r}}o.update=function(t){this.visible?this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=s(t)},o.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},o.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},o.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&amp;&amp;e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,s(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,i={type:r};&quot;geojson&quot;===r?e=&quot;data&quot;:&quot;vector&quot;===r&amp;&amp;(e=&quot;string&quot;==typeof n?&quot;url&quot;:&quot;tiles&quot;);return i[e]=n,i}(t);e.addSource(this.idSource,r)}},o.updateLayer=function(t){var e=this.map,r=l(t);this.removeLayer(),this.layerType=t.type,s(t)&amp;&amp;e.addLayer({id:this.idLayer,source:this.idSource,&quot;source-layer&quot;:t.sourcelayer||&quot;&quot;,type:t.type,layout:r.layout,paint:r.paint},t.below)},o.updateStyle=function(t){if(s(t)){var e=l(t);this.mapbox.setOptions(this.idLayer,&quot;setLayoutProperty&quot;,e.layout),this.mapbox.setOptions(this.idLayer,&quot;setPaintProperty&quot;,e.paint)}},o.removeLayer=function(){var t=this.map;t.getLayer(this.idLayer)&amp;&amp;t.removeLayer(this.idLayer)},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var n=new a(t,e);return n.update(r),n}},{&quot;../../lib&quot;:693,&quot;./convert_text_opts&quot;:798}],801:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/color&quot;).defaultLine,a=t(&quot;../domain&quot;).attributes,o=t(&quot;../font_attributes&quot;),s=t(&quot;../../traces/scatter/attributes&quot;).textposition,l=t(&quot;../../plot_api/edit_types&quot;).overrideAll,c=t(&quot;../../plot_api/plot_template&quot;).templatedArray,u=o({});u.family.dflt=&quot;Open Sans Regular, Arial Unicode MS Regular&quot;,e.exports=l({_arrayAttrRegexps:[n.counterRegex(&quot;mapbox&quot;,&quot;.layers&quot;,!0)],domain:a({name:&quot;mapbox&quot;}),accesstoken:{valType:&quot;string&quot;,noBlank:!0,strict:!0},style:{valType:&quot;any&quot;,values:[&quot;basic&quot;,&quot;streets&quot;,&quot;outdoors&quot;,&quot;light&quot;,&quot;dark&quot;,&quot;satellite&quot;,&quot;satellite-streets&quot;],dflt:&quot;basic&quot;},center:{lon:{valType:&quot;number&quot;,dflt:0},lat:{valType:&quot;number&quot;,dflt:0}},zoom:{valType:&quot;number&quot;,dflt:1},bearing:{valType:&quot;number&quot;,dflt:0},pitch:{valType:&quot;number&quot;,dflt:0},layers:c(&quot;layer&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0},sourcetype:{valType:&quot;enumerated&quot;,values:[&quot;geojson&quot;,&quot;vector&quot;],dflt:&quot;geojson&quot;},source:{valType:&quot;any&quot;},sourcelayer:{valType:&quot;string&quot;,dflt:&quot;&quot;},type:{valType:&quot;enumerated&quot;,values:[&quot;circle&quot;,&quot;line&quot;,&quot;fill&quot;,&quot;symbol&quot;],dflt:&quot;circle&quot;},below:{valType:&quot;string&quot;,dflt:&quot;&quot;},color:{valType:&quot;color&quot;,dflt:i},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1},circle:{radius:{valType:&quot;number&quot;,dflt:15}},line:{width:{valType:&quot;number&quot;,dflt:2}},fill:{outlinecolor:{valType:&quot;color&quot;,dflt:i}},symbol:{icon:{valType:&quot;string&quot;,dflt:&quot;marker&quot;},iconsize:{valType:&quot;number&quot;,dflt:10},text:{valType:&quot;string&quot;,dflt:&quot;&quot;},textfont:u,textposition:n.extendFlat({},s,{arrayOk:!1})}})},&quot;plot&quot;,&quot;from-root&quot;)},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plot_api/plot_template&quot;:732,&quot;../../traces/scatter/attributes&quot;:1032,&quot;../domain&quot;:767,&quot;../font_attributes&quot;:768}],802:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../subplot_defaults&quot;),a=t(&quot;../array_container_defaults&quot;),o=t(&quot;./layout_attributes&quot;);function s(t,e,r,n){r(&quot;accesstoken&quot;,n.accessToken),r(&quot;style&quot;),r(&quot;center.lon&quot;),r(&quot;center.lat&quot;),r(&quot;zoom&quot;),r(&quot;bearing&quot;),r(&quot;pitch&quot;),a(t,e,{name:&quot;layers&quot;,handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r(&quot;visible&quot;)){var i=r(&quot;sourcetype&quot;);r(&quot;source&quot;),&quot;vector&quot;===i&amp;&amp;r(&quot;sourcelayer&quot;);var a=r(&quot;type&quot;);r(&quot;below&quot;),r(&quot;color&quot;),r(&quot;opacity&quot;),&quot;circle&quot;===a&amp;&amp;r(&quot;circle.radius&quot;),&quot;line&quot;===a&amp;&amp;r(&quot;line.width&quot;),&quot;fill&quot;===a&amp;&amp;r(&quot;fill.outlinecolor&quot;),&quot;symbol&quot;===a&amp;&amp;(r(&quot;symbol.icon&quot;),r(&quot;symbol.iconsize&quot;),r(&quot;symbol.text&quot;),n.coerceFont(r,&quot;symbol.textfont&quot;),r(&quot;symbol.textposition&quot;))}}e.exports=function(t,e,r){i(t,e,r,{type:&quot;mapbox&quot;,attributes:o,handleDefaults:s,partition:&quot;y&quot;,accessToken:e._mapboxAccessToken})}},{&quot;../../lib&quot;:693,&quot;../array_container_defaults&quot;:738,&quot;../subplot_defaults&quot;:820,&quot;./layout_attributes&quot;:801}],803:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;mapbox-gl&quot;),i=t(&quot;../../components/fx&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../../components/dragelement&quot;),s=t(&quot;../cartesian/select&quot;).prepSelect,l=t(&quot;../cartesian/select&quot;).selectOnClick,c=t(&quot;./constants&quot;),u=t(&quot;./layout_attributes&quot;),f=t(&quot;./layers&quot;);function h(t){this.id=t.id,this.gd=t.gd,this.container=t.container,this.isStatic=t.staticPlot;var e=t.fullLayout;this.uid=e._uid+&quot;-&quot;+this.id,this.opts=e[this.id],this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(e),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[]}var p=h.prototype;function d(t){var e=u.style.values,r=u.style.dflt,n={};return a.isPlainObject(t)?(n.id=t.id,n.style=t):&quot;string&quot;==typeof t?(n.id=t,n.style=-1!==e.indexOf(t)?g(t):t):(n.id=r,n.style=g(r)),n.transition={duration:0,delay:0},n}function g(t){return c.styleUrlPrefix+t+&quot;-&quot;+c.styleUrlSuffix}function m(t){return[t.lon,t.lat]}e.exports=function(t){return new h(t)},p.plot=function(t,e,r){var n,i=this,a=i.opts=e[this.id];i.map&amp;&amp;a.accesstoken!==i.accessToken&amp;&amp;(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash=[],i.layerList={}),n=i.map?new Promise(function(r,n){i.updateMap(t,e,r,n)}):new Promise(function(r,n){i.createMap(t,e,r,n)}),r.push(n)},p.createMap=function(t,e,r,a){var o=this,s=o.gd,u=o.opts,f=o.styleObj=d(u.style);o.accessToken=u.accesstoken;var h=o.map=new n.Map({container:o.div,style:f.style,center:m(u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1}),p=c.controlContainerClassName,g=o.div.getElementsByClassName(p)[0];if(o.div.removeChild(g),h._canvas.style.left=&quot;0px&quot;,h._canvas.style.top=&quot;0px&quot;,o.rejectOnError(a),h.once(&quot;load&quot;,function(){o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)}),!o.isStatic){var v=!1;h.on(&quot;moveend&quot;,function(t){if(o.map){var e=o.getView();u._input.center=u.center=e.center,u._input.zoom=u.zoom=e.zoom,u._input.bearing=u.bearing=e.bearing,u._input.pitch=u.pitch=e.pitch,(t.originalEvent||v)&amp;&amp;x(e),v=!1}}),h.on(&quot;wheel&quot;,function(){v=!0}),h.on(&quot;mousemove&quot;,function(t){var e=o.div.getBoundingClientRect();t.clientX=t.point.x+e.left,t.clientY=t.point.y+e.top,t.target.getBoundingClientRect=function(){return e},o.xaxis.p2c=function(){return t.lngLat.lng},o.yaxis.p2c=function(){return t.lngLat.lat},i.hover(s,t,o.id)}),h.on(&quot;dragstart&quot;,y),h.on(&quot;zoomstart&quot;,y),h.on(&quot;dblclick&quot;,function(){s.emit(&quot;plotly_doubleclick&quot;,null);var t=o.viewInitial;h.setCenter(m(t.center)),h.setZoom(t.zoom),h.setBearing(t.bearing),h.setPitch(t.pitch);var e=o.getView();u._input.center=u.center=e.center,u._input.zoom=u.zoom=e.zoom,u._input.bearing=u.bearing=e.bearing,u._input.pitch=u.pitch=e.pitch,x(e)}),o.clearSelect=function(){s._fullLayout._zoomlayer.selectAll(&quot;.select-outline&quot;).remove()},o.onClickInPanFn=function(t){return function(e){var r=s._fullLayout.clickmode;r.indexOf(&quot;select&quot;)&gt;-1&amp;&amp;l(e.originalEvent,s,[o.xaxis],[o.yaxis],o.id,t),r.indexOf(&quot;event&quot;)&gt;-1&amp;&amp;i.click(s,e.originalEvent)}}}function y(){i.loneUnhover(e._toppaper)}function x(t){var e=o.id,r={};for(var n in t)r[e+&quot;.&quot;+n]=t[n];s.emit(&quot;plotly_relayout&quot;,r)}},p.updateMap=function(t,e,r,n){var i=this,a=i.map;i.rejectOnError(n);var o=d(i.opts.style);i.styleObj.id!==o.id?(i.styleObj=o,a.setStyle(o.style),a.once(&quot;styledata&quot;,function(){i.traceHash={},i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})):(i.updateData(t),i.updateLayout(e),i.resolveOnRender(r))},p.updateData=function(t){var e,r,n,i,a=this.traceHash;for(n=0;n&lt;t.length;n++){var o=t[n];(e=a[(r=o[0].trace).uid])?e.update(o):r._module&amp;&amp;(a[r.uid]=r._module.plot(this,o))}var s=Object.keys(a);t:for(n=0;n&lt;s.length;n++){var l=s[n];for(i=0;i&lt;t.length;i++)if(l===(r=t[i][0].trace).uid)continue t;(e=a[l]).dispose(),delete a[l]}},p.updateLayout=function(t){var e=this.map,r=this.opts;e.setCenter(m(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch),this.updateLayers(),this.updateFramework(t),this.updateFx(t),this.map.resize()},p.resolveOnRender=function(t){var e=this.map;e.on(&quot;render&quot;,function r(){e.loaded()&amp;&amp;(e.off(&quot;render&quot;,r),setTimeout(t,0))})},p.rejectOnError=function(t){var e=this.map;function r(){t(new Error(c.mapOnErrorMsg))}e.once(&quot;error&quot;,r),e.once(&quot;style.error&quot;,r),e.once(&quot;source.error&quot;,r),e.once(&quot;tile.error&quot;,r),e.once(&quot;layer.error&quot;,r)},p.createFramework=function(t){var e=this,r=e.div=document.createElement(&quot;div&quot;);r.id=e.uid,r.style.position=&quot;absolute&quot;,e.container.appendChild(r),e.xaxis={_id:&quot;x&quot;,c2p:function(t){return e.project(t).x}},e.yaxis={_id:&quot;y&quot;,c2p:function(t){return e.project(t).y}},e.updateFramework(t)},p.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var i,l=t.dragmode;i=&quot;select&quot;===l?function(t,r){(t.range={})[e.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(u)};var c=e.dragOptions;e.dragOptions=a.extendDeep(c||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:i},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(&quot;click&quot;,e.onClickInPanHandler),&quot;select&quot;===l||&quot;lasso&quot;===l?(r.dragPan.disable(),r.on(&quot;zoomstart&quot;,e.clearSelect),e.dragOptions.prepFn=function(t,r,n){s(t,r,n,e.dragOptions,l)},o.init(e.dragOptions)):(r.dragPan.enable(),r.off(&quot;zoomstart&quot;,e.clearSelect),e.div.onmousedown=null,e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on(&quot;click&quot;,e.onClickInPanHandler))}function u(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},p.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+&quot;px&quot;,n.height=r.h*(e.y[1]-e.y[0])+&quot;px&quot;,n.left=r.l+e.x[0]*r.w+&quot;px&quot;,n.top=r.t+(1-e.y[1])*r.h+&quot;px&quot;,this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},p.updateLayers=function(){var t,e=this.opts.layers,r=this.layerList;if(e.length!==r.length){for(t=0;t&lt;r.length;t++)r[t].dispose();for(r=this.layerList=[],t=0;t&lt;e.length;t++)r.push(f(this,t,e[t]))}else for(t=0;t&lt;e.length;t++)r[t].update(e[t])},p.destroy=function(){this.map&amp;&amp;(this.map.remove(),this.map=null,this.container.removeChild(this.div))},p.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},p.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},p.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},p.getView=function(){var t=this.map,e=t.getCenter();return{center:{lon:e.lng,lat:e.lat},zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch()}}},{&quot;../../components/dragelement&quot;:589,&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../cartesian/select&quot;:759,&quot;./constants&quot;:797,&quot;./layers&quot;:800,&quot;./layout_attributes&quot;:801,&quot;mapbox-gl&quot;:406}],804:[function(t,e,r){&quot;use strict&quot;;e.exports={t:{valType:&quot;number&quot;,dflt:0,editType:&quot;arraydraw&quot;},r:{valType:&quot;number&quot;,dflt:0,editType:&quot;arraydraw&quot;},b:{valType:&quot;number&quot;,dflt:0,editType:&quot;arraydraw&quot;},l:{valType:&quot;number&quot;,dflt:0,editType:&quot;arraydraw&quot;},editType:&quot;arraydraw&quot;}},{}],805:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../registry&quot;),o=t(&quot;../plot_api/plot_schema&quot;),s=t(&quot;../plot_api/plot_template&quot;),l=t(&quot;../lib&quot;),c=t(&quot;../components/color&quot;),u=t(&quot;../constants/numerical&quot;).BADNUM,f=t(&quot;../plots/cartesian/axis_ids&quot;),h=t(&quot;./sort_modules&quot;).sortBasePlotModules,p=t(&quot;./animation_attributes&quot;),d=t(&quot;./frame_attributes&quot;),g=l.relinkPrivateKeys,m=l._,v=e.exports={};l.extendFlat(v,a),v.attributes=t(&quot;./attributes&quot;),v.attributes.type.values=v.allTypes,v.fontAttrs=t(&quot;./font_attributes&quot;),v.layoutAttributes=t(&quot;./layout_attributes&quot;),v.fontWeight=&quot;normal&quot;;var y=v.transformsRegistry,x=t(&quot;./command&quot;);v.executeAPICommand=x.executeAPICommand,v.computeAPICommandBindings=x.computeAPICommandBindings,v.manageCommandObserver=x.manageCommandObserver,v.hasSimpleAPICommandBindings=x.hasSimpleAPICommandBindings,v.redrawText=function(t){if(!((t=l.getGraphDiv(t)).data&amp;&amp;t.data[0]&amp;&amp;t.data[0].r))return new Promise(function(e){setTimeout(function(){a.getComponentMethod(&quot;annotations&quot;,&quot;draw&quot;)(t),a.getComponentMethod(&quot;legend&quot;,&quot;draw&quot;)(t),(t.calcdata||[]).forEach(function(t){t[0]&amp;&amp;t[0].t&amp;&amp;t[0].t.cb&amp;&amp;t[0].t.cb()}),e(v.previousPromises(t))},300)})},v.resize=function(t){return t=l.getGraphDiv(t),new Promise(function(e,r){function n(t){var e=window.getComputedStyle(t).display;return!e||&quot;none&quot;===e}t&amp;&amp;!n(t)||r(new Error(&quot;Resize must be passed a displayed plot div element.&quot;)),t._redrawTimer&amp;&amp;clearTimeout(t._redrawTimer),t._redrawTimer=setTimeout(function(){if(!t.layout||t.layout.width&amp;&amp;t.layout.height||n(t))e(t);else{delete t.layout.width,delete t.layout.height;var r=t.changed;t.autoplay=!0,a.call(&quot;relayout&quot;,t,{autosize:!0}).then(function(){t.changed=r,e(t)})}},100)})},v.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})},v.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=l.ensureSingle(e._paper,&quot;text&quot;,&quot;js-plot-link-container&quot;,function(t){t.style({&quot;font-family&quot;:'&quot;Open Sans&quot;, Arial, sans-serif',&quot;font-size&quot;:&quot;12px&quot;,fill:c.defaultLine,&quot;pointer-events&quot;:&quot;all&quot;}).each(function(){var t=n.select(this);t.append(&quot;tspan&quot;).classed(&quot;js-link-to-tool&quot;,!0),t.append(&quot;tspan&quot;).classed(&quot;js-link-spacer&quot;,!0),t.append(&quot;tspan&quot;).classed(&quot;js-sourcelinks&quot;,!0)})}),i=r.node(),a={y:e._paper.attr(&quot;height&quot;)-9};document.body.contains(i)&amp;&amp;i.getComputedTextLength()&gt;=e.width-20?(a[&quot;text-anchor&quot;]=&quot;start&quot;,a.x=5):(a[&quot;text-anchor&quot;]=&quot;end&quot;,a.x=e._paper.attr(&quot;width&quot;)-7),r.attr(a);var o=r.select(&quot;.js-link-to-tool&quot;),s=r.select(&quot;.js-link-spacer&quot;),u=r.select(&quot;.js-sourcelinks&quot;);t._context.showSources&amp;&amp;t._context.showSources(t),t._context.showLink&amp;&amp;function(t,e){e.text(&quot;&quot;);var r=e.append(&quot;a&quot;).attr({&quot;xlink:xlink:href&quot;:&quot;#&quot;,class:&quot;link--impt link--embedview&quot;,&quot;font-weight&quot;:&quot;bold&quot;}).text(t._context.linkText+&quot; &quot;+String.fromCharCode(187));if(t._context.sendData)r.on(&quot;click&quot;,function(){v.sendDataToCloud(t)});else{var n=window.location.pathname.split(&quot;/&quot;),i=window.location.search;r.attr({&quot;xlink:xlink:show&quot;:&quot;new&quot;,&quot;xlink:xlink:href&quot;:&quot;/&quot;+n[2].split(&quot;.&quot;)[0]+&quot;/&quot;+n[1]+i})}}(t,o),s.text(o.text()&amp;&amp;u.text()?&quot; - &quot;:&quot;&quot;)}},v.sendDataToCloud=function(t){t.emit(&quot;plotly_beforeexport&quot;);var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append(&quot;div&quot;).attr(&quot;id&quot;,&quot;hiddenform&quot;).style(&quot;display&quot;,&quot;none&quot;),i=r.append(&quot;form&quot;).attr({action:e+&quot;/external&quot;,method:&quot;post&quot;,target:&quot;_blank&quot;});return i.append(&quot;input&quot;).attr({type:&quot;text&quot;,name:&quot;data&quot;}).node().value=v.graphJson(t,!1,&quot;keepdata&quot;),i.node().submit(),r.remove(),t.emit(&quot;plotly_afterexport&quot;),!1};var b,_=[&quot;days&quot;,&quot;shortDays&quot;,&quot;months&quot;,&quot;shortMonths&quot;,&quot;periods&quot;,&quot;dateTime&quot;,&quot;date&quot;,&quot;time&quot;,&quot;decimal&quot;,&quot;thousands&quot;,&quot;grouping&quot;,&quot;currency&quot;],w=[&quot;year&quot;,&quot;month&quot;,&quot;dayMonth&quot;,&quot;dayMonthYear&quot;];function k(t,e){var r=t._context.locale,n=!1,i={};function o(t){for(var r=!0,a=0;a&lt;e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&amp;&amp;(n=!0)}for(var s=0;s&lt;2;s++){for(var l=t._context.locales,c=0;c&lt;2;c++){var u=(l[r]||{}).format;if(u&amp;&amp;(o(u),n))break;l=a.localeRegistry}var f=r.split(&quot;-&quot;)[0];if(n||f===r)break;r=f}return n||o(a.localeRegistry.en.format),i}function M(t){var e=t.transforms;if(Array.isArray(e)&amp;&amp;e.length)for(var r=0;r&lt;e.length;r++){var n=e[r],i=n._module||y[n.type];if(i&amp;&amp;i.makesData)return!0}return!1}function A(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o&lt;i.length;o++){var s=i[o],l=y[s.type];l&amp;&amp;l.transform&amp;&amp;(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function T(t){t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={})}function S(t){for(var e=0;e&lt;t.length;e++)t[e].clearCalc()}v.supplyDefaults=function(t,e){var r=e&amp;&amp;e.skipUpdateCalc,i=t._fullLayout||{};if(i._skipDefaults)delete i._skipDefaults;else{var o,s=t._fullLayout={},c=t.layout||{},u=t._fullData||[],p=t._fullData=[],d=t.data||[],y=t.calcdata||[],x=t._context||{};t._transitionData||v.createTransitionData(t),s._dfltTitle={plot:m(t,&quot;Click to enter Plot title&quot;),x:m(t,&quot;Click to enter X axis title&quot;),y:m(t,&quot;Click to enter Y axis title&quot;),colorbar:m(t,&quot;Click to enter Colorscale title&quot;),annotation:m(t,&quot;new text&quot;)},s._traceWord=m(t,&quot;trace&quot;);var M=k(t,_);if(s._mapboxAccessToken=x.mapboxAccessToken,i._initialAutoSizeIsDone){var A=i.width,T=i.height;v.supplyLayoutGlobalDefaults(c,s,M),c.width||(s.width=A),c.height||(s.height=T),v.sanitizeMargins(s)}else{v.supplyLayoutGlobalDefaults(c,s,M);var S=!c.width||!c.height,E=s.autosize,C=x.autosizable;S&amp;&amp;(E||C)?v.plotAutoSize(t,c,s):S&amp;&amp;v.sanitizeMargins(s),!E&amp;&amp;S&amp;&amp;(c.width=s.width,c.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),n.locale(t)}(M,s.separators),s._extraFormat=k(t,w),s._initialAutoSizeIsDone=!0,s._dataLength=d.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var L=s._subplots=function(){var t,e,r={};if(!b){b=[];var n=a.subplotsRegistry;for(var i in n){var o=n[i],s=o.attr;if(s&amp;&amp;(b.push(i),Array.isArray(s)))for(e=0;e&lt;s.length;e++)l.pushUnique(b,s[e])}}for(t=0;t&lt;b.length;t++)r[b[t]]=[];return r}(),z=s._splomAxes={x:{},y:{}},P=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._requestRangeslider={},s._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r&lt;t.length;r++){var o=t[r]._fullInput;o!==n&amp;&amp;a.push(o),n=o}var s=a.length,c=new Array(i),u={};function f(t,e){c[e]=t,u[t]=1}function h(t,e){if(t&amp;&amp;&quot;string&quot;==typeof t&amp;&amp;!u[t])return f(t,e),!0}for(r=0;r&lt;i;r++)h(e[r].uid,r)||r&lt;s&amp;&amp;h(a[r].uid,r)||f(l.randstr(u),r);return c}(u,d),s._globalTransforms=(t._context||{}).globalTransforms,v.supplyDataDefaults(d,p,c,s);var O=Object.keys(z.x),I=Object.keys(z.y);if(O.length&gt;1&amp;&amp;I.length&gt;1){for(a.getComponentMethod(&quot;grid&quot;,&quot;sizeDefaults&quot;)(c,s),o=0;o&lt;O.length;o++)l.pushUnique(L.xaxis,O[o]);for(o=0;o&lt;I.length;o++)l.pushUnique(L.yaxis,I[o]);for(var D in P)l.pushUnique(L.cartesian,D)}s._has=v._hasPlotType.bind(s);var R=s._visibleModules;for(o=0;o&lt;R.length;o++){var B=R[o];B.cleanData&amp;&amp;B.cleanData(p)}if(u.length===p.length)for(o=0;o&lt;p.length;o++)g(p[o],u[o]);v.supplyLayoutModuleDefaults(c,s,p,t._transitionData),s._hasOnlyLargeSploms=1===s._basePlotModules.length&amp;&amp;&quot;splom&quot;===s._basePlotModules[0].name&amp;&amp;O.length&gt;15&amp;&amp;I.length&gt;15&amp;&amp;0===s.shapes.length&amp;&amp;0===s.images.length,s._hasCartesian=s._has(&quot;cartesian&quot;),s._hasGeo=s._has(&quot;geo&quot;),s._hasGL3D=s._has(&quot;gl3d&quot;),s._hasGL2D=s._has(&quot;gl2d&quot;),s._hasTernary=s._has(&quot;ternary&quot;),s._hasPie=s._has(&quot;pie&quot;),v.linkSubplots(p,s,u,i),v.cleanPlot(p,s,u,i,y),g(s,i),v.doAutoMargin(t);var F=f.list(t);for(o=0;o&lt;F.length;o++){F[o].setScale()}r||y.length!==p.length||v.supplyDefaultsUpdateCalc(y,p),s._basePlotModules.sort(h)}},v.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r&lt;e.length;r++){var n=e[r],i=t[r][0];if(i&amp;&amp;i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,c,u=a._arrayAttrs;for(o=0;o&lt;u.length;o++)s=u[o],c=l.nestedProperty(a,s).get().slice(),l.nestedProperty(n,s).set(c)}i.trace=n}}},v.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},v._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e&lt;r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e&lt;n.length;e++){var i=n[e].name;if(i===t)return!0;var o=a.modules[i];if(o&amp;&amp;o.categories[t])return!0}return!1},v.cleanPlot=function(t,e,r,n,i){var a,o,s=n._basePlotModules||[];for(a=0;a&lt;s.length;a++){var l=s[a];l.clean&amp;&amp;l.clean(t,e,r,n,i)}var c=n._has&amp;&amp;n._has(&quot;gl&quot;),u=e._has&amp;&amp;e._has(&quot;gl&quot;);c&amp;&amp;!u&amp;&amp;void 0!==n._glcontainer&amp;&amp;(n._glcontainer.selectAll(&quot;.gl-canvas&quot;).remove(),n._glcontainer.selectAll(&quot;.no-webgl&quot;).remove(),n._glcanvas=null);var f=!!n._infolayer;t:for(a=0;a&lt;r.length;a++){var h=r[a].uid;for(o=0;o&lt;t.length;o++){if(h===t[o].uid)continue t}f&amp;&amp;n._infolayer.select(&quot;.cb&quot;+h).remove()}n._zoomlayer&amp;&amp;n._zoomlayer.selectAll(&quot;.select-outline&quot;).remove()},v.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},s=e._plots={},l=e._subplots,c={_fullData:t,_fullLayout:e},u=l.cartesian.concat(l.gl2d||[]);for(i=0;i&lt;u.length;i++){var h,p=u[i],d=o[p],g=f.getFromId(c,p,&quot;x&quot;),m=f.getFromId(c,p,&quot;y&quot;);for(d?h=s[p]=d:(h=s[p]={}).id=p,h.xaxis=g,h.yaxis=m,h._hasClipOnAxisFalse=!1,a=0;a&lt;t.length;a++){var v=t[a];if(v.xaxis===h.xaxis._id&amp;&amp;v.yaxis===h.yaxis._id&amp;&amp;!1===v.cliponaxis){h._hasClipOnAxisFalse=!0;break}}}var y=f.list(c,null,!0);for(i=0;i&lt;y.length;i++){var x=y[i],b=null;x.overlaying&amp;&amp;(b=f.getFromId(c,x.overlaying))&amp;&amp;b.overlaying&amp;&amp;(x.overlaying=!1,b=null),x._mainAxis=b||x,b&amp;&amp;(x.domain=b.domain.slice()),x._anchorAxis=&quot;free&quot;===x.anchor?null:f.getFromId(c,x.anchor)}},v.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],o.crawl(t._module.attributes,function(t,n,i,a){r[a]=n,r.length=a+1,&quot;color&quot;===t.valType&amp;&amp;void 0===t.dflt&amp;&amp;e.push(r.join(&quot;.&quot;))})),n=0;n&lt;e.length;n++){l.nestedProperty(t,&quot;_input.&quot;+e[n]).get()||l.nestedProperty(t,e[n]).set(null)}},v.supplyDataDefaults=function(t,e,r,n){var i,o,c,u=n._modules,f=n._visibleModules,h=n._basePlotModules,p=0,d=0;function m(t){e.push(t);var r=t._module;r&amp;&amp;(l.pushUnique(u,r),!0===t.visible&amp;&amp;l.pushUnique(f,r),l.pushUnique(h,t._module.basePlotModule),p++,!1!==t._input.visible&amp;&amp;d++)}n._transformModules=[];var y={},x=[],b=(r.template||{}).data||{},_=s.traceTemplater(b);for(i=0;i&lt;t.length;i++){if(c=t[i],(o=_.newTrace(c)).uid=n._traceUids[i],v.supplyTraceDefaults(c,o,d,n,i),o.index=i,o._input=c,o._expandedIndex=p,o.transforms&amp;&amp;o.transforms.length)for(var w=A(o,e,r,n),k=0;k&lt;w.length;k++){var M=w[k],T={_template:o._template,type:o.type,uid:o.uid+k};v.supplyTraceDefaults(M,T,p,n,i),g(T,M),T.index=i,T._input=c,T._fullInput=o,T._expandedIndex=p,T._expandedInput=M,m(T)}else o._fullInput=o,o._expandedInput=o,m(o);a.traceIs(o,&quot;carpetAxis&quot;)&amp;&amp;(y[o.carpet]=o),a.traceIs(o,&quot;carpetDependent&quot;)&amp;&amp;x.push(i)}for(i=0;i&lt;x.length;i++)if((o=e[x[i]]).visible){var S=y[o.carpet];o._carpet=S,S&amp;&amp;S.visible?(o.xaxis=S.xaxis,o.yaxis=S.yaxis):o.visible=!1}},v.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return l.coerce(t||{},r,p,e,n)}if(n(&quot;mode&quot;),n(&quot;direction&quot;),n(&quot;fromcurrent&quot;),Array.isArray(t.frame))for(r.frame=[],e=0;e&lt;t.frame.length;e++)r.frame[e]=v.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=v.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e&lt;t.transition.length;e++)r.transition[e]=v.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=v.supplyAnimationTransitionDefaults(t.transition||{});return r},v.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return l.coerce(t||{},e,p.frame,r,n)}return r(&quot;duration&quot;),r(&quot;redraw&quot;),e},v.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return l.coerce(t||{},e,p.transition,r,n)}return r(&quot;duration&quot;),r(&quot;easing&quot;),e},v.supplyFrameDefaults=function(t){var e={};function r(r,n){return l.coerce(t,e,d,r,n)}return r(&quot;group&quot;),r(&quot;name&quot;),r(&quot;traces&quot;),r(&quot;baseframe&quot;),r(&quot;data&quot;),r(&quot;layout&quot;),e},v.supplyTraceDefaults=function(t,e,r,n,i){var o,s=n.colorway||c.defaults,u=s[r%s.length];function f(r,n){return l.coerce(t,e,v.attributes,r,n)}var h=f(&quot;visible&quot;);f(&quot;type&quot;),f(&quot;name&quot;,n._traceWord+&quot; &quot;+i);var p=v.getModule(e);if(e._module=p,p){var d=p.basePlotModule,g=d.attr,m=d.attributes;if(g&amp;&amp;m){var y=n._subplots,x=&quot;&quot;;if(&quot;gl2d&quot;!==d.name||h){if(Array.isArray(g))for(o=0;o&lt;g.length;o++){var b=g[o],_=l.coerce(t,e,m,b);y[b]&amp;&amp;l.pushUnique(y[b],_),x+=_}else x=l.coerce(t,e,m,g);y[d.name]&amp;&amp;l.pushUnique(y[d.name],x)}}}return h&amp;&amp;(f(&quot;customdata&quot;),f(&quot;ids&quot;),a.traceIs(e,&quot;showLegend&quot;)?(e._dfltShowLegend=!0,f(&quot;showlegend&quot;),f(&quot;legendgroup&quot;)):e._dfltShowLegend=!1,a.getComponentMethod(&quot;fx&quot;,&quot;supplyDefaults&quot;)(t,e,u,n),p&amp;&amp;(p.supplyDefaults(t,e,u,n),l.coerceHoverinfo(t,e,n)),a.traceIs(e,&quot;noOpacity&quot;)||f(&quot;opacity&quot;),a.traceIs(e,&quot;notLegendIsolatable&quot;)&amp;&amp;(e.visible=!!e.visible),p&amp;&amp;p.selectPoints&amp;&amp;f(&quot;selectedpoints&quot;),v.supplyTransformDefaults(t,e,n)),e},v.hasMakesDataTransform=M,v.supplyTransformDefaults=function(t,e,r){if(e._length||M(t)){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],c=0;c&lt;o.length;c++){var u,f=o[c],h=f.type,p=y[h],d=!(f._module&amp;&amp;f._module===p),g=p&amp;&amp;&quot;function&quot;==typeof p.transform;p||l.warn(&quot;Unrecognized transform type &quot;+h+&quot;.&quot;),p&amp;&amp;p.supplyDefaults&amp;&amp;(d||g)?((u=p.supplyDefaults(f,e,r,t)).type=h,u._module=p,l.pushUnique(i,p)):u=l.extendFlat({},f),s.push(u)}}},v.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return l.coerce(t,e,v.layoutAttributes,r,n)}var i=t.template;l.isPlainObject(i)&amp;&amp;(e.template=i,e._template=i.layout,e._dataTemplate=i.data);var o=l.coerceFont(n,&quot;font&quot;);n(&quot;title&quot;,e._dfltTitle.plot),l.coerceFont(n,&quot;titlefont&quot;,{family:o.family,size:Math.round(1.4*o.size),color:o.color}),n(&quot;autosize&quot;,!(t.width&amp;&amp;t.height)),n(&quot;width&quot;),n(&quot;height&quot;),n(&quot;margin.l&quot;),n(&quot;margin.r&quot;),n(&quot;margin.t&quot;),n(&quot;margin.b&quot;),n(&quot;margin.pad&quot;),n(&quot;margin.autoexpand&quot;),t.width&amp;&amp;t.height&amp;&amp;v.sanitizeMargins(e),a.getComponentMethod(&quot;grid&quot;,&quot;sizeDefaults&quot;)(t,e),n(&quot;paper_bgcolor&quot;),n(&quot;separators&quot;,r.decimal+r.thousands),n(&quot;hidesources&quot;),n(&quot;colorway&quot;),n(&quot;datarevision&quot;),a.getComponentMethod(&quot;calendars&quot;,&quot;handleDefaults&quot;)(t,e,&quot;calendar&quot;),a.getComponentMethod(&quot;fx&quot;,&quot;supplyLayoutGlobalDefaults&quot;)(t,e,n)},v.plotAutoSize=function(t,e,r){var n,a,o=t._context||{},s=o.frameMargins,c=l.isPlotDiv(t);if(c&amp;&amp;t.emit(&quot;plotly_autosize&quot;),o.fillFrame)n=window.innerWidth,a=window.innerHeight,document.body.style.overflow=&quot;hidden&quot;;else if(i(s)&amp;&amp;s&gt;0){var u=function(t){var e,r={left:0,right:0,bottom:0,top:0};if(t)for(e in t)t.hasOwnProperty(e)&amp;&amp;(r.left+=t[e].left||0,r.right+=t[e].right||0,r.bottom+=t[e].bottom||0,r.top+=t[e].top||0);return r}(t._boundingBoxMargins),f=u.left+u.right,h=u.bottom+u.top,p=1-2*s,d=r._container&amp;&amp;r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(p*(d.width-f)),a=Math.round(p*(d.height-h))}else{var g=c?window.getComputedStyle(t):{};n=parseFloat(g.width)||parseFloat(g.maxWidth)||r.width,a=parseFloat(g.height)||parseFloat(g.maxHeight)||r.height}var m=v.layoutAttributes.width.min,y=v.layoutAttributes.height.min;n&lt;m&amp;&amp;(n=m),a&lt;y&amp;&amp;(a=y);var x=!e.width&amp;&amp;Math.abs(r.width-n)&gt;1,b=!e.height&amp;&amp;Math.abs(r.height-a)&gt;1;(b||x)&amp;&amp;(x&amp;&amp;(r.width=n),b&amp;&amp;(r.height=a)),t._initialAutoSize||(t._initialAutoSize={width:n,height:a}),v.sanitizeMargins(r)},v.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,s,c=a.componentsRegistry,u=e._basePlotModules,f=a.subplotsRegistry.cartesian;for(i in c)(s=c[i]).includeBasePlot&amp;&amp;s.includeBasePlot(t,e);for(var h in u.length||u.push(f),e._has(&quot;cartesian&quot;)&amp;&amp;(a.getComponentMethod(&quot;grid&quot;,&quot;contentDefaults&quot;)(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(l.subplotSort);for(o=0;o&lt;u.length;o++)(s=u[o]).supplyLayoutDefaults&amp;&amp;s.supplyLayoutDefaults(t,e,r);var p=e._visibleModules;for(o=0;o&lt;p.length;o++)(s=p[o]).supplyLayoutDefaults&amp;&amp;s.supplyLayoutDefaults(t,e,r);var d=e._transformModules;for(o=0;o&lt;d.length;o++)(s=d[o]).supplyLayoutDefaults&amp;&amp;s.supplyLayoutDefaults(t,e,r,n);for(i in c)(s=c[i]).supplyLayoutDefaults&amp;&amp;s.supplyLayoutDefaults(t,e,r)},v.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&amp;&amp;(e._glcontainer.selectAll(&quot;.gl-canvas&quot;).remove(),e._glcontainer.remove(),e._glcanvas=null),void 0!==e._geocontainer&amp;&amp;e._geocontainer.remove(),e._modeBar&amp;&amp;e._modeBar.destroy(),t._transitionData&amp;&amp;(t._transitionData._interruptCallbacks&amp;&amp;(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&amp;&amp;window.cancelAnimationFrame(t._transitionData._animationRaf)),l.clearThrottle(),l.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.framework,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&amp;&amp;t.removeAllListeners()},v.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e&lt;r.length;e++){var i=r[e];i.style&amp;&amp;l.pushUnique(n,i.style)}for(e=0;e&lt;n.length;e++)n[e](t)},v.sanitizeMargins=function(t){if(t&amp;&amp;t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a&lt;0&amp;&amp;(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o&lt;0&amp;&amp;(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},v.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},v.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},v.autoMargin=function(t,e,r){var n=t._fullLayout;T(n);var i=n._pushmargin,a=n._pushmarginIds;if(!1!==n.margin.autoexpand){if(r){var o=r.pad;if(void 0===o){var s=n.margin;o=Math.min(12,s.l,s.r,s.t,s.b)}r.l+r.r&gt;.5*n.width&amp;&amp;(r.l=r.r=0),r.b+r.t&gt;.5*n.height&amp;&amp;(r.b=r.t=0);var l=void 0!==r.xl?r.xl:r.x,c=void 0!==r.xr?r.xr:r.x,u=void 0!==r.yt?r.yt:r.y,f=void 0!==r.yb?r.yb:r.y;i[e]={l:{val:l,size:r.l+o},r:{val:c,size:r.r+o},b:{val:f,size:r.b+o},t:{val:u,size:r.t+o}},a[e]=1}else delete i[e],delete a[e];n._replotting||v.doAutoMargin(t)}},v.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),T(e);var r=e._size,n=JSON.stringify(r),o=Math.max(e.margin.l||0,0),s=Math.max(e.margin.r||0,0),l=Math.max(e.margin.t||0,0),c=Math.max(e.margin.b||0,0),u=e._pushmargin,f=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var h in u)f[h]||delete u[h];for(var p in u.base={l:{val:0,size:o},r:{val:1,size:s},t:{val:1,size:l},b:{val:0,size:c}},u){var d=u[p].l||{},g=u[p].b||{},m=d.val,v=d.size,y=g.val,x=g.size;for(var b in u){if(i(v)&amp;&amp;u[b].r){var _=u[b].r.val,w=u[b].r.size;if(_&gt;m){var k=(v*_+(w-e.width)*m)/(_-m),M=(w*(1-m)+(v-e.width)*(1-_))/(_-m);k&gt;=0&amp;&amp;M&gt;=0&amp;&amp;k+M&gt;o+s&amp;&amp;(o=k,s=M)}}if(i(x)&amp;&amp;u[b].t){var A=u[b].t.val,S=u[b].t.size;if(A&gt;y){var E=(x*A+(S-e.height)*y)/(A-y),C=(S*(1-y)+(x-e.height)*(1-A))/(A-y);E&gt;=0&amp;&amp;C&gt;=0&amp;&amp;E+C&gt;c+l&amp;&amp;(c=E,l=C)}}}}}if(r.l=Math.round(o),r.r=Math.round(s),r.t=Math.round(l),r.b=Math.round(c),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&amp;&amp;&quot;{}&quot;!==n&amp;&amp;n!==JSON.stringify(e._size))return&quot;_redrawFromAutoMarginCount&quot;in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1,a.call(&quot;plot&quot;,t)},v.graphJson=function(t,e,r,n,i){(i&amp;&amp;e&amp;&amp;!t._fullData||i&amp;&amp;!e&amp;&amp;!t._fullLayout)&amp;&amp;v.supplyDefaults(t);var a=i?t._fullData:t.data,o=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if(&quot;function&quot;==typeof t)return null;if(l.isPlainObject(t)){var e,n,i={};for(e in t)if(&quot;function&quot;!=typeof t[e]&amp;&amp;-1===[&quot;_&quot;,&quot;[&quot;].indexOf(e.charAt(0))){if(&quot;keepdata&quot;===r){if(&quot;src&quot;===e.substr(e.length-3))continue}else if(&quot;keepstream&quot;===r){if(&quot;string&quot;==typeof(n=t[e+&quot;src&quot;])&amp;&amp;n.indexOf(&quot;:&quot;)&gt;0&amp;&amp;!l.isPlainObject(t.stream))continue}else if(&quot;keepall&quot;!==r&amp;&amp;&quot;string&quot;==typeof(n=t[e+&quot;src&quot;])&amp;&amp;n.indexOf(&quot;:&quot;)&gt;0)continue;i[e]=c(t[e])}return i}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(a||[]).map(function(t){var r=c(t);return e&amp;&amp;delete r.fit,r})};return e||(u.layout=c(o)),t.framework&amp;&amp;t.framework.isPolar&amp;&amp;(u=t.framework.getConfig()),s&amp;&amp;(u.frames=c(s)),&quot;object&quot;===n?u:JSON.stringify(u)},v.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r&lt;e.length;r++)switch((n=e[r]).type){case&quot;replace&quot;:i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&amp;&amp;(delete o[s],o[l]=i);break;case&quot;insert&quot;:o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case&quot;delete&quot;:delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},v.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error(&quot;computeFrame must be given a string frame name&quot;);var s=o[e.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&amp;&amp;(s=o[s.baseframe.toString()])&amp;&amp;-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&amp;&amp;(u.layout=v.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(n=s.traces))for(n=[],r=0;r&lt;s.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r&lt;s.data.length;r++)null!=(i=n[r])&amp;&amp;(-1===(a=u.traces.indexOf(i))&amp;&amp;(a=u.data.length,u.traces[a]=i),u.data[a]=v.extendTrace(u.data[a],s.data[r]))}return u},v.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n&lt;r.length;n++){var i=r[n];i&amp;&amp;i.name&amp;&amp;(e[i.name]=i)}},v.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,c,u,f=l.extendDeepNoArrays({},e||{}),h=l.expandObjectPaths(f),p={};if(r&amp;&amp;r.length)for(a=0;a&lt;r.length;a++)void 0===(i=(n=l.nestedProperty(h,r[a])).get())?l.nestedProperty(p,r[a]).set(null):(n.set(null),l.nestedProperty(p,r[a]).set(i));if(t=l.extendDeepNoArrays(t||{},h),r&amp;&amp;r.length)for(a=0;a&lt;r.length;a++)if(c=l.nestedProperty(p,r[a]).get()){for(u=(s=l.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o&lt;c.length;o++){var d=c[o];u[o]=null===d?null:v.extendObjectWithContainers(u[o],d)}s.set(u)}return t},v.dataArrayContainers=[&quot;transforms&quot;,&quot;dimensions&quot;],v.layoutArrayContainers=a.layoutArrayContainers,v.extendTrace=function(t,e){return v.extendObjectWithContainers(t,e,v.dataArrayContainers)},v.extendLayout=function(t,e){return v.extendObjectWithContainers(t,e,v.layoutArrayContainers)},v.transition=function(t,e,r,n,i,o){var s,c,u=Array.isArray(e)?e.length:0,f=n.slice(0,u),h=[];var p=!1;for(s=0;s&lt;f.length;s++){c=f[s];t._fullData[c]._module}var d=[v.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},function(){var n;for(n=0;n&lt;f.length;n++){var i=f[n],a=t._fullData[i]._module;a&amp;&amp;(a.animatable&amp;&amp;h.push(i),t.data[f[n]]=v.extendTrace(t.data[f[n]],e[n]))}var o=l.expandObjectPaths(l.extendDeepNoArrays({},r)),s=/^[xy]axis[0-9]*$/;for(var c in o)s.test(c)&amp;&amp;delete o[c].range;return v.extendLayout(t.layout,o),delete t.calcdata,v.supplyDefaults(t),v.doCalcdata(t),Promise.resolve()},v.rehover,function(){return t.emit(&quot;plotly_transitioning&quot;,[]),new Promise(function(e){t._transitioning=!0,o.duration&gt;0&amp;&amp;(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){p=!0}),i.redraw&amp;&amp;t._transitionData._interruptCallbacks.push(function(){return a.call(&quot;redraw&quot;,t)}),t._transitionData._interruptCallbacks.push(function(){t.emit(&quot;plotly_transitioninterrupted&quot;,[])});var n,s,c=0,u=0;function f(){return c++,function(){var r;u++,p||u!==c||(r=e,t._transitionData&amp;&amp;(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(i.redraw)return a.call(&quot;redraw&quot;,t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(&quot;plotly_transitioned&quot;,[])}).then(r)))}}var d=t._fullLayout._basePlotModules,g=!1;if(r)for(s=0;s&lt;d.length;s++)if(d[s].transitionAxes){var m=l.expandObjectPaths(r);g=d[s].transitionAxes(t,m,o,f)||g}for(g?((n=l.extendFlat({},o)).duration=0,h=null):n=o,s=0;s&lt;d.length;s++)d[s].plot(t,h,n,f);setTimeout(f())})}],g=l.syncOrAsync(d,t);return g&amp;&amp;g.then||(g=Promise.resolve()),g.then(function(){return t})},v.doCalcdata=function(t,e){var r,n,i,s,c=f.list(t),h=t._fullData,p=t._fullLayout,d=new Array(h.length),g=(t.calcdata||[]).slice(0);for(t.calcdata=d,p._numBoxes=0,p._numViolins=0,p._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,p._piecolormap={},i=0;i&lt;h.length;i++)Array.isArray(e)&amp;&amp;-1===e.indexOf(i)&amp;&amp;(d[i]=g[i]);for(i=0;i&lt;h.length;i++)(r=h[i])._arrayAttrs=o.findArrayAttributes(r),r._extremes={};var m=p._subplots.polar||[];for(i=0;i&lt;m.length;i++)c.push(p[m[i]].radialaxis,p[m[i]].angularaxis);S(c);var v=!1;for(i=0;i&lt;h.length;i++)if(!0===(r=h[i]).visible&amp;&amp;r.transforms){if((n=r._module)&amp;&amp;n.calc){var x=n.calc(t,r);x[0]&amp;&amp;x[0].t&amp;&amp;x[0].t._scene&amp;&amp;delete x[0].t._scene.dirty}for(s=0;s&lt;r.transforms.length;s++){var b=r.transforms[s];(n=y[b.type])&amp;&amp;n.calcTransform&amp;&amp;(r._hasCalcTransform=!0,v=!0,n.calcTransform(t,r,b))}}function _(e,i){if(r=h[e],!!(n=r._module).isContainer===i){var a=[];if(!0===r.visible){delete r._indexToPoints;var o=r.transforms||[];for(s=o.length-1;s&gt;=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&amp;&amp;n.calc&amp;&amp;(a=n.calc(t,r))}Array.isArray(a)&amp;&amp;a[0]||(a=[{x:u,y:u}]),a[0].t||(a[0].t={}),a[0].trace=r,d[e]=a}}for(v&amp;&amp;S(c),i=0;i&lt;h.length;i++)_(i,!0);for(i=0;i&lt;h.length;i++)_(i,!1);!function(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r&lt;a.length;r++){var s=a[r],c=s.crossTraceCalc;if(c){var u=s.basePlotModule.name;o[u]?l.pushUnique(o[u],c):o[u]=[c]}}for(n in o){var f=o[n],h=i._subplots[n];if(Array.isArray(h))for(e=0;e&lt;h.length;e++){var p=h[e],d=&quot;cartesian&quot;===n?i._plots[p]:i[p];for(r=0;r&lt;f.length;r++)f[r](t,d,p)}else for(r=0;r&lt;f.length;r++)f[r](t)}}(t),a.getComponentMethod(&quot;fx&quot;,&quot;calc&quot;)(t),a.getComponentMethod(&quot;errorbars&quot;,&quot;calc&quot;)(t)},v.rehover=function(t){t._fullLayout._rehover&amp;&amp;t._fullLayout._rehover()},v.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i&lt;r.length;i++){var s=r[i],c=s[0].trace;c.visible&amp;&amp;(o[c.type]=o[c.type]||[],o[c.type].push(s))}for(var u in a)if(!o[u]){var f=a[u][0];f[0].trace.visible=!1,o[u]=[f]}for(var h in o){var p=o[h];p[0][0].trace._module.plot(t,e,l.filterVisible(p),n)}e.traceHash=o}},{&quot;../components/color&quot;:567,&quot;../constants/numerical&quot;:670,&quot;../lib&quot;:693,&quot;../plot_api/plot_schema&quot;:731,&quot;../plot_api/plot_template&quot;:732,&quot;../plots/cartesian/axis_ids&quot;:745,&quot;../registry&quot;:825,&quot;./animation_attributes&quot;:737,&quot;./attributes&quot;:739,&quot;./command&quot;:766,&quot;./font_attributes&quot;:768,&quot;./frame_attributes&quot;:769,&quot;./layout_attributes&quot;:796,&quot;./sort_modules&quot;:819,d3:147,&quot;fast-isnumeric&quot;:213}],806:[function(t,e,r){&quot;use strict&quot;;e.exports={attr:&quot;subplot&quot;,name:&quot;polar&quot;,axisNames:[&quot;angularaxis&quot;,&quot;radialaxis&quot;],axisName2dataArray:{angularaxis:&quot;theta&quot;,radialaxis:&quot;r&quot;},layerNames:[&quot;draglayer&quot;,&quot;plotbg&quot;,&quot;backplot&quot;,&quot;angular-grid&quot;,&quot;radial-grid&quot;,&quot;frontplot&quot;,&quot;angular-line&quot;,&quot;radial-line&quot;,&quot;angular-axis&quot;,&quot;radial-axis&quot;],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],807:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../lib/polygon&quot;).tester,a=n.findIndexOfMin,o=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function c(t,e,r,n){var i,a,o=n[0],s=n[1],l=f(Math.sin(e)-Math.sin(t)),c=f(Math.cos(e)-Math.cos(t)),u=Math.tan(r),h=f(1/u),p=l/c,d=s-p*o;return h?l&amp;&amp;c?a=u*(i=d/(u-p)):c?(i=s*h,a=s):(i=o,a=o*u):l&amp;&amp;c?(i=0,a=d):c?(i=0,a=s):i=a=NaN,[i,a]}function u(t,e,r,i){return n.isFullCircle([e,r])?function(t,e){var r,n=e.length,i=new Array(n+1);for(r=0;r&lt;n;r++){var a=e[r];i[r]=[t*Math.cos(a),t*Math.sin(a)]}return i[r]=i[0].slice(),i}(t,i):function(t,e,r,i){var s,u,f=i.length,h=[];function p(e){return[t*Math.cos(e),t*Math.sin(e)]}function d(t,e,r){return c(t,e,r,p(t))}function g(t){return n.mod(t,f)}function m(t){return o(t,[e,r])}var v=a(i,function(t){return m(t)?l(t,e):1/0}),y=d(i[v],i[g(v-1)],e);for(h.push(y),s=v,u=0;u&lt;f;s++,u++){var x=i[g(s)];if(!m(x))break;h.push(p(x))}var b=a(i,function(t){return m(t)?l(t,r):1/0}),_=d(i[b],i[g(b+1)],r);return h.push(_),h.push([0,0]),h.push(h[0].slice()),h}(t,e,r,i)}function f(t){return Math.abs(t)&gt;1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a&lt;n;a++){var o=t[a];i[a]=[e+o[0],r-o[1]]}return i}e.exports={isPtInsidePolygon:function(t,e,r,n,a){if(!o(e,n))return!1;var s,l;r[0]&lt;r[1]?(s=r[0],l=r[1]):(s=r[1],l=r[0]);var c=i(u(s,n[0],n[1],a)),f=i(u(l,n[0],n[1],a)),h=[t*Math.cos(e),t*Math.sin(e)];return f.contains(h)&amp;&amp;!c.contains(h)},findPolygonOffset:function(t,e,r,n){for(var i=1/0,a=1/0,o=u(t,e,r,n),s=0;s&lt;o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]},findEnclosingVertexAngles:function(t,e){var r=a(e,function(e){var r=s(e,t);return r&gt;0?r:1/0}),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return&quot;M&quot;+h(u(t,e,r,n),i,a).join(&quot;L&quot;)},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t&lt;e?(s=t,l=e):(s=e,l=t);var c=h(u(s,r,n,i),a,o);return&quot;M&quot;+h(u(l,r,n,i),a,o).reverse().join(&quot;L&quot;)+&quot;M&quot;+c.join(&quot;L&quot;)}}},{&quot;../../lib&quot;:693,&quot;../../lib/polygon&quot;:706}],808:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../get_data&quot;).getSubplotCalcData,i=t(&quot;../../lib&quot;).counterRegex,a=t(&quot;./polar&quot;),o=t(&quot;./constants&quot;),s=o.attr,l=o.name,c=i(l),u={};u[s]={valType:&quot;subplotid&quot;,dflt:l,editType:&quot;calc&quot;},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:t(&quot;./layout_attributes&quot;),supplyLayoutDefaults:t(&quot;./layout_defaults&quot;),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o&lt;i.length;o++){var s=i[o],c=n(r,l,s),u=e[s]._subplot;u||(u=a(t,s),e[s]._subplot=u),u.plot(c,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=0;a&lt;i.length;a++){var o=i[a],s=n[o]._subplot;if(!e[o]&amp;&amp;s)for(var c in s.framework.remove(),s.layers[&quot;radial-axis-title&quot;].remove(),s.clipPaths)s.clipPaths[c].remove()}},toSVG:t(&quot;../cartesian&quot;).toSVG}},{&quot;../../lib&quot;:693,&quot;../cartesian&quot;:753,&quot;../get_data&quot;:778,&quot;./constants&quot;:806,&quot;./layout_attributes&quot;:809,&quot;./layout_defaults&quot;:810,&quot;./polar&quot;:817}],809:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color/attributes&quot;),i=t(&quot;../cartesian/layout_attributes&quot;),a=t(&quot;../domain&quot;).attributes,o=t(&quot;../../lib&quot;).extendFlat,s=t(&quot;../../plot_api/edit_types&quot;).overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth},&quot;plot&quot;,&quot;from-root&quot;),c=s({tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},&quot;plot&quot;,&quot;from-root&quot;),u={visible:o({},i.visible,{dflt:!0}),type:i.type,autorange:i.autorange,rangemode:{valType:&quot;enumerated&quot;,values:[&quot;tozero&quot;,&quot;nonnegative&quot;,&quot;normal&quot;],dflt:&quot;tozero&quot;,editType:&quot;calc&quot;},range:i.range,categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:&quot;angle&quot;,editType:&quot;plot&quot;},side:{valType:&quot;enumerated&quot;,values:[&quot;clockwise&quot;,&quot;counterclockwise&quot;],dflt:&quot;clockwise&quot;,editType:&quot;plot&quot;},title:o({},i.title,{editType:&quot;plot&quot;,dflt:&quot;&quot;}),titlefont:s(i.titlefont,&quot;plot&quot;,&quot;from-root&quot;),hoverformat:i.hoverformat,editType:&quot;calc&quot;};o(u,l,c);var f={visible:o({},i.visible,{dflt:!0}),type:{valType:&quot;enumerated&quot;,values:[&quot;-&quot;,&quot;linear&quot;,&quot;category&quot;],dflt:&quot;-&quot;,editType:&quot;calc&quot;,_noTemplating:!0},categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:&quot;enumerated&quot;,values:[&quot;radians&quot;,&quot;degrees&quot;],dflt:&quot;degrees&quot;,editType:&quot;calc&quot;},period:{valType:&quot;number&quot;,editType:&quot;calc&quot;,min:0},direction:{valType:&quot;enumerated&quot;,values:[&quot;counterclockwise&quot;,&quot;clockwise&quot;],dflt:&quot;counterclockwise&quot;,editType:&quot;calc&quot;},rotation:{valType:&quot;angle&quot;,editType:&quot;calc&quot;},hoverformat:i.hoverformat,editType:&quot;calc&quot;};o(f,l,c),e.exports={domain:a({name:&quot;polar&quot;,editType:&quot;plot&quot;}),sector:{valType:&quot;info_array&quot;,items:[{valType:&quot;number&quot;,editType:&quot;plot&quot;},{valType:&quot;number&quot;,editType:&quot;plot&quot;}],dflt:[0,360],editType:&quot;plot&quot;},hole:{valType:&quot;number&quot;,min:0,max:1,dflt:0,editType:&quot;plot&quot;},bgcolor:{valType:&quot;color&quot;,editType:&quot;plot&quot;,dflt:n.background},radialaxis:u,angularaxis:f,gridshape:{valType:&quot;enumerated&quot;,values:[&quot;circular&quot;,&quot;linear&quot;],dflt:&quot;circular&quot;,editType:&quot;plot&quot;},editType:&quot;calc&quot;}},{&quot;../../components/color/attributes&quot;:566,&quot;../../lib&quot;:693,&quot;../../plot_api/edit_types&quot;:725,&quot;../cartesian/layout_attributes&quot;:754,&quot;../domain&quot;:767}],810:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../subplot_defaults&quot;),o=t(&quot;../get_data&quot;).getSubplotData,s=t(&quot;../cartesian/tick_value_defaults&quot;),l=t(&quot;../cartesian/tick_mark_defaults&quot;),c=t(&quot;../cartesian/tick_label_defaults&quot;),u=t(&quot;../cartesian/category_order_defaults&quot;),f=t(&quot;../cartesian/line_grid_defaults&quot;),h=t(&quot;../cartesian/axis_autotype&quot;),p=t(&quot;./layout_attributes&quot;),d=t(&quot;./set_convert&quot;),g=t(&quot;./constants&quot;),m=g.axisNames;function v(t,e,r,a){var h=r(&quot;bgcolor&quot;);a.bgColor=i.combine(h,a.paper_bgcolor);var v=r(&quot;sector&quot;);r(&quot;hole&quot;);var x,b=o(a.fullData,g.name,a.id),_=a.layoutOut;function w(t,e){return r(x+&quot;.&quot;+t,e)}for(var k=0;k&lt;m.length;k++){x=m[k],n.isPlainObject(t[x])||(t[x]={});var M=t[x],A=e[x]={};A._id=A._name=x,A._traceIndices=b.map(function(t){return t._expandedIndex});var T=g.axisName2dataArray[x],S=y(M,A,w,b,T);u(M,A,w,{axData:b,dataAttr:T});var E,C,L=w(&quot;visible&quot;);switch(d(A,e,_),L&amp;&amp;(C=(E=w(&quot;color&quot;))===M.color?E:a.font.color),A._m=1,x){case&quot;radialaxis&quot;:var z=w(&quot;autorange&quot;,!A.isValidRange(M.range));M.autorange=z,!z||&quot;linear&quot;!==S&amp;&amp;&quot;-&quot;!==S||w(&quot;rangemode&quot;),&quot;reversed&quot;===z&amp;&amp;(A._m=-1),w(&quot;range&quot;),A.cleanRange(&quot;range&quot;,{dfltRange:[0,1]}),L&amp;&amp;(w(&quot;side&quot;),w(&quot;angle&quot;,v[0]),w(&quot;title&quot;),n.coerceFont(w,&quot;titlefont&quot;,{family:a.font.family,size:Math.round(1.2*a.font.size),color:C}));break;case&quot;angularaxis&quot;:if(&quot;date&quot;===S){n.log(&quot;Polar plots do not support date angular axes yet.&quot;);for(var P=0;P&lt;b.length;P++)b[P].visible=!1;S=M.type=A.type=&quot;linear&quot;}w(&quot;linear&quot;===S?&quot;thetaunit&quot;:&quot;period&quot;);var O=w(&quot;direction&quot;);w(&quot;rotation&quot;,{counterclockwise:0,clockwise:90}[O])}if(L)s(M,A,w,A.type),c(M,A,w,A.type,{tickSuffixDflt:&quot;degrees&quot;===A.thetaunit?&quot;\xb0&quot;:void 0}),l(M,A,w,{outerTicks:!0}),w(&quot;showticklabels&quot;)&amp;&amp;(n.coerceFont(w,&quot;tickfont&quot;,{family:a.font.family,size:a.font.size,color:C}),w(&quot;tickangle&quot;),w(&quot;tickformat&quot;)),f(M,A,w,{dfltColor:E,bgColor:a.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:p[x]}),w(&quot;layer&quot;);&quot;category&quot;!==S&amp;&amp;w(&quot;hoverformat&quot;),A._input=M}&quot;category&quot;===e.angularaxis.type&amp;&amp;r(&quot;gridshape&quot;)}function y(t,e,r,n,i){if(&quot;-&quot;===r(&quot;type&quot;)){for(var a,o=0;o&lt;n.length;o++)if(n[o].visible){a=n[o];break}a&amp;&amp;a[i]&amp;&amp;(e.type=h(a[i],&quot;gregorian&quot;)),&quot;-&quot;===e.type?e.type=&quot;linear&quot;:t.type=e.type}return e.type}e.exports=function(t,e,r){a(t,e,r,{type:g.name,attributes:p,handleDefaults:v,font:e.font,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../cartesian/axis_autotype&quot;:743,&quot;../cartesian/category_order_defaults&quot;:746,&quot;../cartesian/line_grid_defaults&quot;:756,&quot;../cartesian/tick_label_defaults&quot;:761,&quot;../cartesian/tick_mark_defaults&quot;:762,&quot;../cartesian/tick_value_defaults&quot;:763,&quot;../get_data&quot;:778,&quot;../subplot_defaults&quot;:820,&quot;./constants&quot;:806,&quot;./layout_attributes&quot;:809,&quot;./set_convert&quot;:818}],811:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../../traces/scatter/attributes&quot;),i=n.marker,a=t(&quot;../../../lib/extend&quot;).extendFlat;[&quot;Area traces are deprecated!&quot;,&quot;Please switch to the *barpolar* trace type.&quot;].join(&quot; &quot;);e.exports={r:a({},n.r,{}),t:a({},n.t,{}),marker:{color:a({},i.color,{}),size:a({},i.size,{}),symbol:a({},i.symbol,{}),opacity:a({},i.opacity,{}),editType:&quot;calc&quot;}}},{&quot;../../../lib/extend&quot;:682,&quot;../../../traces/scatter/attributes&quot;:1032}],812:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../cartesian/layout_attributes&quot;),i=t(&quot;../../../lib/extend&quot;).extendFlat,a=t(&quot;../../../plot_api/edit_types&quot;).overrideAll,o=[&quot;Legacy polar charts are deprecated!&quot;,&quot;Please switch to *polar* subplots.&quot;].join(&quot; &quot;),s=i({},n.domain,{});function l(t,e){return i({},e,{showline:{valType:&quot;boolean&quot;},showticklabels:{valType:&quot;boolean&quot;},tickorientation:{valType:&quot;enumerated&quot;,values:[&quot;horizontal&quot;,&quot;vertical&quot;]},ticklen:{valType:&quot;number&quot;,min:0},tickcolor:{valType:&quot;color&quot;},ticksuffix:{valType:&quot;string&quot;},endpadding:{valType:&quot;number&quot;,description:o},visible:{valType:&quot;boolean&quot;}})}e.exports=a({radialaxis:l(0,{range:{valType:&quot;info_array&quot;,items:[{valType:&quot;number&quot;},{valType:&quot;number&quot;}]},domain:s,orientation:{valType:&quot;number&quot;}}),angularaxis:l(0,{range:{valType:&quot;info_array&quot;,items:[{valType:&quot;number&quot;,dflt:0},{valType:&quot;number&quot;,dflt:360}]},domain:s}),layout:{direction:{valType:&quot;enumerated&quot;,values:[&quot;clockwise&quot;,&quot;counterclockwise&quot;]},orientation:{valType:&quot;angle&quot;}}},&quot;plot&quot;,&quot;nested&quot;)},{&quot;../../../lib/extend&quot;:682,&quot;../../../plot_api/edit_types&quot;:725,&quot;../../cartesian/layout_attributes&quot;:754}],813:[function(t,e,r){&quot;use strict&quot;;(e.exports=t(&quot;./micropolar&quot;)).manager=t(&quot;./micropolar_manager&quot;)},{&quot;./micropolar&quot;:814,&quot;./micropolar_manager&quot;:815}],814:[function(t,e,r){var n=t(&quot;d3&quot;),i=t(&quot;../../../lib&quot;).extendDeepAll,a=t(&quot;../../../constants/alignment&quot;).MID_SHIFT,o=e.exports={version:&quot;0.2.2&quot;};o.Axis=function(){var t,e,r,s,l={data:[],layout:{}},c={},u={},f=n.dispatch(&quot;hover&quot;),h={};return h.render=function(c){return function(c){e=c||e;var f=l.data,h=l.layout;(&quot;string&quot;==typeof e||e.nodeName)&amp;&amp;(e=n.select(e)),e.datum(f).each(function(e,l){var c=e.slice();u={data:o.util.cloneJson(c),layout:o.util.cloneJson(h)};var f=0;c.forEach(function(t,e){t.color||(t.color=h.defaultColorRange[f],f=(f+1)%h.defaultColorRange.length),t.strokeColor||(t.strokeColor=&quot;LinePlot&quot;===t.geometry?t.color:n.rgb(t.color).darker().toString()),u.data[e].color=t.color,u.data[e].strokeColor=t.strokeColor,u.data[e].strokeDash=t.strokeDash,u.data[e].strokeSize=t.strokeSize});var p=c.filter(function(t,e){var r=t.visible;return&quot;undefined&quot;==typeof r||!0===r}),d=!1,g=p.map(function(t,e){return d=d||&quot;undefined&quot;!=typeof t.groupId,t});if(d){var m=n.nest().key(function(t,e){return&quot;undefined&quot;!=typeof t.groupId?t.groupId:&quot;unstacked&quot;}).entries(g),v=[],y=m.map(function(t,e){if(&quot;unstacked&quot;===t.key)return t.values;var r=t.values[0].r.map(function(t,e){return 0});return t.values.forEach(function(t,e,n){t.yStack=[r],v.push(r),r=o.util.sumArrays(t.r,r)}),t.values});p=n.merge(y)}p.forEach(function(t,e){t.t=Array.isArray(t.t[0])?t.t:[t.t],t.r=Array.isArray(t.r[0])?t.r:[t.r]});var x=Math.min(h.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2;x=Math.max(10,x);var b,_=[h.margin.left+x,h.margin.top+x];b=d?[0,n.max(o.util.sumArrays(o.util.arrayLast(p).r[0],o.util.arrayLast(v)))]:n.extent(o.util.flattenArray(p.map(function(t,e){return t.r}))),h.radialAxis.domain!=o.DATAEXTENT&amp;&amp;(b[0]=0),r=n.scale.linear().domain(h.radialAxis.domain!=o.DATAEXTENT&amp;&amp;h.radialAxis.domain?h.radialAxis.domain:b).range([0,x]),u.layout.radialAxis.domain=r.domain();var w,k=o.util.flattenArray(p.map(function(t,e){return t.t})),M=&quot;string&quot;==typeof k[0];M&amp;&amp;(k=o.util.deduplicate(k),w=k.slice(),k=n.range(k.length),p=p.map(function(t,e){var r=t;return t.t=[k],d&amp;&amp;(r.yStack=t.yStack),r}));var A=p.filter(function(t,e){return&quot;LinePlot&quot;===t.geometry||&quot;DotPlot&quot;===t.geometry}).length===p.length,T=null===h.needsEndSpacing?M||!A:h.needsEndSpacing,S=h.angularAxis.domain&amp;&amp;h.angularAxis.domain!=o.DATAEXTENT&amp;&amp;!M&amp;&amp;h.angularAxis.domain[0]&gt;=0?h.angularAxis.domain:n.extent(k),E=Math.abs(k[1]-k[0]);A&amp;&amp;!M&amp;&amp;(E=0);var C=S.slice();T&amp;&amp;M&amp;&amp;(C[1]+=E);var L=h.angularAxis.ticksCount||4;L&gt;8&amp;&amp;(L=L/(L/8)+L%8),h.angularAxis.ticksStep&amp;&amp;(L=(C[1]-C[0])/L);var z=h.angularAxis.ticksStep||(C[1]-C[0])/(L*(h.minorTicks+1));w&amp;&amp;(z=Math.max(Math.round(z),1)),C[2]||(C[2]=z);var P=n.range.apply(this,C);if(P=P.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range(&quot;clockwise&quot;===h.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=T?E:0,&quot;undefined&quot;==typeof(t=n.select(this).select(&quot;svg.chart-root&quot;))||t.empty()){var O=(new DOMParser).parseFromString(&quot;&lt;svg xmlns='http://www.w3.org/2000/svg' class='chart-root'&gt;' + '&lt;g class='outer-group'&gt;' + '&lt;g class='chart-group'&gt;' + '&lt;circle class='background-circle'&gt;&lt;/circle&gt;' + '&lt;g class='geometry-group'&gt;&lt;/g&gt;' + '&lt;g class='radial axis-group'&gt;' + '&lt;circle class='outside-circle'&gt;&lt;/circle&gt;' + '&lt;/g&gt;' + '&lt;g class='angular axis-group'&gt;&lt;/g&gt;' + '&lt;g class='guides-group'&gt;&lt;line&gt;&lt;/line&gt;&lt;circle r='0'&gt;&lt;/circle&gt;&lt;/g&gt;' + '&lt;/g&gt;' + '&lt;g class='legend-group'&gt;&lt;/g&gt;' + '&lt;g class='tooltips-group'&gt;&lt;/g&gt;' + '&lt;g class='title-group'&gt;&lt;text&gt;&lt;/text&gt;&lt;/g&gt;' + '&lt;/g&gt;' + '&lt;/svg&gt;&quot;,&quot;application/xml&quot;),I=this.appendChild(this.ownerDocument.importNode(O.documentElement,!0));t=n.select(I)}t.select(&quot;.guides-group&quot;).style({&quot;pointer-events&quot;:&quot;none&quot;}),t.select(&quot;.angular.axis-group&quot;).style({&quot;pointer-events&quot;:&quot;none&quot;}),t.select(&quot;.radial.axis-group&quot;).style({&quot;pointer-events&quot;:&quot;none&quot;});var D,R=t.select(&quot;.chart-group&quot;),B={fill:&quot;none&quot;,stroke:h.tickColor},F={&quot;font-size&quot;:h.font.size,&quot;font-family&quot;:h.font.family,fill:h.font.color,&quot;text-shadow&quot;:[&quot;-1px 0px&quot;,&quot;1px -1px&quot;,&quot;-1px 1px&quot;,&quot;1px 1px&quot;].map(function(t,e){return&quot; &quot;+t+&quot; 0 &quot;+h.font.outlineColor}).join(&quot;,&quot;)};if(h.showLegend){D=t.select(&quot;.legend-group&quot;).attr({transform:&quot;translate(&quot;+[x,h.margin.top]+&quot;)&quot;}).style({display:&quot;block&quot;});var N=p.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol=&quot;DotPlot&quot;===t.geometry?t.dotType||&quot;circle&quot;:&quot;LinePlot&quot;!=t.geometry?&quot;square&quot;:&quot;line&quot;,r.visibleInLegend=&quot;undefined&quot;==typeof t.visibleInLegend||t.visibleInLegend,r.color=&quot;LinePlot&quot;===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:p.map(function(t,e){return t.name||&quot;Element&quot;+e}),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:h.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(h.width-j.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,x=Math.max(10,x),_=[h.margin.left+x,h.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr(&quot;transform&quot;,&quot;translate(&quot;+[_[0]+x,_[1]-x]+&quot;)&quot;)}else D=t.select(&quot;.legend-group&quot;).style({display:&quot;none&quot;});t.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),R.attr(&quot;transform&quot;,&quot;translate(&quot;+_+&quot;)&quot;).style({cursor:&quot;crosshair&quot;});var V=[(h.width-(h.margin.left+h.margin.right+2*x+(j?j.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*x))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),t.select(&quot;.outer-group&quot;).attr(&quot;transform&quot;,&quot;translate(&quot;+V+&quot;)&quot;),h.title){var U=t.select(&quot;g.title-group text&quot;).style(F).text(h.title),q=U.node().getBBox();U.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(&quot;.radial.axis-group&quot;);if(h.radialAxis.gridLinesVisible){var G=H.selectAll(&quot;circle.grid-circle&quot;).data(r.ticks(5));G.enter().append(&quot;circle&quot;).attr({class:&quot;grid-circle&quot;}).style(B),G.attr(&quot;r&quot;,r),G.exit().remove()}H.select(&quot;circle.outside-circle&quot;).attr({r:x}).style(B);var W=t.select(&quot;circle.background-circle&quot;).attr({r:x}).style({fill:h.backgroundColor,stroke:h.stroke});function Y(t,e){return s(t)%360+h.orientation}if(h.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:&quot;rotate(&quot;+h.radialAxis.orientation+&quot;)&quot;}),H.selectAll(&quot;.domain&quot;).style(B),H.selectAll(&quot;g&gt;text&quot;).text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(F).style({&quot;text-anchor&quot;:&quot;start&quot;}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return&quot;horizontal&quot;===h.radialAxis.tickOrientation?&quot;rotate(&quot;+-h.radialAxis.orientation+&quot;) translate(&quot;+[0,F[&quot;font-size&quot;]]+&quot;)&quot;:&quot;translate(&quot;+[0,F[&quot;font-size&quot;]]+&quot;)&quot;}}),H.selectAll(&quot;g&gt;line&quot;).style({stroke:&quot;black&quot;})}var Z=t.select(&quot;.angular.axis-group&quot;).selectAll(&quot;g.angular-tick&quot;).data(P),$=Z.enter().append(&quot;g&quot;).classed(&quot;angular-tick&quot;,!0);Z.attr({transform:function(t,e){return&quot;rotate(&quot;+Y(t)+&quot;)&quot;}}).style({display:h.angularAxis.visible?&quot;block&quot;:&quot;none&quot;}),Z.exit().remove(),$.append(&quot;line&quot;).classed(&quot;grid-line&quot;,!0).classed(&quot;major&quot;,function(t,e){return e%(h.minorTicks+1)==0}).classed(&quot;minor&quot;,function(t,e){return!(e%(h.minorTicks+1)==0)}).style(B),$.selectAll(&quot;.minor&quot;).style({stroke:h.minorTickColor}),Z.select(&quot;line.grid-line&quot;).attr({x1:h.tickLength?x-h.tickLength:0,x2:x}).style({display:h.angularAxis.gridLinesVisible?&quot;block&quot;:&quot;none&quot;}),$.append(&quot;text&quot;).classed(&quot;axis-text&quot;,!0).style(F);var J=Z.select(&quot;text.axis-text&quot;).attr({x:x+h.labelOffset,dy:a+&quot;em&quot;,transform:function(t,e){var r=Y(t),n=x+h.labelOffset,i=h.angularAxis.tickOrientation;return&quot;horizontal&quot;==i?&quot;rotate(&quot;+-r+&quot; &quot;+n+&quot; 0)&quot;:&quot;radial&quot;==i?r&lt;270&amp;&amp;r&gt;90?&quot;rotate(180 &quot;+n+&quot; 0)&quot;:null:&quot;rotate(&quot;+(r&lt;=180&amp;&amp;r&gt;0?-90:90)+&quot; &quot;+n+&quot; 0)&quot;}}).style({&quot;text-anchor&quot;:&quot;middle&quot;,display:h.angularAxis.labelsVisible?&quot;block&quot;:&quot;none&quot;}).text(function(t,e){return e%(h.minorTicks+1)!=0?&quot;&quot;:w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(F);h.angularAxis.rewriteTicks&amp;&amp;J.text(function(t,e){return e%(h.minorTicks+1)!=0?&quot;&quot;:h.angularAxis.rewriteTicks(this.textContent,e)});var K=n.max(R.selectAll(&quot;.angular-tick text&quot;)[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));D.attr({transform:&quot;translate(&quot;+[x+K,h.margin.top]+&quot;)&quot;});var Q=t.select(&quot;g.geometry-group&quot;).selectAll(&quot;g&quot;).size()&gt;0,tt=t.select(&quot;g.geometry-group&quot;).selectAll(&quot;g.geometry&quot;).data(p);if(tt.enter().append(&quot;g&quot;).attr({class:function(t,e){return&quot;geometry geometry&quot;+e}}),tt.exit().remove(),p[0]||Q){var et=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=h.orientation,n.direction=h.direction,n.index=e,et.push({data:t,geometryConfig:n})});var rt=n.nest().key(function(t,e){return&quot;undefined&quot;!=typeof t.data.groupId||&quot;unstacked&quot;}).entries(et),nt=[];rt.forEach(function(t,e){&quot;unstacked&quot;===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return i(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=t.select(&quot;.guides-group&quot;),st=t.select(&quot;.tooltips-group&quot;),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!M){var ft=ot.select(&quot;line&quot;).attr({x1:0,y1:0,y2:0}).style({stroke:&quot;grey&quot;,&quot;pointer-events&quot;:&quot;none&quot;});R.on(&quot;mousemove.angular-guide&quot;,function(t,e){var r=o.util.getMousePos(W).angle;ft.attr({x2:-x,transform:&quot;rotate(&quot;+r+&quot;)&quot;}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on(&quot;mouseout.angular-guide&quot;,function(t,e){ot.select(&quot;line&quot;).style({opacity:0})})}var ht=ot.select(&quot;circle&quot;).style({stroke:&quot;grey&quot;,fill:&quot;none&quot;});R.on(&quot;mousemove.radial-guide&quot;,function(t,e){var n=o.util.getMousePos(W).radius;ht.attr({r:n}).style({opacity:.5}),at=r.invert(o.util.getMousePos(W).radius);var i=o.util.convertToCartesian(n,h.radialAxis.orientation);ct.text(o.util.round(at)).move([i[0]+_[0],i[1]+_[1]])}).on(&quot;mouseout.radial-guide&quot;,function(t,e){ht.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()}),t.selectAll(&quot;.geometry-group .mark&quot;).on(&quot;mouseover.tooltip&quot;,function(e,r){var i=n.select(this),a=this.style.fill,s=&quot;black&quot;,l=this.style.opacity||1;if(i.attr({&quot;data-opacity&quot;:l}),a&amp;&amp;&quot;none&quot;!==a){i.attr({&quot;data-fill&quot;:a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};M&amp;&amp;(c.t=w[e[0]]);var u=&quot;t: &quot;+c.t+&quot;, r: &quot;+c.r,f=this.getBoundingClientRect(),h=t.node().getBoundingClientRect(),p=[f.left+f.width/2-V[0]-h.left,f.top+f.height/2-V[1]-h.top];ut.config({color:s}).text(u),ut.move(p)}else a=this.style.stroke||&quot;black&quot;,i.attr({&quot;data-stroke&quot;:a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on(&quot;mousemove.tooltip&quot;,function(t,e){if(0!=n.event.which)return!1;n.select(this).attr(&quot;data-fill&quot;)&amp;&amp;ut.show()}).on(&quot;mouseout.tooltip&quot;,function(t,e){ut.hide();var r=n.select(this),i=r.attr(&quot;data-fill&quot;);i?r.style({fill:i,opacity:r.attr(&quot;data-opacity&quot;)}):r.style({stroke:r.attr(&quot;data-stroke&quot;),opacity:r.attr(&quot;data-opacity&quot;)})})})}(c),this},h.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)}),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},h.getLiveConfig=function(){return u},h.getinputConfig=function(){return c},h.radialScale=function(t){return r},h.angularScale=function(t){return s},h.svg=function(){return t},n.rebind(h,f,&quot;on&quot;),h},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:&quot;Line1&quot;,geometry:&quot;LinePlot&quot;,color:null,strokeDash:&quot;solid&quot;,strokeColor:null,strokeSize:&quot;1&quot;,visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:&quot;gray&quot;,outlineColor:&quot;white&quot;,family:&quot;Tahoma, sans-serif&quot;},direction:&quot;clockwise&quot;,orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:&quot;&quot;,visible:!0,gridLinesVisible:!0,tickOrientation:&quot;horizontal&quot;,rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:&quot;&quot;,visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:&quot;horizontal&quot;,rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:&quot;silver&quot;,minorTickColor:&quot;#eee&quot;,backgroundColor:&quot;none&quot;,needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT=&quot;dataExtent&quot;,o.AREA=&quot;AreaChart&quot;,o.LINE=&quot;LinePlot&quot;,o.DOT=&quot;DotPlot&quot;,o.BAR=&quot;BarChart&quot;,o.util._override=function(t,e){for(var r in t)r in e&amp;&amp;(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&amp;&amp;(s.name=r),s},o.util.ensureArray=function(t,e){if(&quot;undefined&quot;==typeof t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){&quot;string&quot;==typeof e&amp;&amp;(e=e.split(&quot;.&quot;));var r=e.shift();return t[r]&amp;&amp;(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- &gt;=0&amp;&amp;t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i&lt;a;i++)(e=t[i])in r?(r[e]++,n[e]=r[e]):r[e]=1;return n},o.util.duplicates=function(t){return Object.keys(o.util.duplicatesCount(t))},o.util.translator=function(t,e,r,n){if(n){var i=r.slice();r=e,e=i}var a=e.reduce(function(t,e){if(&quot;undefined&quot;!=typeof t)return t[e]},t);&quot;undefined&quot;!=typeof a&amp;&amp;(e.reduce(function(t,r,n){if(&quot;undefined&quot;!=typeof t)return n===e.length-1&amp;&amp;delete t[r],t[r]},t),r.reduce(function(t,e,n){return&quot;undefined&quot;==typeof t[e]&amp;&amp;(t[e]={}),n===r.length-1&amp;&amp;(t[e]=a),t[e]},t))},o.PolyChart=function(){var t=[o.PolyChart.defaultConfig()],e=n.dispatch(&quot;hover&quot;),r={solid:&quot;none&quot;,dash:[5,2],dot:[2,5]};function a(){var e=t[0].geometryConfig,i=e.container;&quot;string&quot;==typeof i&amp;&amp;(i=n.select(i)),i.datum(t).each(function(t,i){var a=!!t[0].data.yStack,o=t.map(function(t,e){return a?n.zip(t.data.t[0],t.data.r[0],t.data.yStack[0]):n.zip(t.data.t[0],t.data.r[0])}),s=e.angularScale,l=e.radialScale.domain()[0],c={bar:function(r,i,a){var o=t[a].data,l=e.radialScale(r[1])-e.radialScale(0),c=e.radialScale(r[2]||0),u=o.barWidth;n.select(this).attr({class:&quot;mark bar&quot;,d:&quot;M&quot;+[[l+c,-u/2],[l+c,u/2],[c,u/2],[c,-u/2]].join(&quot;L&quot;)+&quot;Z&quot;,transform:function(t,r){return&quot;rotate(&quot;+(e.orientation+s(t[0]))+&quot;)&quot;}})}};c.dot=function(r,i,a){var o=r[2]?[r[0],r[1]+r[2]]:r,s=n.svg.symbol().size(t[a].data.dotSize).type(t[a].data.dotType)(r,i);n.select(this).attr({class:&quot;mark dot&quot;,d:s,transform:function(t,r){var n,i,a,s=(n=function(t,r){var n=e.radialScale(t[1]),i=(e.angularScale(t[0])+e.orientation)*Math.PI/180;return{r:n,t:i}}(o),i=n.r*Math.cos(n.t),a=n.r*Math.sin(n.t),{x:i,y:a});return&quot;translate(&quot;+[s.x,s.y]+&quot;)&quot;}})};var u=n.svg.line.radial().interpolate(t[0].data.lineInterpolation).radius(function(t){return e.radialScale(t[1])}).angle(function(t){return e.angularScale(t[0])*Math.PI/180});c.line=function(r,i,a){var s=r[2]?o[a].map(function(t,e){return[t[0],t[1]+t[2]]}):o[a];if(n.select(this).each(c.dot).style({opacity:function(e,r){return+t[a].data.dotVisible},fill:d.stroke(r,i,a)}).attr({class:&quot;mark dot&quot;}),!(i&gt;0)){var l=n.select(this.parentNode).selectAll(&quot;path.line&quot;).data([0]);l.enter().insert(&quot;path&quot;),l.attr({class:&quot;line&quot;,d:u(s),transform:function(t,r){return&quot;rotate(&quot;+(e.orientation+90)+&quot;)&quot;},&quot;pointer-events&quot;:&quot;none&quot;}).style({fill:function(t,e){return d.fill(r,i,a)},&quot;fill-opacity&quot;:0,stroke:function(t,e){return d.stroke(r,i,a)},&quot;stroke-width&quot;:function(t,e){return d[&quot;stroke-width&quot;](r,i,a)},&quot;stroke-dasharray&quot;:function(t,e){return d[&quot;stroke-dasharray&quot;](r,i,a)},opacity:function(t,e){return d.opacity(r,i,a)},display:function(t,e){return d.display(r,i,a)}})}};var f=e.angularScale.range(),h=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle(function(t){return-h/2}).endAngle(function(t){return h/2}).innerRadius(function(t){return e.radialScale(l+(t[2]||0))}).outerRadius(function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])});c.arc=function(t,r,i){n.select(this).attr({class:&quot;mark arc&quot;,d:p,transform:function(t,r){return&quot;rotate(&quot;+(e.orientation+s(t[0])+90)+&quot;)&quot;}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},&quot;stroke-width&quot;:function(e,r,n){return t[n].data.strokeSize+&quot;px&quot;},&quot;stroke-dasharray&quot;:function(e,n,i){return r[t[i].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return&quot;undefined&quot;==typeof t[n].data.visible||t[n].data.visible?&quot;block&quot;:&quot;none&quot;}},g=n.select(this).selectAll(&quot;g.layer&quot;).data(o);g.enter().append(&quot;g&quot;).attr({class:&quot;layer&quot;});var m=g.selectAll(&quot;path.mark&quot;).data(function(t,e){return t});m.enter().append(&quot;path&quot;).attr({class:&quot;mark&quot;}),m.style(d).each(c[e.geometryType]),m.exit().remove(),g.exit().remove()})}return a.config=function(e){return arguments.length?(e.forEach(function(e,r){t[r]||(t[r]={}),i(t[r],o.PolyChart.defaultConfig()),i(t[r],e)}),this):t},a.getColorScale=function(){},n.rebind(a,e,&quot;on&quot;),a},o.PolyChart.defaultConfig=function(){return{data:{name:&quot;geom1&quot;,t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:&quot;circle&quot;,dotSize:64,dotVisible:!1,barWidth:20,color:&quot;#ffa500&quot;,strokeSize:1,strokeColor:&quot;silver&quot;,strokeDash:&quot;solid&quot;,opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:&quot;LinePlot&quot;,geometryType:&quot;arc&quot;,direction:&quot;clockwise&quot;,orientation:0,container:&quot;body&quot;,radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:&quot;bar&quot;}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:&quot;arc&quot;}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:&quot;dot&quot;,dotType:&quot;circle&quot;}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:&quot;line&quot;}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch(&quot;hover&quot;);function r(){var e=t.legendConfig,a=t.data.map(function(t,r){return[].concat(t).map(function(t,n){var a=i({},e.elements[r]);return a.name=t,a.color=[].concat(e.elements[r].color)[n],a})}),o=n.merge(a);o=o.filter(function(t,r){return e.elements[r]&amp;&amp;(e.elements[r].visibleInLegend||&quot;undefined&quot;==typeof e.elements[r].visibleInLegend)}),e.reverseOrder&amp;&amp;(o=o.reverse());var s=e.container;(&quot;string&quot;==typeof s||s.nodeName)&amp;&amp;(s=n.select(s));var l=o.map(function(t,e){return t.color}),c=e.fontSize,u=null==e.isContinuous?&quot;number&quot;==typeof o[0]:e.isContinuous,f=u?e.height:c*o.length,h=s.classed(&quot;legend-group&quot;,!0).selectAll(&quot;svg&quot;).data([0]),p=h.enter().append(&quot;svg&quot;).attr({width:300,height:f+c,xmlns:&quot;http://www.w3.org/2000/svg&quot;,&quot;xmlns:xlink&quot;:&quot;http://www.w3.org/1999/xlink&quot;,version:&quot;1.1&quot;});p.append(&quot;g&quot;).classed(&quot;legend-axis&quot;,!0),p.append(&quot;g&quot;).classed(&quot;legend-marks&quot;,!0);var d=n.range(o.length),g=n.scale[u?&quot;linear&quot;:&quot;ordinal&quot;]().domain(d).range(l),m=n.scale[u?&quot;linear&quot;:&quot;ordinal&quot;]().domain(d)[u?&quot;range&quot;:&quot;rangePoints&quot;]([0,f]);if(u){var v=h.select(&quot;.legend-marks&quot;).append(&quot;defs&quot;).append(&quot;linearGradient&quot;).attr({id:&quot;grad1&quot;,x1:&quot;0%&quot;,y1:&quot;0%&quot;,x2:&quot;0%&quot;,y2:&quot;100%&quot;}).selectAll(&quot;stop&quot;).data(l);v.enter().append(&quot;stop&quot;),v.attr({offset:function(t,e){return e/(l.length-1)*100+&quot;%&quot;}}).style({&quot;stop-color&quot;:function(t,e){return t}}),h.append(&quot;rect&quot;).classed(&quot;legend-mark&quot;,!0).attr({height:e.height,width:e.colorBandWidth,fill:&quot;url(#grad1)&quot;})}else{var y=h.select(&quot;.legend-marks&quot;).selectAll(&quot;path.legend-mark&quot;).data(o);y.enter().append(&quot;path&quot;).classed(&quot;legend-mark&quot;,!0),y.attr({transform:function(t,e){return&quot;translate(&quot;+[c/2,m(e)+c/2]+&quot;)&quot;},d:function(t,e){var r,i,a,o=t.symbol;return a=3*(i=c),&quot;line&quot;===(r=o)?&quot;M&quot;+[[-i/2,-i/12],[i/2,-i/12],[i/2,i/12],[-i/2,i/12]]+&quot;Z&quot;:-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(a)():n.svg.symbol().type(&quot;square&quot;).size(a)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(m).orient(&quot;right&quot;),b=h.select(&quot;g.legend-axis&quot;).attr({transform:&quot;translate(&quot;+[u?e.colorBandWidth:c,c/2]+&quot;)&quot;}).call(x);return b.selectAll(&quot;.domain&quot;).style({fill:&quot;none&quot;,stroke:&quot;none&quot;}),b.selectAll(&quot;line&quot;).style({fill:&quot;none&quot;,stroke:u?e.textColor:&quot;none&quot;}),b.selectAll(&quot;text&quot;).style({fill:e.textColor,&quot;font-size&quot;:e.fontSize}).text(function(t,e){return o[e].name}),r}return r.config=function(e){return arguments.length?(i(t,e),this):t},n.rebind(r,e,&quot;on&quot;),r},o.Legend.defaultConfig=function(t,e){return{data:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],legendConfig:{elements:[{symbol:&quot;line&quot;,color:&quot;red&quot;},{symbol:&quot;square&quot;,color:&quot;yellow&quot;},{symbol:&quot;diamond&quot;,color:&quot;limegreen&quot;}],height:150,colorBandWidth:30,fontSize:12,container:&quot;body&quot;,isContinuous:null,textColor:&quot;grey&quot;,reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:&quot;white&quot;,padding:5},s=&quot;tooltip-&quot;+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll(&quot;g.&quot;+s).data([0])).enter().append(&quot;g&quot;).classed(s,!0).style({&quot;pointer-events&quot;:&quot;none&quot;,display:&quot;none&quot;});return r=n.append(&quot;path&quot;).style({fill:&quot;white&quot;,&quot;fill-opacity&quot;:.9}).attr({d:&quot;M0 0&quot;}),e=n.append(&quot;text&quot;).attr({dx:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o&gt;=.5?&quot;#aaa&quot;:&quot;white&quot;,u=o&gt;=.5?&quot;black&quot;:&quot;white&quot;,f=i||&quot;&quot;;e.style({fill:u,&quot;font-size&quot;:a.fontSize+&quot;px&quot;}).text(f);var h=a.padding,p=e.node().getBBox(),d={fill:a.color,stroke:s,&quot;stroke-width&quot;:&quot;2px&quot;},g=p.width+2*h+l,m=p.height+2*h;return r.attr({d:&quot;M&quot;+[[l,-m/2],[l,-m/4],[a.hasTick?0:l,0],[l,m/4],[l,m/2],[g,m/2],[g,-m/2]].join(&quot;L&quot;)+&quot;Z&quot;}).style(d),t.attr({transform:&quot;translate(&quot;+[l,-m/2+2*h]+&quot;)&quot;}),t.style({display:&quot;block&quot;}),c},c.move=function(e){if(t)return t.attr({transform:&quot;translate(&quot;+[e[0],e[1]]+&quot;)&quot;}).style({display:&quot;block&quot;}),c},c.hide=function(){if(t)return t.style({display:&quot;none&quot;}),c},c.show=function(){if(t)return t.style({display:&quot;block&quot;}),c},c.config=function(t){return i(a,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&amp;&amp;(r.data=t.data.map(function(t,r){var n=i({},t);return[[n,[&quot;marker&quot;,&quot;color&quot;],[&quot;color&quot;]],[n,[&quot;marker&quot;,&quot;opacity&quot;],[&quot;opacity&quot;]],[n,[&quot;marker&quot;,&quot;line&quot;,&quot;color&quot;],[&quot;strokeColor&quot;]],[n,[&quot;marker&quot;,&quot;line&quot;,&quot;dash&quot;],[&quot;strokeDash&quot;]],[n,[&quot;marker&quot;,&quot;line&quot;,&quot;width&quot;],[&quot;strokeSize&quot;]],[n,[&quot;marker&quot;,&quot;symbol&quot;],[&quot;dotType&quot;]],[n,[&quot;marker&quot;,&quot;size&quot;],[&quot;dotSize&quot;]],[n,[&quot;marker&quot;,&quot;barWidth&quot;],[&quot;barWidth&quot;]],[n,[&quot;line&quot;,&quot;interpolation&quot;],[&quot;lineInterpolation&quot;]],[n,[&quot;showlegend&quot;],[&quot;visibleInLegend&quot;]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&amp;&amp;delete n.groupId,e?(&quot;LinePlot&quot;===n.geometry?(n.type=&quot;scatter&quot;,!0===n.dotVisible?(delete n.dotVisible,n.mode=&quot;lines+markers&quot;):n.mode=&quot;lines&quot;):&quot;DotPlot&quot;===n.geometry?(n.type=&quot;scatter&quot;,n.mode=&quot;markers&quot;):&quot;AreaChart&quot;===n.geometry?n.type=&quot;area&quot;:&quot;BarChart&quot;===n.geometry&amp;&amp;(n.type=&quot;bar&quot;),delete n.geometry):(&quot;scatter&quot;===n.type?&quot;lines&quot;===n.mode?n.geometry=&quot;LinePlot&quot;:&quot;markers&quot;===n.mode?n.geometry=&quot;DotPlot&quot;:&quot;lines+markers&quot;===n.mode&amp;&amp;(n.geometry=&quot;LinePlot&quot;,n.dotVisible=!0):&quot;area&quot;===n.type?n.geometry=&quot;AreaChart&quot;:&quot;bar&quot;===n.type&amp;&amp;(n.geometry=&quot;BarChart&quot;),delete n.mode,delete n.type),n}),!e&amp;&amp;t.layout&amp;&amp;&quot;stack&quot;===t.layout.barmode)){var a=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&amp;&amp;(r.data[e].groupId=n)})}if(t.layout){var s=i({},t.layout);if([[s,[&quot;plot_bgcolor&quot;],[&quot;backgroundColor&quot;]],[s,[&quot;showlegend&quot;],[&quot;showLegend&quot;]],[s,[&quot;radialaxis&quot;],[&quot;radialAxis&quot;]],[s,[&quot;angularaxis&quot;],[&quot;angularAxis&quot;]],[s.angularaxis,[&quot;showline&quot;],[&quot;gridLinesVisible&quot;]],[s.angularaxis,[&quot;showticklabels&quot;],[&quot;labelsVisible&quot;]],[s.angularaxis,[&quot;nticks&quot;],[&quot;ticksCount&quot;]],[s.angularaxis,[&quot;tickorientation&quot;],[&quot;tickOrientation&quot;]],[s.angularaxis,[&quot;ticksuffix&quot;],[&quot;ticksSuffix&quot;]],[s.angularaxis,[&quot;range&quot;],[&quot;domain&quot;]],[s.angularaxis,[&quot;endpadding&quot;],[&quot;endPadding&quot;]],[s.radialaxis,[&quot;showline&quot;],[&quot;gridLinesVisible&quot;]],[s.radialaxis,[&quot;tickorientation&quot;],[&quot;tickOrientation&quot;]],[s.radialaxis,[&quot;ticksuffix&quot;],[&quot;ticksSuffix&quot;]],[s.radialaxis,[&quot;range&quot;],[&quot;domain&quot;]],[s.angularAxis,[&quot;showline&quot;],[&quot;gridLinesVisible&quot;]],[s.angularAxis,[&quot;showticklabels&quot;],[&quot;labelsVisible&quot;]],[s.angularAxis,[&quot;nticks&quot;],[&quot;ticksCount&quot;]],[s.angularAxis,[&quot;tickorientation&quot;],[&quot;tickOrientation&quot;]],[s.angularAxis,[&quot;ticksuffix&quot;],[&quot;ticksSuffix&quot;]],[s.angularAxis,[&quot;range&quot;],[&quot;domain&quot;]],[s.angularAxis,[&quot;endpadding&quot;],[&quot;endPadding&quot;]],[s.radialAxis,[&quot;showline&quot;],[&quot;gridLinesVisible&quot;]],[s.radialAxis,[&quot;tickorientation&quot;],[&quot;tickOrientation&quot;]],[s.radialAxis,[&quot;ticksuffix&quot;],[&quot;ticksSuffix&quot;]],[s.radialAxis,[&quot;range&quot;],[&quot;domain&quot;]],[s.font,[&quot;outlinecolor&quot;],[&quot;outlineColor&quot;]],[s.legend,[&quot;traceorder&quot;],[&quot;reverseOrder&quot;]],[s,[&quot;labeloffset&quot;],[&quot;labelOffset&quot;]],[s,[&quot;defaultcolorrange&quot;],[&quot;defaultColorRange&quot;]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(&quot;undefined&quot;!=typeof s.tickLength&amp;&amp;(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&amp;&amp;(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&amp;&amp;&quot;undefined&quot;!=typeof s.angularAxis.ticklen&amp;&amp;(s.tickLength=s.angularAxis.ticklen),s.angularAxis&amp;&amp;&quot;undefined&quot;!=typeof s.angularAxis.tickcolor&amp;&amp;(s.tickColor=s.angularAxis.tickcolor)),s.legend&amp;&amp;&quot;boolean&quot;!=typeof s.legend.reverseOrder&amp;&amp;(s.legend.reverseOrder=&quot;normal&quot;!=s.legend.reverseOrder),s.legend&amp;&amp;&quot;boolean&quot;==typeof s.legend.traceorder&amp;&amp;(s.legend.traceorder=s.legend.traceorder?&quot;reversed&quot;:&quot;normal&quot;,delete s.legend.reverseOrder),s.margin&amp;&amp;&quot;undefined&quot;!=typeof s.margin.t){var l=[&quot;t&quot;,&quot;r&quot;,&quot;b&quot;,&quot;l&quot;,&quot;pad&quot;],c=[&quot;top&quot;,&quot;right&quot;,&quot;bottom&quot;,&quot;left&quot;,&quot;pad&quot;],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}e&amp;&amp;(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{&quot;../../../constants/alignment&quot;:665,&quot;../../../lib&quot;:693,d3:147}],815:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../../lib&quot;),a=t(&quot;../../../components/color&quot;),o=t(&quot;./micropolar&quot;),s=t(&quot;./undo_manager&quot;),l=i.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,i,a,u,f=new s;function h(r,s){return s&amp;&amp;(u=s),n.select(n.select(u).node().parentNode).selectAll(&quot;.svg-container&gt;*:not(.chart-root)&quot;).remove(),e=e?l(e,r):r,i||(i=o.Axis()),a=o.adapter.plotly().convert(e),i.config(a).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return h.isPolar=!0,h.svg=function(){return i.svg()},h.getConfig=function(){return e},h.getLiveConfig=function(){return o.adapter.plotly().convert(i.getLiveConfig(),!0)},h.getLiveScales=function(){return{t:i.angularScale(),r:i.radialScale()}},h.setUndoPoint=function(){var t,n,i=this,a=o.util.cloneJson(e);t=a,n=r,f.add({undo:function(){n&amp;&amp;i(n)},redo:function(){i(t)}}),r=o.util.cloneJson(a)},h.undo=function(){f.undo()},h.redo=function(){f.redo()},h},c.fillLayout=function(t){var e=n.select(t).selectAll(&quot;.plot-container&quot;),r=e.selectAll(&quot;.svg-container&quot;),i=t.framework&amp;&amp;t.framework.svg&amp;&amp;t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{&quot;../../../components/color&quot;:567,&quot;../../../lib&quot;:693,&quot;./micropolar&quot;:814,&quot;./undo_manager&quot;:816,d3:147}],816:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t,e=[],r=-1,n=!1;function i(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(i(n,&quot;undo&quot;),r-=1,t&amp;&amp;t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(i(n,&quot;redo&quot;),r+=1,t&amp;&amp;t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r&lt;e.length-1},getCommands:function(){return e},getPreviousCommand:function(){return e[r-1]},getIndex:function(){return r}}}},{}],817:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;../../registry&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../../components/color&quot;),l=t(&quot;../../components/drawing&quot;),c=t(&quot;../plots&quot;),u=t(&quot;../cartesian/set_convert&quot;),f=t(&quot;./set_convert&quot;),h=t(&quot;../cartesian/autorange&quot;).doAutoRange,p=t(&quot;../cartesian/axes&quot;).doTicksSingle,d=t(&quot;../cartesian/dragbox&quot;),g=t(&quot;../../components/dragelement&quot;),m=t(&quot;../../components/fx&quot;),v=t(&quot;../../components/titles&quot;),y=t(&quot;../cartesian/select&quot;).prepSelect,x=t(&quot;../cartesian/select&quot;).selectOnClick,b=t(&quot;../cartesian/select&quot;).clearSelect,_=t(&quot;../../lib/setcursor&quot;),w=t(&quot;../../constants/alignment&quot;).MID_SHIFT,k=t(&quot;./constants&quot;),M=t(&quot;./helpers&quot;),A=o._,T=o.mod,S=o.deg2rad,E=o.rad2deg;function C(t,e){this.id=e,this.gd=t,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var r=t._fullLayout,n=&quot;clip&quot;+r._uid+e;this.clipIds.forTraces=n+&quot;-for-traces&quot;,this.clipPaths.forTraces=r._clips.append(&quot;clipPath&quot;).attr(&quot;id&quot;,this.clipIds.forTraces),this.clipPaths.forTraces.append(&quot;path&quot;),this.framework=r._polarlayer.append(&quot;g&quot;).attr(&quot;class&quot;,e),this.radialTickLayout=null,this.angularTickLayout=null}var L=C.prototype;function z(t){var e=t.ticks+String(t.ticklen)+String(t.showticklabels);return&quot;side&quot;in t&amp;&amp;(e+=t.side),e}function P(t,e){return e[o.findIndexOfMin(e,function(e){return o.angleDist(t,e)})]}function O(t,e,r){return e?(t.attr(&quot;display&quot;,null),t.attr(r)):t&amp;&amp;t.attr(&quot;display&quot;,&quot;none&quot;),t}function I(t,e){return&quot;translate(&quot;+t+&quot;,&quot;+e+&quot;)&quot;}function D(t){return&quot;rotate(&quot;+t+&quot;)&quot;}function R(t){return Math.abs(t)&lt;1e-10?0:t&gt;0?1:-1}function B(t){return R(Math.cos(t))}function F(t){return R(Math.sin(t))}e.exports=function(t,e){return new C(t,e)},L.plot=function(t,e){var r=e[this.id];this._hasClipOnAxisFalse=!1;for(var n=0;n&lt;t.length;n++){if(!1===t[n][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(e,r),this.updateLayout(e,r),c.generalUpdatePerTraceModule(this.gd,this,t,r),this.updateFx(e,r)},L.updateLayers=function(t,e){var r=this.layers,i=e.radialaxis,a=e.angularaxis,o=k.layerNames,s=o.indexOf(&quot;frontplot&quot;),l=o.slice(0,s),c=&quot;below traces&quot;===a.layer,u=&quot;below traces&quot;===i.layer;c&amp;&amp;l.push(&quot;angular-line&quot;),u&amp;&amp;l.push(&quot;radial-line&quot;),c&amp;&amp;l.push(&quot;angular-axis&quot;),u&amp;&amp;l.push(&quot;radial-axis&quot;),l.push(&quot;frontplot&quot;),c||l.push(&quot;angular-line&quot;),u||l.push(&quot;radial-line&quot;),c||l.push(&quot;angular-axis&quot;),u||l.push(&quot;radial-axis&quot;);var f=this.framework.selectAll(&quot;.polarsublayer&quot;).data(l,String);f.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return&quot;polarsublayer &quot;+t}).each(function(t){var e=r[t]=n.select(this);switch(t){case&quot;frontplot&quot;:e.append(&quot;g&quot;).classed(&quot;barlayer&quot;,!0),e.append(&quot;g&quot;).classed(&quot;scatterlayer&quot;,!0);break;case&quot;backplot&quot;:e.append(&quot;g&quot;).classed(&quot;maplayer&quot;,!0);break;case&quot;plotbg&quot;:r.bg=e.append(&quot;path&quot;);break;case&quot;radial-grid&quot;:e.style(&quot;fill&quot;,&quot;none&quot;),e.append(&quot;g&quot;).classed(&quot;x&quot;,1);break;case&quot;angular-grid&quot;:e.style(&quot;fill&quot;,&quot;none&quot;),e.append(&quot;g&quot;).classed(&quot;angularaxis&quot;,1);break;case&quot;radial-line&quot;:e.append(&quot;line&quot;).style(&quot;fill&quot;,&quot;none&quot;);break;case&quot;angular-line&quot;:e.append(&quot;path&quot;).style(&quot;fill&quot;,&quot;none&quot;)}}),f.order()},L.updateLayout=function(t,e){var r=this.layers,n=t._size,i=e.radialaxis,a=e.angularaxis,o=e.domain.x,c=e.domain.y;this.xOffset=n.l+n.w*o[0],this.yOffset=n.t+n.h*(1-c[1]);var u=this.xLength=n.w*(o[1]-o[0]),f=this.yLength=n.h*(c[1]-c[0]),h=e.sector;this.sectorInRad=h.map(S);var p,d,g,m,v,y=this.sectorBBox=function(t){var e,r,n,i,a=t[0],o=t[1]-a,s=T(a,360),l=s+o,c=Math.cos(S(s)),u=Math.sin(S(s)),f=Math.cos(S(l)),h=Math.sin(S(l));i=s&lt;=90&amp;&amp;l&gt;=90||s&gt;90&amp;&amp;l&gt;=450?1:u&lt;=0&amp;&amp;h&lt;=0?0:Math.max(u,h);e=s&lt;=180&amp;&amp;l&gt;=180||s&gt;180&amp;&amp;l&gt;=540?-1:c&gt;=0&amp;&amp;f&gt;=0?0:Math.min(c,f);r=s&lt;=270&amp;&amp;l&gt;=270||s&gt;270&amp;&amp;l&gt;=630?-1:u&gt;=0&amp;&amp;h&gt;=0?0:Math.min(u,h);n=l&gt;=360?1:c&lt;=0&amp;&amp;f&lt;=0?0:Math.max(c,f);return[e,r,n,i]}(h),x=y[2]-y[0],b=y[3]-y[1],_=f/u,w=Math.abs(b/x);_&gt;w?(p=u,v=(f-(d=u*w))/n.h/2,g=[o[0],o[1]],m=[c[0]+v,c[1]-v]):(d=f,v=(u-(p=f/w))/n.w/2,g=[o[0]+v,o[1]-v],m=[c[0],c[1]]),this.xLength2=p,this.yLength2=d,this.xDomain2=g,this.yDomain2=m;var k=this.xOffset2=n.l+n.w*g[0],M=this.yOffset2=n.t+n.h*(1-m[1]),A=this.radius=p/x,E=this.innerRadius=e.hole*A,C=this.cx=k-A*y[0],L=this.cy=M+A*y[3],z=this.cxx=C-k,P=this.cyy=L-M;this.radialAxis=this.mockAxis(t,e,i,{_axislayer:r[&quot;radial-axis&quot;],_gridlayer:r[&quot;radial-grid&quot;],_id:&quot;x&quot;,side:{counterclockwise:&quot;top&quot;,clockwise:&quot;bottom&quot;}[i.side],domain:[E/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{_axislayer:r[&quot;angular-axis&quot;],_gridlayer:r[&quot;angular-grid&quot;],side:&quot;right&quot;,domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:&quot;x&quot;,domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:&quot;y&quot;,domain:m});var O=this.pathSubplot();this.clipPaths.forTraces.select(&quot;path&quot;).attr(&quot;d&quot;,O).attr(&quot;transform&quot;,I(z,P)),r.frontplot.attr(&quot;transform&quot;,I(k,M)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces),r.bg.attr(&quot;d&quot;,O).attr(&quot;transform&quot;,I(C,L)).call(s.fill,e.bgcolor),this.framework.selectAll(&quot;.crisp&quot;).classed(&quot;crisp&quot;,0)},L.mockAxis=function(t,e,r,n){var i=o.extendFlat({anchor:&quot;free&quot;,position:0,_pos:0,_counteraxis:!0,automargin:!1},r,n);return f(i,e,t),i},L.mockCartesianAxis=function(t,e,r){var n=this,i=r._id,a=o.extendFlat({type:&quot;linear&quot;},r);u(a,t);var s={x:[0,2],y:[1,3]};return a.setRange=function(){var t=n.sectorBBox,r=s[i],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);a.range=[t[r[0]]*l,t[r[1]]*l]},a.isPtWithinRange=&quot;x&quot;===i?function(t){return n.isPtInside(t)}:function(){return!0},a.setRange(),a.setScale(),a},L.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=e.radialaxis;n.setScale(),h(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,&quot;gregorian&quot;),n.r2l(a[1],null,&quot;gregorian&quot;)]},L.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,l=r.cx,c=r.cy,u=e.radialaxis,f=T(e.sector[0],360),h=r.radialAxis,d=o&lt;a;r.fillViewInitialKey(&quot;radialaxis.angle&quot;,u.angle),r.fillViewInitialKey(&quot;radialaxis.range&quot;,h.range.slice()),h.setGeometry(),&quot;auto&quot;===h.tickangle&amp;&amp;f&gt;90&amp;&amp;f&lt;=270&amp;&amp;(h.tickangle=180),h._transfn=function(t){return&quot;translate(&quot;+(h.l2p(t.x)+o)+&quot;,0)&quot;},h._gridpath=function(t){return r.pathArc(h.r2p(t.x)+o)};var g=z(u);r.radialTickLayout!==g&amp;&amp;(i[&quot;radial-axis&quot;].selectAll(&quot;.xtick&quot;).remove(),r.radialTickLayout=g),d&amp;&amp;(h.setScale(),p(n,h,!0));var m=r.radialAxisAngle=r.vangles?E(P(S(u.angle),r.vangles)):u.angle,v=I(l,c)+D(-m);O(i[&quot;radial-axis&quot;],d&amp;&amp;(u.showticklabels||u.ticks),{transform:v}),O(i[&quot;radial-grid&quot;],d&amp;&amp;u.showgrid,{transform:I(l,c)}).selectAll(&quot;path&quot;).attr(&quot;transform&quot;,null),O(i[&quot;radial-line&quot;].select(&quot;line&quot;),d&amp;&amp;u.showline,{x1:o,y1:0,x2:a,y2:0,transform:v}).attr(&quot;stroke-width&quot;,u.linewidth).call(s.stroke,u.linecolor)},L.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,c=this.id+&quot;title&quot;,u=void 0!==r?r:this.radialAxisAngle,f=S(u),h=Math.cos(f),p=Math.sin(f),d=0;if(s.title){var g=l.bBox(this.layers[&quot;radial-axis&quot;].node()).height,m=s.titlefont.size;d=&quot;counterclockwise&quot;===s.side?-g-.4*m:g+.8*m}this.layers[&quot;radial-axis-title&quot;]=v.draw(n,c,{propContainer:s,propName:this.id+&quot;.radialaxis.title&quot;,placeholder:A(n,&quot;Click to enter radial axis title&quot;),attributes:{x:a+i/2*h+d*p,y:o-i/2*p+d*h,&quot;text-anchor&quot;:&quot;middle&quot;},transform:{rotate:-u}})},L.updateAngularAxis=function(t,e){var r=this,i=r.gd,a=r.layers,l=r.radius,c=r.innerRadius,u=r.cx,f=r.cy,h=e.angularaxis,d=r.angularAxis;r.fillViewInitialKey(&quot;angularaxis.rotation&quot;,h.rotation),d.setGeometry();var g=function(t){return d.t2g(t.x)};&quot;linear&quot;===d.type&amp;&amp;&quot;radians&quot;===d.thetaunit&amp;&amp;(d.tick0=E(d.tick0),d.dtick=E(d.dtick)),&quot;category&quot;===d.type&amp;&amp;(d._tickFilter=function(t){return o.isAngleInsideSector(g(t),r.sectorInRad)}),d._transfn=function(t){var e=n.select(this),r=e&amp;&amp;e.node();if(r&amp;&amp;e.classed(&quot;angularaxisgrid&quot;))return&quot;&quot;;var i=g(t),a=I(u+l*Math.cos(i),f-l*Math.sin(i));return r&amp;&amp;e.classed(&quot;ticks&quot;)&amp;&amp;(a+=D(-E(i))),a},d._gridpath=function(t){var e=g(t),r=Math.cos(e),n=Math.sin(e);return&quot;M&quot;+[u+c*r,f-c*n]+&quot;L&quot;+[u+l*r,f-l*n]};var m=&quot;outside&quot;!==h.ticks?.7:.5;d._labelx=function(t){var e=g(t),r=d._labelStandoff,n=d._pad;return(0===F(e)?0:Math.cos(e)*(r+n+m*t.fontSize))+B(e)*(t.dx+r+n)},d._labely=function(t){var e=g(t),r=d._labelStandoff,n=d._labelShift,i=d._pad;return t.dy+t.fontSize*w-n+-Math.sin(e)*(r+i+m*t.fontSize)},d._labelanchor=function(t,e){var r=g(e);return 0===F(r)?B(r)&gt;0?&quot;start&quot;:&quot;end&quot;:&quot;middle&quot;};var v,y=z(h);r.angularTickLayout!==y&amp;&amp;(a[&quot;angular-axis&quot;].selectAll(&quot;.&quot;+d._id+&quot;tick&quot;).remove(),r.angularTickLayout=y),d.setScale(),p(i,d,!0),&quot;linear&quot;===e.gridshape?(v=d._vals.map(g),o.angleDelta(v[0],v[1])&lt;0&amp;&amp;(v=v.slice().reverse())):v=null,r.vangles=v,O(a[&quot;angular-line&quot;].select(&quot;path&quot;),h.showline,{d:r.pathSubplot(),transform:I(u,f)}).attr(&quot;stroke-width&quot;,h.linewidth).call(s.stroke,h.linecolor)},L.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},L.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=k.MINZOOM,c=k.OFFEDGE,u=e.radius,f=e.innerRadius,h=e.cx,p=e.cy,v=e.cxx,_=e.cyy,w=e.sectorInRad,A=e.vangles,T=e.radialAxis,S=M.clampTiny,E=M.findXYatLength,C=M.findEnclosingVertexAngles,L=k.cornerHalfWidth,z=k.cornerLen/2,P=d.makeDragger(o,&quot;path&quot;,&quot;maindrag&quot;,&quot;crosshair&quot;);n.select(P).attr(&quot;d&quot;,e.pathSubplot()).attr(&quot;transform&quot;,I(h,p));var O,D,R,B,F,N,j,V,U,q={element:P,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-v,e-_)}function W(t,e){return Math.atan2(_-e,t-v)}function Y(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=z/t,i=r-n,a=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return&quot;M&quot;+Y(s,i)+&quot;A&quot;+[s,s]+&quot; 0,0,0 &quot;+Y(s,a)+&quot;L&quot;+Y(l,a)+&quot;A&quot;+[l,l]+&quot; 0,0,1 &quot;+Y(l,i)+&quot;Z&quot;}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var i,a,o=Y(t,r),s=Y(t,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&amp;&amp;c){var u=c/l,f=-1/u,h=E(L,u,l,c);i=E(z,f,h[0][0],h[0][1]),a=E(z,f,h[1][0],h[1][1])}else{var p,d;c?(p=z,d=L):(p=L,d=z),i=[[l-p,c-d],[l+p,c-d]],a=[[l-p,c+d],[l+p,c+d]]}return&quot;M&quot;+i.join(&quot;L&quot;)+&quot;L&quot;+a.reverse().join(&quot;L&quot;)+&quot;Z&quot;}function $(t,e){return e=Math.max(Math.min(e,u),f),t&lt;c?t=0:u-t&lt;c?t=u:e&lt;c?e=0:u-e&lt;c&amp;&amp;(e=u),Math.abs(e-t)&gt;l?(t&lt;e?(R=t,B=e):(R=e,B=t),!0):(R=null,B=null,!1)}function J(t,e){t=t||F,e=e||&quot;M0,0Z&quot;,V.attr(&quot;d&quot;,t),U.attr(&quot;d&quot;,e),d.transitionZoombox(V,U,N,j),N=!0}function K(t,r){var n,i,a=O+t,o=D+r,s=G(O,D),l=Math.min(G(a,o),u),c=W(O,D);$(s,l)&amp;&amp;(n=F+e.pathSector(B),R&amp;&amp;(n+=e.pathSector(R)),i=X(R,c)+X(B,c)),J(n,i)}function Q(t,e,r,n){var i=M.findIntersectionXY(r,n,r,[t-v,_-e]);return H(i[0],i[1])}function tt(t,r){var n,i,a=O+t,o=D+r,s=W(O,D),l=W(a,o),c=C(s,A),f=C(l,A);$(Q(O,D,c[0],c[1]),Math.min(Q(a,o,f[0],f[1]),u))&amp;&amp;(n=F+e.pathSector(B),R&amp;&amp;(n+=e.pathSector(R)),i=[Z(R,c[0],c[1]),Z(B,c[0],c[1])].join(&quot; &quot;)),J(n,i)}function et(){if(d.removeZoombox(r),null!==R&amp;&amp;null!==B){d.showDoubleClickNotifier(r);var t=T._rl,n=(t[1]-t[0])/(1-f/u)/u,i=[t[0]+(R-f)*n,t[0]+(B-f)*n];a.call(&quot;relayout&quot;,r,e.id+&quot;.radialaxis.range&quot;,i)}}function rt(t,n){var i=r._fullLayout.clickmode;if(d.removeZoombox(r),2===t){var o={};for(var s in e.viewInitial)o[e.id+&quot;.&quot;+s]=e.viewInitial[s];r.emit(&quot;plotly_doubleclick&quot;,null),a.call(&quot;relayout&quot;,r,o)}i.indexOf(&quot;select&quot;)&gt;-1&amp;&amp;1===t&amp;&amp;x(n,r,[e.xaxis],[e.yaxis],e.id,q),i.indexOf(&quot;event&quot;)&gt;-1&amp;&amp;m.click(r,n,e.id)}q.prepFn=function(t,n,a){var o=r._fullLayout.dragmode,l=P.getBoundingClientRect();if(O=n-l.left,D=a-l.top,A){var c=M.findPolygonOffset(u,w[0],w[1],A);O+=v+c[0],D+=_+c[1]}switch(o){case&quot;zoom&quot;:q.moveFn=A?tt:K,q.clickFn=rt,q.doneFn=et,function(){R=null,B=null,F=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=i(t.bgcolor).getLuminance(),(V=d.makeZoombox(s,j,h,p,F)).attr(&quot;fill-rule&quot;,&quot;evenodd&quot;),U=d.makeCorners(s,h,p),b(s)}();break;case&quot;select&quot;:case&quot;lasso&quot;:y(t,n,a,q,o)}},P.onmousemove=function(t){m.hover(r,t,e.id),r._fullLayout._lasthover=P,r._fullLayout._hoversubplot=e.id},P.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},L.updateRadialDrag=function(t,e,r){var i=this,s=i.gd,l=i.layers,c=i.radius,u=i.innerRadius,f=i.cx,h=i.cy,m=i.radialAxis,v=k.radialDragBoxSize,y=v/2;if(m.visible){var x,_,w,M=S(i.radialAxisAngle),A=m._rl,T=A[0],C=A[1],L=A[r],z=.75*(A[1]-A[0])/(1-e.hole)/c;r?(x=f+(c+y)*Math.cos(M),_=h-(c+y)*Math.sin(M),w=&quot;radialdrag&quot;):(x=f+(u-y)*Math.cos(M),_=h-(u-y)*Math.sin(M),w=&quot;radialdrag-inner&quot;);var R,B,F,N=d.makeRectDragger(l,w,&quot;crosshair&quot;,-y,-y,v,v),j={element:N,gd:s};O(n.select(N),m.visible&amp;&amp;u&lt;c,{transform:I(x,_)}),j.prepFn=function(){R=null,B=null,F=null,j.moveFn=V,j.doneFn=U,b(t._zoomlayer)},j.clampFn=function(t,e){return Math.sqrt(t*t+e*e)&lt;k.MINDRAG&amp;&amp;(t=0,e=0),[t,e]},g.init(j)}function V(t,e){if(R)R(t,e);else{var r=[t,-e],n=[Math.cos(M),Math.sin(M)],i=Math.abs(o.dot(r,n)/Math.sqrt(o.dot(r,r)));isNaN(i)||(R=i&lt;.5?q:H)}}function U(){null!==B?a.call(&quot;relayout&quot;,s,i.id+&quot;.radialaxis.angle&quot;,B):null!==F&amp;&amp;a.call(&quot;relayout&quot;,s,i.id+&quot;.radialaxis.range[&quot;+r+&quot;]&quot;,F)}function q(t,e){if(0!==r){var n=x+t,a=_+e;B=Math.atan2(h-a,n-f),i.vangles&amp;&amp;(B=P(B,i.vangles)),B=E(B);var o=I(f,h)+D(-B);l[&quot;radial-axis&quot;].attr(&quot;transform&quot;,o),l[&quot;radial-line&quot;].select(&quot;line&quot;).attr(&quot;transform&quot;,o);var s=i.gd._fullLayout,c=s[i.id];i.updateRadialAxisTitle(s,c,B)}}function H(t,e){var n=o.dot([t,-e],[Math.cos(M),Math.sin(M)]);if(F=L-z*n,z&gt;0==(r?F&gt;T:F&lt;C))for(var a in m.range[r]=F,m._rl[r]=F,m.setGeometry(),m.setScale(),i.xaxis.setRange(),i.xaxis.setScale(),i.yaxis.setRange(),i.yaxis.setScale(),p(s,m,!0),l[&quot;radial-grid&quot;].attr(&quot;transform&quot;,I(f,h)).selectAll(&quot;path&quot;).attr(&quot;transform&quot;,null),i._scene&amp;&amp;i._scene.clear(),i.traceHash){var c=i.traceHash[a],u=o.filterVisible(c),d=c[0][0].trace._module,g=s._fullLayout[i.id];d.plot(s,i,u,g)}else F=null}},L.updateAngularDrag=function(t){var e=this,r=e.gd,i=e.layers,s=e.radius,c=e.angularAxis,u=e.cx,f=e.cy,h=e.cxx,m=e.cyy,v=k.angularDragBoxSize,y=d.makeDragger(i,&quot;path&quot;,&quot;angulardrag&quot;,&quot;move&quot;),x={element:y,gd:r};function w(t,e){return Math.atan2(m+v-e,t-h-v)}n.select(y).attr(&quot;d&quot;,e.pathAnnulus(s,s+v)).attr(&quot;transform&quot;,I(u,f)).call(_,&quot;move&quot;);var M,A,T,S,C,L,z=i.frontplot.select(&quot;.scatterlayer&quot;).selectAll(&quot;.trace&quot;),P=z.selectAll(&quot;.point&quot;),O=z.selectAll(&quot;.textpoint&quot;);function R(t,s){var d=e.gd._fullLayout,g=d[e.id],v=w(M+t,A+s),y=E(v-L);if(S=T+y,i.frontplot.attr(&quot;transform&quot;,I(e.xOffset2,e.yOffset2)+D([-y,h,m])),e.vangles){C=e.radialAxisAngle+y;var x=I(u,f)+D(-y),b=I(u,f)+D(-C);i.bg.attr(&quot;transform&quot;,x),i[&quot;radial-grid&quot;].attr(&quot;transform&quot;,x),i[&quot;angular-line&quot;].select(&quot;path&quot;).attr(&quot;transform&quot;,x),i[&quot;radial-axis&quot;].attr(&quot;transform&quot;,b),i[&quot;radial-line&quot;].select(&quot;line&quot;).attr(&quot;transform&quot;,b),e.updateRadialAxisTitle(d,g,C)}else e.clipPaths.forTraces.select(&quot;path&quot;).attr(&quot;transform&quot;,I(h,m)+D(y));for(var _ in P.each(function(){var t=n.select(this),e=l.getTranslate(t);t.attr(&quot;transform&quot;,I(e.x,e.y)+D([y]))}),O.each(function(){var t=n.select(this),e=t.select(&quot;text&quot;),r=l.getTranslate(t);t.attr(&quot;transform&quot;,D([y,e.attr(&quot;x&quot;),e.attr(&quot;y&quot;)])+I(r.x,r.y))}),c.rotation=o.modHalf(S,360),c.setGeometry(),c.setScale(),p(r,c,!0),e._hasClipOnAxisFalse&amp;&amp;!o.isFullCircle(e.sectorInRad)&amp;&amp;z.call(l.hideOutsideRangePoints,e),e._scene&amp;&amp;e._scene.clear(),e.traceHash)if(a.traceIs(_,&quot;gl&quot;)){var k=e.traceHash[_],R=o.filterVisible(k);k[0][0].trace._module.plot(r,e,R,g)}}function B(){O.select(&quot;text&quot;).attr(&quot;transform&quot;,null);var t={};t[e.id+&quot;.angularaxis.rotation&quot;]=S,e.vangles&amp;&amp;(t[e.id+&quot;.radialaxis.angle&quot;]=C),a.call(&quot;relayout&quot;,r,t)}x.prepFn=function(r,n,i){var a=t[e.id];T=a.angularaxis.rotation;var o=y.getBoundingClientRect();M=n-o.left,A=i-o.top,L=w(M,A),x.moveFn=R,x.doneFn=B,b(t._zoomlayer)},e.vangles&amp;&amp;!o.isFullCircle(e.sectorInRad)&amp;&amp;(x.prepFn=o.noop,_(n.select(y),null)),g.init(x)},L.isPtInside=function(t){var e=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(t.theta),i=this.radialAxis,a=i.c2l(t.r),s=i._rl;return(r?M.isPtInsidePolygon:o.isPtInsideSector)(a,n,s,e,r)},L.pathArc=function(t){var e=this.sectorInRad,r=this.vangles;return(r?M.pathPolygon:o.pathArc)(t,e[0],e[1],r)},L.pathSector=function(t){var e=this.sectorInRad,r=this.vangles;return(r?M.pathPolygon:o.pathSector)(t,e[0],e[1],r)},L.pathAnnulus=function(t,e){var r=this.sectorInRad,n=this.vangles;return(n?M.pathPolygonAnnulus:o.pathAnnulus)(t,e,r[0],r[1],n)},L.pathSubplot=function(){var t=this.innerRadius,e=this.radius;return t?this.pathAnnulus(t,e):this.pathSector(e)},L.fillViewInitialKey=function(t,e){t in this.viewInitial||(this.viewInitial[t]=e)}},{&quot;../../components/color&quot;:567,&quot;../../components/dragelement&quot;:589,&quot;../../components/drawing&quot;:592,&quot;../../components/fx&quot;:609,&quot;../../components/titles&quot;:658,&quot;../../constants/alignment&quot;:665,&quot;../../lib&quot;:693,&quot;../../lib/setcursor&quot;:714,&quot;../../registry&quot;:825,&quot;../cartesian/autorange&quot;:741,&quot;../cartesian/axes&quot;:742,&quot;../cartesian/dragbox&quot;:750,&quot;../cartesian/select&quot;:759,&quot;../cartesian/set_convert&quot;:760,&quot;../plots&quot;:805,&quot;./constants&quot;:806,&quot;./helpers&quot;:807,&quot;./set_convert&quot;:818,d3:147,tinycolor2:511}],818:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../cartesian/set_convert&quot;),a=n.deg2rad,o=n.rad2deg;e.exports=function(t,e,r){switch(i(t,r),t._id){case&quot;x&quot;:case&quot;radialaxis&quot;:!function(t,e){var r=e._subplot;t.setGeometry=function(){var e=t._rl[0],n=t._rl[1],i=r.innerRadius,a=(r.radius-i)/(n-e),o=i/a,s=e&gt;n?function(t){return t&lt;=0}:function(t){return t&gt;=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case&quot;angularaxis&quot;:!function(t,e){var r=t.type;if(&quot;linear&quot;===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return&quot;degrees&quot;===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return&quot;degrees&quot;===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&amp;&amp;&quot;linear&quot;===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o&lt;l;o++)a[o]=c(s[o])}else{var u=i+&quot;0&quot;,f=&quot;d&quot;+i,h=u in e?c(e[u]):0,p=e[f]?c(e[f]):(t.period||2*Math.PI)/l;for(a=new Array(l),o=0;o&lt;l;o++)a[o]=h+o*p}return a},t.setGeometry=function(){var i,s,l,c,u=e.sector,f=u.map(a),h={clockwise:-1,counterclockwise:1}[t.direction],p=a(t.rotation),d=function(t){return h*t+p},g=function(t){return(t-p)/h};switch(r){case&quot;linear&quot;:s=i=n.identity,c=a,l=o,t.range=n.isFullCircle(f)?[u[0],u[0]+360]:f.map(g).map(o);break;case&quot;category&quot;:var m=t._categories.length,v=t.period?Math.max(t.period,m):m;s=c=function(t){return 2*t*Math.PI/v},i=l=function(t){return t*v/Math.PI/2},t.range=[0,v]}t.c2g=function(t){return d(s(t))},t.g2c=function(t){return i(g(t))},t.t2g=function(t){return d(c(t))},t.g2t=function(t){return l(g(t))}}}(t,e)}}},{&quot;../../lib&quot;:693,&quot;../cartesian/set_convert&quot;:760}],819:[function(t,e,r){&quot;use strict&quot;;function n(t,e){return&quot;splom&quot;===t?-1:&quot;splom&quot;===e?1:0}e.exports={sortBasePlotModules:function(t,e){return n(t.name,e.name)},sortModules:n}},{}],820:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../plot_api/plot_template&quot;),a=t(&quot;./domain&quot;).defaults;e.exports=function(t,e,r,o){var s,l,c=o.type,u=o.attributes,f=o.handleDefaults,h=o.partition||&quot;x&quot;,p=e._subplots[c],d=p.length,g=d&amp;&amp;p[0].replace(/\d+$/,&quot;&quot;);function m(t,e){return n.coerce(s,l,u,t,e)}for(var v=0;v&lt;d;v++){var y=p[v];s=t[y]?t[y]:t[y]={},l=i.newContainer(e,y,g);var x={};x[h]=[v/d,(v+1)/d],a(l,e,m,x),o.id=y,f(s,l,m,o)}}},{&quot;../lib&quot;:693,&quot;../plot_api/plot_template&quot;:732,&quot;./domain&quot;:767}],821:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./ternary&quot;),i=t(&quot;../../plots/get_data&quot;).getSubplotCalcData,a=t(&quot;../../lib&quot;).counterRegex;r.name=&quot;ternary&quot;;var o=r.attr=&quot;subplot&quot;;r.idRoot=&quot;ternary&quot;,r.idRegex=r.attrRegex=a(&quot;ternary&quot;),(r.attributes={})[o]={valType:&quot;subplotid&quot;,dflt:&quot;ternary&quot;,editType:&quot;calc&quot;},r.layoutAttributes=t(&quot;./layout_attributes&quot;),r.supplyLayoutDefaults=t(&quot;./layout_defaults&quot;),r.plot=function(t){for(var e=t._fullLayout,r=t.calcdata,a=e._subplots.ternary,o=0;o&lt;a.length;o++){var s=a[o],l=i(r,&quot;ternary&quot;,s),c=e[s]._subplot;c||(c=new n({id:s,graphDiv:t,container:e._ternarylayer.node()},e),e[s]._subplot=c),c.plot(l,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.ternary||[],a=0;a&lt;i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&amp;&amp;s&amp;&amp;(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[&quot;a-title&quot;].remove(),s.layers[&quot;b-title&quot;].remove(),s.layers[&quot;c-title&quot;].remove())}}},{&quot;../../lib&quot;:693,&quot;../../plots/get_data&quot;:778,&quot;./layout_attributes&quot;:822,&quot;./layout_defaults&quot;:823,&quot;./ternary&quot;:824}],822:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color/attributes&quot;),i=t(&quot;../domain&quot;).attributes,a=t(&quot;../cartesian/layout_attributes&quot;),o=t(&quot;../../plot_api/edit_types&quot;).overrideAll,s=t(&quot;../../lib/extend&quot;).extendFlat,l={title:a.title,titlefont:a.titlefont,color:a.color,tickmode:a.tickmode,nticks:s({},a.nticks,{dflt:6,min:1}),tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:s({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:s({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,layer:a.layer,min:{valType:&quot;number&quot;,dflt:0,min:0}};e.exports=o({domain:i({name:&quot;ternary&quot;}),bgcolor:{valType:&quot;color&quot;,dflt:n.background},sum:{valType:&quot;number&quot;,dflt:1,min:0},aaxis:l,baxis:l,caxis:l},&quot;plot&quot;,&quot;from-root&quot;)},{&quot;../../components/color/attributes&quot;:566,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../cartesian/layout_attributes&quot;:754,&quot;../domain&quot;:767}],823:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;../../plot_api/plot_template&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../subplot_defaults&quot;),s=t(&quot;../cartesian/tick_label_defaults&quot;),l=t(&quot;../cartesian/tick_mark_defaults&quot;),c=t(&quot;../cartesian/tick_value_defaults&quot;),u=t(&quot;../cartesian/line_grid_defaults&quot;),f=t(&quot;./layout_attributes&quot;),h=[&quot;aaxis&quot;,&quot;baxis&quot;,&quot;caxis&quot;];function p(t,e,r,a){var o,s,l,c=r(&quot;bgcolor&quot;),u=r(&quot;sum&quot;);a.bgColor=n.combine(c,a.paper_bgcolor);for(var f=0;f&lt;h.length;f++)s=t[o=h[f]]||{},(l=i.newContainer(e,o))._name=o,d(s,l,a);var p=e.aaxis,g=e.baxis,m=e.caxis;p.min+g.min+m.min&gt;=u&amp;&amp;(p.min=0,g.min=0,m.min=0,t.aaxis&amp;&amp;delete t.aaxis.min,t.baxis&amp;&amp;delete t.baxis.min,t.caxis&amp;&amp;delete t.caxis.min)}function d(t,e,r){var n=f[e._name];function i(r,i){return a.coerce(t,e,n,r,i)}e.type=&quot;linear&quot;;var o=i(&quot;color&quot;),h=o!==n.color.dflt?o:r.font.color,p=e._name.charAt(0).toUpperCase(),d=&quot;Component &quot;+p,g=i(&quot;title&quot;,d);e._hovertitle=g===d?g:p,a.coerceFont(i,&quot;titlefont&quot;,{family:r.font.family,size:Math.round(1.2*r.font.size),color:h}),i(&quot;min&quot;),c(t,e,i,&quot;linear&quot;),s(t,e,i,&quot;linear&quot;,{}),l(t,e,i,{outerTicks:!0}),i(&quot;showticklabels&quot;)&amp;&amp;(a.coerceFont(i,&quot;tickfont&quot;,{family:r.font.family,size:r.font.size,color:h}),i(&quot;tickangle&quot;),i(&quot;tickformat&quot;)),u(t,e,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),i(&quot;hoverformat&quot;),i(&quot;layer&quot;)}e.exports=function(t,e,r){o(t,e,r,{type:&quot;ternary&quot;,attributes:f,handleDefaults:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../plot_api/plot_template&quot;:732,&quot;../cartesian/line_grid_defaults&quot;:756,&quot;../cartesian/tick_label_defaults&quot;:761,&quot;../cartesian/tick_mark_defaults&quot;:762,&quot;../cartesian/tick_value_defaults&quot;:763,&quot;../subplot_defaults&quot;:820,&quot;./layout_attributes&quot;:822}],824:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;../../registry&quot;),o=t(&quot;../../lib&quot;),s=o._,l=t(&quot;../../components/color&quot;),c=t(&quot;../../components/drawing&quot;),u=t(&quot;../cartesian/set_convert&quot;),f=t(&quot;../../lib/extend&quot;).extendFlat,h=t(&quot;../plots&quot;),p=t(&quot;../cartesian/axes&quot;),d=t(&quot;../../components/dragelement&quot;),g=t(&quot;../../components/fx&quot;),m=t(&quot;../../components/titles&quot;),v=t(&quot;../cartesian/select&quot;).prepSelect,y=t(&quot;../cartesian/select&quot;).selectOnClick,x=t(&quot;../cartesian/select&quot;).clearSelect,b=t(&quot;../cartesian/constants&quot;);function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;i&lt;t.length;i++){if(!1===t[i][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(r),this.adjustLayout(r,n),h.generalUpdatePerTraceModule(this.graphDiv,this,t,r),this.layers.plotbg.select(&quot;path&quot;).call(l.fill,r.bgcolor)},w.makeFramework=function(t){var e=t[this.id],r=this.clipId=&quot;clip&quot;+this.layoutId+this.id,n=this.clipIdRelative=&quot;clip-relative&quot;+this.layoutId+this.id;this.clipDef=o.ensureSingleById(t._clips,&quot;clipPath&quot;,r,function(t){t.append(&quot;path&quot;).attr(&quot;d&quot;,&quot;M0,0Z&quot;)}),this.clipDefRelative=o.ensureSingleById(t._clips,&quot;clipPath&quot;,n,function(t){t.append(&quot;path&quot;).attr(&quot;d&quot;,&quot;M0,0Z&quot;)}),this.plotContainer=o.ensureSingle(this.container,&quot;g&quot;,this.id),this.updateLayers(e),c.setClipUrl(this.layers.backplot,r),c.setClipUrl(this.layers.grids,r)},w.updateLayers=function(t){var e=this.layers,r=[&quot;draglayer&quot;,&quot;plotbg&quot;,&quot;backplot&quot;,&quot;grids&quot;];&quot;below traces&quot;===t.aaxis.layer&amp;&amp;r.push(&quot;aaxis&quot;,&quot;aline&quot;),&quot;below traces&quot;===t.baxis.layer&amp;&amp;r.push(&quot;baxis&quot;,&quot;bline&quot;),&quot;below traces&quot;===t.caxis.layer&amp;&amp;r.push(&quot;caxis&quot;,&quot;cline&quot;),r.push(&quot;frontplot&quot;),&quot;above traces&quot;===t.aaxis.layer&amp;&amp;r.push(&quot;aaxis&quot;,&quot;aline&quot;),&quot;above traces&quot;===t.baxis.layer&amp;&amp;r.push(&quot;baxis&quot;,&quot;bline&quot;),&quot;above traces&quot;===t.caxis.layer&amp;&amp;r.push(&quot;caxis&quot;,&quot;cline&quot;);var i=this.plotContainer.selectAll(&quot;g.toplevel&quot;).data(r,String),a=[&quot;agrid&quot;,&quot;bgrid&quot;,&quot;cgrid&quot;];i.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return&quot;toplevel &quot;+t}).each(function(t){var r=n.select(this);e[t]=r,&quot;frontplot&quot;===t?r.append(&quot;g&quot;).classed(&quot;scatterlayer&quot;,!0):&quot;backplot&quot;===t?r.append(&quot;g&quot;).classed(&quot;maplayer&quot;,!0):&quot;plotbg&quot;===t?r.append(&quot;path&quot;).attr(&quot;d&quot;,&quot;M0,0Z&quot;):&quot;aline&quot;===t||&quot;bline&quot;===t||&quot;cline&quot;===t?r.append(&quot;path&quot;):&quot;grids&quot;===t&amp;&amp;a.forEach(function(t){e[t]=r.append(&quot;g&quot;).classed(&quot;grid &quot;+t,!0);var n=&quot;bgrid&quot;===t?&quot;x&quot;:&quot;y&quot;;e[t].append(&quot;g&quot;).classed(n,!0)})}),i.order()};var k=Math.sqrt(4/3);function M(t){return t.ticks+String(t.ticklen)+String(t.showticklabels)}w.adjustLayout=function(t,e){var r,n,i,a,o,s,h=this,p=t.domain,d=(p.x[0]+p.x[1])/2,g=(p.y[0]+p.y[1])/2,m=p.x[1]-p.x[0],v=p.y[1]-p.y[0],y=m*e.w,x=v*e.h,b=t.sum,_=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;y&gt;k*x?i=(a=x)*k:a=(i=y)/k,o=m*i/y,s=v*a/x,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-g)-a/2,h.x0=r,h.y0=n,h.w=i,h.h=a,h.sum=b,h.xaxis={type:&quot;linear&quot;,range:[_+2*M-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:&quot;x&quot;},u(h.xaxis,h.graphDiv._fullLayout),h.xaxis.setScale(),h.xaxis.isPtWithinRange=function(t){return t.a&gt;=h.aaxis.range[0]&amp;&amp;t.a&lt;=h.aaxis.range[1]&amp;&amp;t.b&gt;=h.baxis.range[1]&amp;&amp;t.b&lt;=h.baxis.range[0]&amp;&amp;t.c&gt;=h.caxis.range[1]&amp;&amp;t.c&lt;=h.caxis.range[0]},h.yaxis={type:&quot;linear&quot;,range:[_,b-w-M],domain:[g-s/2,g+s/2],_id:&quot;y&quot;},u(h.yaxis,h.graphDiv._fullLayout),h.yaxis.setScale(),h.yaxis.isPtWithinRange=function(){return!0};var A=h.yaxis.domain[0],T=h.aaxis=f({},t.aaxis,{visible:!0,range:[_,b-w-M],side:&quot;left&quot;,_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],_axislayer:h.layers.aaxis,_gridlayer:h.layers.agrid,anchor:&quot;free&quot;,position:0,_pos:0,_id:&quot;y&quot;,_length:i,_gridpath:&quot;M0,0l&quot;+a+&quot;,-&quot;+i/2,automargin:!1});u(T,h.graphDiv._fullLayout),T.setScale();var S=h.baxis=f({},t.baxis,{visible:!0,range:[b-_-M,w],side:&quot;bottom&quot;,_counterangle:30,domain:h.xaxis.domain,_axislayer:h.layers.baxis,_gridlayer:h.layers.bgrid,_counteraxis:h.aaxis,anchor:&quot;free&quot;,position:0,_pos:0,_id:&quot;x&quot;,_length:i,_gridpath:&quot;M0,0l-&quot;+i/2+&quot;,-&quot;+a,automargin:!1});u(S,h.graphDiv._fullLayout),S.setScale(),T._counteraxis=S;var E=h.caxis=f({},t.caxis,{visible:!0,range:[b-_-w,M],side:&quot;right&quot;,_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],_axislayer:h.layers.caxis,_gridlayer:h.layers.cgrid,_counteraxis:h.baxis,anchor:&quot;free&quot;,position:0,_pos:0,_id:&quot;y&quot;,_length:i,_gridpath:&quot;M0,0l-&quot;+a+&quot;,&quot;+i/2,automargin:!1});u(E,h.graphDiv._fullLayout),E.setScale();var C=&quot;M&quot;+r+&quot;,&quot;+(n+a)+&quot;h&quot;+i+&quot;l-&quot;+i/2+&quot;,-&quot;+a+&quot;Z&quot;;h.clipDef.select(&quot;path&quot;).attr(&quot;d&quot;,C),h.layers.plotbg.select(&quot;path&quot;).attr(&quot;d&quot;,C);var L=&quot;M0,&quot;+a+&quot;h&quot;+i+&quot;l-&quot;+i/2+&quot;,-&quot;+a+&quot;Z&quot;;h.clipDefRelative.select(&quot;path&quot;).attr(&quot;d&quot;,L);var z=&quot;translate(&quot;+r+&quot;,&quot;+n+&quot;)&quot;;h.plotContainer.selectAll(&quot;.scatterlayer,.maplayer&quot;).attr(&quot;transform&quot;,z),h.clipDefRelative.select(&quot;path&quot;).attr(&quot;transform&quot;,null);var P=&quot;translate(&quot;+(r-S._offset)+&quot;,&quot;+(n+a)+&quot;)&quot;;h.layers.baxis.attr(&quot;transform&quot;,P),h.layers.bgrid.attr(&quot;transform&quot;,P);var O=&quot;translate(&quot;+(r+i/2)+&quot;,&quot;+n+&quot;)rotate(30)translate(0,&quot;+-T._offset+&quot;)&quot;;h.layers.aaxis.attr(&quot;transform&quot;,O),h.layers.agrid.attr(&quot;transform&quot;,O);var I=&quot;translate(&quot;+(r+i/2)+&quot;,&quot;+n+&quot;)rotate(-30)translate(0,&quot;+-E._offset+&quot;)&quot;;h.layers.caxis.attr(&quot;transform&quot;,I),h.layers.cgrid.attr(&quot;transform&quot;,I),h.drawAxes(!0),h.plotContainer.selectAll(&quot;.crisp&quot;).classed(&quot;crisp&quot;,!1),h.layers.aline.select(&quot;path&quot;).attr(&quot;d&quot;,T.showline?&quot;M&quot;+r+&quot;,&quot;+(n+a)+&quot;l&quot;+i/2+&quot;,-&quot;+a:&quot;M0,0&quot;).call(l.stroke,T.linecolor||&quot;#000&quot;).style(&quot;stroke-width&quot;,(T.linewidth||0)+&quot;px&quot;),h.layers.bline.select(&quot;path&quot;).attr(&quot;d&quot;,S.showline?&quot;M&quot;+r+&quot;,&quot;+(n+a)+&quot;h&quot;+i:&quot;M0,0&quot;).call(l.stroke,S.linecolor||&quot;#000&quot;).style(&quot;stroke-width&quot;,(S.linewidth||0)+&quot;px&quot;),h.layers.cline.select(&quot;path&quot;).attr(&quot;d&quot;,E.showline?&quot;M&quot;+(r+i/2)+&quot;,&quot;+n+&quot;l&quot;+i/2+&quot;,&quot;+a:&quot;M0,0&quot;).call(l.stroke,E.linecolor||&quot;#000&quot;).style(&quot;stroke-width&quot;,(E.linewidth||0)+&quot;px&quot;),h.graphDiv._context.staticPlot||h.initInteractions(),c.setClipUrl(h.layers.frontplot,h._hasClipOnAxisFalse?null:h.clipId)},w.drawAxes=function(t){var e,r=this.graphDiv,n=this.id.substr(7)+&quot;title&quot;,i=this.layers,a=this.aaxis,o=this.baxis,l=this.caxis;if(e=M(a),this.aTickLayout!==e&amp;&amp;(i.aaxis.selectAll(&quot;.ytick&quot;).remove(),this.aTickLayout=e),e=M(o),this.bTickLayout!==e&amp;&amp;(i.baxis.selectAll(&quot;.xtick&quot;).remove(),this.bTickLayout=e),e=M(l),this.cTickLayout!==e&amp;&amp;(i.caxis.selectAll(&quot;.ytick&quot;).remove(),this.cTickLayout=e),p.doTicksSingle(r,a,!0),p.doTicksSingle(r,o,!0),p.doTicksSingle(r,l,!0),t){var c=Math.max(a.showticklabels?a.tickfont.size/2:0,(l.showticklabels?.75*l.tickfont.size:0)+(&quot;outside&quot;===l.ticks?.87*l.ticklen:0));this.layers[&quot;a-title&quot;]=m.draw(r,&quot;a&quot;+n,{propContainer:a,propName:this.id+&quot;.aaxis.title&quot;,placeholder:s(r,&quot;Click to enter Component A title&quot;),attributes:{x:this.x0+this.w/2,y:this.y0-a.titlefont.size/3-c,&quot;text-anchor&quot;:&quot;middle&quot;}});var u=(o.showticklabels?o.tickfont.size:0)+(&quot;outside&quot;===o.ticks?o.ticklen:0)+3;this.layers[&quot;b-title&quot;]=m.draw(r,&quot;b&quot;+n,{propContainer:o,propName:this.id+&quot;.baxis.title&quot;,placeholder:s(r,&quot;Click to enter Component B title&quot;),attributes:{x:this.x0-u,y:this.y0+this.h+.83*o.titlefont.size+u,&quot;text-anchor&quot;:&quot;middle&quot;}}),this.layers[&quot;c-title&quot;]=m.draw(r,&quot;c&quot;+n,{propContainer:l,propName:this.id+&quot;.caxis.title&quot;,placeholder:s(r,&quot;Click to enter Component C title&quot;),attributes:{x:this.x0+this.w+u,y:this.y0+this.h+.83*l.titlefont.size+u,&quot;text-anchor&quot;:&quot;middle&quot;}})}};var A=b.MINZOOM/2+.87,T=&quot;m-0.87,.5h&quot;+A+&quot;v3h-&quot;+(A+5.2)+&quot;l&quot;+(A/2+2.6)+&quot;,-&quot;+(.87*A+4.5)+&quot;l2.6,1.5l-&quot;+A/2+&quot;,&quot;+.87*A+&quot;Z&quot;,S=&quot;m0.87,.5h-&quot;+A+&quot;v3h&quot;+(A+5.2)+&quot;l-&quot;+(A/2+2.6)+&quot;,-&quot;+(.87*A+4.5)+&quot;l-2.6,1.5l&quot;+A/2+&quot;,&quot;+.87*A+&quot;Z&quot;,E=&quot;m0,1l&quot;+A/2+&quot;,&quot;+.87*A+&quot;l2.6,-1.5l-&quot;+(A/2+2.6)+&quot;,-&quot;+(.87*A+4.5)+&quot;l-&quot;+(A/2+2.6)+&quot;,&quot;+(.87*A+4.5)+&quot;l2.6,1.5l&quot;+A/2+&quot;,-&quot;+.87*A+&quot;Z&quot;,C=&quot;m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z&quot;,L=!0;function z(t){n.select(t).selectAll(&quot;.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners&quot;).remove()}w.initInteractions=function(){var t,e,r,n,u,f,h,p,m,_,w=this,M=w.layers.plotbg.select(&quot;path&quot;).node(),A=w.graphDiv,P=A._fullLayout._zoomlayer,O={element:M,gd:A,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(a,o,s){O.xaxes=[w.xaxis],O.yaxes=[w.yaxis];var c=A._fullLayout.dragmode;O.minDrag=&quot;lasso&quot;===c?1:void 0,&quot;zoom&quot;===c?(O.moveFn=F,O.clickFn=I,O.doneFn=N,function(a,o,s){var c=M.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,f=i(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),h=&quot;M0,&quot;+w.h+&quot;L&quot;+w.w/2+&quot;, 0L&quot;+w.w+&quot;,&quot;+w.h+&quot;Z&quot;,p=!1,m=P.append(&quot;path&quot;).attr(&quot;class&quot;,&quot;zoombox&quot;).attr(&quot;transform&quot;,&quot;translate(&quot;+w.x0+&quot;, &quot;+w.y0+&quot;)&quot;).style({fill:f&gt;.2?&quot;rgba(0,0,0,0)&quot;:&quot;rgba(255,255,255,0)&quot;,&quot;stroke-width&quot;:0}).attr(&quot;d&quot;,h),_=P.append(&quot;path&quot;).attr(&quot;class&quot;,&quot;zoombox-corners&quot;).attr(&quot;transform&quot;,&quot;translate(&quot;+w.x0+&quot;, &quot;+w.y0+&quot;)&quot;).style({fill:l.background,stroke:l.defaultLine,&quot;stroke-width&quot;:1,opacity:0}).attr(&quot;d&quot;,&quot;M0,0Z&quot;),x(P)}(0,o,s)):&quot;pan&quot;===c?(O.moveFn=j,O.clickFn=I,O.doneFn=V,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(P)):&quot;select&quot;!==c&amp;&amp;&quot;lasso&quot;!==c||v(a,o,s,O,c)}};function I(t,e){var r=A._fullLayout.clickmode;if(z(A),2===t){var n={};n[w.id+&quot;.aaxis.min&quot;]=0,n[w.id+&quot;.baxis.min&quot;]=0,n[w.id+&quot;.caxis.min&quot;]=0,A.emit(&quot;plotly_doubleclick&quot;,null),a.call(&quot;relayout&quot;,A,n)}r.indexOf(&quot;select&quot;)&gt;-1&amp;&amp;1===t&amp;&amp;y(e,A,[w.xaxis],[w.yaxis],w.id,O),r.indexOf(&quot;event&quot;)&gt;-1&amp;&amp;g.click(A,e,w.id)}function D(t,e){return 1-e/w.h}function R(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function B(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function F(i,a){var o=t+i,s=e+a,l=Math.max(0,Math.min(1,D(0,e),D(0,s))),c=Math.max(0,Math.min(1,R(t,e),R(o,s))),d=Math.max(0,Math.min(1,B(t,e),B(o,s))),g=(l/2+d)*w.w,v=(1-l/2-c)*w.w,y=(g+v)/2,x=v-g,M=(1-l)*w.h,A=M-x/k;x&lt;b.MINZOOM?(u=r,m.attr(&quot;d&quot;,h),_.attr(&quot;d&quot;,&quot;M0,0Z&quot;)):(u={a:r.a+l*n,b:r.b+c*n,c:r.c+d*n},m.attr(&quot;d&quot;,h+&quot;M&quot;+g+&quot;,&quot;+M+&quot;H&quot;+v+&quot;L&quot;+y+&quot;,&quot;+A+&quot;L&quot;+g+&quot;,&quot;+M+&quot;Z&quot;),_.attr(&quot;d&quot;,&quot;M&quot;+t+&quot;,&quot;+e+C+&quot;M&quot;+g+&quot;,&quot;+M+T+&quot;M&quot;+v+&quot;,&quot;+M+S+&quot;M&quot;+y+&quot;,&quot;+A+E)),p||(m.transition().style(&quot;fill&quot;,f&gt;.2?&quot;rgba(0,0,0,0.4)&quot;:&quot;rgba(255,255,255,0.3)&quot;).duration(200),_.transition().style(&quot;opacity&quot;,1).duration(200),p=!0)}function N(){if(z(A),u!==r){var t={};t[w.id+&quot;.aaxis.min&quot;]=u.a,t[w.id+&quot;.baxis.min&quot;]=u.b,t[w.id+&quot;.caxis.min&quot;]=u.c,a.call(&quot;relayout&quot;,A,t),L&amp;&amp;A.data&amp;&amp;A._context.showTips&amp;&amp;(o.notifier(s(A,&quot;Double-click to zoom back out&quot;),&quot;long&quot;),L=!1)}}function j(t,e){var n=t/w.xaxis._m,i=e/w.yaxis._m,a=[(u={a:r.a-i,b:r.b+(n+i)/2,c:r.c-(n-i)/2}).a,u.b,u.c].sort(),o=a.indexOf(u.a),s=a.indexOf(u.b),l=a.indexOf(u.c);a[0]&lt;0&amp;&amp;(a[1]+a[0]/2&lt;0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),u={a:a[o],b:a[s],c:a[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var f=&quot;translate(&quot;+(w.x0+t)+&quot;,&quot;+(w.y0+e)+&quot;)&quot;;w.plotContainer.selectAll(&quot;.scatterlayer,.maplayer&quot;).attr(&quot;transform&quot;,f);var h=&quot;translate(&quot;+-t+&quot;,&quot;+-e+&quot;)&quot;;w.clipDefRelative.select(&quot;path&quot;).attr(&quot;transform&quot;,h),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w.plotContainer.selectAll(&quot;.crisp&quot;).classed(&quot;crisp&quot;,!1),w._hasClipOnAxisFalse&amp;&amp;w.plotContainer.select(&quot;.scatterlayer&quot;).selectAll(&quot;.trace&quot;).call(c.hideOutsideRangePoints,w)}function V(){var t={};t[w.id+&quot;.aaxis.min&quot;]=u.a,t[w.id+&quot;.baxis.min&quot;]=u.b,t[w.id+&quot;.caxis.min&quot;]=u.c,a.call(&quot;relayout&quot;,A,t)}M.onmousemove=function(t){g.hover(A,t,w.id),A._fullLayout._lasthover=M,A._fullLayout._hoversubplot=w.id},M.onmouseout=function(t){A._dragging||d.unhover(A,t)},d.init(O)}},{&quot;../../components/color&quot;:567,&quot;../../components/dragelement&quot;:589,&quot;../../components/drawing&quot;:592,&quot;../../components/fx&quot;:609,&quot;../../components/titles&quot;:658,&quot;../../lib&quot;:693,&quot;../../lib/extend&quot;:682,&quot;../../registry&quot;:825,&quot;../cartesian/axes&quot;:742,&quot;../cartesian/constants&quot;:747,&quot;../cartesian/select&quot;:759,&quot;../cartesian/set_convert&quot;:760,&quot;../plots&quot;:805,d3:147,tinycolor2:511}],825:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/loggers&quot;),i=t(&quot;./lib/noop&quot;),a=t(&quot;./lib/push_unique&quot;),o=t(&quot;./lib/is_plain_object&quot;),s=t(&quot;./lib/extend&quot;),l=t(&quot;./plots/attributes&quot;),c=t(&quot;./plots/layout_attributes&quot;),u=s.extendFlat,f=s.extendDeepAll;function h(t){var e=t.name,i=t.categories,a=t.meta;if(r.modules[e])n.log(&quot;Type &quot;+e+&quot; already registered&quot;);else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])return void n.log(&quot;Plot type &quot;+e+&quot; already registered.&quot;);for(var i in m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var o={},s=0;s&lt;i.length;s++)o[i[s]]=!0,r.allCategories[i[s]]=!0;for(var l in r.modules[e]={_module:t,categories:o},a&amp;&amp;Object.keys(a).length&amp;&amp;(r.modules[e].meta=a),r.allTypes.push(e),r.componentsRegistry)v(l,e);t.layoutAttributes&amp;&amp;u(r.traceLayoutAttributes,t.layoutAttributes)}}function p(t){if(&quot;string&quot;!=typeof t.name)throw new Error(&quot;Component module *name* must be a string.&quot;);var e=t.name;for(var n in r.componentsRegistry[e]=t,t.layoutAttributes&amp;&amp;(t.layoutAttributes._isLinkedToArray&amp;&amp;a(r.layoutArrayContainers,e),m(t)),r.modules)v(e,n);for(var i in r.subplotsRegistry)x(e,i);for(var o in r.transformsRegistry)y(e,o);t.schema&amp;&amp;t.schema.layout&amp;&amp;f(c,t.schema.layout)}function d(t){if(&quot;string&quot;!=typeof t.name)throw new Error(&quot;Transform module *name* must be a string.&quot;);var e=&quot;Transform module &quot;+t.name,i=&quot;function&quot;==typeof t.transform,a=&quot;function&quot;==typeof t.calcTransform;if(!i&amp;&amp;!a)throw new Error(e+&quot; is missing a *transform* or *calcTransform* method.&quot;);for(var s in i&amp;&amp;a&amp;&amp;n.log([e+&quot; has both a *transform* and *calcTransform* methods.&quot;,&quot;Please note that all *transform* methods are executed&quot;,&quot;before all *calcTransform* methods.&quot;].join(&quot; &quot;)),o(t.attributes)||n.log(e+&quot; registered without an *attributes* object.&quot;),&quot;function&quot;!=typeof t.supplyDefaults&amp;&amp;n.log(e+&quot; registered without a *supplyDefaults* method.&quot;),r.transformsRegistry[t.name]=t,r.componentsRegistry)y(s,t.name)}function g(t){var e=t.name,n=e.split(&quot;-&quot;)[0],i=t.dictionary,a=t.format,o=i&amp;&amp;Object.keys(i).length,s=a&amp;&amp;Object.keys(a).length,l=r.localeRegistry,c=l[e];if(c||(l[e]=c={}),n!==e){var u=l[n];u||(l[n]=u={}),o&amp;&amp;u.dictionary===c.dictionary&amp;&amp;(u.dictionary=i),s&amp;&amp;u.format===c.format&amp;&amp;(u.format=a)}o&amp;&amp;(c.dictionary=i),s&amp;&amp;(c.format=a)}function m(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n&lt;e.length;n++)a(r.layoutArrayRegexes,e[n])}}function v(t,e){var n=r.componentsRegistry[t].schema;if(n&amp;&amp;n.traces){var i=n.traces[e];i&amp;&amp;f(r.modules[e]._module.attributes,i)}}function y(t,e){var n=r.componentsRegistry[t].schema;if(n&amp;&amp;n.transforms){var i=n.transforms[e];i&amp;&amp;f(r.transformsRegistry[e].attributes,i)}}function x(t,e){var n=r.componentsRegistry[t].schema;if(n&amp;&amp;n.subplots){var i=r.subplotsRegistry[e],a=i.layoutAttributes,o=&quot;subplot&quot;===i.attr?i.name:i.attr;Array.isArray(o)&amp;&amp;(o=o[0]);var s=n.subplots[o];a&amp;&amp;s&amp;&amp;f(a,s)}}function b(t){return&quot;object&quot;==typeof t&amp;&amp;(t=t.type),t}r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.apiMethodRegistry={},r.register=function(t){if(!t)throw new Error(&quot;No argument passed to Plotly.register.&quot;);t&amp;&amp;!Array.isArray(t)&amp;&amp;(t=[t]);for(var e=0;e&lt;t.length;e++){var n=t[e];if(!n)throw new Error(&quot;Invalid module was attempted to be registered!&quot;);switch(n.moduleType){case&quot;trace&quot;:h(n);break;case&quot;transform&quot;:d(n);break;case&quot;component&quot;:p(n);break;case&quot;locale&quot;:g(n);break;case&quot;apiMethod&quot;:var i=n.name;r.apiMethodRegistry[i]=n.fn;break;default:throw new Error(&quot;Invalid module was attempted to be registered!&quot;)}}},r.getModule=function(t){var e=r.modules[b(t)];return!!e&amp;&amp;e._module},r.traceIs=function(t,e){if(&quot;various&quot;===(t=b(t)))return!1;var i=r.modules[t];return i||(t&amp;&amp;&quot;area&quot;!==t&amp;&amp;n.log(&quot;Unrecognized trace type &quot;+t+&quot;.&quot;),i=r.modules[l.type.dflt]),!!i.categories[e]},r.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i&lt;n.length;i++)n[i].type===e&amp;&amp;r.push(i);return r},r.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n&lt;r.length;n++)if(r[n].type===e)return!0;return!1},r.getComponentMethod=function(t,e){var n=r.componentsRegistry[t];return n&amp;&amp;n[e]||i},r.call=function(){var t=arguments[0],e=[].slice.call(arguments,1);return r.apiMethodRegistry[t].apply(null,e)}},{&quot;./lib/extend&quot;:682,&quot;./lib/is_plain_object&quot;:695,&quot;./lib/loggers&quot;:698,&quot;./lib/noop&quot;:703,&quot;./lib/push_unique&quot;:708,&quot;./plots/attributes&quot;:739,&quot;./plots/layout_attributes&quot;:796}],826:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=n.extendFlat,a=n.extendDeep;function o(t){var e;switch(t){case&quot;themes__thumb&quot;:e={autosize:!0,width:150,height:150,title:&quot;&quot;,showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case&quot;thumbnail&quot;:e={title:&quot;&quot;,hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:&quot;&quot;,margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}e.exports=function(t,e){var r;t.framework&amp;&amp;t.framework.isPolar&amp;&amp;(t=t.framework.getConfig());var n,s=t.data,l=t.layout,c=a([],s),u=a({},l,o(e.tileClass)),f=t._context||{};if(e.width&amp;&amp;(u.width=e.width),e.height&amp;&amp;(u.height=e.height),&quot;thumbnail&quot;===e.tileClass||&quot;themes__thumb&quot;===e.tileClass){u.annotations=[];var h=Object.keys(u);for(r=0;r&lt;h.length;r++)n=h[r],[&quot;xaxis&quot;,&quot;yaxis&quot;,&quot;zaxis&quot;].indexOf(n.slice(0,5))&gt;-1&amp;&amp;(u[h[r]].title=&quot;&quot;);for(r=0;r&lt;c.length;r++){var p=c[r];p.showscale=!1,p.marker&amp;&amp;(p.marker.showscale=!1),&quot;pie&quot;===p.type&amp;&amp;(p.textposition=&quot;none&quot;)}}if(Array.isArray(e.annotations))for(r=0;r&lt;e.annotations.length;r++)u.annotations.push(e.annotations[r]);var d=Object.keys(u).filter(function(t){return t.match(/^scene\d*$/)});if(d.length){var g={};for(&quot;thumbnail&quot;===e.tileClass&amp;&amp;(g={title:&quot;&quot;,showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r&lt;d.length;r++){var m=u[d[r]];m.xaxis||(m.xaxis={}),m.yaxis||(m.yaxis={}),m.zaxis||(m.zaxis={}),i(m.xaxis,g),i(m.yaxis,g),i(m.zaxis,g),m._scene=null}}var v=document.createElement(&quot;div&quot;);e.tileClass&amp;&amp;(v.className=e.tileClass);var y={gd:v,td:v,layout:u,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:f.mapboxAccessToken}};return&quot;transparent&quot;!==e.setBackground&amp;&amp;(y.config.setBackground=e.setBackground||&quot;opaque&quot;),y.gd.defaultLayout=o(e.tileClass),y}},{&quot;../lib&quot;:693}],827:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../plot_api/to_image&quot;),i=t(&quot;../lib&quot;),a=t(&quot;./filesaver&quot;);e.exports=function(t,e){var r;return i.isPlainObject(t)||(r=i.getGraphDiv(t)),(e=e||{}).format=e.format||&quot;png&quot;,new Promise(function(o,s){r&amp;&amp;r._snapshotInProgress&amp;&amp;s(new Error(&quot;Snapshotting already in progress.&quot;)),i.isIE()&amp;&amp;&quot;svg&quot;!==e.format&amp;&amp;s(new Error(&quot;Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.&quot;)),r&amp;&amp;(r._snapshotInProgress=!0);var l=n(t,e),c=e.filename||t.fn||&quot;newplot&quot;;c+=&quot;.&quot;+e.format,l.then(function(t){return r&amp;&amp;(r._snapshotInProgress=!1),a(t,c)}).then(function(t){o(t)}).catch(function(t){r&amp;&amp;(r._snapshotInProgress=!1),s(t)})})}},{&quot;../lib&quot;:693,&quot;../plot_api/to_image&quot;:735,&quot;./filesaver&quot;:828}],828:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=document.createElement(&quot;a&quot;),n=&quot;download&quot;in r,i=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent);return new Promise(function(a,o){if(&quot;undefined&quot;!=typeof navigator&amp;&amp;/MSIE [1-9]\./.test(navigator.userAgent)&amp;&amp;o(new Error(&quot;IE &lt; 10 unsupported&quot;)),i&amp;&amp;(document.location.href=&quot;data:application/octet-stream&quot;+t.slice(t.search(/[,;]/)),a(e)),e||(e=&quot;download&quot;),n&amp;&amp;(r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),a(e)),&quot;undefined&quot;!=typeof navigator&amp;&amp;navigator.msSaveBlob){var s=t.split(/^data:image\/svg\+xml,/)[1],l=decodeURIComponent(s);navigator.msSaveBlob(new Blob([l]),e),a(e)}o(new Error(&quot;download error&quot;))})}},{}],829:[function(t,e,r){&quot;use strict&quot;;r.getDelay=function(t){return t._has&amp;&amp;(t._has(&quot;gl3d&quot;)||t._has(&quot;gl2d&quot;)||t._has(&quot;mapbox&quot;))?500:0},r.getRedrawFunc=function(t){var e=t._fullLayout||{};if(!(!(e._has&amp;&amp;e._has(&quot;polar&quot;))&amp;&amp;t.data&amp;&amp;t.data[0]&amp;&amp;t.data[0].r))return function(){(t.calcdata||[]).forEach(function(t){t[0]&amp;&amp;t[0].t&amp;&amp;t[0].t.cb&amp;&amp;t[0].t.cb()})}}},{}],830:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./helpers&quot;),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:t(&quot;./cloneplot&quot;),toSVG:t(&quot;./tosvg&quot;),svgToImg:t(&quot;./svgtoimg&quot;),toImage:t(&quot;./toimage&quot;),downloadImage:t(&quot;./download&quot;)};e.exports=i},{&quot;./cloneplot&quot;:826,&quot;./download&quot;:827,&quot;./helpers&quot;:829,&quot;./svgtoimg&quot;:831,&quot;./toimage&quot;:832,&quot;./tosvg&quot;:833}],831:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;events&quot;).EventEmitter;e.exports=function(t){var e=t.emitter||new i,r=new Promise(function(i,a){var o=window.Image,s=t.svg,l=t.format||&quot;png&quot;;if(n.isIE()&amp;&amp;&quot;svg&quot;!==l){var c=new Error(&quot;Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.&quot;);return a(c),t.promise?r:e.emit(&quot;error&quot;,c)}var u=t.canvas,f=t.scale||1,h=t.width||300,p=t.height||150,d=f*h,g=f*p,m=u.getContext(&quot;2d&quot;),v=new o,y=&quot;data:image/svg+xml,&quot;+encodeURIComponent(s);u.width=d,u.height=g,v.onload=function(){var r;switch(&quot;svg&quot;!==l&amp;&amp;m.drawImage(v,0,0,d,g),l){case&quot;jpeg&quot;:r=u.toDataURL(&quot;image/jpeg&quot;);break;case&quot;png&quot;:r=u.toDataURL(&quot;image/png&quot;);break;case&quot;webp&quot;:r=u.toDataURL(&quot;image/webp&quot;);break;case&quot;svg&quot;:r=y;break;default:var n=&quot;Image format is not jpeg, png, svg or webp.&quot;;if(a(new Error(n)),!t.promise)return e.emit(&quot;error&quot;,n)}i(r),t.promise||e.emit(&quot;success&quot;,r)},v.onerror=function(r){if(a(r),!t.promise)return e.emit(&quot;error&quot;,r)},v.src=y});return t.promise?r:e}},{&quot;../lib&quot;:693,events:91}],832:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;events&quot;).EventEmitter,i=t(&quot;../registry&quot;),a=t(&quot;../lib&quot;),o=t(&quot;./helpers&quot;),s=t(&quot;./cloneplot&quot;),l=t(&quot;./tosvg&quot;),c=t(&quot;./svgtoimg&quot;);e.exports=function(t,e){var r=new n,u=s(t,{format:&quot;png&quot;}),f=u.gd;f.style.position=&quot;absolute&quot;,f.style.left=&quot;-5000px&quot;,document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.call(&quot;plot&quot;,f,u.data,u.layout,u.config).then(h).then(function(){var t=o.getDelay(f._fullLayout);setTimeout(function(){var t=l(f),n=document.createElement(&quot;canvas&quot;);n.id=a.randstr(),(r=c({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&amp;&amp;document.body.removeChild(f)}},t)}).catch(function(t){r.emit(&quot;error&quot;,t)}),r}},{&quot;../lib&quot;:693,&quot;../registry&quot;:825,&quot;./cloneplot&quot;:826,&quot;./helpers&quot;:829,&quot;./svgtoimg&quot;:831,&quot;./tosvg&quot;:833,events:91}],833:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../lib&quot;),a=t(&quot;../components/drawing&quot;),o=t(&quot;../components/color&quot;),s=t(&quot;../constants/xmlns_namespaces&quot;),l=/&quot;/g,c=new RegExp('(&quot;TOBESTRIPPED)|(TOBESTRIPPED&quot;)',&quot;g&quot;);e.exports=function(t,e,r){var u,f=t._fullLayout,h=f._paper,p=f._toppaper,d=f.width,g=f.height;h.insert(&quot;rect&quot;,&quot;:first-child&quot;).call(a.setRect,0,0,d,g).call(o.fill,f.paper_bgcolor);var m=f._basePlotModules||[];for(u=0;u&lt;m.length;u++){var v=m[u];v.toSVG&amp;&amp;v.toSVG(t)}if(p){var y=p.node().childNodes,x=Array.prototype.slice.call(y);for(u=0;u&lt;x.length;u++){var b=x[u];b.childNodes.length&amp;&amp;h.node().appendChild(b)}}f._draggers&amp;&amp;f._draggers.remove(),h.node().style.background=&quot;&quot;,h.selectAll(&quot;text&quot;).attr({&quot;data-unformatted&quot;:null,&quot;data-math&quot;:null}).each(function(){var t=n.select(this);if(&quot;hidden&quot;!==this.style.visibility&amp;&amp;&quot;none&quot;!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&amp;&amp;-1!==e.indexOf('&quot;')&amp;&amp;t.style(&quot;font-family&quot;,e.replace(l,&quot;TOBESTRIPPED&quot;))}else t.remove()}),h.selectAll(&quot;.point, .scatterpts, .legendfill&gt;path, .legendlines&gt;path, .cbfill&quot;).each(function(){var t=n.select(this),e=this.style.fill;e&amp;&amp;-1!==e.indexOf(&quot;url(&quot;)&amp;&amp;t.style(&quot;fill&quot;,e.replace(l,&quot;TOBESTRIPPED&quot;));var r=this.style.stroke;r&amp;&amp;-1!==r.indexOf(&quot;url(&quot;)&amp;&amp;t.style(&quot;stroke&quot;,r.replace(l,&quot;TOBESTRIPPED&quot;))}),&quot;pdf&quot;!==e&amp;&amp;&quot;eps&quot;!==e||h.selectAll(&quot;#MathJax_SVG_glyphs path&quot;).attr(&quot;stroke-width&quot;,0),h.node().setAttributeNS(s.xmlns,&quot;xmlns&quot;,s.svg),h.node().setAttributeNS(s.xmlns,&quot;xmlns:xlink&quot;,s.xlink),&quot;svg&quot;===e&amp;&amp;r&amp;&amp;(h.attr(&quot;width&quot;,r*d),h.attr(&quot;height&quot;,r*g),h.attr(&quot;viewBox&quot;,&quot;0 0 &quot;+d+&quot; &quot;+g));var _=(new window.XMLSerializer).serializeToString(h.node());return _=function(t){var e=n.select(&quot;body&quot;).append(&quot;div&quot;).style({display:&quot;none&quot;}).html(&quot;&quot;),r=t.replace(/(&amp;[^;]*;)/gi,function(t){return&quot;&amp;lt;&quot;===t?&quot;&amp;#60;&quot;:&quot;&amp;rt;&quot;===t?&quot;&amp;#62;&quot;:-1!==t.indexOf(&quot;&lt;&quot;)||-1!==t.indexOf(&quot;&gt;&quot;)?&quot;&quot;:e.html(t).text()});return e.remove(),r}(_),_=(_=_.replace(/&amp;(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,&quot;&amp;amp;&quot;)).replace(c,&quot;'&quot;),i.isIE()&amp;&amp;(_=(_=(_=_.replace(/&quot;/gi,&quot;'&quot;)).replace(/(\('#)([^']*)('\))/gi,'(&quot;#$2&quot;)')).replace(/(\\')/gi,'&quot;')),_}},{&quot;../components/color&quot;:567,&quot;../components/drawing&quot;:592,&quot;../constants/xmlns_namespaces&quot;:671,&quot;../lib&quot;:693,d3:147}],834:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).mergeArray;e.exports=function(t,e){for(var r=0;r&lt;t.length;r++)t[r].i=r;n(e.text,t,&quot;tx&quot;),n(e.hovertext,t,&quot;htx&quot;);var i=e.marker;if(i){n(i.opacity,t,&quot;mo&quot;),n(i.color,t,&quot;mc&quot;);var a=i.line;a&amp;&amp;(n(a.color,t,&quot;mlc&quot;),n(a.width,t,&quot;mlw&quot;))}}},{&quot;../../lib&quot;:693}],835:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;),i=t(&quot;../../components/colorscale/attributes&quot;),a=t(&quot;../../components/colorbar/attributes&quot;),o=t(&quot;../../plots/font_attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat,l=o({editType:&quot;calc&quot;,arrayOk:!0}),c=s({},n.marker.line.width,{dflt:0}),u=s({width:c,editType:&quot;calc&quot;},i(&quot;marker.line&quot;)),f=s({line:u,editType:&quot;calc&quot;},i(&quot;marker&quot;),{colorbar:a,opacity:{valType:&quot;number&quot;,arrayOk:!0,dflt:1,min:0,max:1,editType:&quot;style&quot;}});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,hovertext:n.hovertext,textposition:{valType:&quot;enumerated&quot;,values:[&quot;inside&quot;,&quot;outside&quot;,&quot;auto&quot;,&quot;none&quot;],dflt:&quot;none&quot;,arrayOk:!0,editType:&quot;calc&quot;},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),constraintext:{valType:&quot;enumerated&quot;,values:[&quot;inside&quot;,&quot;outside&quot;,&quot;both&quot;,&quot;none&quot;],dflt:&quot;both&quot;,editType:&quot;calc&quot;},cliponaxis:s({},n.cliponaxis,{}),orientation:{valType:&quot;enumerated&quot;,values:[&quot;v&quot;,&quot;h&quot;],editType:&quot;calc+clearAxisTypes&quot;},base:{valType:&quot;any&quot;,dflt:null,arrayOk:!0,editType:&quot;calc&quot;},offset:{valType:&quot;number&quot;,dflt:null,arrayOk:!0,editType:&quot;calc&quot;},width:{valType:&quot;number&quot;,dflt:null,min:0,arrayOk:!0,editType:&quot;calc&quot;},marker:f,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:&quot;style&quot;},textfont:n.selected.textfont,editType:&quot;style&quot;},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:&quot;style&quot;},textfont:n.unselected.textfont,editType:&quot;style&quot;},r:n.r,t:n.t,_deprecated:{bardir:{valType:&quot;enumerated&quot;,editType:&quot;calc&quot;,values:[&quot;v&quot;,&quot;h&quot;]}}}},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plots/font_attributes&quot;:768,&quot;../scatter/attributes&quot;:1032}],836:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../components/colorscale/has_colorscale&quot;),a=t(&quot;../../components/colorscale/calc&quot;),o=t(&quot;./arrays_to_calcdata&quot;),s=t(&quot;../scatter/calc_selection&quot;);e.exports=function(t,e){var r,l,c=n.getFromId(t,e.xaxis||&quot;x&quot;),u=n.getFromId(t,e.yaxis||&quot;y&quot;);&quot;h&quot;===e.orientation?(r=c.makeCalcdata(e,&quot;x&quot;),l=u.makeCalcdata(e,&quot;y&quot;)):(r=u.makeCalcdata(e,&quot;y&quot;),l=c.makeCalcdata(e,&quot;x&quot;));for(var f=Math.min(l.length,r.length),h=new Array(f),p=0;p&lt;f;p++)h[p]={p:l[p],s:r[p]},e.ids&amp;&amp;(h[p].id=String(e.ids[p]));return i(e,&quot;marker&quot;)&amp;&amp;a(e,e.marker.color,&quot;marker&quot;,&quot;c&quot;),i(e,&quot;marker.line&quot;)&amp;&amp;a(e,e.marker.line.color,&quot;marker.line&quot;,&quot;c&quot;),o(h,e),s(h,e),h}},{&quot;../../components/colorscale/calc&quot;:575,&quot;../../components/colorscale/has_colorscale&quot;:581,&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/calc_selection&quot;:1034,&quot;./arrays_to_calcdata&quot;:834}],837:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;).isArrayOrTypedArray,a=t(&quot;../../constants/numerical&quot;).BADNUM,o=t(&quot;../../registry&quot;),s=t(&quot;../../plots/cartesian/axes&quot;),l=t(&quot;./sieve.js&quot;);function c(t,e,r,o){if(o.length){var c,_,w,k,M=t._fullLayout.barmode,A=&quot;overlay&quot;===M,T=&quot;group&quot;===M;if(function(t,e,r,a){var o,s;for(o=0;o&lt;a.length;o++){var l,c=a[o],u=c[0].trace,f=u.base,h=&quot;h&quot;===u.orientation?u.xcalendar:u.ycalendar;if(i(f)){for(s=0;s&lt;Math.min(f.length,c.length);s++)l=r.d2c(f[s],0,h),n(l)?(c[s].b=+l,c[s].hasB=1):c[s].b=0;for(;s&lt;c.length;s++)c[s].b=0}else{l=r.d2c(f,0,h);var p=n(l);for(l=p?l:0,s=0;s&lt;c.length;s++)c[s].b=l,p&amp;&amp;(c[s].hasB=1)}}}(0,0,r,o),A)u(t,e,r,o);else if(T){for(c=[],_=[],w=0;w&lt;o.length;w++)void 0===(k=o[w])[0].trace.offset?_.push(k):c.push(k);_.length&amp;&amp;function(t,e,r,n){var i=t._fullLayout.barnorm,a=new l(n,!1,!i);(function(t,e,r){var n,i,a,o,s=t._fullLayout,l=s.bargap,c=s.bargroupgap||0,u=r.positions,f=r.distinctPositions,g=r.minDiff,m=r.traces,v=u.length!==f.length,y=m.length,x=g*(1-l),b=v?x/y:x,_=b*(1-c);for(n=0;n&lt;y;n++){i=m[n],a=i[0];var w=v?((2*n+1-y)*b-_)/2:-_/2;(o=a.t).barwidth=_,o.poffset=w,o.bargroupwidth=x,o.bardelta=g}r.binWidth=m[0][0].t.barwidth/100,h(r),p(t,e,r),d(t,e,r,v)})(t,e,a),i?(v(t,r,a),y(t,r,a)):m(t,r,a)}(t,e,r,_),c.length&amp;&amp;u(t,e,r,c)}else{for(c=[],_=[],w=0;w&lt;o.length;w++)void 0===(k=o[w])[0].trace.base?_.push(k):c.push(k);_.length&amp;&amp;function(t,e,r,i){var o=t._fullLayout.barmode,c=&quot;stack&quot;===o,u=&quot;relative&quot;===o,h=t._fullLayout.barnorm,p=new l(i,u,!(h||c||u));f(t,e,p),function(t,e,r){var i,o,l,c,u=t._fullLayout.barnorm,f=x(e),h=r.traces,p=[null,null];for(i=0;i&lt;h.length;i++)for(o=h[i],l=0;l&lt;o.length;l++)if((c=o[l]).s!==a){var d=r.put(c.p,c.b+c.s),m=d+c.b+c.s;c.b=d,c[f]=m,u||(n(e.c2l(m))&amp;&amp;g(p,m),c.hasB&amp;&amp;n(e.c2l(d))&amp;&amp;g(p,d))}if(!u){var v=s.findExtremes(e,p,{tozero:!0,padded:!0});b(h,e,v)}}(t,r,p);for(var d=0;d&lt;i.length;d++)for(var m=i[d],v=0;v&lt;m.length;v++){var _=m[v];if(_.s!==a){var w=_.b+_.s===p.get(_.p,_.s);w&amp;&amp;(_._outmost=!0)}}h&amp;&amp;y(t,r,p)}(t,e,r,_),c.length&amp;&amp;u(t,e,r,c)}!function(t,e){var r,i,a,o=e._id.charAt(0),s={},l=1/0,c=-1/0;for(r=0;r&lt;t.length;r++)for(a=t[r],i=0;i&lt;a.length;i++){var u=a[i].p;n(u)&amp;&amp;(l=Math.min(l,u),c=Math.max(c,u))}var f,h,p=1e4/(c-l),d=s.round=function(t){return String(Math.round(p*(t-l)))};for(r=0;r&lt;t.length;r++)for((a=t[r])[0].t.extents=s,f=a[0].t.poffset,h=Array.isArray(f),i=0;i&lt;a.length;i++){var g=a[i],m=g[o]-g.w/2;if(n(m)){var v=g[o]+g.w/2,y=d(g.p);s[y]?s[y]=[Math.min(m,s[y][0]),Math.max(v,s[y][1])]:s[y]=[m,v]}g.p0=g.p+(h?f[i]:f),g.p1=g.p0+g.w,g.s0=g.b,g.s1=g.s0+g.s}}(o,e)}}function u(t,e,r,n){for(var i=t._fullLayout.barnorm,a=!i,o=0;o&lt;n.length;o++){var s=n[o],c=new l([s],!1,a);f(t,e,c),i?(v(t,r,c),y(t,r,c)):m(t,r,c)}}function f(t,e,r){var n,i,a=t._fullLayout,o=a.bargap,s=a.bargroupgap||0,l=r.minDiff,c=r.traces,u=l*(1-o),f=u*(1-s),g=-f/2;for(n=0;n&lt;c.length;n++)(i=c[n][0].t).barwidth=f,i.poffset=g,i.bargroupwidth=u,i.bardelta=l;r.binWidth=c[0][0].t.barwidth/100,h(r),p(t,e,r),d(t,e,r)}function h(t){var e,r,a,o,s,l,c=t.traces;for(e=0;e&lt;c.length;e++){o=(a=(r=c[e])[0]).trace,l=a.t;var u,f=o._offset||o.offset,h=l.poffset;if(i(f)){for(u=f.slice(0,r.length),s=0;s&lt;u.length;s++)n(u[s])||(u[s]=h);for(s=u.length;s&lt;r.length;s++)u.push(h);l.poffset=u}else void 0!==f&amp;&amp;(l.poffset=f);var p=o._width||o.width,d=l.barwidth;if(i(p)){var g=p.slice(0,r.length);for(s=0;s&lt;g.length;s++)n(g[s])||(g[s]=d);for(s=g.length;s&lt;r.length;s++)g.push(d);if(l.barwidth=g,void 0===f){for(u=[],s=0;s&lt;r.length;s++)u.push(h+(d-g[s])/2);l.poffset=u}}else void 0!==p&amp;&amp;(l.barwidth=p,void 0===f&amp;&amp;(l.poffset=h+(d-p)/2))}}function p(t,e,r){for(var n=r.traces,i=x(e),a=0;a&lt;n.length;a++)for(var o=n[a],s=o[0].t,l=s.poffset,c=Array.isArray(l),u=s.barwidth,f=Array.isArray(u),h=0;h&lt;o.length;h++){var p=o[h],d=p.w=f?u[h]:u;p[i]=p.p+(c?l[h]:l)+d/2}}function d(t,e,r,n){var i=r.traces,a=r.distinctPositions,o=a[0],l=r.minDiff,c=l/2;s.minDtick(e,l,o,n);for(var u=Math.min.apply(Math,a)-c,f=Math.max.apply(Math,a)+c,h=0;h&lt;i.length;h++){var p=i[h],d=p[0],g=d.trace;if(void 0!==g.width||void 0!==g.offset)for(var m=d.t,v=m.poffset,y=m.barwidth,x=Array.isArray(v),_=Array.isArray(y),w=0;w&lt;p.length;w++){var k=p[w],M=x?v[w]:v,A=_?y[w]:y,T=k.p+M,S=T+A;u=Math.min(u,T),f=Math.max(f,S)}}b(i,e,s.findExtremes(e,[u,f],{padded:!1}))}function g(t,e){n(t[0])?t[0]=Math.min(t[0],e):t[0]=e,n(t[1])?t[1]=Math.max(t[1],e):t[1]=e}function m(t,e,r){for(var i=r.traces,a=x(e),o=[null,null],l=0;l&lt;i.length;l++)for(var c=i[l],u=0;u&lt;c.length;u++){var f=c[u],h=f.b,p=h+f.s;f[a]=p,n(e.c2l(p))&amp;&amp;g(o,p),f.hasB&amp;&amp;n(e.c2l(h))&amp;&amp;g(o,h)}b(i,e,s.findExtremes(e,o,{tozero:!0,padded:!0}))}function v(t,e,r){for(var n=r.traces,i=0;i&lt;n.length;i++)for(var o=n[i],s=0;s&lt;o.length;s++){var l=o[s];l.s!==a&amp;&amp;r.put(l.p,l.b+l.s)}}function y(t,e,r){var i=r.traces,o=x(e),l=&quot;fraction&quot;===t._fullLayout.barnorm?1:100,c=l/1e9,u=e.l2c(e.c2l(0)),f=&quot;stack&quot;===t._fullLayout.barmode?l:u,h=[u,f],p=!1;function d(t){n(e.c2l(t))&amp;&amp;(t&lt;u-c||t&gt;f+c||!n(u))&amp;&amp;(p=!0,g(h,t))}for(var m=0;m&lt;i.length;m++)for(var v=i[m],y=0;y&lt;v.length;y++){var _=v[y];if(_.s!==a){var w=Math.abs(l/r.get(_.p,_.s));_.b*=w,_.s*=w;var k=_.b,M=k+_.s;_[o]=M,d(M),_.hasB&amp;&amp;d(k)}}var A=s.findExtremes(e,h,{tozero:!0,padded:p});b(i,e,A)}function x(t){return t._id.charAt(0)}function b(t,e,r){for(var n=0;n&lt;t.length;n++)t[n][0].trace._extremes[e._id]=r}e.exports={crossTraceCalc:function(t,e){var r,n=e.xaxis,i=e.yaxis,a=t._fullData,s=t.calcdata,l=[],u=[];for(r=0;r&lt;a.length;r++){var f=a[r];!0===f.visible&amp;&amp;o.traceIs(f,&quot;bar&quot;)&amp;&amp;f.xaxis===n._id&amp;&amp;f.yaxis===i._id&amp;&amp;(&quot;h&quot;===f.orientation?l.push(s[r]):u.push(s[r]))}c(t,n,i,u),c(t,i,n,l)},setGroupPositions:c}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;./sieve.js&quot;:845,&quot;fast-isnumeric&quot;:213}],838:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../../registry&quot;),o=t(&quot;../scatter/xy_defaults&quot;),s=t(&quot;../bar/style_defaults&quot;),l=t(&quot;./attributes&quot;);e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}var f=n.coerceFont;if(o(t,e,c,u)){u(&quot;orientation&quot;,e.x&amp;&amp;!e.y?&quot;h&quot;:&quot;v&quot;),u(&quot;base&quot;),u(&quot;offset&quot;),u(&quot;width&quot;),u(&quot;text&quot;),u(&quot;hovertext&quot;);var h=u(&quot;textposition&quot;),p=Array.isArray(h)||&quot;auto&quot;===h,d=p||&quot;inside&quot;===h,g=p||&quot;outside&quot;===h;if(d||g){var m=f(u,&quot;textfont&quot;,c.font);d&amp;&amp;f(u,&quot;insidetextfont&quot;,m),g&amp;&amp;f(u,&quot;outsidetextfont&quot;,m),u(&quot;constraintext&quot;),u(&quot;selected.textfont.color&quot;),u(&quot;unselected.textfont.color&quot;),u(&quot;cliponaxis&quot;)}s(t,e,u,r,c);var v=a.getComponentMethod(&quot;errorbars&quot;,&quot;supplyDefaults&quot;);v(t,e,i.defaultLine,{axis:&quot;y&quot;}),v(t,e,i.defaultLine,{axis:&quot;x&quot;,inherit:&quot;y&quot;}),n.coerceSelectionMarkerOpacity(e,u)}else e.visible=!1}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;../bar/style_defaults&quot;:847,&quot;../scatter/xy_defaults&quot;:1058,&quot;./attributes&quot;:835}],839:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/fx&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;../scatter/fill_hover_text&quot;);function s(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=e.mlw||t.marker.line.width;return a.opacity(r)?r:a.opacity(n)&amp;&amp;i?n:void 0}e.exports={hoverPoints:function(t,e,r,a){var l,c,u,f,h,p,d,g=t.cd,m=g[0].trace,v=g[0].t,y=&quot;closest&quot;===a,x=t.maxHoverDistance,b=t.maxSpikeDistance;function _(t){return t[u]-t.w/2}function w(t){return t[u]+t.w/2}var k=y?_:function(t){return Math.min(_(t),t.p-v.bardelta/2)},M=y?w:function(t){return Math.max(w(t),t.p+v.bardelta/2)};function A(t,e){return n.inbox(t-l,e-l,x+Math.min(1,Math.abs(e-t)/d)-1)}function T(t){return A(k(t),M(t))}function S(t){return n.inbox(t.b-c,t[f]-c,x+(t[f]-c)/(t[f]-t.b)-1)}&quot;h&quot;===m.orientation?(l=r,c=e,u=&quot;y&quot;,f=&quot;x&quot;,h=S,p=T):(l=e,c=r,u=&quot;x&quot;,f=&quot;y&quot;,p=S,h=T);var E=t[u+&quot;a&quot;],C=t[f+&quot;a&quot;];d=Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0]));var L=n.getDistanceFunction(a,h,p,function(t){return(h(t)+p(t))/2});if(n.getClosest(g,L,t),!1!==t.index){y||(k=function(t){return Math.min(_(t),t.p-v.bargroupwidth/2)},M=function(t){return Math.max(w(t),t.p+v.bargroupwidth/2)});var z=g[t.index],P=m.base?z.b+z.s:z.s;t[f+&quot;0&quot;]=t[f+&quot;1&quot;]=C.c2p(z[f],!0),t[f+&quot;LabelVal&quot;]=P;var O=v.extents[v.extents.round(z.p)];return t[u+&quot;0&quot;]=E.c2p(y?k(z):O[0],!0),t[u+&quot;1&quot;]=E.c2p(y?M(z):O[1],!0),t[u+&quot;LabelVal&quot;]=z.p,t.spikeDistance=(S(z)+function(t){return A(_(t),w(t))}(z))/2+b-x,t[u+&quot;Spike&quot;]=E.c2p(z.p,!0),t.color=s(m,z),o(z,m,t),i.getComponentMethod(&quot;errorbars&quot;,&quot;hoverInfo&quot;)(z,m,t),[t]}},getTraceColor:s}},{&quot;../../components/color&quot;:567,&quot;../../components/fx&quot;:609,&quot;../../registry&quot;:825,&quot;../scatter/fill_hover_text&quot;:1040}],840:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.layoutAttributes=t(&quot;./layout_attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.supplyLayoutDefaults=t(&quot;./layout_defaults&quot;),n.calc=t(&quot;./calc&quot;),n.crossTraceCalc=t(&quot;./cross_trace_calc&quot;).crossTraceCalc,n.colorbar=t(&quot;../scatter/marker_colorbar&quot;),n.arraysToCalcdata=t(&quot;./arrays_to_calcdata&quot;),n.plot=t(&quot;./plot&quot;),n.style=t(&quot;./style&quot;).style,n.styleOnSelect=t(&quot;./style&quot;).styleOnSelect,n.hoverPoints=t(&quot;./hover&quot;).hoverPoints,n.selectPoints=t(&quot;./select&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;bar&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;bar&quot;,&quot;oriented&quot;,&quot;errorBarsOK&quot;,&quot;showLegend&quot;,&quot;zoomScale&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;../scatter/marker_colorbar&quot;:1050,&quot;./arrays_to_calcdata&quot;:834,&quot;./attributes&quot;:835,&quot;./calc&quot;:836,&quot;./cross_trace_calc&quot;:837,&quot;./defaults&quot;:838,&quot;./hover&quot;:839,&quot;./layout_attributes&quot;:841,&quot;./layout_defaults&quot;:842,&quot;./plot&quot;:843,&quot;./select&quot;:844,&quot;./style&quot;:846}],841:[function(t,e,r){&quot;use strict&quot;;e.exports={barmode:{valType:&quot;enumerated&quot;,values:[&quot;stack&quot;,&quot;group&quot;,&quot;overlay&quot;,&quot;relative&quot;],dflt:&quot;group&quot;,editType:&quot;calc&quot;},barnorm:{valType:&quot;enumerated&quot;,values:[&quot;&quot;,&quot;fraction&quot;,&quot;percent&quot;],dflt:&quot;&quot;,editType:&quot;calc&quot;},bargap:{valType:&quot;number&quot;,min:0,max:1,editType:&quot;calc&quot;},bargroupgap:{valType:&quot;number&quot;,min:0,max:1,dflt:0,editType:&quot;calc&quot;}}},{}],842:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;./layout_attributes&quot;);e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=0;h&lt;r.length;h++){var p=r[h];if(n.traceIs(p,&quot;bar&quot;)){if(l=!0,&quot;overlay&quot;!==t.barmode&amp;&amp;&quot;stack&quot;!==t.barmode){var d=p.xaxis+p.yaxis;f[d]&amp;&amp;(u=!0),f[d]=!0}if(p.visible&amp;&amp;&quot;histogram&quot;===p.type)&quot;category&quot;!==i.getFromId({_fullLayout:e},p[&quot;v&quot;===p.orientation?&quot;xaxis&quot;:&quot;yaxis&quot;]).type&amp;&amp;(c=!0)}}l&amp;&amp;(&quot;overlay&quot;!==s(&quot;barmode&quot;)&amp;&amp;s(&quot;barnorm&quot;),s(&quot;bargap&quot;,c&amp;&amp;!u?0:.2),s(&quot;bargroupgap&quot;))}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;./layout_attributes&quot;:841}],843:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;tinycolor2&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../../lib/svg_text_utils&quot;),l=t(&quot;../../components/color&quot;),c=t(&quot;../../components/drawing&quot;),u=t(&quot;../../registry&quot;),f=t(&quot;./attributes&quot;),h=f.text,p=f.textposition,d=f.textfont,g=f.insidetextfont,m=f.outsidetextfont,v=3;function y(t,e,r,n,i,a){var o;return i&lt;1?o=&quot;scale(&quot;+i+&quot;) &quot;:(i=1,o=&quot;&quot;),&quot;translate(&quot;+(r-i*t)+&quot; &quot;+(n-i*e)+&quot;)&quot;+o+(a?&quot;rotate(&quot;+a+&quot; &quot;+t+&quot; &quot;+e+&quot;) &quot;:&quot;&quot;)}function x(t,e,r,n){var o=b((e=e||{}).family,r),s=b(e.size,r),l=b(e.color,r);return{family:_(t.family,o,n.family),size:function(t,e,r){if(i(e)){e=+e;var n=t.min,a=t.max,o=void 0!==n&amp;&amp;e&lt;n||void 0!==a&amp;&amp;e&gt;a;if(!o)return e}return void 0!==r?r:t.dflt}(t.size,s,n.size),color:function(t,e,r){return a(e).isValid()?e:void 0!==r?r:t.dflt}(t.color,l,n.color)}}function b(t,e){var r;return Array.isArray(t)?e&lt;t.length&amp;&amp;(r=t[e]):r=t,r}function _(t,e,r){if(&quot;string&quot;==typeof e){if(e||!t.noBlank)return e}else if(&quot;number&quot;==typeof e&amp;&amp;!t.strict)return String(e);return void 0!==r?r:t.dflt}e.exports=function(t,e,r,a){var f=e.xaxis,w=e.yaxis,k=t._fullLayout,M=o.makeTraceGroups(a,r,&quot;trace bars&quot;).each(function(r){var a=n.select(this),u=r[0],M=u.trace;e.isRangePlot||(u.node3=a);var A=o.ensureSingle(a,&quot;g&quot;,&quot;points&quot;).selectAll(&quot;g.point&quot;).data(o.identity);A.enter().append(&quot;g&quot;).classed(&quot;point&quot;,!0),A.exit().remove(),A.each(function(a,u){var A,T,S,E,C=n.select(this);if(&quot;h&quot;===M.orientation?(S=w.c2p(a.p0,!0),E=w.c2p(a.p1,!0),A=f.c2p(a.s0,!0),T=f.c2p(a.s1,!0),a.ct=[T,(S+E)/2]):(A=f.c2p(a.p0,!0),T=f.c2p(a.p1,!0),S=w.c2p(a.s0,!0),E=w.c2p(a.s1,!0),a.ct=[(A+T)/2,E]),i(A)&amp;&amp;i(T)&amp;&amp;i(S)&amp;&amp;i(E)&amp;&amp;A!==T&amp;&amp;S!==E){var L=(a.mlw+1||M.marker.line.width+1||(a.trace?a.trace.marker.line.width:0)+1)-1,z=n.round(L/2%1,2);if(!t._context.staticPlot){var P=l.opacity(a.mc||M.marker.color)&lt;1||L&gt;.01?O:function(t,e){return Math.abs(t-e)&gt;=2?O(t):t&gt;e?Math.ceil(t):Math.floor(t)};A=P(A,T),T=P(T,A),S=P(S,E),E=P(E,S)}o.ensureSingle(C,&quot;path&quot;).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;).attr(&quot;d&quot;,&quot;M&quot;+A+&quot;,&quot;+S+&quot;V&quot;+E+&quot;H&quot;+T+&quot;V&quot;+S+&quot;Z&quot;).call(c.setClipUrl,e.layerClipId),function(t,e,r,n,i,a,l,u){var f;function w(e,r,n){var i=o.ensureSingle(e,&quot;text&quot;).text(r).attr({class:&quot;bartext bartext-&quot;+f,transform:&quot;&quot;,&quot;text-anchor&quot;:&quot;middle&quot;,&quot;data-notex&quot;:1}).call(c.font,n).call(s.convertToTspans,t);return i}var k=r[0].trace,M=k.orientation,A=function(t,e){var r=b(t.text,e);return _(h,r)}(k,n);if(f=function(t,e){var r=b(t.textposition,e);return function(t,e,r){return t.coerceNumber&amp;&amp;(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt}(p,r)}(k,n),!A||&quot;none&quot;===f)return void e.select(&quot;text&quot;).remove();var T,S,E,C,L,z,P=function(t,e,r){return x(d,t.textfont,e,r)}(k,n,t._fullLayout.font),O=function(t,e,r){return x(g,t.insidetextfont,e,r)}(k,n,P),I=function(t,e,r){return x(m,t.outsidetextfont,e,r)}(k,n,P),D=t._fullLayout.barmode,R=&quot;relative&quot;===D,B=&quot;stack&quot;===D||R,F=r[n],N=!B||F._outmost,j=Math.abs(a-i)-2*v,V=Math.abs(u-l)-2*v;&quot;outside&quot;===f&amp;&amp;(N||(f=&quot;inside&quot;));if(&quot;auto&quot;===f)if(N){f=&quot;inside&quot;,T=w(e,A,O),S=c.bBox(T.node()),E=S.width,C=S.height;var U=E&gt;0&amp;&amp;C&gt;0,q=E&lt;=j&amp;&amp;C&lt;=V,H=E&lt;=V&amp;&amp;C&lt;=j,G=&quot;h&quot;===M?j&gt;=E*(V/C):V&gt;=C*(j/E);U&amp;&amp;(q||H||G)?f=&quot;inside&quot;:(f=&quot;outside&quot;,T.remove(),T=null)}else f=&quot;inside&quot;;if(!T&amp;&amp;(T=w(e,A,&quot;outside&quot;===f?I:O),S=c.bBox(T.node()),E=S.width,C=S.height,E&lt;=0||C&lt;=0))return void T.remove();&quot;outside&quot;===f?(z=&quot;both&quot;===k.constraintext||&quot;outside&quot;===k.constraintext,L=function(t,e,r,n,i,a,o){var s,l=&quot;h&quot;===a?Math.abs(n-r):Math.abs(e-t);l&gt;2*v&amp;&amp;(s=v);var c=1;o&amp;&amp;(c=&quot;h&quot;===a?Math.min(1,l/i.height):Math.min(1,l/i.width));var u,f,h,p,d=(i.left+i.right)/2,g=(i.top+i.bottom)/2;u=c*i.width,f=c*i.height,&quot;h&quot;===a?e&lt;t?(h=e-s-u/2,p=(r+n)/2):(h=e+s+u/2,p=(r+n)/2):n&gt;r?(h=(t+e)/2,p=n+s+f/2):(h=(t+e)/2,p=n-s-f/2);return y(d,g,h,p,c,!1)}(i,a,l,u,S,M,z)):(z=&quot;both&quot;===k.constraintext||&quot;inside&quot;===k.constraintext,L=function(t,e,r,n,i,a,o){var s,l,c,u,f,h,p,d=i.width,g=i.height,m=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=Math.abs(e-t),_=Math.abs(n-r);b&gt;2*v&amp;&amp;_&gt;2*v?(b-=2*(f=v),_-=2*f):f=0;d&lt;=b&amp;&amp;g&lt;=_?(h=!1,p=1):d&lt;=_&amp;&amp;g&lt;=b?(h=!0,p=1):d&lt;g==b&lt;_?(h=!1,p=o?Math.min(b/d,_/g):1):(h=!0,p=o?Math.min(_/d,b/g):1);h&amp;&amp;(h=90);h?(s=p*g,l=p*d):(s=p*d,l=p*g);&quot;h&quot;===a?e&lt;t?(c=e+f+s/2,u=(r+n)/2):(c=e-f-s/2,u=(r+n)/2):n&gt;r?(c=(t+e)/2,u=n-f-l/2):(c=(t+e)/2,u=n+f+l/2);return y(m,x,c,u,p,h)}(i,a,l,u,S,M,z));T.attr(&quot;transform&quot;,L)}(t,C,r,u,A,T,S,E),e.layerClipId&amp;&amp;c.hideOutsideRangePoint(a,C.select(&quot;text&quot;),f,w,M.xcalendar,M.ycalendar)}else C.remove();function O(t){return 0===k.bargap&amp;&amp;0===k.bargroupgap?n.round(Math.round(t)-z,2):t}});var T=!1===u.trace.cliponaxis;c.setClipUrl(a,T?null:e.layerClipId)});u.getComponentMethod(&quot;errorbars&quot;,&quot;plot&quot;)(M,e)}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../registry&quot;:825,&quot;./attributes&quot;:835,d3:147,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],844:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[];if(!1===e)for(r=0;r&lt;n.length;r++)n[r].selected=0;else for(r=0;r&lt;n.length;r++){var s=n[r];e.contains(s.ct,!1,r,t)?(o.push({pointNumber:r,x:i.c2d(s.x),y:a.c2d(s.y)}),s.selected=1):s.selected=0}return o}},{}],845:[function(t,e,r){&quot;use strict&quot;;e.exports=a;var n=t(&quot;../../lib&quot;),i=t(&quot;../../constants/numerical&quot;).BADNUM;function a(t,e,r){this.traces=t,this.separateNegativeValues=e,this.dontMergeOverlappingData=r;for(var a=1/0,o=[],s=0;s&lt;t.length;s++){for(var l=t[s],c=0;c&lt;l.length;c++){var u=l[c];u.p!==i&amp;&amp;o.push(u.p)}l[0]&amp;&amp;l[0].width1&amp;&amp;(a=Math.min(l[0].width1,a))}this.positions=o;var f=n.distinctVals(o);this.distinctPositions=f.vals,1===f.vals.length&amp;&amp;a!==1/0?this.minDiff=a:this.minDiff=Math.min(f.minDiff,a),this.binWidth=this.minDiff,this.bins={}}a.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},a.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},a.prototype.getLabel=function(t,e){return(e&lt;0&amp;&amp;this.separateNegativeValues?&quot;v&quot;:&quot;^&quot;)+(this.dontMergeOverlappingData?t:Math.round(t/this.binWidth))}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693}],846:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/drawing&quot;),a=t(&quot;../../registry&quot;);function o(t,e,r){var a=t.selectAll(&quot;path&quot;),o=t.selectAll(&quot;text&quot;);i.pointStyle(a,e,r),o.each(function(t){var r,a=n.select(this);function o(e){var n=r[e];return Array.isArray(n)?n[t.i]:n}a.classed(&quot;bartext-inside&quot;)?r=e.insidetextfont:a.classed(&quot;bartext-outside&quot;)&amp;&amp;(r=e.outsidetextfont),r||(r=e.textfont),i.font(a,o(&quot;family&quot;),o(&quot;size&quot;),o(&quot;color&quot;))})}e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(&quot;g.trace.bars&quot;),i=r.size(),s=t._fullLayout;r.style(&quot;opacity&quot;,function(t){return t[0].trace.opacity}).each(function(t){(&quot;stack&quot;===s.barmode&amp;&amp;i&gt;1||0===s.bargap&amp;&amp;0===s.bargroupgap&amp;&amp;!t[0].trace.marker.line.width)&amp;&amp;n.select(this).attr(&quot;shape-rendering&quot;,&quot;crispEdges&quot;)}),r.selectAll(&quot;g.points&quot;).each(function(e){o(n.select(this),e[0].trace,t)}),a.getComponentMethod(&quot;errorbars&quot;,&quot;style&quot;)(r)},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll(&quot;path&quot;),n),i.selectedTextStyle(r.selectAll(&quot;text&quot;),n)):o(r,n,t)}}},{&quot;../../components/drawing&quot;:592,&quot;../../registry&quot;:825,d3:147}],847:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;../../components/colorscale/has_colorscale&quot;),a=t(&quot;../../components/colorscale/defaults&quot;);e.exports=function(t,e,r,o,s){r(&quot;marker.color&quot;,o),i(t,&quot;marker&quot;)&amp;&amp;a(t,e,s,r,{prefix:&quot;marker.&quot;,cLetter:&quot;c&quot;}),r(&quot;marker.line.color&quot;,n.defaultLine),i(t,&quot;marker.line&quot;)&amp;&amp;a(t,e,s,r,{prefix:&quot;marker.line.&quot;,cLetter:&quot;c&quot;}),r(&quot;marker.line.width&quot;),r(&quot;marker.opacity&quot;),r(&quot;selected.marker.color&quot;),r(&quot;unselected.marker.color&quot;)}},{&quot;../../components/color&quot;:567,&quot;../../components/colorscale/defaults&quot;:577,&quot;../../components/colorscale/has_colorscale&quot;:581}],848:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib/extend&quot;).extendFlat,i=t(&quot;../scatterpolar/attributes&quot;),a=t(&quot;../bar/attributes&quot;);e.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:n({},a.base,{}),offset:n({},a.offset,{}),width:n({},a.width,{}),text:n({},a.text,{}),marker:a.marker,hoverinfo:i.hoverinfo,selected:a.selected,unselected:a.unselected}},{&quot;../../lib/extend&quot;:682,&quot;../bar/attributes&quot;:835,&quot;../scatterpolar/attributes&quot;:1094}],849:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/has_colorscale&quot;),i=t(&quot;../../components/colorscale/calc&quot;),a=t(&quot;../bar/arrays_to_calcdata&quot;),o=t(&quot;../bar/cross_trace_calc&quot;).setGroupPositions,s=t(&quot;../scatter/calc_selection&quot;),l=t(&quot;../../registry&quot;).traceIs,c=t(&quot;../../lib&quot;).extendFlat;e.exports={calc:function(t,e){for(var r=t._fullLayout,o=e.subplot,l=r[o].radialaxis,c=r[o].angularaxis,u=l.makeCalcdata(e,&quot;r&quot;),f=c.makeCalcdata(e,&quot;theta&quot;),h=e._length,p=new Array(h),d=u,g=f,m=0;m&lt;h;m++)p[m]={p:g[m],s:d[m]};function v(t){var r=e[t];void 0!==r&amp;&amp;(e[&quot;_&quot;+t]=Array.isArray(r)?c.makeCalcdata(e,t):c.d2c(r,e.thetaunit))}return&quot;linear&quot;===c.type&amp;&amp;(v(&quot;width&quot;),v(&quot;offset&quot;)),n(e,&quot;marker&quot;)&amp;&amp;i(e,e.marker.color,&quot;marker&quot;,&quot;c&quot;),n(e,&quot;marker.line&quot;)&amp;&amp;i(e,e.marker.line.color,&quot;marker.line&quot;,&quot;c&quot;),a(p,e),s(p,e),p},crossTraceCalc:function(t,e,r){for(var n=t.calcdata,i=[],a=0;a&lt;n.length;a++){var s=n[a],u=s[0].trace;!0===u.visible&amp;&amp;l(u,&quot;bar&quot;)&amp;&amp;u.subplot===r&amp;&amp;i.push(s)}var f=c({},e.radialaxis,{_id:&quot;x&quot;}),h=e.angularaxis;o({_fullLayout:e},h,f,i)}}},{&quot;../../components/colorscale/calc&quot;:575,&quot;../../components/colorscale/has_colorscale&quot;:581,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;../bar/arrays_to_calcdata&quot;:834,&quot;../bar/cross_trace_calc&quot;:837,&quot;../scatter/calc_selection&quot;:1034}],850:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatterpolar/defaults&quot;).handleRThetaDefaults,a=t(&quot;../bar/style_defaults&quot;),o=t(&quot;./attributes&quot;);e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}i(t,e,s,l)?(l(&quot;thetaunit&quot;),l(&quot;base&quot;),l(&quot;offset&quot;),l(&quot;width&quot;),l(&quot;text&quot;),a(t,e,l,r,s),n.coerceSelectionMarkerOpacity(e,l)):e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../bar/style_defaults&quot;:847,&quot;../scatterpolar/defaults&quot;:1096,&quot;./attributes&quot;:848}],851:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/fx&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../bar/hover&quot;).getTraceColor,o=t(&quot;../scatter/fill_hover_text&quot;),s=t(&quot;../scatterpolar/hover&quot;).makeHoverPointText,l=t(&quot;../../plots/polar/helpers&quot;).isPtInsidePolygon;e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.subplot,h=f.radialAxis,p=f.angularAxis,d=f.vangles,g=d?l:i.isPtInsideSector,m=t.maxHoverDistance,v=p._period||2*Math.PI,y=Math.abs(h.g2p(Math.sqrt(e*e+r*r))),x=Math.atan2(r,e);h.range[0]&gt;h.range[1]&amp;&amp;(x+=Math.PI);if(n.getClosest(c,function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s&lt;0&amp;&amp;(t.idealAlign=&quot;left&quot;),[t]}}},{&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../../plots/polar/helpers&quot;:807,&quot;../bar/hover&quot;:839,&quot;../scatter/fill_hover_text&quot;:1040,&quot;../scatterpolar/hover&quot;:1097}],852:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;trace&quot;,name:&quot;barpolar&quot;,basePlotModule:t(&quot;../../plots/polar&quot;),categories:[&quot;polar&quot;,&quot;bar&quot;,&quot;showLegend&quot;],attributes:t(&quot;./attributes&quot;),layoutAttributes:t(&quot;./layout_attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),supplyLayoutDefaults:t(&quot;./layout_defaults&quot;),calc:t(&quot;./calc&quot;).calc,crossTraceCalc:t(&quot;./calc&quot;).crossTraceCalc,plot:t(&quot;./plot&quot;),colorbar:t(&quot;../scatter/marker_colorbar&quot;),style:t(&quot;../bar/style&quot;).style,hoverPoints:t(&quot;./hover&quot;),selectPoints:t(&quot;../bar/select&quot;),meta:{}}},{&quot;../../plots/polar&quot;:808,&quot;../bar/select&quot;:844,&quot;../bar/style&quot;:846,&quot;../scatter/marker_colorbar&quot;:1050,&quot;./attributes&quot;:848,&quot;./calc&quot;:849,&quot;./defaults&quot;:850,&quot;./hover&quot;:851,&quot;./layout_attributes&quot;:853,&quot;./layout_defaults&quot;:854,&quot;./plot&quot;:855}],853:[function(t,e,r){&quot;use strict&quot;;e.exports={barmode:{valType:&quot;enumerated&quot;,values:[&quot;stack&quot;,&quot;overlay&quot;],dflt:&quot;stack&quot;,editType:&quot;calc&quot;},bargap:{valType:&quot;number&quot;,dflt:.1,min:0,max:1,editType:&quot;calc&quot;}}},{}],854:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./layout_attributes&quot;);e.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l&lt;r.length;l++){var c=r[l];&quot;barpolar&quot;===c.type&amp;&amp;!0===c.visible&amp;&amp;(o[a=c.subplot]||(s(&quot;barmode&quot;),s(&quot;bargap&quot;),o[a]=1))}}},{&quot;../../lib&quot;:693,&quot;./layout_attributes&quot;:853}],855:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../../components/drawing&quot;),s=t(&quot;../../plots/polar/helpers&quot;);e.exports=function(t,e,r){var l=e.xaxis,c=e.yaxis,u=e.radialAxis,f=e.angularAxis,h=function(t){var e=t.cxx,r=t.cyy;if(t.vangles)return function(n,i,o,l){var c,u;a.angleDelta(o,l)&gt;0?(c=o,u=l):(c=l,u=o);var f=s.findEnclosingVertexAngles(c,t.vangles)[0],h=s.findEnclosingVertexAngles(u,t.vangles)[1],p=[f,(c+u)/2,h];return s.pathPolygonAnnulus(n,i,c,u,p,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select(&quot;g.barlayer&quot;);a.makeTraceGroups(p,r,&quot;trace bars&quot;).each(function(t){var r=t[0].node3=n.select(this),s=a.ensureSingle(r,&quot;g&quot;,&quot;points&quot;).selectAll(&quot;g.point&quot;).data(a.identity);s.enter().append(&quot;g&quot;).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;).style(&quot;stroke-miterlimit&quot;,2).classed(&quot;point&quot;,!0),s.exit().remove(),s.each(function(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&amp;&amp;i(s)&amp;&amp;i(p)&amp;&amp;i(d)&amp;&amp;o!==s&amp;&amp;p!==d){var g=u.c2g(t.s1),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],e=h(o,s,p,d)}else e=&quot;M0,0Z&quot;;a.ensureSingle(r,&quot;path&quot;).attr(&quot;d&quot;,e)}),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null)})}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../../plots/polar/helpers&quot;:807,d3:147,&quot;fast-isnumeric&quot;:213}],856:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;),i=t(&quot;../../components/color/attributes&quot;),a=t(&quot;../../lib/extend&quot;).extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},x0:{valType:&quot;any&quot;,editType:&quot;calc+clearAxisTypes&quot;},y0:{valType:&quot;any&quot;,editType:&quot;calc+clearAxisTypes&quot;},name:{valType:&quot;string&quot;,editType:&quot;calc+clearAxisTypes&quot;},text:a({},n.text,{}),whiskerwidth:{valType:&quot;number&quot;,min:0,max:1,dflt:.5,editType:&quot;calc&quot;},notched:{valType:&quot;boolean&quot;,editType:&quot;calc&quot;},notchwidth:{valType:&quot;number&quot;,min:0,max:.5,dflt:.25,editType:&quot;calc&quot;},boxpoints:{valType:&quot;enumerated&quot;,values:[&quot;all&quot;,&quot;outliers&quot;,&quot;suspectedoutliers&quot;,!1],dflt:&quot;outliers&quot;,editType:&quot;calc&quot;},boxmean:{valType:&quot;enumerated&quot;,values:[!0,&quot;sd&quot;,!1],dflt:!1,editType:&quot;calc&quot;},jitter:{valType:&quot;number&quot;,min:0,max:1,editType:&quot;calc&quot;},pointpos:{valType:&quot;number&quot;,min:-2,max:2,editType:&quot;calc&quot;},orientation:{valType:&quot;enumerated&quot;,values:[&quot;v&quot;,&quot;h&quot;],editType:&quot;calc+clearAxisTypes&quot;},marker:{outliercolor:{valType:&quot;color&quot;,dflt:&quot;rgba(0, 0, 0, 0)&quot;,editType:&quot;style&quot;},symbol:a({},o.symbol,{arrayOk:!1,editType:&quot;plot&quot;}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1,editType:&quot;style&quot;}),size:a({},o.size,{arrayOk:!1,editType:&quot;calc&quot;}),color:a({},o.color,{arrayOk:!1,editType:&quot;style&quot;}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine,editType:&quot;style&quot;}),width:a({},s.width,{arrayOk:!1,dflt:0,editType:&quot;style&quot;}),outliercolor:{valType:&quot;color&quot;,editType:&quot;style&quot;},outlierwidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;style&quot;},editType:&quot;style&quot;},editType:&quot;plot&quot;},line:{color:{valType:&quot;color&quot;,editType:&quot;style&quot;},width:{valType:&quot;number&quot;,min:0,dflt:2,editType:&quot;style&quot;},editType:&quot;plot&quot;},fillcolor:n.fillcolor,selected:{marker:n.selected.marker,editType:&quot;style&quot;},unselected:{marker:n.unselected.marker,editType:&quot;style&quot;},hoveron:{valType:&quot;flaglist&quot;,flags:[&quot;boxes&quot;,&quot;points&quot;],dflt:&quot;boxes+points&quot;,editType:&quot;style&quot;}}},{&quot;../../components/color/attributes&quot;:566,&quot;../../lib/extend&quot;:682,&quot;../scatter/attributes&quot;:1032}],857:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=i._,o=t(&quot;../../plots/cartesian/axes&quot;);function s(t,e,r){var n={text:&quot;tx&quot;};for(var i in n)Array.isArray(e[i])&amp;&amp;(t[n[i]]=e[i][r])}function l(t,e){return t.v-e.v}function c(t){return t.v}e.exports=function(t,e){var r,u,f,h,p,d=t._fullLayout,g=o.getFromId(t,e.xaxis||&quot;x&quot;),m=o.getFromId(t,e.yaxis||&quot;y&quot;),v=[],y=&quot;violin&quot;===e.type?&quot;_numViolins&quot;:&quot;_numBoxes&quot;;&quot;h&quot;===e.orientation?(u=g,f=&quot;x&quot;,h=m,p=&quot;y&quot;):(u=m,f=&quot;y&quot;,h=g,p=&quot;x&quot;);var x=u.makeCalcdata(e,f),b=function(t,e,r,a,o){if(e in t)return r.makeCalcdata(t,e);var s;s=e+&quot;0&quot;in t?t[e+&quot;0&quot;]:&quot;name&quot;in t&amp;&amp;(&quot;category&quot;===r.type||n(t.name)&amp;&amp;-1!==[&quot;linear&quot;,&quot;log&quot;].indexOf(r.type)||i.isDateTime(t.name)&amp;&amp;&quot;date&quot;===r.type)?t.name:o;var l=r.d2c(s,0,t[e+&quot;calendar&quot;]);return a.map(function(){return l})}(e,p,h,x,d[y]),_=i.distinctVals(b),w=_.vals,k=_.minDiff/2,M=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i&lt;r;i++)n[i]=t[i]-e;return n[r]=t[r-1]+e,n}(w,k),A=w.length,T=function(t){for(var e=new Array(t),r=0;r&lt;t;r++)e[r]=[];return e}(A);for(r=0;r&lt;e._length;r++){var S=x[r];if(n(S)){var E=i.findBin(b[r],M);if(E&gt;=0&amp;&amp;E&lt;A){var C={v:S,i:r};s(C,e,r),T[E].push(C)}}}for(r=0;r&lt;A;r++)if(T[r].length&gt;0){var L=T[r].sort(l),z=L.map(c),P=z.length,O={pos:w[r],pts:L};O.min=z[0],O.max=z[P-1],O.mean=i.mean(z,P),O.sd=i.stdev(z,P,O.mean),O.q1=i.interp(z,.25),O.med=i.interp(z,.5),O.q3=i.interp(z,.75),O.lf=Math.min(O.q1,z[Math.min(i.findBin(2.5*O.q1-1.5*O.q3,z,!0)+1,P-1)]),O.uf=Math.max(O.q3,z[Math.max(i.findBin(2.5*O.q3-1.5*O.q1,z),0)]),O.lo=4*O.q1-3*O.q3,O.uo=4*O.q3-3*O.q1;var I=1.57*(O.q3-O.q1)/Math.sqrt(P);O.ln=O.med-I,O.un=O.med+I,v.push(O)}!function(t,e){if(i.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r&lt;t.length;r++){for(var n=t[r].pts||[],a={},o=0;o&lt;n.length;o++)a[n[o].i]=o;i.tagSelected(n,e,a)}}(v,e);var D=o.findExtremes(u,x,{padded:!0});return e._extremes[u._id]=D,v.length&gt;0?(v[0].t={num:d[y],dPos:k,posLetter:p,valLetter:f,labels:{med:a(t,&quot;median:&quot;),min:a(t,&quot;min:&quot;),q1:a(t,&quot;q1:&quot;),q3:a(t,&quot;q3:&quot;),max:a(t,&quot;max:&quot;),mean:&quot;sd&quot;===e.boxmean?a(t,&quot;mean \xb1 \u03c3:&quot;):a(t,&quot;mean:&quot;),lf:a(t,&quot;lower fence:&quot;),uf:a(t,&quot;upper fence:&quot;)}},d[y]++,v):[{t:{empty:!0}}]}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;fast-isnumeric&quot;:213}],858:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../lib&quot;),a=[&quot;v&quot;,&quot;h&quot;];function o(t,e,r,a,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=[],p=&quot;violin&quot;===t?&quot;_numViolins&quot;:&quot;_numBoxes&quot;;for(s=0;s&lt;r.length;s++)for(c=u[r[s]],l=0;l&lt;c.length;l++)h.push(c[l].pos);if(h.length){var d=i.distinctVals(h),g=d.minDiff/2;h.length===d.vals.length&amp;&amp;(f[p]=1),n.minDtick(a,d.minDiff,d.vals[0],!0);var m=(1-f[t+&quot;gap&quot;])*(1-f[t+&quot;groupgap&quot;])*g/f[p],v=n.findExtremes(a,d.vals,{vpadminus:g+o[0]*m,vpadplus:g+o[1]*m});for(s=0;s&lt;r.length;s++)(c=u[r[s]])[0].t.dPos=g,c[0].trace._extremes[a._id]=v}}e.exports={crossTraceCalc:function(t,e){for(var r=t.calcdata,n=e.xaxis,i=e.yaxis,s=0;s&lt;a.length;s++){for(var l=a[s],c=&quot;h&quot;===l?i:n,u=[],f=0,h=0,p=0;p&lt;r.length;p++){var d=r[p],g=d[0].t,m=d[0].trace;!0!==m.visible||&quot;box&quot;!==m.type&amp;&amp;&quot;candlestick&quot;!==m.type||g.empty||(m.orientation||&quot;v&quot;)!==l||m.xaxis!==n._id||m.yaxis!==i._id||(u.push(p),m.boxpoints&amp;&amp;(f=Math.max(f,m.jitter-m.pointpos-1),h=Math.max(h,m.jitter+m.pointpos-1)))}o(&quot;box&quot;,t,u,c,[f,h])}},setPositionOffset:o}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742}],859:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;./attributes&quot;);function s(t,e,r,n){var a,o,s=r(&quot;y&quot;),l=r(&quot;x&quot;),c=l&amp;&amp;l.length;if(s&amp;&amp;s.length)a=&quot;v&quot;,c?o=Math.min(l.length,s.length):(r(&quot;x0&quot;),o=s.length);else{if(!c)return void(e.visible=!1);a=&quot;h&quot;,r(&quot;y0&quot;),o=l.length}e._length=o,i.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;,&quot;y&quot;],n),r(&quot;orientation&quot;,a)}function l(t,e,r,i){var a=i.prefix,s=n.coerce2(t,e,o,&quot;marker.outliercolor&quot;),l=r(&quot;marker.line.outliercolor&quot;),c=r(a+&quot;points&quot;,s||l?&quot;suspectedoutliers&quot;:void 0);c?(r(&quot;jitter&quot;,&quot;all&quot;===c?.3:0),r(&quot;pointpos&quot;,&quot;all&quot;===c?-1.5:0),r(&quot;marker.symbol&quot;),r(&quot;marker.opacity&quot;),r(&quot;marker.size&quot;),r(&quot;marker.color&quot;,e.line.color),r(&quot;marker.line.color&quot;),r(&quot;marker.line.width&quot;),&quot;suspectedoutliers&quot;===c&amp;&amp;(r(&quot;marker.line.outliercolor&quot;,e.marker.color),r(&quot;marker.line.outlierwidth&quot;)),r(&quot;selected.marker.color&quot;),r(&quot;unselected.marker.color&quot;),r(&quot;selected.marker.size&quot;),r(&quot;unselected.marker.size&quot;),r(&quot;text&quot;)):delete e.marker,r(&quot;hoveron&quot;),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function c(r,i){return n.coerce(t,e,o,r,i)}s(t,e,c,i),!1!==e.visible&amp;&amp;(c(&quot;line.color&quot;,(t.marker||{}).color||r),c(&quot;line.width&quot;),c(&quot;fillcolor&quot;,a.addOpacity(e.line.color,.5)),c(&quot;whiskerwidth&quot;),c(&quot;boxmean&quot;),c(&quot;notched&quot;,void 0!==t.notchwidth)&amp;&amp;c(&quot;notchwidth&quot;),l(t,e,c,{prefix:&quot;box&quot;}))},handleSampleDefaults:s,handlePointsDefaults:l}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./attributes&quot;:856}],860:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return e.hoverOnBox&amp;&amp;(t.hoverOnBox=e.hoverOnBox),&quot;xVal&quot;in e&amp;&amp;(t.x=e.xVal),&quot;yVal&quot;in e&amp;&amp;(t.y=e.yVal),e.xa&amp;&amp;(t.xaxis=e.xa),e.ya&amp;&amp;(t.yaxis=e.ya),t}},{}],861:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../components/fx&quot;),o=t(&quot;../../components/color&quot;),s=t(&quot;../scatter/fill_hover_text&quot;);function l(t,e,r,s){var l,c,u,f,h,p,d,g,m,v,y,x,b=t.cd,_=t.xa,w=t.ya,k=b[0].trace,M=b[0].t,A=&quot;violin&quot;===k.type,T=[],S=M.bdPos,E=M.wHover,C=function(t){return t.pos+M.bPos-p};A&amp;&amp;&quot;both&quot;!==k.side?(&quot;positive&quot;===k.side&amp;&amp;(m=function(t){var e=C(t);return a.inbox(e,e+E,v)}),&quot;negative&quot;===k.side&amp;&amp;(m=function(t){var e=C(t);return a.inbox(e-E,e,v)})):m=function(t){var e=C(t);return a.inbox(e-E,e+E,v)},x=A?function(t){return a.inbox(t.span[0]-h,t.span[1]-h,v)}:function(t){return a.inbox(t.min-h,t.max-h,v)},&quot;h&quot;===k.orientation?(h=e,p=r,d=x,g=m,l=&quot;y&quot;,u=w,c=&quot;x&quot;,f=_):(h=r,p=e,d=m,g=x,l=&quot;x&quot;,u=_,c=&quot;y&quot;,f=w);var L=Math.min(1,S/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function z(t){return(d(t)+g(t))/2}v=t.maxHoverDistance-L,y=t.maxSpikeDistance-L;var P=a.getDistanceFunction(s,d,g,z);if(a.getClosest(b,P,t),!1===t.index)return[];var O=b[t.index],I=k.line.color,D=(k.marker||{}).color;o.opacity(I)&amp;&amp;k.line.width?t.color=I:o.opacity(D)&amp;&amp;k.boxpoints?t.color=D:t.color=k.fillcolor,t[l+&quot;0&quot;]=u.c2p(O.pos+M.bPos-S,!0),t[l+&quot;1&quot;]=u.c2p(O.pos+M.bPos+S,!0),t[l+&quot;LabelVal&quot;]=O.pos;var R=l+&quot;Spike&quot;;t.spikeDistance=z(O)*y/v,t[R]=u.c2p(O.pos,!0);var B={},F=[&quot;med&quot;,&quot;min&quot;,&quot;q1&quot;,&quot;q3&quot;,&quot;max&quot;];(k.boxmean||(k.meanline||{}).visible)&amp;&amp;F.push(&quot;mean&quot;),(k.boxpoints||k.points)&amp;&amp;F.push(&quot;lf&quot;,&quot;uf&quot;);for(var N=0;N&lt;F.length;N++){var j=F[N];if(j in O&amp;&amp;!(O[j]in B)){B[O[j]]=!0;var V=O[j],U=f.c2p(V,!0),q=i.extendFlat({},t);q[c+&quot;0&quot;]=q[c+&quot;1&quot;]=U,q[c+&quot;LabelVal&quot;]=V,q[c+&quot;Label&quot;]=(M.labels?M.labels[j]+&quot; &quot;:&quot;&quot;)+n.hoverLabelText(f,V),q.hoverOnBox=!0,&quot;mean&quot;===j&amp;&amp;&quot;sd&quot;in O&amp;&amp;&quot;sd&quot;===k.boxmean&amp;&amp;(q[c+&quot;err&quot;]=O.sd),t.name=&quot;&quot;,t.spikeDistance=void 0,t[R]=void 0,T.push(q)}}return T}function c(t,e,r){for(var n,o,l,c=t.cd,u=t.xa,f=t.ya,h=c[0].trace,p=u.c2p(e),d=f.c2p(r),g=a.quadrature(function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(u.c2p(t.x)-p)-e,1-3/e)},function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(f.c2p(t.y)-d)-e,1-3/e)}),m=!1,v=0;v&lt;c.length;v++){o=c[v];for(var y=0;y&lt;(o.pts||[]).length;y++){var x=g(l=o.pts[y]);x&lt;=t.distance&amp;&amp;(t.distance=x,m=[v,y])}}if(!m)return!1;l=(o=c[m[0]]).pts[m[1]];var b=u.c2p(l.x,!0),_=f.c2p(l.y,!0),w=l.mrc||1;n=i.extendFlat({},t,{index:l.i,color:(h.marker||{}).color,name:h.name,x0:b-w,x1:b+w,xLabelVal:l.x,y0:_-w,y1:_+w,yLabelVal:l.y,spikeDistance:t.distance});var k=&quot;h&quot;===h.orientation?&quot;y&quot;:&quot;x&quot;,M=&quot;h&quot;===h.orientation?f:u;return n[k+&quot;Spike&quot;]=M.c2p(o.pos,!0),s(l,h,n),n}e.exports={hoverPoints:function(t,e,r,n){var i,a=t.cd[0].trace.hoveron,o=[];return-1!==a.indexOf(&quot;boxes&quot;)&amp;&amp;(o=o.concat(l(t,e,r,n))),-1!==a.indexOf(&quot;points&quot;)&amp;&amp;(i=c(t,e,r)),&quot;closest&quot;===n?i?[i]:o:i?(o.push(i),o):o},hoverOnBoxes:l,hoverOnPoints:c}},{&quot;../../components/color&quot;:567,&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/fill_hover_text&quot;:1040}],862:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.layoutAttributes=t(&quot;./layout_attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;).supplyDefaults,n.supplyLayoutDefaults=t(&quot;./layout_defaults&quot;).supplyLayoutDefaults,n.calc=t(&quot;./calc&quot;),n.crossTraceCalc=t(&quot;./cross_trace_calc&quot;).crossTraceCalc,n.plot=t(&quot;./plot&quot;).plot,n.style=t(&quot;./style&quot;).style,n.styleOnSelect=t(&quot;./style&quot;).styleOnSelect,n.hoverPoints=t(&quot;./hover&quot;).hoverPoints,n.eventData=t(&quot;./event_data&quot;),n.selectPoints=t(&quot;./select&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;box&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;symbols&quot;,&quot;oriented&quot;,&quot;box-violin&quot;,&quot;showLegend&quot;,&quot;boxLayout&quot;,&quot;zoomScale&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;./attributes&quot;:856,&quot;./calc&quot;:857,&quot;./cross_trace_calc&quot;:858,&quot;./defaults&quot;:859,&quot;./event_data&quot;:860,&quot;./hover&quot;:861,&quot;./layout_attributes&quot;:863,&quot;./layout_defaults&quot;:864,&quot;./plot&quot;:865,&quot;./select&quot;:866,&quot;./style&quot;:867}],863:[function(t,e,r){&quot;use strict&quot;;e.exports={boxmode:{valType:&quot;enumerated&quot;,values:[&quot;group&quot;,&quot;overlay&quot;],dflt:&quot;overlay&quot;,editType:&quot;calc&quot;},boxgap:{valType:&quot;number&quot;,min:0,max:1,dflt:.3,editType:&quot;calc&quot;},boxgroupgap:{valType:&quot;number&quot;,min:0,max:1,dflt:.3,editType:&quot;calc&quot;}}},{}],864:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;./layout_attributes&quot;);function o(t,e,r,i,a){for(var o,s=a+&quot;Layout&quot;,l=0;l&lt;r.length;l++)if(n.traceIs(r[l],s)){o=!0;break}o&amp;&amp;(i(a+&quot;mode&quot;),i(a+&quot;gap&quot;),i(a+&quot;groupgap&quot;))}e.exports={supplyLayoutDefaults:function(t,e,r){o(0,0,r,function(r,n){return i.coerce(t,e,a,r,n)},&quot;box&quot;)},_supply:o}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./layout_attributes&quot;:863}],865:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../components/drawing&quot;),o=5,s=.01;function l(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,f=a.wdPos||0,h=a.bPosPxOffset||0,p=r.whiskerwidth||0,d=r.notched||!1,g=d?1-2*r.notchwidth:1;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var m=t.selectAll(&quot;path.box&quot;).data(&quot;violin&quot;!==r.type||r.box.visible?i.identity:[]);m.enter().append(&quot;path&quot;).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;).attr(&quot;class&quot;,&quot;box&quot;),m.exit().remove(),m.each(function(t){var e=t.pos,a=l.c2p(e+u,!0)+h,m=l.c2p(e+u-o,!0)+h,v=l.c2p(e+u+s,!0)+h,y=l.c2p(e+u-f,!0)+h,x=l.c2p(e+u+f,!0)+h,b=l.c2p(e+u-o*g,!0)+h,_=l.c2p(e+u+s*g,!0)+h,w=c.c2p(t.q1,!0),k=c.c2p(t.q3,!0),M=i.constrain(c.c2p(t.med,!0),Math.min(w,k)+1,Math.max(w,k)-1),A=void 0===t.lf||!1===r.boxpoints,T=c.c2p(A?t.min:t.lf,!0),S=c.c2p(A?t.max:t.uf,!0),E=c.c2p(t.ln,!0),C=c.c2p(t.un,!0);&quot;h&quot;===r.orientation?n.select(this).attr(&quot;d&quot;,&quot;M&quot;+M+&quot;,&quot;+b+&quot;V&quot;+_+&quot;M&quot;+w+&quot;,&quot;+m+&quot;V&quot;+v+(d?&quot;H&quot;+E+&quot;L&quot;+M+&quot;,&quot;+_+&quot;L&quot;+C+&quot;,&quot;+v:&quot;&quot;)+&quot;H&quot;+k+&quot;V&quot;+m+(d?&quot;H&quot;+C+&quot;L&quot;+M+&quot;,&quot;+b+&quot;L&quot;+E+&quot;,&quot;+m:&quot;&quot;)+&quot;ZM&quot;+w+&quot;,&quot;+a+&quot;H&quot;+T+&quot;M&quot;+k+&quot;,&quot;+a+&quot;H&quot;+S+(0===p?&quot;&quot;:&quot;M&quot;+T+&quot;,&quot;+y+&quot;V&quot;+x+&quot;M&quot;+S+&quot;,&quot;+y+&quot;V&quot;+x)):n.select(this).attr(&quot;d&quot;,&quot;M&quot;+b+&quot;,&quot;+M+&quot;H&quot;+_+&quot;M&quot;+m+&quot;,&quot;+w+&quot;H&quot;+v+(d?&quot;V&quot;+E+&quot;L&quot;+_+&quot;,&quot;+M+&quot;L&quot;+v+&quot;,&quot;+C:&quot;&quot;)+&quot;V&quot;+k+&quot;H&quot;+m+(d?&quot;V&quot;+C+&quot;L&quot;+b+&quot;,&quot;+M+&quot;L&quot;+m+&quot;,&quot;+E:&quot;&quot;)+&quot;ZM&quot;+a+&quot;,&quot;+w+&quot;V&quot;+T+&quot;M&quot;+a+&quot;,&quot;+k+&quot;V&quot;+S+(0===p?&quot;&quot;:&quot;M&quot;+y+&quot;,&quot;+T+&quot;H&quot;+x+&quot;M&quot;+y+&quot;,&quot;+S+&quot;H&quot;+x))})}function c(t,e,r,n){var l=e.x,c=e.y,u=n.bdPos,f=n.bPos,h=r.boxpoints||r.points;i.seedPseudoRandom();var p=t.selectAll(&quot;g.points&quot;).data(h?function(t){return t.forEach(function(t){t.t=n,t.trace=r}),t}:[]);p.enter().append(&quot;g&quot;).attr(&quot;class&quot;,&quot;points&quot;),p.exit().remove();var d=p.selectAll(&quot;path&quot;).data(function(t){var e,n,a=&quot;all&quot;===h?t.pts:t.pts.filter(function(e){return e.v&lt;t.lf||e.v&gt;t.uf}),l=Math.max((t.max-t.min)/10,t.q3-t.q1),c=1e-9*l,p=l*s,d=[],g=0;if(r.jitter){if(0===l)for(g=1,d=new Array(a.length),e=0;e&lt;a.length;e++)d[e]=1;else for(e=0;e&lt;a.length;e++){var m=Math.max(0,e-o),v=a[m].v,y=Math.min(a.length-1,e+o),x=a[y].v;&quot;all&quot;!==h&amp;&amp;(a[e].v&lt;t.lf?x=Math.min(x,t.lf):v=Math.max(v,t.uf));var b=Math.sqrt(p*(y-m)/(x-v+c))||0;b=i.constrain(Math.abs(b),0,1),d.push(b),g=Math.max(b,g)}n=2*r.jitter/(g||1)}for(e=0;e&lt;a.length;e++){var _=a[e],w=_.v,k=r.jitter?n*d[e]*(i.pseudoRandom()-.5):0,M=t.pos+f+u*(r.pointpos+k);&quot;h&quot;===r.orientation?(_.y=M,_.x=w):(_.x=M,_.y=w),&quot;suspectedoutliers&quot;===h&amp;&amp;w&lt;t.uo&amp;&amp;w&gt;t.lo&amp;&amp;(_.so=!0)}return a});d.enter().append(&quot;path&quot;).classed(&quot;point&quot;,!0),d.exit().remove(),d.call(a.translatePoints,l,c)}function u(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,f=a.bPosPxOffset||0,h=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=t.selectAll(&quot;path.mean&quot;).data(&quot;box&quot;===r.type&amp;&amp;r.boxmean||&quot;violin&quot;===r.type&amp;&amp;r.box.visible&amp;&amp;r.meanline.visible?i.identity:[]);p.enter().append(&quot;path&quot;).attr(&quot;class&quot;,&quot;mean&quot;).style({fill:&quot;none&quot;,&quot;vector-effect&quot;:&quot;non-scaling-stroke&quot;}),p.exit().remove(),p.each(function(t){var e=l.c2p(t.pos+u,!0)+f,i=l.c2p(t.pos+u-o,!0)+f,a=l.c2p(t.pos+u+s,!0)+f,p=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),g=c.c2p(t.mean+t.sd,!0);&quot;h&quot;===r.orientation?n.select(this).attr(&quot;d&quot;,&quot;M&quot;+p+&quot;,&quot;+i+&quot;V&quot;+a+(&quot;sd&quot;===h?&quot;m0,0L&quot;+d+&quot;,&quot;+e+&quot;L&quot;+p+&quot;,&quot;+i+&quot;L&quot;+g+&quot;,&quot;+e+&quot;Z&quot;:&quot;&quot;)):n.select(this).attr(&quot;d&quot;,&quot;M&quot;+i+&quot;,&quot;+p+&quot;H&quot;+a+(&quot;sd&quot;===h?&quot;m0,0L&quot;+e+&quot;,&quot;+d+&quot;L&quot;+i+&quot;,&quot;+p+&quot;L&quot;+e+&quot;,&quot;+g+&quot;Z&quot;:&quot;&quot;))})}e.exports={plot:function(t,e,r,a){var o=t._fullLayout,s=e.xaxis,f=e.yaxis,h=o._numBoxes,p=1-o.boxgap,d=&quot;group&quot;===o.boxmode&amp;&amp;h&gt;1;i.makeTraceGroups(a,r,&quot;trace boxes&quot;).each(function(t){var r=n.select(this),i=t[0],a=i.t,g=i.trace;e.isRangePlot||(i.node3=r);var m,v,y=a.dPos*p*(1-o.boxgroupgap)/(d?h:1),x=d?2*a.dPos*((a.num+.5)/h-.5)*p:0,b=y*g.whiskerwidth;!0!==g.visible||a.empty?r.remove():(&quot;h&quot;===g.orientation?(m=f,v=s):(m=s,v=f),a.bPos=x,a.bdPos=y,a.wdPos=b,a.wHover=a.dPos*(d?p/h:1),l(r,{pos:m,val:v},g,a),c(r,{x:s,y:f},g,a),u(r,{pos:m,val:v},g,a))})},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,d3:147}],866:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r&lt;i.length;r++)for(n=0;n&lt;(i[r].pts||[]).length;n++)i[r].pts[n].selected=0;else for(r=0;r&lt;i.length;r++)for(n=0;n&lt;(i[r].pts||[]).length;n++){var l=i[r].pts[n],c=a.c2p(l.x),u=o.c2p(l.y);e.contains([c,u],null,l.i,t)?(s.push({pointNumber:l.i,x:a.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],867:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../../components/drawing&quot;);e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(&quot;g.trace.boxes&quot;);r.style(&quot;opacity&quot;,function(t){return t[0].trace.opacity}),r.each(function(e){var r=n.select(this),o=e[0].trace,s=o.line.width;function l(t,e,r,n){t.style(&quot;stroke-width&quot;,e+&quot;px&quot;).call(i.stroke,r).call(i.fill,n)}var c=r.selectAll(&quot;path.box&quot;);if(&quot;candlestick&quot;===o.type)c.each(function(t){var e=n.select(this),r=o[t.dir];l(e,r.line.width,r.line.color,r.fillcolor),e.style(&quot;opacity&quot;,o.selectedpoints&amp;&amp;!t.selected?.3:1)});else{l(c,s,o.line.color,o.fillcolor),r.selectAll(&quot;path.mean&quot;).style({&quot;stroke-width&quot;:s,&quot;stroke-dasharray&quot;:2*s+&quot;px,&quot;+s+&quot;px&quot;}).call(i.stroke,o.line.color);var u=r.selectAll(&quot;path.point&quot;);a.pointStyle(u,o,t)}})},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace,i=r.selectAll(&quot;path.point&quot;);n.selectedpoints?a.selectedPointStyle(i,n):a.pointStyle(i,n,t)}}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,d3:147}],868:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).extendFlat,i=t(&quot;../ohlc/attributes&quot;),a=t(&quot;../box/attributes&quot;);function o(t){return{line:{color:n({},a.line.color,{dflt:t}),width:a.line.width,editType:&quot;style&quot;},fillcolor:a.fillcolor,editType:&quot;style&quot;}}e.exports={x:i.x,open:i.open,high:i.high,low:i.low,close:i.close,line:{width:n({},a.line.width,{}),editType:&quot;style&quot;},increasing:o(i.increasing.line.color.dflt),decreasing:o(i.decreasing.line.color.dflt),text:i.text,whiskerwidth:n({},a.whiskerwidth,{dflt:0})}},{&quot;../../lib&quot;:693,&quot;../box/attributes&quot;:856,&quot;../ohlc/attributes&quot;:987}],869:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../ohlc/calc&quot;).calcCommon;function o(t,e,r,n){return{min:r,q1:Math.min(t,n),med:n,q3:Math.max(t,n),max:e}}e.exports=function(t,e){var r=t._fullLayout,s=i.getFromId(t,e.xaxis),l=i.getFromId(t,e.yaxis),c=s.makeCalcdata(e,&quot;x&quot;),u=a(t,e,c,l,o);return u.length?(n.extendFlat(u[0].t,{num:r._numBoxes,dPos:n.distinctVals(c).minDiff/2,posLetter:&quot;x&quot;,valLetter:&quot;y&quot;}),r._numBoxes++,u):[{t:{empty:!0}}]}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../ohlc/calc&quot;:988}],870:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../ohlc/ohlc_defaults&quot;),o=t(&quot;./attributes&quot;);function s(t,e,r,n){var a=r(n+&quot;.line.color&quot;);r(n+&quot;.line.width&quot;,e.line.width),r(n+&quot;.fillcolor&quot;,i.addOpacity(a,.5))}e.exports=function(t,e,r,i){function l(r,i){return n.coerce(t,e,o,r,i)}a(t,e,l,i)?(l(&quot;line.width&quot;),s(t,e,l,&quot;increasing&quot;),s(t,e,l,&quot;decreasing&quot;),l(&quot;text&quot;),l(&quot;whiskerwidth&quot;),i._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../ohlc/ohlc_defaults&quot;:992,&quot;./attributes&quot;:868}],871:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;trace&quot;,name:&quot;candlestick&quot;,basePlotModule:t(&quot;../../plots/cartesian&quot;),categories:[&quot;cartesian&quot;,&quot;svg&quot;,&quot;showLegend&quot;,&quot;candlestick&quot;,&quot;boxLayout&quot;],meta:{},attributes:t(&quot;./attributes&quot;),layoutAttributes:t(&quot;../box/layout_attributes&quot;),supplyLayoutDefaults:t(&quot;../box/layout_defaults&quot;).supplyLayoutDefaults,crossTraceCalc:t(&quot;../box/cross_trace_calc&quot;).crossTraceCalc,supplyDefaults:t(&quot;./defaults&quot;),calc:t(&quot;./calc&quot;),plot:t(&quot;../box/plot&quot;).plot,layerName:&quot;boxlayer&quot;,style:t(&quot;../box/style&quot;).style,hoverPoints:t(&quot;../ohlc/hover&quot;),selectPoints:t(&quot;../ohlc/select&quot;)}},{&quot;../../plots/cartesian&quot;:753,&quot;../box/cross_trace_calc&quot;:858,&quot;../box/layout_attributes&quot;:863,&quot;../box/layout_defaults&quot;:864,&quot;../box/plot&quot;:865,&quot;../box/style&quot;:867,&quot;../ohlc/hover&quot;:990,&quot;../ohlc/select&quot;:994,&quot;./attributes&quot;:868,&quot;./calc&quot;:869,&quot;./defaults&quot;:870}],872:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./axis_defaults&quot;);e.exports=function(t,e,r,i,a){i(&quot;a&quot;)||(i(&quot;da&quot;),i(&quot;a0&quot;)),i(&quot;b&quot;)||(i(&quot;db&quot;),i(&quot;b0&quot;)),function(t,e,r,i){[&quot;aaxis&quot;,&quot;baxis&quot;].forEach(function(a){var o=a.charAt(0),s=t[a]||{},l={},c={tickfont:&quot;x&quot;,id:o+&quot;axis&quot;,letter:o,font:e.font,name:a,data:t[o],calendar:e.calendar,dfltColor:i,bgColor:r.paper_bgcolor,fullLayout:r};n(s,l,c),l._categories=l._categories||[],e[a]=l,t[a]||&quot;-&quot;===s.type||(t[a]={type:s.type})})}(t,e,r,a)}},{&quot;./axis_defaults&quot;:877}],873:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).isArrayOrTypedArray;e.exports=function(t){return function t(e,r){if(!n(e)||r&gt;=10)return null;var i=1/0;var a=-1/0;var o=e.length;for(var s=0;s&lt;o;s++){var l=e[s];if(n(l)){var c=t(l,r+1);c&amp;&amp;(i=Math.min(c[0],i),a=Math.max(c[1],a))}else i=Math.min(l,i),a=Math.max(l,a)}return[i,a]}(t,0)}},{&quot;../../lib&quot;:693}],874:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;),i=t(&quot;./axis_attributes&quot;),a=t(&quot;../../components/color/attributes&quot;),o=n({editType:&quot;calc&quot;});o.family.dflt='&quot;Open Sans&quot;, verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=a.defaultLine,e.exports={carpet:{valType:&quot;string&quot;,editType:&quot;calc&quot;},x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},y:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},a:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},a0:{valType:&quot;number&quot;,dflt:0,editType:&quot;calc&quot;},da:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},b:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},b0:{valType:&quot;number&quot;,dflt:0,editType:&quot;calc&quot;},db:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},cheaterslope:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},aaxis:i,baxis:i,font:o,color:{valType:&quot;color&quot;,dflt:a.defaultLine,editType:&quot;plot&quot;}}},{&quot;../../components/color/attributes&quot;:566,&quot;../../plots/font_attributes&quot;:768,&quot;./axis_attributes&quot;:876}],875:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).isArrayOrTypedArray;e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,p,d,g,m,v,y=n(r)?&quot;a&quot;:&quot;b&quot;,x=(&quot;a&quot;===y?t.aaxis:t.baxis).smoothing,b=&quot;a&quot;===y?t.a2i:t.b2j,_=&quot;a&quot;===y?r:i,w=&quot;a&quot;===y?i:r,k=&quot;a&quot;===y?e.a.length:e.b.length,M=&quot;a&quot;===y?e.b.length:e.a.length,A=Math.floor(&quot;a&quot;===y?t.b2j(w):t.a2i(w)),T=&quot;a&quot;===y?function(e){return t.evalxy([],e,A)}:function(e){return t.evalxy([],A,e)};x&amp;&amp;(s=Math.max(0,Math.min(M-2,A)),l=A-s,o=&quot;a&quot;===y?function(e,r){return t.dxydi([],e,s,r,l)}:function(e,r){return t.dxydj([],s,e,l,r)});var S=b(_[0]),E=b(_[1]),C=S&lt;E?1:-1,L=1e-8*(E-S),z=C&gt;0?Math.floor:Math.ceil,P=C&gt;0?Math.ceil:Math.floor,O=C&gt;0?Math.min:Math.max,I=C&gt;0?Math.max:Math.min,D=z(S+L),R=P(E-L),B=[[f=T(S)]];for(a=D;a*C&lt;R*C;a+=C)c=[],g=I(S,a),v=(m=O(E,a+C))-g,u=Math.max(0,Math.min(k-2,Math.floor(.5*(g+m)))),h=T(m),x&amp;&amp;(p=o(u,g-u),d=o(u,m-u),c.push([f[0]+p[0]/3*v,f[1]+p[1]/3*v]),c.push([h[0]-d[0]/3*v,h[1]-d[1]/3*v])),c.push(h),B.push(c),f=h;return B}},{&quot;../../lib&quot;:693}],876:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;),i=t(&quot;../../components/color/attributes&quot;),a=t(&quot;../../plots/cartesian/layout_attributes&quot;),o=t(&quot;../../plot_api/edit_types&quot;).overrideAll;e.exports={color:{valType:&quot;color&quot;,editType:&quot;calc&quot;},smoothing:{valType:&quot;number&quot;,dflt:1,min:0,max:1.3,editType:&quot;calc&quot;},title:{valType:&quot;string&quot;,editType:&quot;calc&quot;},titlefont:n({editType:&quot;calc&quot;}),titleoffset:{valType:&quot;number&quot;,dflt:10,editType:&quot;calc&quot;},type:{valType:&quot;enumerated&quot;,values:[&quot;-&quot;,&quot;linear&quot;,&quot;date&quot;,&quot;category&quot;],dflt:&quot;-&quot;,editType:&quot;calc&quot;},autorange:{valType:&quot;enumerated&quot;,values:[!0,!1,&quot;reversed&quot;],dflt:!0,editType:&quot;calc&quot;},rangemode:{valType:&quot;enumerated&quot;,values:[&quot;normal&quot;,&quot;tozero&quot;,&quot;nonnegative&quot;],dflt:&quot;normal&quot;,editType:&quot;calc&quot;},range:{valType:&quot;info_array&quot;,editType:&quot;calc&quot;,items:[{valType:&quot;any&quot;,editType:&quot;calc&quot;},{valType:&quot;any&quot;,editType:&quot;calc&quot;}]},fixedrange:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},cheatertype:{valType:&quot;enumerated&quot;,values:[&quot;index&quot;,&quot;value&quot;],dflt:&quot;value&quot;,editType:&quot;calc&quot;},tickmode:{valType:&quot;enumerated&quot;,values:[&quot;linear&quot;,&quot;array&quot;],dflt:&quot;array&quot;,editType:&quot;calc&quot;},nticks:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;calc&quot;},tickvals:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},ticktext:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},showticklabels:{valType:&quot;enumerated&quot;,values:[&quot;start&quot;,&quot;end&quot;,&quot;both&quot;,&quot;none&quot;],dflt:&quot;start&quot;,editType:&quot;calc&quot;},tickfont:n({editType:&quot;calc&quot;}),tickangle:{valType:&quot;angle&quot;,dflt:&quot;auto&quot;,editType:&quot;calc&quot;},tickprefix:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;},showtickprefix:{valType:&quot;enumerated&quot;,values:[&quot;all&quot;,&quot;first&quot;,&quot;last&quot;,&quot;none&quot;],dflt:&quot;all&quot;,editType:&quot;calc&quot;},ticksuffix:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;},showticksuffix:{valType:&quot;enumerated&quot;,values:[&quot;all&quot;,&quot;first&quot;,&quot;last&quot;,&quot;none&quot;],dflt:&quot;all&quot;,editType:&quot;calc&quot;},showexponent:{valType:&quot;enumerated&quot;,values:[&quot;all&quot;,&quot;first&quot;,&quot;last&quot;,&quot;none&quot;],dflt:&quot;all&quot;,editType:&quot;calc&quot;},exponentformat:{valType:&quot;enumerated&quot;,values:[&quot;none&quot;,&quot;e&quot;,&quot;E&quot;,&quot;power&quot;,&quot;SI&quot;,&quot;B&quot;],dflt:&quot;B&quot;,editType:&quot;calc&quot;},separatethousands:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},tickformat:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;},tickformatstops:o(a.tickformatstops,&quot;calc&quot;,&quot;from-root&quot;),categoryorder:{valType:&quot;enumerated&quot;,values:[&quot;trace&quot;,&quot;category ascending&quot;,&quot;category descending&quot;,&quot;array&quot;],dflt:&quot;trace&quot;,editType:&quot;calc&quot;},categoryarray:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},labelpadding:{valType:&quot;integer&quot;,dflt:10,editType:&quot;calc&quot;},labelprefix:{valType:&quot;string&quot;,editType:&quot;calc&quot;},labelsuffix:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;},showline:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},linecolor:{valType:&quot;color&quot;,dflt:i.defaultLine,editType:&quot;calc&quot;},linewidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;calc&quot;},gridcolor:{valType:&quot;color&quot;,editType:&quot;calc&quot;},gridwidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;calc&quot;},showgrid:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},minorgridcount:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;calc&quot;},minorgridwidth:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;calc&quot;},minorgridcolor:{valType:&quot;color&quot;,dflt:i.lightLine,editType:&quot;calc&quot;},startline:{valType:&quot;boolean&quot;,editType:&quot;calc&quot;},startlinecolor:{valType:&quot;color&quot;,editType:&quot;calc&quot;},startlinewidth:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},endline:{valType:&quot;boolean&quot;,editType:&quot;calc&quot;},endlinewidth:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},endlinecolor:{valType:&quot;color&quot;,editType:&quot;calc&quot;},tick0:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;calc&quot;},dtick:{valType:&quot;number&quot;,min:0,dflt:1,editType:&quot;calc&quot;},arraytick0:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;calc&quot;},arraydtick:{valType:&quot;integer&quot;,min:1,dflt:1,editType:&quot;calc&quot;},editType:&quot;calc&quot;}},{&quot;../../components/color/attributes&quot;:566,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/cartesian/layout_attributes&quot;:754,&quot;../../plots/font_attributes&quot;:768}],877:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./attributes&quot;),i=t(&quot;../../components/color&quot;).addOpacity,a=t(&quot;../../registry&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../../plots/cartesian/tick_value_defaults&quot;),l=t(&quot;../../plots/cartesian/tick_label_defaults&quot;),c=t(&quot;../../plots/cartesian/category_order_defaults&quot;),u=t(&quot;../../plots/cartesian/set_convert&quot;),f=t(&quot;../../plots/cartesian/axis_autotype&quot;);e.exports=function(t,e,r){var h=r.letter,p=r.font||{},d=n[h+&quot;axis&quot;];function g(r,n){return o.coerce(t,e,d,r,n)}function m(r,n){return o.coerce2(t,e,d,r,n)}r.name&amp;&amp;(e._name=r.name,e._id=r.name);var v=g(&quot;type&quot;);(&quot;-&quot;===v&amp;&amp;(r.data&amp;&amp;function(t,e){if(&quot;-&quot;!==t.type)return;var r=t._id.charAt(0),n=t[r+&quot;calendar&quot;];t.type=f(e,n)}(e,r.data),&quot;-&quot;===e.type?e.type=&quot;linear&quot;:v=t.type=e.type),g(&quot;smoothing&quot;),g(&quot;cheatertype&quot;),g(&quot;showticklabels&quot;),g(&quot;labelprefix&quot;,h+&quot; = &quot;),g(&quot;labelsuffix&quot;),g(&quot;showtickprefix&quot;),g(&quot;showticksuffix&quot;),g(&quot;separatethousands&quot;),g(&quot;tickformat&quot;),g(&quot;exponentformat&quot;),g(&quot;showexponent&quot;),g(&quot;categoryorder&quot;),g(&quot;tickmode&quot;),g(&quot;tickvals&quot;),g(&quot;ticktext&quot;),g(&quot;tick0&quot;),g(&quot;dtick&quot;),&quot;array&quot;===e.tickmode&amp;&amp;(g(&quot;arraytick0&quot;),g(&quot;arraydtick&quot;)),g(&quot;labelpadding&quot;),e._hovertitle=h,&quot;date&quot;===v)&amp;&amp;a.getComponentMethod(&quot;calendars&quot;,&quot;handleDefaults&quot;)(t,e,&quot;calendar&quot;,r.calendar);u(e,r.fullLayout),e.c2p=o.identity;var y=g(&quot;color&quot;,r.dfltColor),x=y===t.color?y:p.color;g(&quot;title&quot;),o.coerceFont(g,&quot;titlefont&quot;,{family:p.family,size:Math.round(1.2*p.size),color:x}),g(&quot;titleoffset&quot;),g(&quot;tickangle&quot;),g(&quot;autorange&quot;,!e.isValidRange(t.range))&amp;&amp;g(&quot;rangemode&quot;),g(&quot;range&quot;),e.cleanRange(),g(&quot;fixedrange&quot;),s(t,e,g,v),l(t,e,g,v,r),c(t,e,g,{data:r.data,dataAttr:h});var b=m(&quot;gridcolor&quot;,i(y,.3)),_=m(&quot;gridwidth&quot;),w=g(&quot;showgrid&quot;);w||(delete e.gridcolor,delete e.gridwidth);var k=m(&quot;startlinecolor&quot;,y),M=m(&quot;startlinewidth&quot;,_);g(&quot;startline&quot;,e.showgrid||!!k||!!M)||(delete e.startlinecolor,delete e.startlinewidth);var A=m(&quot;endlinecolor&quot;,y),T=m(&quot;endlinewidth&quot;,_);return g(&quot;endline&quot;,e.showgrid||!!A||!!T)||(delete e.endlinecolor,delete e.endlinewidth),w?(g(&quot;minorgridcount&quot;),g(&quot;minorgridwidth&quot;,_),g(&quot;minorgridcolor&quot;,i(b,.06)),e.minorgridcount||(delete e.minorgridwidth,delete e.minorgridcolor)):(delete e.gridcolor,delete e.gridWidth),&quot;none&quot;===e.showticklabels&amp;&amp;(delete e.tickfont,delete e.tickangle,delete e.showexponent,delete e.exponentformat,delete e.tickformat,delete e.showticksuffix,delete e.showtickprefix),e.showticksuffix||delete e.ticksuffix,e.showtickprefix||delete e.tickprefix,g(&quot;tickmode&quot;),(!e.title||e.title&amp;&amp;0===e.title.length)&amp;&amp;(delete e.titlefont,delete e.titleoffset),e}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axis_autotype&quot;:743,&quot;../../plots/cartesian/category_order_defaults&quot;:746,&quot;../../plots/cartesian/set_convert&quot;:760,&quot;../../plots/cartesian/tick_label_defaults&quot;:761,&quot;../../plots/cartesian/tick_value_defaults&quot;:763,&quot;../../registry&quot;:825,&quot;./attributes&quot;:874}],878:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../lib&quot;).isArray1D,a=t(&quot;./cheater_basis&quot;),o=t(&quot;./array_minmax&quot;),s=t(&quot;./calc_gridlines&quot;),l=t(&quot;./calc_labels&quot;),c=t(&quot;./calc_clippath&quot;),u=t(&quot;../heatmap/clean_2d_array&quot;),f=t(&quot;./smooth_fill_2d_array&quot;),h=t(&quot;../heatmap/convert_column_xyz&quot;),p=t(&quot;./set_convert&quot;);e.exports=function(t,e){var r=n.getFromId(t,e.xaxis),d=n.getFromId(t,e.yaxis),g=e.aaxis,m=e.baxis,v=e.x,y=e.y,x=[];v&amp;&amp;i(v)&amp;&amp;x.push(&quot;x&quot;),y&amp;&amp;i(y)&amp;&amp;x.push(&quot;y&quot;),x.length&amp;&amp;h(e,g,m,&quot;a&quot;,&quot;b&quot;,x);var b=e._a=e._a||e.a,_=e._b=e._b||e.b;v=e._x||e.x,y=e._y||e.y;var w={};if(e._cheater){var k=&quot;index&quot;===g.cheatertype?b.length:b,M=&quot;index&quot;===m.cheatertype?_.length:_;v=a(k,M,e.cheaterslope)}e._x=v=u(v),e._y=y=u(y),f(v,b,_),f(y,b,_),p(e),e.setScale();var A=o(v),T=o(y),S=.5*(A[1]-A[0]),E=.5*(A[1]+A[0]),C=.5*(T[1]-T[0]),L=.5*(T[1]+T[0]);return A=[E-1.3*S,E+1.3*S],T=[L-1.3*C,L+1.3*C],e._extremes[r._id]=n.findExtremes(r,A,{padded:!0}),e._extremes[d._id]=n.findExtremes(d,T,{padded:!0}),s(e,&quot;a&quot;,&quot;b&quot;),s(e,&quot;b&quot;,&quot;a&quot;),l(e,g),l(e,m),w.clipsegments=c(e._xctrl,e._yctrl,g,m),w.x=v,w.y=y,w.a=b,w.b=_,[w]}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../heatmap/clean_2d_array&quot;:944,&quot;../heatmap/convert_column_xyz&quot;:946,&quot;./array_minmax&quot;:873,&quot;./calc_clippath&quot;:879,&quot;./calc_gridlines&quot;:880,&quot;./calc_labels&quot;:881,&quot;./cheater_basis&quot;:883,&quot;./set_convert&quot;:896,&quot;./smooth_fill_2d_array&quot;:897}],879:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var i,a,o,s=[],l=!!r.smoothing,c=!!n.smoothing,u=t[0].length-1,f=t.length-1;for(i=0,a=[],o=[];i&lt;=u;i++)a[i]=t[0][i],o[i]=e[0][i];for(s.push({x:a,y:o,bicubic:l}),i=0,a=[],o=[];i&lt;=f;i++)a[i]=t[i][u],o[i]=e[i][u];for(s.push({x:a,y:o,bicubic:c}),i=u,a=[],o=[];i&gt;=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i&gt;=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],880:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../lib/extend&quot;).extendFlat;e.exports=function(t,e,r){var a,o,s,l,c,u,f,h,p,d,g,m,v,y,x=t[&quot;_&quot;+e],b=t[e+&quot;axis&quot;],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],M=t[&quot;_&quot;+r],A=t[r+&quot;axis&quot;];&quot;array&quot;===b.tickmode&amp;&amp;(b.tickvals=x.slice());var T=t._xctrl,S=t._yctrl,E=T[0].length,C=T.length,L=t._a.length,z=t._b.length;n.prepTicks(b),&quot;array&quot;===b.tickmode&amp;&amp;delete b.tickvals;var P=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(&quot;b&quot;===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(z-2,a))),s=a-o,x.length=z,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i&lt;L;i++)c=Math.min(L-2,i),u=i-c,f=t.evalxy([],i,a),A.smoothing&amp;&amp;i&gt;0&amp;&amp;(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,i))),u=i-c,x.length=L,x.crossLength=z,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a&lt;z;a++)o=Math.min(z-2,a),s=a-o,f=t.evalxy([],i,a),A.smoothing&amp;&amp;a&gt;0&amp;&amp;(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=h,x.x=v,x.y=y,x.smoothing=A.smoothing,x}function I(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=M.length,&quot;b&quot;===e)for(o=Math.max(0,Math.min(z-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;i&lt;E;i++)c[i]=T[n*P][i],u[i]=S[n*P][i];else for(a=Math.max(0,Math.min(L-2,n)),s=Math.min(1,Math.max(0,n-a)),f.xy=function(e){return t.evalxy([],n,e)},f.dxy=function(e,r){return t.dxydj([],a,e,s,r)},i=0;i&lt;C;i++)c[i]=T[i][n*P],u[i]=S[i][n*P];return f.axisLetter=e,f.axis=b,f.crossAxis=A,f.value=x[n],f.constvar=r,f.index=n,f.x=c,f.y=u,f.smoothing=A.smoothing,f}if(&quot;array&quot;===b.tickmode){for(l=5e-15,u=(c=[Math.floor((x.length-1-b.arraytick0)/b.arraydtick*(1+l)),Math.ceil(-b.arraytick0/b.arraydtick/(1+l))].sort(function(t,e){return t-e}))[0]-1,f=c[1]+1,h=u;h&lt;f;h++)(o=b.arraytick0+b.arraydtick*h)&lt;0||o&gt;x.length-1||_.push(i(I(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;h&lt;f;h++)if(s=b.arraytick0+b.arraydtick*h,g=Math.min(s+b.arraydtick,x.length-1),!(s&lt;0||s&gt;x.length-1||g&lt;0||g&gt;x.length-1))for(m=x[s],v=x[g],a=0;a&lt;b.minorgridcount;a++)(y=g-s)&lt;=0||(d=m+(v-m)*(a+1)/(b.minorgridcount+1)*(b.arraydtick/y))&lt;x[0]||d&gt;x[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&amp;&amp;k.push(i(I(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&amp;&amp;k.push(i(I(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort(function(t,e){return t-e}))[0],f=c[1],h=u;h&lt;=f;h++)p=b.tick0+b.dtick*h,_.push(i(O(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;h&lt;f+1;h++)for(p=b.tick0+b.dtick*h,a=0;a&lt;b.minorgridcount;a++)(d=p+b.dtick*(a+1)/(b.minorgridcount+1))&lt;x[0]||d&gt;x[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&amp;&amp;k.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&amp;&amp;k.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{&quot;../../lib/extend&quot;:682,&quot;../../plots/cartesian/axes&quot;:742}],881:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../lib/extend&quot;).extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;r&lt;l.length;r++)o=l[r],-1!==[&quot;start&quot;,&quot;both&quot;].indexOf(e.showticklabels)&amp;&amp;(a=n.tickText(e,o.value),i(a,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a)),-1!==[&quot;end&quot;,&quot;both&quot;].indexOf(e.showticklabels)&amp;&amp;(a=n.tickText(e,o.value),i(a,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a))}},{&quot;../../lib/extend&quot;:682,&quot;../../plots/cartesian/axes&quot;:742}],882:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,f=(c*c*a-l*l*s)*n,h=c*(l+c)*3,p=l*(l+c)*3;return[[e[0]+(h&amp;&amp;u/h),e[1]+(h&amp;&amp;f/h)],[e[0]-(p&amp;&amp;u/p),e[1]-(p&amp;&amp;f/p)]]}},{}],883:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).isArrayOrTypedArray;e.exports=function(t,e,r){var i,a,o,s,l,c,u=[],f=n(t)?t.length:t,h=n(e)?e.length:e,p=n(t)?t:null,d=n(e)?e:null;p&amp;&amp;(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1)),d&amp;&amp;(s=(d.length-1)/(d[d.length-1]-d[0])/(h-1));var g=1/0,m=-1/0;for(a=0;a&lt;h;a++)for(u[a]=[],l=d?(d[a]-d[0])*s:a/(h-1),i=0;i&lt;f;i++)c=(p?(p[i]-p[0])*o:i/(f-1))-l*r,g=Math.min(c,g),m=Math.max(c,m),u[a][i]=c;var v=1/(m-g),y=-g*v;for(a=0;a&lt;h;a++)for(i=0;i&lt;f;i++)u[a][i]=v*u[a][i]+y;return u}},{&quot;../../lib&quot;:693}],884:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./catmull_rom&quot;),i=t(&quot;../../lib&quot;).ensureArray;function a(t,e,r){var n=-.5*r[0]+1.5*e[0],i=-.5*r[1]+1.5*e[1];return[(2*n+t[0])/3,(2*i+t[1])/3]}e.exports=function(t,e,r,o,s,l){var c,u,f,h,p,d,g,m,v,y,x=r[0].length,b=r.length,_=s?3*x-2:x,w=l?3*b-2:b;for(t=i(t,w),e=i(e,w),f=0;f&lt;w;f++)t[f]=i(t[f],_),e[f]=i(e[f],_);for(u=0,h=0;u&lt;b;u++,h+=l?3:1)for(p=t[h],d=e[h],g=r[u],m=o[u],c=0,f=0;c&lt;x;c++,f+=s?3:1)p[f]=g[c],d[f]=m[c];if(s)for(u=0,h=0;u&lt;b;u++,h+=l?3:1){for(c=1,f=3;c&lt;x-1;c++,f+=3)v=n([r[u][c-1],o[u][c-1]],[r[u][c],o[u][c]],[r[u][c+1],o[u][c+1]],s),t[h][f-1]=v[0][0],e[h][f-1]=v[0][1],t[h][f+1]=v[1][0],e[h][f+1]=v[1][1];y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=y[0],e[h][1]=y[1],y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=y[0],e[h][_-2]=y[1]}if(l)for(f=0;f&lt;_;f++){for(h=3;h&lt;w-3;h+=3)v=n([t[h-3][f],e[h-3][f]],[t[h][f],e[h][f]],[t[h+3][f],e[h+3][f]],l),t[h-1][f]=v[0][0],e[h-1][f]=v[0][1],t[h+1][f]=v[1][0],e[h+1][f]=v[1][1];y=a([t[0][f],e[0][f]],[t[2][f],e[2][f]],[t[3][f],e[3][f]]),t[1][f]=y[0],e[1][f]=y[1],y=a([t[w-1][f],e[w-1][f]],[t[w-3][f],e[w-3][f]],[t[w-4][f],e[w-4][f]]),t[w-2][f]=y[0],e[w-2][f]=y[1]}if(s&amp;&amp;l)for(h=1;h&lt;w;h+=(h+1)%3==0?2:1){for(f=3;f&lt;_-3;f+=3)v=n([t[h][f-3],e[h][f-3]],[t[h][f],e[h][f]],[t[h][f+3],e[h][f+3]],s),t[h][f-1]=.5*(t[h][f-1]+v[0][0]),e[h][f-1]=.5*(e[h][f-1]+v[0][1]),t[h][f+1]=.5*(t[h][f+1]+v[1][0]),e[h][f+1]=.5*(e[h][f+1]+v[1][1]);y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=.5*(t[h][1]+y[0]),e[h][1]=.5*(e[h][1]+y[1]),y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=.5*(t[h][_-2]+y[0]),e[h][_-2]=.5*(e[h][_-2]+y[1])}return[t,e]}},{&quot;../../lib&quot;:693,&quot;./catmull_rom&quot;:882}],885:[function(t,e,r){&quot;use strict&quot;;e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],886:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){return e&amp;&amp;r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=1-i,d=p*p,g=p*i*2,m=-3*d,v=3*(d-g),y=3*(g-h),x=3*h,b=a*a,_=b*a,w=1-a,k=w*w,M=k*w;for(f=0;f&lt;t.length;f++)o=m*(u=t[f])[n][r]+v*u[n][r+1]+y*u[n][r+2]+x*u[n][r+3],s=m*u[n+1][r]+v*u[n+1][r+1]+y*u[n+1][r+2]+x*u[n+1][r+3],l=m*u[n+2][r]+v*u[n+2][r+1]+y*u[n+2][r+2]+x*u[n+2][r+3],c=m*u[n+3][r]+v*u[n+3][r+1]+y*u[n+3][r+2]+x*u[n+3][r+3],e[f]=M*o+3*(k*a*s+w*b*l)+_*c;return e}:e?function(e,r,n,i,a){var o,s,l,c;e||(e=[]),r*=3;var u=i*i,f=1-i,h=f*f,p=f*i*2,d=-3*h,g=3*(h-p),m=3*(p-u),v=3*u,y=1-a;for(l=0;l&lt;t.length;l++)o=d*(c=t[l])[n][r]+g*c[n][r+1]+m*c[n][r+2]+v*c[n][r+3],s=d*c[n+1][r]+g*c[n+1][r+1]+m*c[n+1][r+2]+v*c[n+1][r+3],e[l]=y*o+a*s;return e}:r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),n*=3;var h=a*a,p=h*a,d=1-a,g=d*d,m=g*d;for(u=0;u&lt;t.length;u++)o=(f=t[u])[n][r+1]-f[n][r],s=f[n+1][r+1]-f[n+1][r],l=f[n+2][r+1]-f[n+2][r],c=f[n+3][r+1]-f[n+3][r],e[u]=m*o+3*(g*a*s+d*h*l)+p*c;return e}:function(e,r,n,i,a){var o,s,l,c;e||(e=[]);var u=1-a;for(l=0;l&lt;t.length;l++)o=(c=t[l])[n][r+1]-c[n][r],s=c[n+1][r+1]-c[n+1][r],e[l]=u*o+a*s;return e}}},{}],887:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){return e&amp;&amp;r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=h*i,d=1-i,g=d*d,m=g*d,v=a*a,y=1-a,x=y*y,b=y*a*2,_=-3*x,w=3*(x-b),k=3*(b-v),M=3*v;for(f=0;f&lt;t.length;f++)o=_*(u=t[f])[n][r]+w*u[n+1][r]+k*u[n+2][r]+M*u[n+3][r],s=_*u[n][r+1]+w*u[n+1][r+1]+k*u[n+2][r+1]+M*u[n+3][r+1],l=_*u[n][r+2]+w*u[n+1][r+2]+k*u[n+2][r+2]+M*u[n+3][r+2],c=_*u[n][r+3]+w*u[n+1][r+3]+k*u[n+2][r+3]+M*u[n+3][r+3],e[f]=m*o+3*(g*i*s+d*h*l)+p*c;return e}:e?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3;var h=a*a,p=h*a,d=1-a,g=d*d,m=g*d;for(u=0;u&lt;t.length;u++)o=(f=t[u])[n+1][r]-f[n][r],s=f[n+1][r+1]-f[n][r+1],l=f[n+1][r+2]-f[n][r+2],c=f[n+1][r+3]-f[n][r+3],e[u]=m*o+3*(g*a*s+d*h*l)+p*c;return e}:r?function(e,r,n,i,a){var o,s,l,c;e||(e=[]),n*=3;var u=1-i,f=a*a,h=1-a,p=h*h,d=h*a*2,g=-3*p,m=3*(p-d),v=3*(d-f),y=3*f;for(l=0;l&lt;t.length;l++)o=g*(c=t[l])[n][r]+m*c[n+1][r]+v*c[n+2][r]+y*c[n+3][r],s=g*c[n][r+1]+m*c[n+1][r+1]+v*c[n+2][r+1]+y*c[n+3][r+1],e[l]=u*o+i*s;return e}:function(e,r,n,i,a){var o,s,l,c;e||(e=[]);var u=1-i;for(l=0;l&lt;t.length;l++)o=(c=t[l])[n+1][r]-c[n][r],s=c[n+1][r+1]-c[n][r+1],e[l]=u*o+i*s;return e}}},{}],888:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i){var a=e-2,o=r-2;return n&amp;&amp;i?function(e,r,n){var i,s,l,c,u,f;e||(e=[]);var h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3,p*=3;var m=d*d,v=m*d,y=1-d,x=y*y,b=x*y,_=g*g,w=_*g,k=1-g,M=k*k,A=M*k;for(f=0;f&lt;t.length;f++)i=b*(u=t[f])[p][h]+3*(x*d*u[p][h+1]+y*m*u[p][h+2])+v*u[p][h+3],s=b*u[p+1][h]+3*(x*d*u[p+1][h+1]+y*m*u[p+1][h+2])+v*u[p+1][h+3],l=b*u[p+2][h]+3*(x*d*u[p+2][h+1]+y*m*u[p+2][h+2])+v*u[p+2][h+3],c=b*u[p+3][h]+3*(x*d*u[p+3][h+1]+y*m*u[p+3][h+2])+v*u[p+3][h+3],e[f]=A*i+3*(M*g*s+k*_*l)+w*c;return e}:n?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3;var m=d*d,v=m*d,y=1-d,x=y*y,b=x*y,_=1-g;for(u=0;u&lt;t.length;u++)i=_*(f=t[u])[p][h]+g*f[p+1][h],s=_*f[p][h+1]+g*f[p+1][h+1],l=_*f[p][h+2]+g*f[p+1][h+1],c=_*f[p][h+3]+g*f[p+1][h+1],e[u]=b*i+3*(x*d*s+y*m*l)+v*c;return e}:i?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));p*=3;var m=g*g,v=m*g,y=1-g,x=y*y,b=x*y,_=1-d;for(u=0;u&lt;t.length;u++)i=_*(f=t[u])[p][h]+d*f[p][h+1],s=_*f[p+1][h]+d*f[p+1][h+1],l=_*f[p+2][h]+d*f[p+2][h+1],c=_*f[p+3][h]+d*f[p+3][h+1],e[u]=b*i+3*(x*g*s+y*m*l)+v*c;return e}:function(e,r,n){e||(e=[]);var i,s,l,c,u=Math.max(0,Math.min(Math.floor(r),a)),f=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(1,r-u)),p=Math.max(0,Math.min(1,n-f)),d=1-p,g=1-h;for(l=0;l&lt;t.length;l++)i=g*(c=t[l])[f][u]+h*c[f][u+1],s=g*c[f+1][u]+h*c[f+1][u+1],e[l]=d*i+p*s;return e}}},{}],889:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./xy_defaults&quot;),a=t(&quot;./ab_defaults&quot;),o=t(&quot;./attributes&quot;),s=t(&quot;../../components/color/attributes&quot;);e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,o,r,i)}e._clipPathId=&quot;clip&quot;+e.uid+&quot;carpet&quot;;var u=c(&quot;color&quot;,s.defaultLine);(n.coerceFont(c,&quot;font&quot;),c(&quot;carpet&quot;),a(t,e,l,c,u),e.a&amp;&amp;e.b)?(e.a.length&lt;3&amp;&amp;(e.aaxis.smoothing=0),e.b.length&lt;3&amp;&amp;(e.baxis.smoothing=0),i(t,e,c)||(e.visible=!1),e._cheater&amp;&amp;c(&quot;cheaterslope&quot;)):e.visible=!1}},{&quot;../../components/color/attributes&quot;:566,&quot;../../lib&quot;:693,&quot;./ab_defaults&quot;:872,&quot;./attributes&quot;:874,&quot;./xy_defaults&quot;:898}],890:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.plot=t(&quot;./plot&quot;),n.calc=t(&quot;./calc&quot;),n.animatable=!0,n.isContainer=!0,n.moduleType=&quot;trace&quot;,n.name=&quot;carpet&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;carpet&quot;,&quot;carpetAxis&quot;,&quot;notLegendIsolatable&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;./attributes&quot;:874,&quot;./calc&quot;:878,&quot;./defaults&quot;:889,&quot;./plot&quot;:895}],891:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r,n=t._fullData.length,i=0;i&lt;n;i++){var a=t._fullData[i];if(a.index!==e.index&amp;&amp;(&quot;carpet&quot;===a.type&amp;&amp;(r||(r=a),a.carpet===e.carpet)))return a}return r}},{}],892:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){if(0===t.length)return&quot;&quot;;var n,i=[],a=r?3:1;for(n=0;n&lt;t.length;n+=a)i.push(t[n]+&quot;,&quot;+e[n]),r&amp;&amp;n&lt;t.length-a&amp;&amp;(i.push(&quot;C&quot;),i.push([t[n+1]+&quot;,&quot;+e[n+1],t[n+2]+&quot;,&quot;+e[n+2]+&quot; &quot;].join(&quot; &quot;)));return i.join(r?&quot;&quot;:&quot;L&quot;)}},{}],893:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).isArrayOrTypedArray;e.exports=function(t,e,r){var i;for(n(t)?t.length&gt;e.length&amp;&amp;(t=t.slice(0,e.length)):t=[],i=0;i&lt;e.length;i++)t[i]=r(e[i]);return t}},{&quot;../../lib&quot;:693}],894:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i,a){var o=i[0]*t.dpdx(e),s=i[1]*t.dpdy(r),l=1,c=1;if(a){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(i[0]*a[0]+i[1]*a[1])/u/f;c=Math.max(0,h)}var p=180*Math.atan2(s,o)/Math.PI;return p&lt;-90?(p+=180,l=-l):p&gt;90&amp;&amp;(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],895:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/drawing&quot;),a=t(&quot;./map_1d_array&quot;),o=t(&quot;./makepath&quot;),s=t(&quot;./orient_text&quot;),l=t(&quot;../../lib/svg_text_utils&quot;),c=t(&quot;../../lib&quot;),u=t(&quot;../../constants/alignment&quot;);function f(t,e,r,i,s,l){var c=&quot;const-&quot;+s+&quot;-lines&quot;,u=r.selectAll(&quot;.&quot;+c).data(l);u.enter().append(&quot;path&quot;).classed(c,!0).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;),u.each(function(r){var i=r,s=i.x,l=i.y,c=a([],s,t.c2p),u=a([],l,e.c2p),f=&quot;M&quot;+o(c,u,i.smoothing);n.select(this).attr(&quot;d&quot;,f).style(&quot;stroke-width&quot;,i.width).style(&quot;stroke&quot;,i.color).style(&quot;fill&quot;,&quot;none&quot;)}),u.exit().remove()}function h(t,e,r,a,o,c,u,f){var h=c.selectAll(&quot;text.&quot;+f).data(u);h.enter().append(&quot;text&quot;).classed(f,!0);var p=0,d={};return h.each(function(o,c){var u;if(&quot;auto&quot;===o.axis.tickangle)u=s(a,e,r,o.xy,o.dxy);else{var f=(o.axis.tickangle+180)*Math.PI/180;u=s(a,e,r,o.xy,[Math.cos(f),Math.sin(f)])}c||(d={angle:u.angle,flip:u.flip});var h=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({&quot;text-anchor&quot;:h&gt;0?&quot;start&quot;:&quot;end&quot;,&quot;data-notex&quot;:1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),m=i.bBox(this);g.attr(&quot;transform&quot;,&quot;translate(&quot;+u.p[0]+&quot;,&quot;+u.p[1]+&quot;) rotate(&quot;+u.angle+&quot;)translate(&quot;+o.axis.labelpadding*h+&quot;,&quot;+.3*m.height+&quot;)&quot;),p=Math.max(p,m.width+o.axis.labelpadding)}),h.exit().remove(),d.maxExtent=p,d}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,p=t._fullLayout._clips;c.makeTraceGroups(i,r,&quot;trace&quot;).each(function(e){var r=n.select(this),i=e[0],d=i.trace,m=d.aaxis,v=d.baxis,y=c.ensureSingle(r,&quot;g&quot;,&quot;minorlayer&quot;),x=c.ensureSingle(r,&quot;g&quot;,&quot;majorlayer&quot;),b=c.ensureSingle(r,&quot;g&quot;,&quot;boundarylayer&quot;),_=c.ensureSingle(r,&quot;g&quot;,&quot;labellayer&quot;);r.style(&quot;opacity&quot;,d.opacity),f(l,u,x,m,&quot;a&quot;,m._gridlines),f(l,u,x,v,&quot;b&quot;,v._gridlines),f(l,u,y,m,&quot;a&quot;,m._minorgridlines),f(l,u,y,v,&quot;b&quot;,v._minorgridlines),f(l,u,b,m,&quot;a-boundary&quot;,m._boundarylines),f(l,u,b,v,&quot;b-boundary&quot;,v._boundarylines);var w=h(t,l,u,d,i,_,m._labels,&quot;a-label&quot;),k=h(t,l,u,d,i,_,v._labels,&quot;b-label&quot;);!function(t,e,r,n,i,a,o,l){var u,f,h,p;u=.5*(r.a[0]+r.a[r.a.length-1]),f=r.b[0],h=r.ab2xy(u,f,!0),p=r.dxyda_rough(u,f),void 0===o.angle&amp;&amp;c.extendFlat(o,s(r,i,a,h,r.dxydb_rough(u,f)));g(t,e,r,n,h,p,r.aaxis,i,a,o,&quot;a-title&quot;),u=r.a[0],f=.5*(r.b[0]+r.b[r.b.length-1]),h=r.ab2xy(u,f,!0),p=r.dxydb_rough(u,f),void 0===l.angle&amp;&amp;c.extendFlat(l,s(r,i,a,h,r.dxyda_rough(u,f)));g(t,e,r,n,h,p,r.baxis,i,a,l,&quot;b-title&quot;)}(t,_,d,i,l,u,w,k),function(t,e,r,n,i){var s,l,u,f,h=r.select(&quot;#&quot;+t._clipPathId);h.size()||(h=r.append(&quot;clipPath&quot;).classed(&quot;carpetclip&quot;,!0));var p=c.ensureSingle(h,&quot;path&quot;,&quot;carpetboundary&quot;),d=e.clipsegments,g=[];for(f=0;f&lt;d.length;f++)s=d[f],l=a([],s.x,n.c2p),u=a([],s.y,i.c2p),g.push(o(l,u,s.bicubic));var m=&quot;M&quot;+g.join(&quot;L&quot;)+&quot;Z&quot;;h.attr(&quot;id&quot;,t._clipPathId),p.attr(&quot;d&quot;,m)}(d,i,p,l,u)})};var p=u.LINE_SPACING,d=(1-u.MID_SHIFT)/p+1;function g(t,e,r,a,o,c,u,f,h,g,m){var v=[];u.title&amp;&amp;v.push(u.title);var y=e.selectAll(&quot;text.&quot;+m).data(v),x=g.maxExtent;y.enter().append(&quot;text&quot;).classed(m,!0),y.each(function(){var e=s(r,f,h,o,c);-1===[&quot;start&quot;,&quot;both&quot;].indexOf(u.showticklabels)&amp;&amp;(x=0);var a=u.titlefont.size;x+=a+u.titleoffset;var m=(g.angle+(g.flip&lt;0?180:0)-e.angle+450)%360,v=m&gt;90&amp;&amp;m&lt;270,y=n.select(this);y.text(u.title||&quot;&quot;).call(l.convertToTspans,t),v&amp;&amp;(x=(-l.lineCount(y)+d)*p*a-x),y.attr(&quot;transform&quot;,&quot;translate(&quot;+e.p[0]+&quot;,&quot;+e.p[1]+&quot;) rotate(&quot;+e.angle+&quot;) translate(0,&quot;+x+&quot;)&quot;).classed(&quot;user-select-none&quot;,!0).attr(&quot;text-anchor&quot;,&quot;middle&quot;).call(i.font,u.titlefont)}),y.exit().remove()}},{&quot;../../components/drawing&quot;:592,&quot;../../constants/alignment&quot;:665,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;./makepath&quot;:892,&quot;./map_1d_array&quot;:893,&quot;./orient_text&quot;:894,d3:147}],896:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;),i=t(&quot;../../lib/search&quot;).findBin,a=t(&quot;./compute_control_points&quot;),o=t(&quot;./create_spline_evaluator&quot;),s=t(&quot;./create_i_derivative_evaluator&quot;),l=t(&quot;./create_j_derivative_evaluator&quot;);e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[c-1],g=r[0],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t&gt;p&amp;&amp;t&lt;d&amp;&amp;e&gt;g&amp;&amp;e&lt;m},t.isOccluded=function(t,e){return t&lt;p||t&gt;d||e&lt;g||e&gt;m},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&amp;&amp;(n&lt;e[0]||n&gt;e[c-1]|i&lt;r[0]||i&gt;r[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,g=0,m=0,v=[];n&lt;e[0]?(f=0,h=0,g=(n-e[0])/(e[1]-e[0])):n&gt;e[c-1]?(f=c-2,h=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),i&lt;r[0]?(p=0,d=0,m=(i-r[0])/(r[1]-r[0])):i&gt;r[u-1]?(p=u-2,d=1,m=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&amp;&amp;(t.dxydi(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&amp;&amp;(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=v*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{&quot;../../lib/search&quot;:713,&quot;./compute_control_points&quot;:884,&quot;./constants&quot;:885,&quot;./create_i_derivative_evaluator&quot;:886,&quot;./create_j_derivative_evaluator&quot;:887,&quot;./create_spline_evaluator&quot;:888}],897:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t,e,r){var i,a,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,i=0,a=0;return e&gt;0&amp;&amp;void 0!==(n=t[r][e-1])&amp;&amp;(a++,i+=n),e&lt;c-1&amp;&amp;void 0!==(n=t[r][e+1])&amp;&amp;(a++,i+=n),r&gt;0&amp;&amp;void 0!==(n=t[r-1][e])&amp;&amp;(a++,i+=n),r&lt;u-1&amp;&amp;void 0!==(n=t[r+1][e])&amp;&amp;(a++,i+=n),i/Math.max(1,a)}var h,p,d,g,m,v,y,x,b,_,w,k=0;for(i=0;i&lt;c;i++)for(a=0;a&lt;u;a++)void 0===t[a][i]&amp;&amp;(s.push(i),l.push(a),t[a][i]=f(i,a)),k=Math.max(k,Math.abs(t[a][i]));if(!s.length)return t;var M=0,A=0,T=s.length;do{for(M=0,o=0;o&lt;T;o++){i=s[o],a=l[o];var S,E,C,L,z,P,O=0,I=0;0===i?(C=e[z=Math.min(c-1,2)],L=e[1],S=t[a][z],I+=(E=t[a][1])+(E-S)*(e[0]-L)/(L-C),O++):i===c-1&amp;&amp;(C=e[z=Math.max(0,c-3)],L=e[c-2],S=t[a][z],I+=(E=t[a][c-2])+(E-S)*(e[c-1]-L)/(L-C),O++),(0===i||i===c-1)&amp;&amp;a&gt;0&amp;&amp;a&lt;u-1&amp;&amp;(h=r[a+1]-r[a],I+=((p=r[a]-r[a-1])*t[a+1][i]+h*t[a-1][i])/(p+h),O++),0===a?(C=r[P=Math.min(u-1,2)],L=r[1],S=t[P][i],I+=(E=t[1][i])+(E-S)*(r[0]-L)/(L-C),O++):a===u-1&amp;&amp;(C=r[P=Math.max(0,u-3)],L=r[u-2],S=t[P][i],I+=(E=t[u-2][i])+(E-S)*(r[u-1]-L)/(L-C),O++),(0===a||a===u-1)&amp;&amp;i&gt;0&amp;&amp;i&lt;c-1&amp;&amp;(h=e[i+1]-e[i],I+=((p=e[i]-e[i-1])*t[a][i+1]+h*t[a][i-1])/(p+h),O++),O?I/=O:(d=e[i+1]-e[i],g=e[i]-e[i-1],x=(m=r[a+1]-r[a])*(v=r[a]-r[a-1])*(m+v),I=((y=d*g*(d+g))*(v*t[a+1][i]+m*t[a-1][i])+x*(g*t[a][i+1]+d*t[a][i-1]))/(x*(g+d)+y*(v+m))),M+=(_=(b=I-t[a][i])/k)*_,w=O?0:.85,t[a][i]+=b*(1+w)}M=Math.sqrt(M)}while(A++&lt;100&amp;&amp;M&gt;1e-5);return n.log(&quot;Smoother converged to&quot;,M,&quot;after&quot;,A,&quot;iterations&quot;),t}},{&quot;../../lib&quot;:693}],898:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).isArray1D;e.exports=function(t,e,r){var i=r(&quot;x&quot;),a=i&amp;&amp;i.length,o=r(&quot;y&quot;),s=o&amp;&amp;o.length;if(!a&amp;&amp;!s)return!1;if(e._cheater=!i,a&amp;&amp;!n(i)||s&amp;&amp;!n(o))e._length=null;else{var l=a?i.length:1/0;s&amp;&amp;(l=Math.min(l,o.length)),e.a&amp;&amp;e.a.length&amp;&amp;(l=Math.min(l,e.a.length)),e.b&amp;&amp;e.b.length&amp;&amp;(l=Math.min(l,e.b.length)),e._length=l}return!0}},{&quot;../../lib&quot;:693}],899:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scattergeo/attributes&quot;),i=t(&quot;../../components/colorscale/attributes&quot;),a=t(&quot;../../components/colorbar/attributes&quot;),o=t(&quot;../../plots/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat,l=n.marker.line;e.exports=s({locations:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},locationmode:n.locationmode,z:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},text:s({},n.text,{}),marker:{line:{color:l.color,width:s({},l.width,{dflt:1}),editType:&quot;calc&quot;},opacity:{valType:&quot;number&quot;,arrayOk:!0,min:0,max:1,dflt:1,editType:&quot;style&quot;},editType:&quot;calc&quot;},selected:{marker:{opacity:n.selected.marker.opacity,editType:&quot;plot&quot;},editType:&quot;plot&quot;},unselected:{marker:{opacity:n.unselected.marker.opacity,editType:&quot;plot&quot;},editType:&quot;plot&quot;},hoverinfo:s({},o.hoverinfo,{editType:&quot;calc&quot;,flags:[&quot;location&quot;,&quot;z&quot;,&quot;text&quot;,&quot;name&quot;]})},i(&quot;&quot;,{cLetter:&quot;z&quot;,editTypeOverride:&quot;calc&quot;}),{colorbar:a})},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../scattergeo/attributes&quot;:1072}],900:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../constants/numerical&quot;).BADNUM,a=t(&quot;../../components/colorscale/calc&quot;),o=t(&quot;../scatter/arrays_to_calcdata&quot;),s=t(&quot;../scatter/calc_selection&quot;);e.exports=function(t,e){for(var r=e._length,l=new Array(r),c=0;c&lt;r;c++){var u=l[c]={},f=e.locations[c],h=e.z[c];u.loc=&quot;string&quot;==typeof f?f:null,u.z=n(h)?h:i}return o(l,e),a(e,e.z,&quot;&quot;,&quot;z&quot;),s(l,e),l}},{&quot;../../components/colorscale/calc&quot;:575,&quot;../../constants/numerical&quot;:670,&quot;../scatter/arrays_to_calcdata&quot;:1031,&quot;../scatter/calc_selection&quot;:1034,&quot;fast-isnumeric&quot;:213}],901:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/colorscale/defaults&quot;),a=t(&quot;./attributes&quot;);e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(&quot;locations&quot;),c=s(&quot;z&quot;);l&amp;&amp;l.length&amp;&amp;n.isArrayOrTypedArray(c)&amp;&amp;c.length?(e._length=Math.min(l.length,c.length),s(&quot;locationmode&quot;),s(&quot;text&quot;),s(&quot;marker.line.color&quot;),s(&quot;marker.line.width&quot;),s(&quot;marker.opacity&quot;),i(t,e,o,s,{prefix:&quot;&quot;,cLetter:&quot;z&quot;}),n.coerceSelectionMarkerOpacity(e,s)):e.visible=!1}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../lib&quot;:693,&quot;./attributes&quot;:899}],902:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],903:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;./attributes&quot;),a=t(&quot;../scatter/fill_hover_text&quot;);e.exports=function(t,e,r){var o,s,l,c,u=t.cd,f=u[0].trace,h=t.subplot;for(s=0;s&lt;u.length;s++)if(c=!1,(o=u[s])._polygons){for(l=0;l&lt;o._polygons.length;l++)o._polygons[l].contains([e,r])&amp;&amp;(c=!c),o._polygons[l].contains([e+360,r])&amp;&amp;(c=!c);if(c)break}if(c&amp;&amp;o)return t.x0=t.x1=t.xa.c2p(o.ct),t.y0=t.y1=t.ya.c2p(o.ct),t.index=o.index,t.location=o.loc,t.z=o.z,function(t,e,r,o){var s=r.hi||e.hoverinfo,l=&quot;all&quot;===s?i.hoverinfo.flags:s.split(&quot;+&quot;),c=-1!==l.indexOf(&quot;name&quot;),u=-1!==l.indexOf(&quot;location&quot;),f=-1!==l.indexOf(&quot;z&quot;),h=-1!==l.indexOf(&quot;text&quot;),p=[];!c&amp;&amp;u?t.nameOverride=r.loc:(c&amp;&amp;(t.nameOverride=e.name),u&amp;&amp;p.push(r.loc));f&amp;&amp;p.push((d=r.z,n.tickText(o,o.c2l(d),&quot;hover&quot;).text));var d;h&amp;&amp;a(r,e,p);t.extraText=p.join(&quot;&lt;br&gt;&quot;)}(t,f,o,h.mockAxis),[t]}},{&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/fill_hover_text&quot;:1040,&quot;./attributes&quot;:899}],904:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar=t(&quot;../heatmap/colorbar&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.style=t(&quot;./style&quot;).style,n.styleOnSelect=t(&quot;./style&quot;).styleOnSelect,n.hoverPoints=t(&quot;./hover&quot;),n.eventData=t(&quot;./event_data&quot;),n.selectPoints=t(&quot;./select&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;choropleth&quot;,n.basePlotModule=t(&quot;../../plots/geo&quot;),n.categories=[&quot;geo&quot;,&quot;noOpacity&quot;],n.meta={},e.exports=n},{&quot;../../plots/geo&quot;:772,&quot;../heatmap/colorbar&quot;:945,&quot;./attributes&quot;:899,&quot;./calc&quot;:900,&quot;./defaults&quot;:901,&quot;./event_data&quot;:902,&quot;./hover&quot;:903,&quot;./plot&quot;:905,&quot;./select&quot;:906,&quot;./style&quot;:907}],905:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../lib/polygon&quot;),o=t(&quot;../../lib/topojson_utils&quot;).getTopojsonFeatures,s=t(&quot;../../lib/geo_location_utils&quot;).locationToFeature,l=t(&quot;./style&quot;).style;function c(t,e){for(var r=t[0].trace,n=t.length,i=o(r,e),a=0;a&lt;n;a++){var l=t[a],c=s(r.locationmode,l.loc,i);c?(l.geojson=c,l.ct=c.properties.ct,l.index=a,l._polygons=u(c)):l.geojson=null}}function u(t){var e,r,n,i,o=t.geometry,s=o.coordinates,l=t.id,c=[];function u(t){for(var e=0;e&lt;t.length-1;e++)if(t[e][0]&gt;0&amp;&amp;t[e+1][0]&lt;0)return e;return null}switch(e=&quot;RUS&quot;===l||&quot;FJI&quot;===l?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;i&lt;t.length;i++)e[i]=[t[i][0]&lt;0?t[i][0]+360:t[i][0],t[i][1]];c.push(a.tester(e))}:&quot;ATA&quot;===l?function(t){var e=u(t);if(null===e)return c.push(a.tester(t));var r=new Array(t.length+1),n=0;for(i=0;i&lt;t.length;i++)i&gt;e?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var o=a.tester(r);o.pts.pop(),c.push(o)}:function(t){c.push(a.tester(t))},o.type){case&quot;MultiPolygon&quot;:for(r=0;r&lt;s.length;r++)for(n=0;n&lt;s[r].length;n++)e(s[r][n]);break;case&quot;Polygon&quot;:for(r=0;r&lt;s.length;r++)e(s[r])}return c}e.exports=function(t,e,r){for(var a=0;a&lt;r.length;a++)c(r[a],e.topojson);var o=e.layers.backplot.select(&quot;.choroplethlayer&quot;);i.makeTraceGroups(o,r,&quot;trace choropleth&quot;).each(function(e){var r=(e[0].node3=n.select(this)).selectAll(&quot;path.choroplethlocation&quot;).data(i.identity);r.enter().append(&quot;path&quot;).classed(&quot;choroplethlocation&quot;,!0),r.exit().remove(),l(t,e)})}},{&quot;../../lib&quot;:693,&quot;../../lib/geo_location_utils&quot;:685,&quot;../../lib/polygon&quot;:706,&quot;../../lib/topojson_utils&quot;:721,&quot;./style&quot;:907,d3:147}],906:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r,n,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[];if(!1===e)for(r=0;r&lt;s.length;r++)s[r].selected=0;else for(r=0;r&lt;s.length;r++)(i=(n=s[r]).ct)&amp;&amp;(a=l.c2p(i),o=c.c2p(i),e.contains([a,o],null,r,t)?(u.push({pointNumber:r,lon:i[0],lat:i[1]}),n.selected=1):n.selected=0);return u}},{}],907:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../../components/drawing&quot;),o=t(&quot;../../components/colorscale&quot;);function s(t,e){var r=e[0].trace,s=e[0].node3.selectAll(&quot;.choroplethlocation&quot;),l=r.marker||{},c=l.line||{},u=o.makeColorScaleFunc(o.extractScale(r.colorscale,r.zmin,r.zmax));s.each(function(t){n.select(this).attr(&quot;fill&quot;,u(t.z)).call(i.stroke,t.mlc||c.color).call(a.dashLine,&quot;&quot;,t.mlw||c.width||0).style(&quot;opacity&quot;,l.opacity)}),a.selectedPointStyle(s,r,t)}e.exports={style:function(t,e){e&amp;&amp;s(t,e)},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?a.selectedPointStyle(r.selectAll(&quot;.choroplethlocation&quot;),n,t):s(t,e)}}},{&quot;../../components/color&quot;:567,&quot;../../components/colorscale&quot;:582,&quot;../../components/drawing&quot;:592,d3:147}],908:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/attributes&quot;),i=t(&quot;../../components/colorbar/attributes&quot;),a=t(&quot;../mesh3d/attributes&quot;),o=t(&quot;../../plots/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat,l={x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},y:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},z:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},u:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},v:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},w:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},sizemode:{valType:&quot;enumerated&quot;,values:[&quot;scaled&quot;,&quot;absolute&quot;],editType:&quot;calc&quot;,dflt:&quot;scaled&quot;},sizeref:{valType:&quot;number&quot;,editType:&quot;calc&quot;,min:0},anchor:{valType:&quot;enumerated&quot;,editType:&quot;calc&quot;,values:[&quot;tip&quot;,&quot;tail&quot;,&quot;cm&quot;,&quot;center&quot;],dflt:&quot;cm&quot;},text:{valType:&quot;string&quot;,dflt:&quot;&quot;,arrayOk:!0,editType:&quot;calc&quot;}};s(l,n(&quot;&quot;,{colorAttr:&quot;u/v/w norm&quot;,showScaleDflt:!0,editTypeOverride:&quot;calc&quot;}),{colorbar:i});[&quot;opacity&quot;,&quot;lightposition&quot;,&quot;lighting&quot;].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:&quot;calc&quot;,flags:[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;,&quot;u&quot;,&quot;v&quot;,&quot;w&quot;,&quot;norm&quot;,&quot;text&quot;,&quot;name&quot;],dflt:&quot;x+y+z+norm+text+name&quot;}),e.exports=l},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../mesh3d/attributes&quot;:982}],909:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/calc&quot;);e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;c&lt;o;c++){var u=r[c],f=i[c],h=a[c],p=Math.sqrt(u*u+f*f+h*h);s=Math.max(s,p),l=Math.min(l,p)}e._len=o,e._normMax=s,n(e,[l,s],&quot;&quot;,&quot;c&quot;)}},{&quot;../../components/colorscale/calc&quot;:575}],910:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-cone3d&quot;),i=t(&quot;gl-cone3d&quot;).createConeMesh,a=t(&quot;../../lib&quot;).simpleMap,o=t(&quot;../../lib/gl_format_color&quot;).parseColorScale,s=t(&quot;../../plots/gl3d/zip3&quot;);function l(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var c=l.prototype;c.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index,r=this.data.x[e],n=this.data.y[e],i=this.data.z[e],a=this.data.u[e],o=this.data.v[e],s=this.data.w[e];t.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.text;return Array.isArray(l)&amp;&amp;void 0!==l[e]?t.textLabel=l[e]:l&amp;&amp;(t.textLabel=l),!0}};var u={xaxis:0,yaxis:1,zaxis:2},f={tip:1,tail:0,cm:.25,center:.5},h={tip:1,tail:1,cm:.75,center:.5};function p(t,e){var r=t.fullSceneLayout,i=t.dataScale,l={};function c(t,e){var n=r[e],o=i[u[e]];return a(t,function(t){return n.d2l(t)*o})}l.vectors=s(c(e.u,&quot;xaxis&quot;),c(e.v,&quot;yaxis&quot;),c(e.w,&quot;zaxis&quot;),e._len),l.positions=s(c(e.x,&quot;xaxis&quot;),c(e.y,&quot;yaxis&quot;),c(e.z,&quot;zaxis&quot;),e._len),l.colormap=o(e.colorscale),l.vertexIntensityBounds=[e.cmin/e._normMax,e.cmax/e._normMax],l.coneOffset=f[e.anchor],&quot;scaled&quot;===e.sizemode?l.coneSize=e.sizeref||.5:l.coneSize=e.sizeref&amp;&amp;e._normMax?e.sizeref/e._normMax:.5;var p=n(l),d=e.lightposition;return p.lightPosition=[d.x,d.y,d.z],p.ambient=e.lighting.ambient,p.diffuse=e.lighting.diffuse,p.specular=e.lighting.specular,p.roughness=e.lighting.roughness,p.fresnel=e.lighting.fresnel,p.opacity=e.opacity,e._pad=h[e.anchor]*p.vectorScale*p.coneScale*e._normMax,p}c.update=function(t){this.data=t;var e=p(this.scene,t);this.mesh.update(e)},c.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=p(t,e),a=i(r,n),o=new l(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{&quot;../../lib&quot;:693,&quot;../../lib/gl_format_color&quot;:689,&quot;../../plots/gl3d/zip3&quot;:795,&quot;gl-cone3d&quot;:230}],911:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/colorscale/defaults&quot;),a=t(&quot;./attributes&quot;);e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(&quot;u&quot;),c=s(&quot;v&quot;),u=s(&quot;w&quot;),f=s(&quot;x&quot;),h=s(&quot;y&quot;),p=s(&quot;z&quot;);l&amp;&amp;l.length&amp;&amp;c&amp;&amp;c.length&amp;&amp;u&amp;&amp;u.length&amp;&amp;f&amp;&amp;f.length&amp;&amp;h&amp;&amp;h.length&amp;&amp;p&amp;&amp;p.length?(s(&quot;sizeref&quot;),s(&quot;sizemode&quot;),s(&quot;anchor&quot;),s(&quot;lighting.ambient&quot;),s(&quot;lighting.diffuse&quot;),s(&quot;lighting.specular&quot;),s(&quot;lighting.roughness&quot;),s(&quot;lighting.fresnel&quot;),s(&quot;lightposition.x&quot;),s(&quot;lightposition.y&quot;),s(&quot;lightposition.z&quot;),i(t,e,o,s,{prefix:&quot;&quot;,cLetter:&quot;c&quot;}),s(&quot;text&quot;),e._length=null):e.visible=!1}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../lib&quot;:693,&quot;./attributes&quot;:908}],912:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;trace&quot;,name:&quot;cone&quot;,basePlotModule:t(&quot;../../plots/gl3d&quot;),categories:[&quot;gl3d&quot;],attributes:t(&quot;./attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),colorbar:{min:&quot;cmin&quot;,max:&quot;cmax&quot;},calc:t(&quot;./calc&quot;),plot:t(&quot;./convert&quot;),meta:{}}},{&quot;../../plots/gl3d&quot;:784,&quot;./attributes&quot;:908,&quot;./calc&quot;:909,&quot;./convert&quot;:910,&quot;./defaults&quot;:911}],913:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../heatmap/attributes&quot;),i=t(&quot;../scatter/attributes&quot;),a=t(&quot;../../components/colorscale/attributes&quot;),o=t(&quot;../../components/colorbar/attributes&quot;),s=t(&quot;../../components/drawing/attributes&quot;).dash,l=t(&quot;../../plots/font_attributes&quot;),c=t(&quot;../../lib/extend&quot;).extendFlat,u=t(&quot;../../constants/filter_ops&quot;),f=u.COMPARISON_OPS2,h=u.INTERVAL_OPS,p=i.line;e.exports=c({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,zhoverformat:n.zhoverformat,connectgaps:n.connectgaps,fillcolor:{valType:&quot;color&quot;,editType:&quot;calc&quot;},autocontour:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;,impliedEdits:{&quot;contours.start&quot;:void 0,&quot;contours.end&quot;:void 0,&quot;contours.size&quot;:void 0}},ncontours:{valType:&quot;integer&quot;,dflt:15,min:1,editType:&quot;calc&quot;},contours:{type:{valType:&quot;enumerated&quot;,values:[&quot;levels&quot;,&quot;constraint&quot;],dflt:&quot;levels&quot;,editType:&quot;calc&quot;},start:{valType:&quot;number&quot;,dflt:null,editType:&quot;plot&quot;,impliedEdits:{&quot;^autocontour&quot;:!1}},end:{valType:&quot;number&quot;,dflt:null,editType:&quot;plot&quot;,impliedEdits:{&quot;^autocontour&quot;:!1}},size:{valType:&quot;number&quot;,dflt:null,min:0,editType:&quot;plot&quot;,impliedEdits:{&quot;^autocontour&quot;:!1}},coloring:{valType:&quot;enumerated&quot;,values:[&quot;fill&quot;,&quot;heatmap&quot;,&quot;lines&quot;,&quot;none&quot;],dflt:&quot;fill&quot;,editType:&quot;calc&quot;},showlines:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;plot&quot;},showlabels:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;plot&quot;},labelfont:l({editType:&quot;plot&quot;,colorEditType:&quot;style&quot;}),labelformat:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;plot&quot;},operation:{valType:&quot;enumerated&quot;,values:[].concat(f).concat(h),dflt:&quot;=&quot;,editType:&quot;calc&quot;},value:{valType:&quot;any&quot;,dflt:0,editType:&quot;calc&quot;},editType:&quot;calc&quot;,impliedEdits:{autocontour:!1}},line:{color:c({},p.color,{editType:&quot;style+colorbars&quot;}),width:c({},p.width,{editType:&quot;style+colorbars&quot;}),dash:s,smoothing:c({},p.smoothing,{}),editType:&quot;plot&quot;}},a(&quot;&quot;,{cLetter:&quot;z&quot;,autoColorDflt:!1,editTypeOverride:&quot;calc&quot;}),{colorbar:o})},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../components/drawing/attributes&quot;:591,&quot;../../constants/filter_ops&quot;:666,&quot;../../lib/extend&quot;:682,&quot;../../plots/font_attributes&quot;:768,&quot;../heatmap/attributes&quot;:942,&quot;../scatter/attributes&quot;:1032}],914:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../heatmap/calc&quot;),i=t(&quot;./set_contours&quot;);e.exports=function(t,e){var r=n(t,e);return i(e),r}},{&quot;../heatmap/calc&quot;:943,&quot;./set_contours&quot;:932}],915:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var i,a,o,s=t[0],l=s.x.length,c=s.y.length,u=s.z,f=n.contours,h=-1/0,p=1/0;for(i=0;i&lt;c;i++)p=Math.min(p,u[i][0]),p=Math.min(p,u[i][l-1]),h=Math.max(h,u[i][0]),h=Math.max(h,u[i][l-1]);for(i=1;i&lt;l-1;i++)p=Math.min(p,u[0][i]),p=Math.min(p,u[c-1][i]),h=Math.max(h,u[0][i]),h=Math.max(h,u[c-1][i]);switch(s.prefixBoundary=!1,e){case&quot;&gt;&quot;:f.value&gt;h&amp;&amp;(s.prefixBoundary=!0);break;case&quot;&lt;&quot;:f.value&lt;p&amp;&amp;(s.prefixBoundary=!0);break;case&quot;[]&quot;:a=Math.min.apply(null,f.value),((o=Math.max.apply(null,f.value))&lt;p||a&gt;h)&amp;&amp;(s.prefixBoundary=!0);break;case&quot;][&quot;:a=Math.min.apply(null,f.value),o=Math.max.apply(null,f.value),a&lt;p&amp;&amp;o&gt;h&amp;&amp;(s.prefixBoundary=!0)}}},{}],916:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorbar/draw&quot;),i=t(&quot;./make_color_map&quot;),a=t(&quot;./end_plus&quot;);e.exports=function(t,e){var r=e[0].trace,o=&quot;cb&quot;+r.uid;if(t._fullLayout._infolayer.selectAll(&quot;.&quot;+o).remove(),r.showscale){var s=e[0].t.cb=n(t,o),l=r.contours,c=r.line,u=l.size||1,f=l.coloring,h=i(r,{isColorbar:!0});s.fillgradient(&quot;heatmap&quot;===f?r.colorscale:&quot;&quot;).zrange(&quot;heatmap&quot;===f?[r.zmin,r.zmax]:&quot;&quot;).fillcolor(&quot;fill&quot;===f?h:&quot;&quot;).line({color:&quot;lines&quot;===f?h:c.color,width:!1!==l.showlines?c.width:0,dash:c.dash}).levels({start:l.start,end:a(l),size:u}).options(r.colorbar)()}}},{&quot;../../components/colorbar/draw&quot;:572,&quot;./end_plus&quot;:924,&quot;./make_color_map&quot;:929}],917:[function(t,e,r){&quot;use strict&quot;;e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],918:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;./label_defaults&quot;),a=t(&quot;../../components/color&quot;),o=a.addOpacity,s=a.opacity,l=t(&quot;../../constants/filter_ops&quot;),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,a,l,f){var h,p,d,g=e.contours,m=r(&quot;contours.operation&quot;);(g._operation=c[m],function(t,e){var r;-1===u.indexOf(e.operation)?(t(&quot;contours.value&quot;,[0,1]),Array.isArray(e.value)?e.value.length&gt;2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length&lt;2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&amp;&amp;(r=parseFloat(e.value),e.value=[r,r+1])):(t(&quot;contours.value&quot;,0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),&quot;=&quot;===m?h=g.showlines=!0:(h=r(&quot;contours.showlines&quot;),d=r(&quot;fillcolor&quot;,o((t.line||{}).color||l,.5))),h)&amp;&amp;(p=r(&quot;line.color&quot;,d&amp;&amp;s(d)?o(e.fillcolor,1):l),r(&quot;line.width&quot;,2),r(&quot;line.dash&quot;));r(&quot;line.smoothing&quot;),i(r,a,p,f)}},{&quot;../../components/color&quot;:567,&quot;../../constants/filter_ops&quot;:666,&quot;./label_defaults&quot;:928,&quot;fast-isnumeric&quot;:213}],919:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../constants/filter_ops&quot;),i=t(&quot;fast-isnumeric&quot;);function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&amp;&amp;(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}e.exports={&quot;[]&quot;:o(&quot;[]&quot;),&quot;][&quot;:o(&quot;][&quot;),&quot;&gt;&quot;:s(&quot;&gt;&quot;),&quot;&lt;&quot;:s(&quot;&lt;&quot;),&quot;=&quot;:s(&quot;=&quot;)}},{&quot;../../constants/filter_ops&quot;:666,&quot;fast-isnumeric&quot;:213}],920:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var i=n(&quot;contours.start&quot;),a=n(&quot;contours.end&quot;),o=!1===i||!1===a,s=r(&quot;contours.size&quot;);!(o?e.autocontour=!0:r(&quot;autocontour&quot;,!1))&amp;&amp;s||r(&quot;ncontours&quot;)}},{}],921:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case&quot;=&quot;:case&quot;&lt;&quot;:return t;case&quot;&gt;&quot;:for(1!==t.length&amp;&amp;n.warn(&quot;Contour data invalid for the specified inequality operation.&quot;),a=t[0],r=0;r&lt;a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r&lt;a.paths.length;r++)a.paths[r]=s(a.paths[r]);return t;case&quot;][&quot;:var c=s;s=l,l=c;case&quot;[]&quot;:for(2!==t.length&amp;&amp;n.warn(&quot;Contour data invalid for the specified inequality range operation.&quot;),a=i(t[0]),o=i(t[1]),r=0;r&lt;a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r&lt;a.paths.length;r++)a.paths[r]=s(a.paths[r]);for(;o.edgepaths.length;)a.edgepaths.push(l(o.edgepaths.shift()));for(;o.paths.length;)a.paths.push(l(o.paths.shift()));return[a]}}},{&quot;../../lib&quot;:693}],922:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../heatmap/xyz_defaults&quot;),a=t(&quot;./constraint_defaults&quot;),o=t(&quot;./contours_defaults&quot;),s=t(&quot;./style_defaults&quot;),l=t(&quot;./attributes&quot;);e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}if(i(t,e,u,c)){u(&quot;text&quot;);var f=&quot;constraint&quot;===u(&quot;contours.type&quot;);u(&quot;connectgaps&quot;,n.isArray1D(e.z)),f?a(t,e,u,c,r):(o(t,e,u,function(r){return n.coerce2(t,e,l,r)}),s(t,e,u,c))}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../heatmap/xyz_defaults&quot;:957,&quot;./attributes&quot;:913,&quot;./constraint_defaults&quot;:918,&quot;./contours_defaults&quot;:920,&quot;./style_defaults&quot;:934}],923:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./constraint_mapping&quot;),a=t(&quot;./end_plus&quot;);e.exports=function(t,e,r){for(var o=&quot;constraint&quot;===t.type?i[t._operation](t.value):t,s=o.size,l=[],c=a(o),u=r.trace._carpetTrace,f=u?{xaxis:u.aaxis,yaxis:u.baxis,x:r.a,y:r.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:r.x,y:r.y},h=o.start;h&lt;c;h+=s)if(l.push(n.extendFlat({level:h,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},f)),l.length&gt;1e3){n.warn(&quot;Too many contours, clipping at 1000&quot;,t);break}return l}},{&quot;../../lib&quot;:693,&quot;./constraint_mapping&quot;:919,&quot;./end_plus&quot;:924}],924:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t.end+t.size/1e6}},{}],925:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./constants&quot;);function a(t,e,r,n){return Math.abs(t[0]-e[0])&lt;r&amp;&amp;Math.abs(t[1]-e[1])&lt;n}function o(t,e,r,o,l){var c,u=e.join(&quot;,&quot;),f=u,h=t.crossings[f],p=function(t,e,r){var n=0,a=0;t&gt;20&amp;&amp;e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1;return[n,a]}(h,r,e),d=[s(t,e,[-p[0],-p[1]])],g=p.join(&quot;,&quot;),m=t.z.length,v=t.z[0].length;for(c=0;c&lt;1e4;c++){if(h&gt;20?(h=i.CHOOSESADDLE[h][(p[0]||p[1])&lt;0?0:1],t.crossings[f]=i.SADDLEREMAINDER[h]):delete t.crossings[f],!(p=i.NEWDELTA[h])){n.log(&quot;Found bad marching index:&quot;,h,e,t.level);break}d.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],a(d[d.length-1],d[d.length-2],o,l)&amp;&amp;d.pop(),f=e.join(&quot;,&quot;);var y=p[0]&amp;&amp;(e[0]&lt;0||e[0]&gt;v-2)||p[1]&amp;&amp;(e[1]&lt;0||e[1]&gt;m-2);if(f===u&amp;&amp;p.join(&quot;,&quot;)===g||r&amp;&amp;y)break;h=t.crossings[f]}1e4===c&amp;&amp;n.log(&quot;Infinite loop in contour?&quot;);var x,b,_,w,k,M,A,T,S,E,C,L,z,P,O,I=a(d[0],d[d.length-1],o,l),D=0,R=.2*t.smoothing,B=[],F=0;for(c=1;c&lt;d.length;c++)L=d[c],z=d[c-1],void 0,void 0,P=L[2]-z[2],O=L[3]-z[3],D+=A=Math.sqrt(P*P+O*O),B.push(A);var N=D/B.length*R;function j(t){return d[t%d.length]}for(c=d.length-2;c&gt;=F;c--)if((x=B[c])&lt;N){for(_=0,b=c-1;b&gt;=F&amp;&amp;x+B[b]&lt;N;b--)x+=B[b];if(I&amp;&amp;c===d.length-2)for(_=0;_&lt;b&amp;&amp;x+B[_]&lt;N;_++)x+=B[_];k=c-b+_+1,M=Math.floor((c+b+_+2)/2),w=I||c!==d.length-2?I||-1!==b?k%2?j(M):[(j(M)[0]+j(M+1)[0])/2,(j(M)[1]+j(M+1)[1])/2]:d[0]:d[d.length-1],d.splice(b+1,c-b+1,w),c=b+1,_&amp;&amp;(F=_),I&amp;&amp;(c===d.length-2?d[_]=d[d.length-1]:0===c&amp;&amp;(d[d.length-1]=d[0]))}for(d.splice(0,F),c=0;c&lt;d.length;c++)d[c].length=2;if(!(d.length&lt;2))if(I)d.pop(),t.paths.push(d);else{r||n.log(&quot;Unclosed interior contour?&quot;,t.level,u,d.join(&quot;L&quot;));var V=!1;for(T=0;T&lt;t.edgepaths.length;T++)if(E=t.edgepaths[T],!V&amp;&amp;a(E[0],d[d.length-1],o,l)){d.pop(),V=!0;var U=!1;for(S=0;S&lt;t.edgepaths.length;S++)if(a((C=t.edgepaths[S])[C.length-1],d[0],o,l)){U=!0,d.shift(),t.edgepaths.splice(T,1),S===T?t.paths.push(d.concat(C)):(S&gt;T&amp;&amp;S--,t.edgepaths[S]=C.concat(d,E));break}U||(t.edgepaths[T]=d.concat(E))}for(T=0;T&lt;t.edgepaths.length&amp;&amp;!V;T++)a((E=t.edgepaths[T])[E.length-1],d[0],o,l)&amp;&amp;(d.shift(),t.edgepaths[T]=E.concat(d),V=!0);V||t.edgepaths.push(d)}}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0),n+l,i]}var c=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-c)*t.y[i]+c*t.y[i+1],!0),n,i+c]}e.exports=function(t,e,r){var i,a,s,l;for(e=e||.01,r=r||.01,a=0;a&lt;t.length;a++){for(s=t[a],l=0;l&lt;s.starts.length;l++)o(s,s.starts[l],&quot;edge&quot;,e,r);for(i=0;Object.keys(s.crossings).length&amp;&amp;i&lt;1e4;)i++,o(s,Object.keys(s.crossings)[0].split(&quot;,&quot;).map(Number),void 0,e,r);1e4===i&amp;&amp;n.log(&quot;Infinite loop in contour?&quot;)}}},{&quot;../../lib&quot;:693,&quot;./constants&quot;:917}],926:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;../heatmap/hover&quot;);e.exports=function(t,e,r,a,o){var s=i(t,e,r,a,o,!0);return s&amp;&amp;s.forEach(function(t){var e=t.trace;&quot;constraint&quot;===e.contours.type&amp;&amp;(e.fillcolor&amp;&amp;n.opacity(e.fillcolor)?t.color=n.addOpacity(e.fillcolor,1):e.contours.showlines&amp;&amp;n.opacity(e.line.color)&amp;&amp;(t.color=n.addOpacity(e.line.color,1)))}),s}},{&quot;../../components/color&quot;:567,&quot;../heatmap/hover&quot;:949}],927:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;).plot,n.style=t(&quot;./style&quot;),n.colorbar=t(&quot;./colorbar&quot;),n.hoverPoints=t(&quot;./hover&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;contour&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;2dMap&quot;,&quot;contour&quot;,&quot;showLegend&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;./attributes&quot;:913,&quot;./calc&quot;:914,&quot;./colorbar&quot;:916,&quot;./defaults&quot;:922,&quot;./hover&quot;:926,&quot;./plot&quot;:931,&quot;./style&quot;:933}],928:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t,e,r,i){if(i||(i={}),t(&quot;contours.showlabels&quot;)){var a=e.font;n.coerceFont(t,&quot;contours.labelfont&quot;,{family:a.family,size:a.size,color:r}),t(&quot;contours.labelformat&quot;)}!1!==i.hasHover&amp;&amp;t(&quot;zhoverformat&quot;)}},{&quot;../../lib&quot;:693}],929:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/colorscale&quot;),a=t(&quot;./end_plus&quot;);e.exports=function(t){var e=t.contours,r=e.start,o=a(e),s=e.size||1,l=Math.floor((o-r)/s)+1,c=&quot;lines&quot;===e.coloring?0:1;isFinite(s)||(s=1,l=1);var u,f,h=t.colorscale,p=h.length,d=new Array(p),g=new Array(p);if(&quot;heatmap&quot;===e.coloring){for(t.zauto&amp;&amp;!1===t.autocontour&amp;&amp;(t.zmin=r-s/2,t.zmax=t.zmin+l*s),f=0;f&lt;p;f++)u=h[f],d[f]=u[0]*(t.zmax-t.zmin)+t.zmin,g[f]=u[1];var m=n.extent([t.zmin,t.zmax,e.start,e.start+s*(l-1)]),v=m[t.zmin&lt;t.zmax?0:1],y=m[t.zmin&lt;t.zmax?1:0];v!==t.zmin&amp;&amp;(d.splice(0,0,v),g.splice(0,0,Range[0])),y!==t.zmax&amp;&amp;(d.push(y),g.push(g[g.length-1]))}else for(f=0;f&lt;p;f++)u=h[f],d[f]=(u[0]*(l+c-1)-c/2)*s+r,g[f]=u[1];return i.makeColorScaleFunc({domain:d,range:g},{noNumericCheck:!0})}},{&quot;../../components/colorscale&quot;:582,&quot;./end_plus&quot;:924,d3:147}],930:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;);function i(t,e){var r=(e[0][0]&gt;t?0:1)+(e[0][1]&gt;t?0:2)+(e[1][1]&gt;t?0:4)+(e[1][0]&gt;t?0:8);return 5===r||10===r?t&gt;(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,a,o,s,l,c,u,f,h=t[0].z,p=h.length,d=h[0].length,g=2===p||2===d;for(r=0;r&lt;p-1;r++)for(o=[],0===r&amp;&amp;(o=o.concat(n.BOTTOMSTART)),r===p-2&amp;&amp;(o=o.concat(n.TOPSTART)),e=0;e&lt;d-1;e++)for(a=o.slice(),0===e&amp;&amp;(a=a.concat(n.LEFTSTART)),e===d-2&amp;&amp;(a=a.concat(n.RIGHTSTART)),s=e+&quot;,&quot;+r,l=[[h[r][e],h[r][e+1]],[h[r+1][e],h[r+1][e+1]]],f=0;f&lt;t.length;f++)(c=i((u=t[f]).level,l))&amp;&amp;(u.crossings[s]=c,-1!==a.indexOf(c)&amp;&amp;(u.starts.push([e,r]),g&amp;&amp;-1!==a.indexOf(c,a.indexOf(c)+1)&amp;&amp;u.starts.push([e,r])))}},{&quot;./constants&quot;:917}],931:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../components/drawing&quot;),o=t(&quot;../../lib/svg_text_utils&quot;),s=t(&quot;../../plots/cartesian/axes&quot;),l=t(&quot;../../plots/cartesian/set_convert&quot;),c=t(&quot;../heatmap/plot&quot;),u=t(&quot;./make_crossings&quot;),f=t(&quot;./find_all_paths&quot;),h=t(&quot;./empty_pathinfo&quot;),p=t(&quot;./convert_to_constraints&quot;),d=t(&quot;./close_boundaries&quot;),g=t(&quot;./constants&quot;),m=g.LABELOPTIMIZER;function v(t,e){var r,n,o,s,l,c,u,f=function(t,e){var r=t.prefixBoundary;if(void 0===r){var n=Math.min(t.z[0][0],t.z[0][1]);r=!t.edgepaths.length&amp;&amp;n&gt;t.level}return r?&quot;M&quot;+e.join(&quot;L&quot;)+&quot;Z&quot;:&quot;&quot;}(t,e),h=0,p=t.edgepaths.map(function(t,e){return e}),d=!0;function g(t){return Math.abs(t[1]-e[2][1])&lt;.01}function m(t){return Math.abs(t[0]-e[0][0])&lt;.01}function v(t){return Math.abs(t[0]-e[2][0])&lt;.01}for(;p.length;){for(c=a.smoothopen(t.edgepaths[h],t.smoothing),f+=d?c:c.replace(/^M/,&quot;L&quot;),p.splice(p.indexOf(h),1),r=t.edgepaths[h][t.edgepaths[h].length-1],s=-1,o=0;o&lt;4;o++){if(!r){i.log(&quot;Missing end?&quot;,h,t);break}for(u=r,Math.abs(u[1]-e[0][1])&lt;.01&amp;&amp;!v(r)?n=e[1]:m(r)?n=e[0]:g(r)?n=e[3]:v(r)&amp;&amp;(n=e[2]),l=0;l&lt;t.edgepaths.length;l++){var y=t.edgepaths[l][0];Math.abs(r[0]-n[0])&lt;.01?Math.abs(r[0]-y[0])&lt;.01&amp;&amp;(y[1]-r[1])*(n[1]-y[1])&gt;=0&amp;&amp;(n=y,s=l):Math.abs(r[1]-n[1])&lt;.01?Math.abs(r[1]-y[1])&lt;.01&amp;&amp;(y[0]-r[0])*(n[0]-y[0])&gt;=0&amp;&amp;(n=y,s=l):i.log(&quot;endpt to newendpt is not vert. or horz.&quot;,r,n,y)}if(r=n,s&gt;=0)break;f+=&quot;L&quot;+n}if(s===t.edgepaths.length){i.log(&quot;unclosed perimeter path&quot;);break}h=s,(d=-1===p.indexOf(h))&amp;&amp;(h=p[0],f+=&quot;Z&quot;)}for(h=0;h&lt;t.paths.length;h++)f+=a.smoothclosed(t.paths[h],t.smoothing);return f}function y(t,e,r,n){var a=e.width/2,o=e.height/2,s=t.x,l=t.y,c=t.theta,u=Math.cos(c)*a,f=Math.sin(c)*a,h=(s&gt;n.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),p=(l&gt;n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(h&lt;1||p&lt;1)return 1/0;var d=m.EDGECOST*(1/(h-1)+1/(p-1));d+=m.ANGLECOST*c*c;for(var g=s-u,v=l-f,y=s+u,x=l+f,b=0;b&lt;r.length;b++){var _=r[b],w=Math.cos(_.theta)*_.width/2,k=Math.sin(_.theta)*_.width/2,M=2*i.segmentDistance(g,v,y,x,_.x-w,_.y-k,_.x+w,_.y+k)/(e.height+_.height),A=_.level===e.level,T=A?m.SAMELEVELDISTANCE:1;if(M&lt;=T)return 1/0;d+=m.NEIGHBORCOST*(A?m.SAMELEVELFACTOR:1)/(M-T)}return d}r.plot=function(t,e,o,s){var l=e.xaxis,m=e.yaxis,y=t._fullLayout;i.makeTraceGroups(s,o,&quot;contour&quot;).each(function(o){var s=n.select(this),x=o[0],b=x.trace,_=x.x,w=x.y,k=b.contours,M=h(k,e,x),A=i.ensureSingle(s,&quot;g&quot;,&quot;heatmapcoloring&quot;),T=[];&quot;heatmap&quot;===k.coloring&amp;&amp;(b.zauto&amp;&amp;!1===b.autocontour&amp;&amp;(b._input.zmin=b.zmin=k.start-k.size/2,b._input.zmax=b.zmax=b.zmin+M.length*k.size),T=[o]),c(t,e,T,A),u(M),f(M);var S=l.c2p(_[0],!0),E=l.c2p(_[_.length-1],!0),C=m.c2p(w[0],!0),L=m.c2p(w[w.length-1],!0),z=[[S,L],[E,L],[E,C],[S,C]],P=M;&quot;constraint&quot;===k.type&amp;&amp;(P=p(M,k._operation),d(P,k._operation,z,b)),function(t,e,r){var n=i.ensureSingle(t,&quot;g&quot;,&quot;contourbg&quot;).selectAll(&quot;path&quot;).data(&quot;fill&quot;===r.coloring?[0]:[]);n.enter().append(&quot;path&quot;),n.exit().remove(),n.attr(&quot;d&quot;,&quot;M&quot;+e.join(&quot;L&quot;)+&quot;Z&quot;).style(&quot;stroke&quot;,&quot;none&quot;)}(s,z,k),function(t,e,r,a){var o=i.ensureSingle(t,&quot;g&quot;,&quot;contourfill&quot;).selectAll(&quot;path&quot;).data(&quot;fill&quot;===a.coloring||&quot;constraint&quot;===a.type&amp;&amp;&quot;=&quot;!==a._operation?e:[]);o.enter().append(&quot;path&quot;),o.exit().remove(),o.each(function(t){var e=v(t,r);e?n.select(this).attr(&quot;d&quot;,e).style(&quot;stroke&quot;,&quot;none&quot;):n.select(this).remove()})}(s,P,z,k),function(t,e,o,s,l,c){var u=i.ensureSingle(t,&quot;g&quot;,&quot;contourlines&quot;),f=!1!==l.showlines,h=l.showlabels,p=f&amp;&amp;h,d=r.createLines(u,f||h,e),m=r.createLineClip(u,p,o._fullLayout._clips,s.trace.uid),v=t.selectAll(&quot;g.contourlabels&quot;).data(h?[0]:[]);if(v.exit().remove(),v.enter().append(&quot;g&quot;).classed(&quot;contourlabels&quot;,!0),h){var y=[c],x=[];i.clearLocationCache();var b=r.labelFormatter(l,s.t.cb,o._fullLayout),_=a.tester.append(&quot;text&quot;).attr(&quot;data-notex&quot;,1).call(a.font,l.labelfont),w=e[0].xaxis._length,k=e[0].yaxis._length,M={left:Math.max(c[0][0],0),right:Math.min(c[2][0],w),top:Math.max(c[0][1],0),bottom:Math.min(c[2][1],k)};M.middle=(M.top+M.bottom)/2,M.center=(M.left+M.right)/2;var A=Math.sqrt(w*w+k*k),T=g.LABELDISTANCE*A/Math.max(1,e.length/g.LABELINCREASE);d.each(function(t){var e=r.calcTextOpts(t.level,b,_,o);n.select(this).selectAll(&quot;path&quot;).each(function(){var t=i.getVisibleSegment(this,M,e.height/2);if(t&amp;&amp;!(t.len&lt;(e.width+e.height)*g.LABELMIN))for(var n=Math.min(Math.ceil(t.len/T),g.LABELMAX),a=0;a&lt;n;a++){var o=r.findBestTextLocation(this,t,e,x,M);if(!o)break;r.addLabelData(o,e,x,y)}})}),_.remove(),r.drawLabels(v,x,o,m,p?y:null)}h&amp;&amp;!f&amp;&amp;d.remove()}(s,M,t,x,k,z),function(t,e,r,n,o){var s=&quot;clip&quot;+n.trace.uid,l=r.selectAll(&quot;#&quot;+s).data(n.trace.connectgaps?[]:[0]);if(l.enter().append(&quot;clipPath&quot;).classed(&quot;contourclip&quot;,!0).attr(&quot;id&quot;,s),l.exit().remove(),!1===n.trace.connectgaps){var c={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:n.x,y:n.y,z:function(t){var e,r,n=t.trace._emptypoints,i=[],a=t.z.length,o=t.z[0].length,s=[];for(e=0;e&lt;o;e++)s.push(1);for(e=0;e&lt;a;e++)i.push(s.slice());for(e=0;e&lt;n.length;e++)r=n[e],i[r[0]][r[1]]=0;return t.zmask=i,i}(n),smoothing:0};u([c]),f([c]);var h=v(c,o),p=i.ensureSingle(l,&quot;path&quot;,&quot;&quot;);p.attr(&quot;d&quot;,h)}else s=null;t.call(a.setClipUrl,s)}(s,e,y._clips,x,z)})},r.createLines=function(t,e,r){var n=r[0].smoothing,i=t.selectAll(&quot;g.contourlevel&quot;).data(e?r:[]);if(i.exit().remove(),i.enter().append(&quot;g&quot;).classed(&quot;contourlevel&quot;,!0),e){var o=i.selectAll(&quot;path.openline&quot;).data(function(t){return t.pedgepaths||t.edgepaths});o.exit().remove(),o.enter().append(&quot;path&quot;).classed(&quot;openline&quot;,!0),o.attr(&quot;d&quot;,function(t){return a.smoothopen(t,n)}).style(&quot;stroke-miterlimit&quot;,1).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;);var s=i.selectAll(&quot;path.closedline&quot;).data(function(t){return t.ppaths||t.paths});s.exit().remove(),s.enter().append(&quot;path&quot;).classed(&quot;closedline&quot;,!0),s.attr(&quot;d&quot;,function(t){return a.smoothclosed(t,n)}).style(&quot;stroke-miterlimit&quot;,1).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;)}return i},r.createLineClip=function(t,e,r,n){var i=e?&quot;clipline&quot;+n:null,o=r.selectAll(&quot;#&quot;+i).data(e?[0]:[]);return o.exit().remove(),o.enter().append(&quot;clipPath&quot;).classed(&quot;contourlineclip&quot;,!0).attr(&quot;id&quot;,i),a.setClipUrl(t,i),o},r.labelFormatter=function(t,e,r){if(t.labelformat)return r._d3locale.numberFormat(t.labelformat);var n;if(e)n=e.axis;else{if(n={type:&quot;linear&quot;,_id:&quot;ycontour&quot;,showexponent:&quot;all&quot;,exponentformat:&quot;B&quot;},&quot;constraint&quot;===t.type){var i=t.value;Array.isArray(i)?n.range=[i[0],i[i.length-1]]:n.range=[i,i]}else n.range=[t.start,t.end],n.nticks=(t.end-t.start)/t.size;n.range[0]===n.range[1]&amp;&amp;(n.range[1]+=n.range[0]||1),n.nticks||(n.nticks=1e3),l(n,r),s.prepTicks(n),n._tmin=null,n._tmax=null}return function(t){return s.tickText(n,t).text}},r.calcTextOpts=function(t,e,r,n){var i=e(t);r.text(i).call(o.convertToTspans,n);var s=a.bBox(r.node(),!0);return{text:i,width:s.width,height:s.height,level:t,dy:(s.top+s.bottom)/2}},r.findBestTextLocation=function(t,e,r,n,a){var o,s,l,c,u,f=r.width;e.isClosed?(s=e.len/m.INITIALSEARCHPOINTS,o=e.min+s/2,l=e.max):(s=(e.len-f)/(m.INITIALSEARCHPOINTS+1),o=e.min+s+f/2,l=e.max-(s+f)/2);for(var h=1/0,p=0;p&lt;m.ITERATIONS;p++){for(var d=o;d&lt;l;d+=s){var g=i.getTextLocation(t,e.total,d,f),v=y(g,r,n,a);v&lt;h&amp;&amp;(h=v,u=g,c=d)}if(h&gt;2*m.MAXCOST)break;p&amp;&amp;(s/=2),l=(o=c-s/2)+1.5*s}if(h&lt;=m.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.width/2,a=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),f=i*u,h=a*c,p=i*c,d=-a*u,g=[[o-f-h,s-p-d],[o+f-h,s+p-d],[o+f+h,s+p+d],[o-f+h,s-p+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,a,s){var l=t.selectAll(&quot;text&quot;).data(e,function(t){return t.text+&quot;,&quot;+t.x+&quot;,&quot;+t.y+&quot;,&quot;+t.theta});if(l.exit().remove(),l.enter().append(&quot;text&quot;).attr({&quot;data-notex&quot;:1,&quot;text-anchor&quot;:&quot;middle&quot;}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:&quot;rotate(&quot;+180*t.theta/Math.PI+&quot; &quot;+e+&quot; &quot;+i+&quot;)&quot;}).call(o.convertToTspans,r)}),s){for(var c=&quot;&quot;,u=0;u&lt;s.length;u++)c+=&quot;M&quot;+s[u].join(&quot;L&quot;)+&quot;Z&quot;;i.ensureSingle(a,&quot;path&quot;,&quot;&quot;).attr(&quot;d&quot;,c)}}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../plots/cartesian/set_convert&quot;:760,&quot;../heatmap/plot&quot;:954,&quot;./close_boundaries&quot;:915,&quot;./constants&quot;:917,&quot;./convert_to_constraints&quot;:921,&quot;./empty_pathinfo&quot;:923,&quot;./find_all_paths&quot;:925,&quot;./make_crossings&quot;:930,d3:147}],932:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../lib&quot;);function a(t,e,r){var i={type:&quot;linear&quot;,range:[t,e]};return n.autoTicks(i,(e-t)/(r||15)),i}e.exports=function(t){var e=t.contours;if(t.autocontour){var r=t.zmin,o=t.zmax;void 0!==r&amp;&amp;void 0!==o||(r=i.aggNums(Math.min,null,t._z),o=i.aggNums(Math.max,null,t._z));var s=a(r,o,t.ncontours);e.size=s.dtick,e.start=n.tickFirst(s),s.range.reverse(),e.end=n.tickFirst(s),e.start===r&amp;&amp;(e.start+=e.size),e.end===o&amp;&amp;(e.end-=e.size),e.start&gt;e.end&amp;&amp;(e.start=e.end=(e.start+e.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:e.start,end:e.end,size:e.size}),t._input.autocontour=!0}else if(&quot;constraint&quot;!==e.type){var l,c=e.start,u=e.end,f=t._input.contours;if(c&gt;u&amp;&amp;(e.start=f.start=u,u=e.end=f.end=c,c=e.start),!(e.size&gt;0))l=c===u?1:a(c,u,t.ncontours).dtick,f.size=e.size=l}}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742}],933:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/drawing&quot;),a=t(&quot;../heatmap/style&quot;),o=t(&quot;./make_color_map&quot;);e.exports=function(t){var e=n.select(t).selectAll(&quot;g.contour&quot;);e.style(&quot;opacity&quot;,function(t){return t[0].trace.opacity}),e.each(function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u=&quot;constraint&quot;===a.type,f=!u&amp;&amp;&quot;lines&quot;===a.coloring,h=!u&amp;&amp;&quot;fill&quot;===a.coloring,p=f||h?o(r):null;e.selectAll(&quot;g.contourlevel&quot;).each(function(t){n.select(this).selectAll(&quot;path&quot;).call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)});var d=a.labelfont;if(e.selectAll(&quot;g.contourlabels text&quot;).each(function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})}),u)e.selectAll(&quot;g.contourfill path&quot;).style(&quot;fill&quot;,r.fillcolor);else if(h){var g;e.selectAll(&quot;g.contourfill path&quot;).style(&quot;fill&quot;,function(t){return void 0===g&amp;&amp;(g=t.level),p(t.level+.5*l)}),void 0===g&amp;&amp;(g=c),e.selectAll(&quot;g.contourbg path&quot;).style(&quot;fill&quot;,p(g-.5*l))}}),a(t)}},{&quot;../../components/drawing&quot;:592,&quot;../heatmap/style&quot;:955,&quot;./make_color_map&quot;:929,d3:147}],934:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/defaults&quot;),i=t(&quot;./label_defaults&quot;);e.exports=function(t,e,r,a,o){var s,l=r(&quot;contours.coloring&quot;),c=&quot;&quot;;&quot;fill&quot;===l&amp;&amp;(s=r(&quot;contours.showlines&quot;)),!1!==s&amp;&amp;(&quot;lines&quot;!==l&amp;&amp;(c=r(&quot;line.color&quot;,&quot;#000&quot;)),r(&quot;line.width&quot;,.5),r(&quot;line.dash&quot;)),&quot;none&quot;!==l&amp;&amp;(!0!==t.showlegend&amp;&amp;(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:&quot;&quot;,cLetter:&quot;z&quot;})),r(&quot;line.smoothing&quot;),i(r,a,c,o)}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;./label_defaults&quot;:928}],935:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../heatmap/attributes&quot;),i=t(&quot;../contour/attributes&quot;),a=i.contours,o=t(&quot;../scatter/attributes&quot;),s=t(&quot;../../components/colorscale/attributes&quot;),l=t(&quot;../../components/colorbar/attributes&quot;),c=t(&quot;../../lib/extend&quot;).extendFlat,u=o.line;e.exports=c({carpet:{valType:&quot;string&quot;,editType:&quot;calc&quot;},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:a.type,start:a.start,end:a.end,size:a.size,coloring:{valType:&quot;enumerated&quot;,values:[&quot;fill&quot;,&quot;lines&quot;,&quot;none&quot;],dflt:&quot;fill&quot;,editType:&quot;calc&quot;},showlines:a.showlines,showlabels:a.showlabels,labelfont:a.labelfont,labelformat:a.labelformat,operation:a.operation,value:a.value,editType:&quot;calc&quot;,impliedEdits:{autocontour:!1}},line:{color:c({},u.color,{}),width:u.width,dash:u.dash,smoothing:c({},u.smoothing,{}),editType:&quot;plot&quot;}},s(&quot;&quot;,{cLetter:&quot;z&quot;,autoColorDflt:!1}),{colorbar:l})},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../contour/attributes&quot;:913,&quot;../heatmap/attributes&quot;:942,&quot;../scatter/attributes&quot;:1032}],936:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/calc&quot;),i=t(&quot;../../lib&quot;).isArray1D,a=t(&quot;../heatmap/convert_column_xyz&quot;),o=t(&quot;../heatmap/clean_2d_array&quot;),s=t(&quot;../heatmap/max_row_length&quot;),l=t(&quot;../heatmap/interp2d&quot;),c=t(&quot;../heatmap/find_empties&quot;),u=t(&quot;../heatmap/make_bound_array&quot;),f=t(&quot;./defaults&quot;),h=t(&quot;../carpet/lookup_carpetid&quot;),p=t(&quot;../contour/set_contours&quot;);e.exports=function(t,e){var r=e._carpetTrace=h(t,e);if(r&amp;&amp;r.visible&amp;&amp;&quot;legendonly&quot;!==r.visible){if(!e.a||!e.b){var d=t.data[r.index],g=t.data[e.index];g.a||(g.a=d.a),g.b||(g.b=d.b),f(g,e,e._defaultColor,t._fullLayout)}var m=function(t,e){var r,f,h,p,d,g,m,v=e._carpetTrace,y=v.aaxis,x=v.baxis;y._minDtick=0,x._minDtick=0,i(e.z)&amp;&amp;a(e,y,x,&quot;a&quot;,&quot;b&quot;,[&quot;z&quot;]);r=e._a=e._a||e.a,p=e._b=e._b||e.b,r=r?y.makeCalcdata(e,&quot;_a&quot;):[],p=p?x.makeCalcdata(e,&quot;_b&quot;):[],f=e.a0||0,h=e.da||1,d=e.b0||0,g=e.db||1,m=e._z=o(e._z||e.z,e.transpose),e._emptypoints=c(m),l(m,e._emptypoints);var b=s(m),_=&quot;scaled&quot;===e.xtype?&quot;&quot;:r,w=u(e,_,f,h,b,y),k=&quot;scaled&quot;===e.ytype?&quot;&quot;:p,M=u(e,k,d,g,m.length,x),A={a:w,b:M,z:m};&quot;levels&quot;===e.contours.type&amp;&amp;&quot;none&quot;!==e.contours.coloring&amp;&amp;n(e,m,&quot;&quot;,&quot;z&quot;);return[A]}(0,e);return p(e),m}}},{&quot;../../components/colorscale/calc&quot;:575,&quot;../../lib&quot;:693,&quot;../carpet/lookup_carpetid&quot;:891,&quot;../contour/set_contours&quot;:932,&quot;../heatmap/clean_2d_array&quot;:944,&quot;../heatmap/convert_column_xyz&quot;:946,&quot;../heatmap/find_empties&quot;:948,&quot;../heatmap/interp2d&quot;:951,&quot;../heatmap/make_bound_array&quot;:952,&quot;../heatmap/max_row_length&quot;:953,&quot;./defaults&quot;:937}],937:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../heatmap/xyz_defaults&quot;),a=t(&quot;./attributes&quot;),o=t(&quot;../contour/constraint_defaults&quot;),s=t(&quot;../contour/contours_defaults&quot;),l=t(&quot;../contour/style_defaults&quot;);e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,a,r,i)}if(u(&quot;carpet&quot;),t.a&amp;&amp;t.b){if(!i(t,e,u,c,&quot;a&quot;,&quot;b&quot;))return void(e.visible=!1);u(&quot;text&quot;),&quot;constraint&quot;===u(&quot;contours.type&quot;)?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,function(r){return n.coerce2(t,e,a,r)}),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{&quot;../../lib&quot;:693,&quot;../contour/constraint_defaults&quot;:918,&quot;../contour/contours_defaults&quot;:920,&quot;../contour/style_defaults&quot;:934,&quot;../heatmap/xyz_defaults&quot;:957,&quot;./attributes&quot;:935}],938:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar=t(&quot;../contour/colorbar&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.style=t(&quot;../contour/style&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;contourcarpet&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;carpet&quot;,&quot;contour&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;hasLines&quot;,&quot;carpetDependent&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;../contour/colorbar&quot;:916,&quot;../contour/style&quot;:933,&quot;./attributes&quot;:935,&quot;./calc&quot;:936,&quot;./defaults&quot;:937,&quot;./plot&quot;:941}],939:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/drawing&quot;),i=t(&quot;../carpet/axis_aligned_line&quot;),a=t(&quot;../../lib&quot;);e.exports=function(t,e,r,o,s,l,c,u){var f,h,p,d,g,m,v,y=&quot;&quot;,x=e.edgepaths.map(function(t,e){return e}),b=!0,_=1e-4*Math.abs(r[0][0]-r[2][0]),w=1e-4*Math.abs(r[0][1]-r[2][1]);function k(t){return Math.abs(t[1]-r[0][1])&lt;w}function M(t){return Math.abs(t[1]-r[2][1])&lt;w}function A(t){return Math.abs(t[0]-r[0][0])&lt;_}function T(t){return Math.abs(t[0]-r[2][0])&lt;_}function S(t,e){var r,n,a,o,f=&quot;&quot;;for(k(t)&amp;&amp;!T(t)||M(t)&amp;&amp;!A(t)?(o=s.aaxis,a=i(s,l,[t[0],e[0]],.5*(t[1]+e[1]))):(o=s.baxis,a=i(s,l,.5*(t[0]+e[0]),[t[1],e[1]])),r=1;r&lt;a.length;r++)for(f+=o.smoothing?&quot;C&quot;:&quot;L&quot;,n=0;n&lt;a[r].length;n++){var h=a[r][n];f+=[c.c2p(h[0]),u.c2p(h[1])]+&quot; &quot;}return f}for(f=0,h=null;x.length;){var E=e.edgepaths[f][0];for(h&amp;&amp;(y+=S(h,E)),v=n.smoothopen(e.edgepaths[f].map(o),e.smoothing),y+=b?v:v.replace(/^M/,&quot;L&quot;),x.splice(x.indexOf(f),1),h=e.edgepaths[f][e.edgepaths[f].length-1],g=-1,d=0;d&lt;4;d++){if(!h){a.log(&quot;Missing end?&quot;,f,e);break}for(k(h)&amp;&amp;!T(h)?p=r[1]:A(h)?p=r[0]:M(h)?p=r[3]:T(h)&amp;&amp;(p=r[2]),m=0;m&lt;e.edgepaths.length;m++){var C=e.edgepaths[m][0];Math.abs(h[0]-p[0])&lt;_?Math.abs(h[0]-C[0])&lt;_&amp;&amp;(C[1]-h[1])*(p[1]-C[1])&gt;=0&amp;&amp;(p=C,g=m):Math.abs(h[1]-p[1])&lt;w?Math.abs(h[1]-C[1])&lt;w&amp;&amp;(C[0]-h[0])*(p[0]-C[0])&gt;=0&amp;&amp;(p=C,g=m):a.log(&quot;endpt to newendpt is not vert. or horz.&quot;,h,p,C)}if(g&gt;=0)break;y+=S(h,p),h=p}if(g===e.edgepaths.length){a.log(&quot;unclosed perimeter path&quot;);break}f=g,(b=-1===x.indexOf(f))&amp;&amp;(f=x[0],y+=S(h,p)+&quot;Z&quot;,h=null)}for(f=0;f&lt;e.paths.length;f++)y+=n.smoothclosed(e.paths[f].map(o),e.smoothing);return y}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../carpet/axis_aligned_line&quot;:875}],940:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r&lt;t.length;r++){for(o=(a=t[r]).pedgepaths=[],s=a.ppaths=[],n=0;n&lt;a.edgepaths.length;n++){for(u=a.edgepaths[n],l=[],i=0;i&lt;u.length;i++)l[i]=e(u[i]);o.push(l)}for(n=0;n&lt;a.paths.length;n++){for(u=a.paths[n],c=[],i=0;i&lt;u.length;i++)c[i]=e(u[i]);s.push(c)}}}},{}],941:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../carpet/map_1d_array&quot;),a=t(&quot;../carpet/makepath&quot;),o=t(&quot;../../components/drawing&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../contour/make_crossings&quot;),c=t(&quot;../contour/find_all_paths&quot;),u=t(&quot;../contour/plot&quot;),f=t(&quot;../contour/constants&quot;),h=t(&quot;../contour/convert_to_constraints&quot;),p=t(&quot;./join_all_paths&quot;),d=t(&quot;../contour/empty_pathinfo&quot;),g=t(&quot;./map_pathinfo&quot;),m=t(&quot;../carpet/lookup_carpetid&quot;),v=t(&quot;../contour/close_boundaries&quot;);function y(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function x(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function b(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,_){var w=e.xaxis,k=e.yaxis;s.makeTraceGroups(_,r,&quot;contour&quot;).each(function(r){var _=n.select(this),M=r[0],A=M.trace,T=A._carpetTrace=m(t,A),S=t.calcdata[T.index][0];if(T.visible&amp;&amp;&quot;legendonly&quot;!==T.visible){var E=M.a,C=M.b,L=A.contours,z=d(L,e,M),P=&quot;constraint&quot;===L.type,O=L._operation,I=P?&quot;=&quot;===O?&quot;lines&quot;:&quot;fill&quot;:L.coloring,D=[[E[0],C[C.length-1]],[E[E.length-1],C[C.length-1]],[E[E.length-1],C[0]],[E[0],C[0]]];l(z);var R=1e-8*(E[E.length-1]-E[0]),B=1e-8*(C[C.length-1]-C[0]);c(z,R,B);var F,N,j,V,U=z;&quot;constraint&quot;===L.type&amp;&amp;(U=h(z,O),v(U,O,D,A)),g(z,G);var q=[];for(V=S.clipsegments.length-1;V&gt;=0;V--)F=S.clipsegments[V],N=i([],F.x,w.c2p),j=i([],F.y,k.c2p),N.reverse(),j.reverse(),q.push(a(N,j,F.bicubic));var H=&quot;M&quot;+q.join(&quot;L&quot;)+&quot;Z&quot;;!function(t,e,r,n,o,l){var c,u,f,h,p=s.ensureSingle(t,&quot;g&quot;,&quot;contourbg&quot;).selectAll(&quot;path&quot;).data(&quot;fill&quot;!==l||o?[]:[0]);p.enter().append(&quot;path&quot;),p.exit().remove();var d=[];for(h=0;h&lt;e.length;h++)c=e[h],u=i([],c.x,r.c2p),f=i([],c.y,n.c2p),d.push(a(u,f,c.bicubic));p.attr(&quot;d&quot;,&quot;M&quot;+d.join(&quot;L&quot;)+&quot;Z&quot;).style(&quot;stroke&quot;,&quot;none&quot;)}(_,S.clipsegments,w,k,P,I),function(t,e,r,i,a,o,l,c,u,f,h){var d=s.ensureSingle(e,&quot;g&quot;,&quot;contourfill&quot;).selectAll(&quot;path&quot;).data(&quot;fill&quot;===f?a:[]);d.enter().append(&quot;path&quot;),d.exit().remove(),d.each(function(e){var a=p(t,e,o,l,c,u,r,i);e.prefixBoundary&amp;&amp;(a=h+a),a?n.select(this).attr(&quot;d&quot;,a).style(&quot;stroke&quot;,&quot;none&quot;):n.select(this).remove()})}(A,_,w,k,U,D,G,T,S,I,H),function(t,e,r,i,a,l,c){var h=s.ensureSingle(t,&quot;g&quot;,&quot;contourlines&quot;),p=!1!==a.showlines,d=a.showlabels,g=p&amp;&amp;d,m=u.createLines(h,p||d,e),v=u.createLineClip(h,g,r._fullLayout._defs,i.trace.uid),_=t.selectAll(&quot;g.contourlabels&quot;).data(d?[0]:[]);if(_.exit().remove(),_.enter().append(&quot;g&quot;).classed(&quot;contourlabels&quot;,!0),d){var w=l.xaxis,k=l.yaxis,M=w._length,A=k._length,T=[[[0,0],[M,0],[M,A],[0,A]]],S=[];s.clearLocationCache();var E=u.labelFormatter(a,i.t.cb,r._fullLayout),C=o.tester.append(&quot;text&quot;).attr(&quot;data-notex&quot;,1).call(o.font,a.labelfont),L={left:0,right:M,center:M/2,top:0,bottom:A,middle:A/2},z=Math.sqrt(M*M+A*A),P=f.LABELDISTANCE*z/Math.max(1,e.length/f.LABELINCREASE);m.each(function(t){var e=u.calcTextOpts(t.level,E,C,r);n.select(this).selectAll(&quot;path&quot;).each(function(r){var n=s.getVisibleSegment(this,L,e.height/2);if(n&amp;&amp;(function(t,e,r,n,i,a){for(var o,s=0;s&lt;r.pedgepaths.length;s++)e===r.pedgepaths[s]&amp;&amp;(o=r.edgepaths[s]);if(!o)return;var l=i.a[0],c=i.a[i.a.length-1],u=i.b[0],f=i.b[i.b.length-1];function h(t,e){var r,n=0;return(Math.abs(t[0]-l)&lt;.1||Math.abs(t[0]-c)&lt;.1)&amp;&amp;(r=x(i.dxydb_rough(t[0],t[1],.1)),n=Math.max(n,a*b(e,r)/2)),(Math.abs(t[1]-u)&lt;.1||Math.abs(t[1]-f)&lt;.1)&amp;&amp;(r=x(i.dxyda_rough(t[0],t[1],.1)),n=Math.max(n,a*b(e,r)/2)),n}var p=y(t,0,1),d=y(t,n.total,n.total-1),g=h(o[0],p),m=n.total-h(o[o.length-1],d);n.min&lt;g&amp;&amp;(n.min=g);n.max&gt;m&amp;&amp;(n.max=m);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len&lt;(e.width+e.height)*f.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/P),f.LABELMAX),a=0;a&lt;i;a++){var o=u.findBestTextLocation(this,n,e,S,L);if(!o)break;u.addLabelData(o,e,S,T)}})}),C.remove(),u.drawLabels(_,S,r,v,g?T:null)}d&amp;&amp;!p&amp;&amp;m.remove()}(_,z,t,M,L,e,T),o.setClipUrl(_,T._clipPathId)}function G(t){var e=T.ab2xy(t[0],t[1],!0);return[w.c2p(e[0]),k.c2p(e[1])]}})}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../carpet/lookup_carpetid&quot;:891,&quot;../carpet/makepath&quot;:892,&quot;../carpet/map_1d_array&quot;:893,&quot;../contour/close_boundaries&quot;:915,&quot;../contour/constants&quot;:917,&quot;../contour/convert_to_constraints&quot;:921,&quot;../contour/empty_pathinfo&quot;:923,&quot;../contour/find_all_paths&quot;:925,&quot;../contour/make_crossings&quot;:930,&quot;../contour/plot&quot;:931,&quot;./join_all_paths&quot;:939,&quot;./map_pathinfo&quot;:940,d3:147}],942:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;),i=t(&quot;../../components/colorscale/attributes&quot;),a=t(&quot;../../components/colorbar/attributes&quot;),o=t(&quot;../../lib/extend&quot;).extendFlat;e.exports=o({z:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},x:o({},n.x,{impliedEdits:{xtype:&quot;array&quot;}}),x0:o({},n.x0,{impliedEdits:{xtype:&quot;scaled&quot;}}),dx:o({},n.dx,{impliedEdits:{xtype:&quot;scaled&quot;}}),y:o({},n.y,{impliedEdits:{ytype:&quot;array&quot;}}),y0:o({},n.y0,{impliedEdits:{ytype:&quot;scaled&quot;}}),dy:o({},n.dy,{impliedEdits:{ytype:&quot;scaled&quot;}}),text:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},transpose:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},xtype:{valType:&quot;enumerated&quot;,values:[&quot;array&quot;,&quot;scaled&quot;],editType:&quot;calc+clearAxisTypes&quot;},ytype:{valType:&quot;enumerated&quot;,values:[&quot;array&quot;,&quot;scaled&quot;],editType:&quot;calc+clearAxisTypes&quot;},zsmooth:{valType:&quot;enumerated&quot;,values:[&quot;fast&quot;,&quot;best&quot;,!1],dflt:!1,editType:&quot;calc&quot;},connectgaps:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},xgap:{valType:&quot;number&quot;,dflt:0,min:0,editType:&quot;plot&quot;},ygap:{valType:&quot;number&quot;,dflt:0,min:0,editType:&quot;plot&quot;},zhoverformat:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;none&quot;}},i(&quot;&quot;,{cLetter:&quot;z&quot;,autoColorDflt:!1}),{colorbar:a})},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../scatter/attributes&quot;:1032}],943:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;../histogram2d/calc&quot;),s=t(&quot;../../components/colorscale/calc&quot;),l=t(&quot;./convert_column_xyz&quot;),c=t(&quot;./max_row_length&quot;),u=t(&quot;./clean_2d_array&quot;),f=t(&quot;./interp2d&quot;),h=t(&quot;./find_empties&quot;),p=t(&quot;./make_bound_array&quot;);e.exports=function(t,e){var r,d,g,m,v,y,x,b,_,w=a.getFromId(t,e.xaxis||&quot;x&quot;),k=a.getFromId(t,e.yaxis||&quot;y&quot;),M=n.traceIs(e,&quot;contour&quot;),A=n.traceIs(e,&quot;histogram&quot;),T=n.traceIs(e,&quot;gl2d&quot;),S=M?&quot;best&quot;:e.zsmooth;if(w._minDtick=0,k._minDtick=0,A)r=(_=o(t,e)).x,d=_.x0,g=_.dx,m=_.y,v=_.y0,y=_.dy,x=_.z;else{var E=e.z;i.isArray1D(E)?(l(e,w,k,&quot;x&quot;,&quot;y&quot;,[&quot;z&quot;]),r=e._x,m=e._y,E=e._z):(r=e.x?w.makeCalcdata(e,&quot;x&quot;):[],m=e.y?k.makeCalcdata(e,&quot;y&quot;):[]),d=e.x0||0,g=e.dx||1,v=e.y0||0,y=e.dy||1,x=u(E,e.transpose),(M||e.connectgaps)&amp;&amp;(e._emptypoints=h(x),f(x,e._emptypoints))}function C(t){S=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: &quot;fast&quot;: '+t)}if(&quot;fast&quot;===S)if(&quot;log&quot;===w.type||&quot;log&quot;===k.type)C(&quot;log axis found&quot;);else if(!A){if(r.length){var L=(r[r.length-1]-r[0])/(r.length-1),z=Math.abs(L/100);for(b=0;b&lt;r.length-1;b++)if(Math.abs(r[b+1]-r[b]-L)&gt;z){C(&quot;x scale is not linear&quot;);break}}if(m.length&amp;&amp;&quot;fast&quot;===S){var P=(m[m.length-1]-m[0])/(m.length-1),O=Math.abs(P/100);for(b=0;b&lt;m.length-1;b++)if(Math.abs(m[b+1]-m[b]-P)&gt;O){C(&quot;y scale is not linear&quot;);break}}}var I=c(x),D=&quot;scaled&quot;===e.xtype?&quot;&quot;:r,R=p(e,D,d,g,I,w),B=&quot;scaled&quot;===e.ytype?&quot;&quot;:m,F=p(e,B,v,y,x.length,k);T||(e._extremes[w._id]=a.findExtremes(w,R),e._extremes[k._id]=a.findExtremes(k,F));var N={x:R,y:F,z:x,text:e._text||e.text};if(D&amp;&amp;D.length===R.length-1&amp;&amp;(N.xCenter=D),B&amp;&amp;B.length===F.length-1&amp;&amp;(N.yCenter=B),A&amp;&amp;(N.xRanges=_.xRanges,N.yRanges=_.yRanges,N.pts=_.pts),M&amp;&amp;&quot;constraint&quot;===e.contours.type||s(e,x,&quot;&quot;,&quot;z&quot;),M&amp;&amp;e.contours&amp;&amp;&quot;heatmap&quot;===e.contours.coloring){var j={type:&quot;contour&quot;===e.type?&quot;heatmap&quot;:&quot;histogram2d&quot;,xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(j,D,d,g,I,w),N.yfill=p(j,B,v,y,x.length,k)}return[N]}},{&quot;../../components/colorscale/calc&quot;:575,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../registry&quot;:825,&quot;../histogram2d/calc&quot;:974,&quot;./clean_2d_array&quot;:944,&quot;./convert_column_xyz&quot;:946,&quot;./find_empties&quot;:948,&quot;./interp2d&quot;:951,&quot;./make_bound_array&quot;:952,&quot;./max_row_length&quot;:953}],944:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;);e.exports=function(t,e){var r,i,a,o,s,l;function c(t){if(n(t))return+t}if(e){for(r=0,s=0;s&lt;t.length;s++)r=Math.max(r,t[s].length);if(0===r)return!1;a=function(t){return t.length},o=function(t,e,r){return t[r][e]}}else r=t.length,a=function(t,e){return t[e].length},o=function(t,e,r){return t[e][r]};var u=new Array(r);for(s=0;s&lt;r;s++)for(i=a(t,s),u[s]=new Array(i),l=0;l&lt;i;l++)u[s][l]=c(o(t,s,l));return u}},{&quot;fast-isnumeric&quot;:213}],945:[function(t,e,r){&quot;use strict&quot;;e.exports={min:&quot;zmin&quot;,max:&quot;zmax&quot;}},{}],946:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../constants/numerical&quot;).BADNUM;e.exports=function(t,e,r,a,o,s){var l,c,u,f=t._length,h=t[a].slice(0,f),p=t[o].slice(0,f),d=t.text,g=void 0!==d&amp;&amp;n.isArray1D(d),m=t[a+&quot;calendar&quot;],v=t[o+&quot;calendar&quot;];for(l=0;l&lt;f;l++)h[l]=e.d2c(h[l],0,m),p[l]=r.d2c(p[l],0,v);var y,x,b,_=n.distinctVals(h),w=_.vals,k=n.distinctVals(p),M=k.vals,A=[];for(l=0;l&lt;s.length;l++)A[l]=n.init2dArray(M.length,w.length);for(g&amp;&amp;(b=n.init2dArray(M.length,w.length)),l=0;l&lt;f;l++)if(h[l]!==i&amp;&amp;p[l]!==i){for(y=n.findBin(h[l]+_.minDiff/2,w),x=n.findBin(p[l]+k.minDiff/2,M),c=0;c&lt;s.length;c++)u=t[s[c]],A[c][x][y]=u[l];g&amp;&amp;(b[x][y]=d[l])}for(t[&quot;_&quot;+a]=w,t[&quot;_&quot;+o]=M,c=0;c&lt;s.length;c++)t[&quot;_&quot;+s[c]]=A[c];g&amp;&amp;(t._text=b)}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693}],947:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./xyz_defaults&quot;),a=t(&quot;./style_defaults&quot;),o=t(&quot;../../components/colorscale/defaults&quot;),s=t(&quot;./attributes&quot;);e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l)?(c(&quot;text&quot;),a(t,e,c,l),c(&quot;connectgaps&quot;,n.isArray1D(e.z)&amp;&amp;!1!==e.zsmooth),o(t,e,l,c,{prefix:&quot;&quot;,cLetter:&quot;z&quot;})):e.visible=!1}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../lib&quot;:693,&quot;./attributes&quot;:942,&quot;./style_defaults&quot;:956,&quot;./xyz_defaults&quot;:957}],948:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./max_row_length&quot;);e.exports=function(t){var e,r,i,a,o,s,l,c,u=[],f={},h=[],p=t[0],d=[],g=[0,0,0],m=n(t);for(r=0;r&lt;t.length;r++)for(e=d,d=p,p=t[r+1]||[],i=0;i&lt;m;i++)void 0===d[i]&amp;&amp;((s=(void 0!==d[i-1]?1:0)+(void 0!==d[i+1]?1:0)+(void 0!==e[i]?1:0)+(void 0!==p[i]?1:0))?(0===r&amp;&amp;s++,0===i&amp;&amp;s++,r===t.length-1&amp;&amp;s++,i===d.length-1&amp;&amp;s++,s&lt;4&amp;&amp;(f[[r,i]]=[r,i,s]),u.push([r,i,s])):h.push([r,i]));for(;h.length;){for(l={},c=!1,o=h.length-1;o&gt;=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||g)[2]+(f[[r+1,i]]||g)[2]+(f[[r,i-1]]||g)[2]+(f[[r,i+1]]||g)[2])/20)&amp;&amp;(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw&quot;findEmpties iterated with no new neighbors&quot;;for(a in l)f[a]=l[a],u.push(l[a])}return u.sort(function(t,e){return e[2]-t[2]})}},{&quot;./max_row_length&quot;:953}],949:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/fx&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plots/cartesian/axes&quot;);e.exports=function(t,e,r,o,s,l){var c,u,f,h,p=t.cd[0],d=p.trace,g=t.xa,m=t.ya,v=p.x,y=p.y,x=p.z,b=p.xCenter,_=p.yCenter,w=p.zmask,k=[d.zmin,d.zmax],M=d.zhoverformat,A=v,T=y;if(!1!==t.index){try{f=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void i.error(&quot;Error hovering on heatmap, pointNumber must be [row,col], found:&quot;,t.index)}if(f&lt;0||f&gt;=x[0].length||h&lt;0||h&gt;x.length)return}else{if(n.inbox(e-v[0],e-v[v.length-1],0)&gt;0||n.inbox(r-y[0],r-y[y.length-1],0)&gt;0)return;if(l){var S;for(A=[2*v[0]-v[1]],S=1;S&lt;v.length;S++)A.push((v[S]+v[S-1])/2);for(A.push([2*v[v.length-1]-v[v.length-2]]),T=[2*y[0]-y[1]],S=1;S&lt;y.length;S++)T.push((y[S]+y[S-1])/2);T.push([2*y[y.length-1]-y[y.length-2]])}f=Math.max(0,Math.min(A.length-2,i.findBin(e,A))),h=Math.max(0,Math.min(T.length-2,i.findBin(r,T)))}var E=g.c2p(v[f]),C=g.c2p(v[f+1]),L=m.c2p(y[h]),z=m.c2p(y[h+1]);l?(C=E,c=v[f],z=L,u=y[h]):(c=b?b[f]:(v[f]+v[f+1])/2,u=_?_[h]:(y[h]+y[h+1])/2,d.zsmooth&amp;&amp;(E=C=g.c2p(c),L=z=m.c2p(u)));var P,O,I=x[h][f];w&amp;&amp;!w[h][f]&amp;&amp;(I=void 0),Array.isArray(p.text)&amp;&amp;Array.isArray(p.text[h])&amp;&amp;(P=p.text[h][f]);var D={type:&quot;linear&quot;,range:k,hoverformat:M,_separators:g._separators,_numFormat:g._numFormat};return O=a.tickText(D,I,&quot;hover&quot;).text,[i.extendFlat(t,{index:[h,f],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:E,x1:C,y0:L,y1:z,xLabelVal:c,yLabelVal:u,zLabelVal:I,zLabel:O,text:P})]}},{&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742}],950:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.colorbar=t(&quot;./colorbar&quot;),n.style=t(&quot;./style&quot;),n.hoverPoints=t(&quot;./hover&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;heatmap&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;2dMap&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;./attributes&quot;:942,&quot;./calc&quot;:943,&quot;./colorbar&quot;:945,&quot;./defaults&quot;:947,&quot;./hover&quot;:949,&quot;./plot&quot;:954,&quot;./style&quot;:955}],951:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=[[-1,0],[1,0],[0,-1],[0,1]];function a(t){return.5-.25*Math.min(1,.5*t)}function o(t,e,r){var n,a,o,s,l,c,u,f,h,p,d,g,m,v=0;for(s=0;s&lt;e.length;s++){for(a=(n=e[s])[0],o=n[1],d=t[a][o],p=0,h=0,l=0;l&lt;4;l++)(u=t[a+(c=i[l])[0]])&amp;&amp;void 0!==(f=u[o+c[1]])&amp;&amp;(0===p?g=m=f:(g=Math.min(g,f),m=Math.max(m,f)),h++,p+=f);if(0===h)throw&quot;iterateInterp2d order is wrong: no defined neighbors&quot;;t[a][o]=p/h,void 0===d?h&lt;4&amp;&amp;(v=1):(t[a][o]=(1+r)*t[a][o]-r*d,m&gt;g&amp;&amp;(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r&lt;e.length&amp;&amp;!(e[r][2]&lt;4);r++);for(e=e.slice(r),r=0;r&lt;100&amp;&amp;i&gt;.01;r++)i=o(t,e,a(i));return i&gt;.01&amp;&amp;n.log(&quot;interp2d didn't converge quickly&quot;,i),t}},{&quot;../../lib&quot;:693}],952:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;).isArrayOrTypedArray;e.exports=function(t,e,r,a,o,s){var l,c,u,f=[],h=n.traceIs(t,&quot;contour&quot;),p=n.traceIs(t,&quot;histogram&quot;),d=n.traceIs(t,&quot;gl2d&quot;);if(i(e)&amp;&amp;e.length&gt;1&amp;&amp;!p&amp;&amp;&quot;category&quot;!==s.type){var g=e.length;if(!(g&lt;=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u&lt;g;u++)f.push(.5*(e[u-1]+e[u]));f.push(1.5*e[g-1]-.5*e[g-2])}if(g&lt;o){var m=f[f.length-1],v=m-f[f.length-2];for(u=g;u&lt;o;u++)m+=v,f.push(m)}}else{c=a||1;var y=t[s._id.charAt(0)+&quot;calendar&quot;];for(l=p||&quot;category&quot;===s.type?s.r2c(r,0,y)||0:i(e)&amp;&amp;1===e.length?e[0]:void 0===r?0:s.d2c(r,0,y),u=h||d?0:-.5;u&lt;o;u++)f.push(l+c*u)}return f}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825}],953:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=0,r=0;r&lt;t.length;r++)e=Math.max(e,t[r].length);return e}},{}],954:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;tinycolor2&quot;),a=t(&quot;../../registry&quot;),o=t(&quot;../../lib&quot;),s=t(&quot;../../components/colorscale&quot;),l=t(&quot;../../constants/xmlns_namespaces&quot;),c=t(&quot;./max_row_length&quot;);function u(t,e){var r=e.length-2,n=o.constrain(o.findBin(t,e),0,r),i=e[n],a=e[n+1],s=o.constrain(n+(t-i)/(a-i)-.5,0,r),l=Math.round(s),c=Math.abs(s-l);return s&amp;&amp;s!==r&amp;&amp;c?{bin0:l,frac:c,bin1:Math.round(l+c/(s-l))}:{bin0:l,bin1:l,frac:0}}function f(t,e){var r=e.length-1,n=o.constrain(o.findBin(t,e),0,r),i=e[n],a=(t-i)/(e[n+1]-i)||0;return a&lt;=0?{bin0:n,bin1:n,frac:0}:a&lt;.5?{bin0:n,bin1:n+1,frac:a}:{bin0:n+1,bin1:n,frac:1-a}}function h(t,e,r){t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=Math.round(255*r[3])}e.exports=function(t,e,r,p){var d=e.xaxis,g=e.yaxis;o.makeTraceGroups(p,r,&quot;hm&quot;).each(function(e){var r,p,m,v,y,x,b=n.select(this),_=e[0],w=_.trace,k=_.z,M=_.x,A=_.y,T=_.xCenter,S=_.yCenter,E=a.traceIs(w,&quot;contour&quot;),C=E?&quot;best&quot;:w.zsmooth,L=k.length,z=c(k),P=!1,O=!1;for(x=0;void 0===r&amp;&amp;x&lt;M.length-1;)r=d.c2p(M[x]),x++;for(x=M.length-1;void 0===p&amp;&amp;x&gt;0;)p=d.c2p(M[x]),x--;for(p&lt;r&amp;&amp;(m=p,p=r,r=m,P=!0),x=0;void 0===v&amp;&amp;x&lt;A.length-1;)v=g.c2p(A[x]),x++;for(x=A.length-1;void 0===y&amp;&amp;x&gt;0;)y=g.c2p(A[x]),x--;if(y&lt;v&amp;&amp;(m=v,v=y,y=m,O=!0),E&amp;&amp;(T=M,S=A,M=_.xfill,A=_.yfill),&quot;fast&quot;!==C){var I=&quot;best&quot;===C?0:.5;r=Math.max(-I*d._length,r),p=Math.min((1+I)*d._length,p),v=Math.max(-I*g._length,v),y=Math.min((1+I)*g._length,y)}var D=Math.round(p-r),R=Math.round(y-v);if(D&lt;=0||R&lt;=0){b.selectAll(&quot;image&quot;).data([]).exit().remove()}else{var B,F;&quot;fast&quot;===C?(B=z,F=L):(B=D,F=R);var N=document.createElement(&quot;canvas&quot;);N.width=B,N.height=F;var j,V,U=N.getContext(&quot;2d&quot;),q=s.makeColorScaleFunc(s.extractScale(w.colorscale,w.zmin,w.zmax),{noNumericCheck:!0,returnArray:!0});&quot;fast&quot;===C?(j=P?function(t){return z-1-t}:o.identity,V=O?function(t){return L-1-t}:o.identity):(j=function(t){return o.constrain(Math.round(d.c2p(M[t])-r),0,D)},V=function(t){return o.constrain(Math.round(g.c2p(A[t])-v),0,R)});var H,G,W,Y,X,Z=V(0),$=[Z,Z],J=P?0:1,K=O?0:1,Q=0,tt=0,et=0,rt=0;if(C){var nt,it=0;try{nt=new Uint8Array(D*R*4)}catch(t){nt=new Array(D*R*4)}if(&quot;best&quot;===C){var at,ot,st,lt=T||M,ct=S||A,ut=new Array(lt.length),ft=new Array(ct.length),ht=new Array(D),pt=T?f:u,dt=S?f:u;for(x=0;x&lt;lt.length;x++)ut[x]=Math.round(d.c2p(lt[x])-r);for(x=0;x&lt;ct.length;x++)ft[x]=Math.round(g.c2p(ct[x])-v);for(x=0;x&lt;D;x++)ht[x]=pt(x,ut);for(G=0;G&lt;R;G++)for(ot=k[(at=dt(G,ft)).bin0],st=k[at.bin1],x=0;x&lt;D;x++,it+=4)h(nt,it,X=At(ot,st,ht[x],at))}else for(G=0;G&lt;L;G++)for(Y=k[G],$=V(G),x=0;x&lt;D;x++)X=Mt(Y[x],1),h(nt,it=4*($*D+j(x)),X);var gt=U.createImageData(D,R);try{gt.data.set(nt)}catch(t){var mt=gt.data,vt=mt.length;for(G=0;G&lt;vt;G++)mt[G]=nt[G]}U.putImageData(gt,0,0)}else{var yt=w.xgap,xt=w.ygap,bt=Math.floor(yt/2),_t=Math.floor(xt/2);for(G=0;G&lt;L;G++)if(Y=k[G],$.reverse(),$[K]=V(G+1),$[0]!==$[1]&amp;&amp;void 0!==$[0]&amp;&amp;void 0!==$[1])for(H=[W=j(0),W],x=0;x&lt;z;x++)H.reverse(),H[J]=j(x+1),H[0]!==H[1]&amp;&amp;void 0!==H[0]&amp;&amp;void 0!==H[1]&amp;&amp;(X=Mt(Y[x],(H[1]-H[0])*($[1]-$[0])),U.fillStyle=&quot;rgba(&quot;+X.join(&quot;,&quot;)+&quot;)&quot;,U.fillRect(H[0]+bt,$[0]+_t,H[1]-H[0]-yt,$[1]-$[0]-xt))}tt=Math.round(tt/Q),et=Math.round(et/Q),rt=Math.round(rt/Q);var wt=i(&quot;rgb(&quot;+tt+&quot;,&quot;+et+&quot;,&quot;+rt+&quot;)&quot;);t._hmpixcount=(t._hmpixcount||0)+Q,t._hmlumcount=(t._hmlumcount||0)+Q*wt.getLuminance();var kt=b.selectAll(&quot;image&quot;).data(e);kt.enter().append(&quot;svg:image&quot;).attr({xmlns:l.svg,preserveAspectRatio:&quot;none&quot;}),kt.attr({height:R,width:D,x:r,y:v,&quot;xlink:href&quot;:N.toDataURL(&quot;image/png&quot;)})}function Mt(t,e){if(void 0!==t){var r=q(t);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),Q+=e,tt+=r[0]*e,et+=r[1]*e,rt+=r[2]*e,r}return[0,0,0,0]}function At(t,e,r,n){var i=t[r.bin0];if(void 0===i)return Mt(void 0,1);var a,o=t[r.bin1],s=e[r.bin0],l=e[r.bin1],c=o-i||0,u=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,Mt(i+r.frac*c+n.frac*(u+r.frac*a))}})}},{&quot;../../components/colorscale&quot;:582,&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./max_row_length&quot;:953,d3:147,tinycolor2:511}],955:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;);e.exports=function(t){n.select(t).selectAll(&quot;.hm image&quot;).style(&quot;opacity&quot;,function(t){return t.trace.opacity})}},{d3:147}],956:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){!1===r(&quot;zsmooth&quot;)&amp;&amp;(r(&quot;xgap&quot;),r(&quot;ygap&quot;)),r(&quot;zhoverformat&quot;)}},{}],957:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../registry&quot;);function o(t,e){var r=e(t);return&quot;scaled&quot;===(r?e(t+&quot;type&quot;,&quot;array&quot;):&quot;scaled&quot;)&amp;&amp;(e(t+&quot;0&quot;),e(&quot;d&quot;+t)),r}e.exports=function(t,e,r,s,l,c){var u,f,h=r(&quot;z&quot;);if(l=l||&quot;x&quot;,c=c||&quot;y&quot;,void 0===h||!h.length)return 0;if(i.isArray1D(t.z)){if(u=r(l),f=r(c),!(u&amp;&amp;u.length&amp;&amp;f&amp;&amp;f.length))return 0;e._length=Math.min(u.length,f.length,h.length)}else{if(u=o(l,r),f=o(c,r),!function(t){for(var e,r=!0,a=!1,o=!1,s=0;s&lt;t.length;s++){if(e=t[s],!i.isArrayOrTypedArray(e)){r=!1;break}e.length&gt;0&amp;&amp;(a=!0);for(var l=0;l&lt;e.length;l++)if(n(e[l])){o=!0;break}}return r&amp;&amp;a&amp;&amp;o}(h))return 0;r(&quot;transpose&quot;),e._length=null}return a.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[l,c],s),!0}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;fast-isnumeric&quot;:213}],958:[function(t,e,r){&quot;use strict&quot;;for(var n=t(&quot;../heatmap/attributes&quot;),i=t(&quot;../../components/colorscale/attributes&quot;),a=t(&quot;../../components/colorbar/attributes&quot;),o=t(&quot;../../lib/extend&quot;).extendFlat,s=t(&quot;../../plot_api/edit_types&quot;).overrideAll,l=[&quot;z&quot;,&quot;x&quot;,&quot;x0&quot;,&quot;dx&quot;,&quot;y&quot;,&quot;y0&quot;,&quot;dy&quot;,&quot;text&quot;,&quot;transpose&quot;,&quot;xtype&quot;,&quot;ytype&quot;],c={},u=0;u&lt;l.length;u++){var f=l[u];c[f]=n[f]}o(c,i(&quot;&quot;,{cLetter:&quot;z&quot;,autoColorDflt:!1}),{colorbar:a}),e.exports=s(c,&quot;calc&quot;,&quot;nested&quot;)},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../heatmap/attributes&quot;:942}],959:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-heatmap2d&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../lib/str2rgbarray&quot;);function o(t,e){this.scene=t,this.uid=e,this.type=&quot;heatmapgl&quot;,this.name=&quot;&quot;,this.hoverinfo=&quot;all&quot;,this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=n(t.glplot,this.options),this.heatmap._trace=this}var s=o.prototype;s.handlePick=function(t){var e=this.options,r=e.shape,n=t.pointId,i=n%r[0],a=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[e.x[i],e.y[a],e.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[a,i],hoverinfo:this.hoverinfo}},s.update=function(t,e){var r=e[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var o=n[0].length,s=n.length;this.options.shape=[o,s],this.options.x=r.x,this.options.y=r.y;var l=function(t){for(var e=t.colorscale,r=t.zmin,n=t.zmax,i=e.length,o=new Array(i),s=new Array(4*i),l=0;l&lt;i;l++){var c=e[l],u=a(c[1]);o[l]=r+c[0]*(n-r);for(var f=0;f&lt;4;f++)s[4*l+f]=u[f]}return{colorLevels:o,colorValues:s}}(t);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options);var c=this.scene.xaxis,u=this.scene.yaxis;t._extremes[c._id]=i.findExtremes(c,r.x),t._extremes[u._id]=i.findExtremes(u,r.y)},s.dispose=function(){this.heatmap.dispose()},e.exports=function(t,e,r){var n=new o(t,e.uid);return n.update(e,r),n}},{&quot;../../lib/str2rgbarray&quot;:717,&quot;../../plots/cartesian/axes&quot;:742,&quot;gl-heatmap2d&quot;:240}],960:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;../heatmap/defaults&quot;),n.colorbar=t(&quot;../heatmap/colorbar&quot;),n.calc=t(&quot;../heatmap/calc&quot;),n.plot=t(&quot;./convert&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;heatmapgl&quot;,n.basePlotModule=t(&quot;../../plots/gl2d&quot;),n.categories=[&quot;gl&quot;,&quot;gl2d&quot;,&quot;2dMap&quot;],n.meta={},e.exports=n},{&quot;../../plots/gl2d&quot;:781,&quot;../heatmap/calc&quot;:943,&quot;../heatmap/colorbar&quot;:945,&quot;../heatmap/defaults&quot;:947,&quot;./attributes&quot;:958,&quot;./convert&quot;:959}],961:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../bar/attributes&quot;);function i(t){var e={};e[&quot;autobin&quot;+t]=!1;var r={};return r[&quot;^autobin&quot;+t]=!1,{start:{valType:&quot;any&quot;,dflt:null,editType:&quot;calc&quot;,impliedEdits:r},end:{valType:&quot;any&quot;,dflt:null,editType:&quot;calc&quot;,impliedEdits:r},size:{valType:&quot;any&quot;,dflt:null,editType:&quot;calc&quot;,impliedEdits:r},editType:&quot;calc&quot;,impliedEdits:e}}e.exports={x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},y:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},text:n.text,orientation:n.orientation,histfunc:{valType:&quot;enumerated&quot;,values:[&quot;count&quot;,&quot;sum&quot;,&quot;avg&quot;,&quot;min&quot;,&quot;max&quot;],dflt:&quot;count&quot;,editType:&quot;calc&quot;},histnorm:{valType:&quot;enumerated&quot;,values:[&quot;&quot;,&quot;percent&quot;,&quot;probability&quot;,&quot;density&quot;,&quot;probability density&quot;],dflt:&quot;&quot;,editType:&quot;calc&quot;},cumulative:{enabled:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},direction:{valType:&quot;enumerated&quot;,values:[&quot;increasing&quot;,&quot;decreasing&quot;],dflt:&quot;increasing&quot;,editType:&quot;calc&quot;},currentbin:{valType:&quot;enumerated&quot;,values:[&quot;include&quot;,&quot;exclude&quot;,&quot;half&quot;],dflt:&quot;include&quot;,editType:&quot;calc&quot;},editType:&quot;calc&quot;},autobinx:{valType:&quot;boolean&quot;,dflt:null,editType:&quot;calc&quot;,impliedEdits:{&quot;xbins.start&quot;:void 0,&quot;xbins.end&quot;:void 0,&quot;xbins.size&quot;:void 0}},nbinsx:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;calc&quot;},xbins:i(&quot;x&quot;),autobiny:{valType:&quot;boolean&quot;,dflt:null,editType:&quot;calc&quot;,impliedEdits:{&quot;ybins.start&quot;:void 0,&quot;ybins.end&quot;:void 0,&quot;ybins.size&quot;:void 0}},nbinsy:{valType:&quot;integer&quot;,min:0,dflt:0,editType:&quot;calc&quot;},ybins:i(&quot;y&quot;),marker:n.marker,selected:n.selected,unselected:n.unselected,_deprecated:{bardir:n._deprecated.bardir}}},{&quot;../bar/attributes&quot;:835}],962:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r=t.length,n=0,i=0;i&lt;r;i++)e[i]?(t[i]/=e[i],n+=t[i]):t[i]=null;return n}},{}],963:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){return r(&quot;histnorm&quot;),n.forEach(function(t){r(t+&quot;bins.start&quot;),r(t+&quot;bins.end&quot;),r(t+&quot;bins.size&quot;),!1!==r(&quot;autobin&quot;+t)&amp;&amp;r(&quot;nbins&quot;+t)}),e}},{}],964:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;);e.exports={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,i){var a=i[e];return n(a)?(a=Number(a),r[t]+=a,a):0},avg:function(t,e,r,i,a){var o=i[e];return n(o)&amp;&amp;(o=Number(o),r[t]+=o,a[t]++),0},min:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]&gt;a){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]&lt;a){var o=a-r[t];return r[t]=a,o}}return 0}}},{&quot;fast-isnumeric&quot;:213}],965:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../constants/numerical&quot;),i=n.ONEAVGYEAR,a=n.ONEAVGMONTH,o=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,c=n.ONESEC,u=t(&quot;../../plots/cartesian/axes&quot;).tickIncrement;function f(t,e,r,n){if(t*e&lt;=0)return 1/0;for(var i=Math.abs(e-t),a=&quot;date&quot;===r.type,o=h(i,a),s=0;s&lt;10;s++){var l=h(80*o,a);if(o===l)break;if(!p(l,t,e,a,r,n))break;o=l}return o}function h(t,e){return e&amp;&amp;t&gt;c?t&gt;o?t&gt;1.1*i?i:t&gt;1.1*a?a:o:t&gt;s?s:t&gt;l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&amp;&amp;t&gt;o){var l=d(e,a,s),c=d(r,a,s),u=t===i?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)&gt;.1}function d(t,e,r){var n=e.c2d(t,i,r).split(&quot;-&quot;);return&quot;&quot;===n[0]&amp;&amp;(n.unshift(),n[0]=&quot;-&quot;+n[0]),n}e.exports=function(t,e,r,n,a){var s,l,c=-1.1*e,h=-.1*e,p=t-h,d=r[0],g=r[1],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m&gt;v&amp;&amp;v&lt;Math.abs(g-d)/4e3?(s=m,l=!1):(s=Math.min(m,v),l=!0),&quot;date&quot;===n.type&amp;&amp;s&gt;o){var y=s===i?1:6,x=s===i?&quot;M12&quot;:&quot;M1&quot;;return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf(&quot;-&quot;,y);s&gt;0&amp;&amp;(o=o.substr(0,s));var c=n.d2c(o,0,a);if(c&lt;e){var f=u(c,x,!1,a);(c+f)/2&lt;e+t&amp;&amp;(c=f)}return r&amp;&amp;l?u(c,x,!0,a):c}}return function(e,r){var n=s*Math.round(e/s);return n+s/10&lt;e&amp;&amp;n+.9*s&lt;e+t&amp;&amp;(n+=s),r&amp;&amp;l&amp;&amp;(n-=s),n}}},{&quot;../../constants/numerical&quot;:670,&quot;../../plots/cartesian/axes&quot;:742}],966:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;../bar/arrays_to_calcdata&quot;),s=t(&quot;./bin_functions&quot;),l=t(&quot;./norm_functions&quot;),c=t(&quot;./average&quot;),u=t(&quot;./clean_bins&quot;),f=t(&quot;../../constants/numerical&quot;).ONEAVGMONTH,h=t(&quot;./bin_label_vals&quot;);function p(t,e,r,i,o){var s,l,c,u,f,h=i+&quot;bins&quot;,p=&quot;overlay&quot;===t._fullLayout.barmode;if(e._autoBinFinished)delete e._autoBinFinished;else{var v=p?[e]:g(t,e),y=[],x=1/0,b=1/0,_=-1/0,w=&quot;autobin&quot;+i;for(s=0;s&lt;v.length;s++){f=(l=v[s])._pos0=r.makeCalcdata(l,i);var k=l[h];if(l[w]||!k||null===k.start||null===k.end){c=l[i+&quot;calendar&quot;];var M=l.cumulative;if(k=a.autoBin(f,r,l[&quot;nbins&quot;+i],!1,c),p&amp;&amp;0===k._dataSpan&amp;&amp;&quot;category&quot;!==r.type){if(o)return[k,f,!0];k=d(t,e,r,i,h)}M.enabled&amp;&amp;&quot;include&quot;!==M.currentbin&amp;&amp;(&quot;decreasing&quot;===M.direction?b=Math.min(b,r.r2c(k.start,0,c)-k.size):_=Math.max(_,r.r2c(k.end,0,c)+k.size)),y.push(l)}else u||(u={size:k.size,start:r.r2c(k.start,0,c),end:r.r2c(k.end,0,c)});x=m(x,k.size),b=Math.min(b,r.r2c(k.start,0,c)),_=Math.max(_,r.r2c(k.end,0,c)),s&amp;&amp;(l._autoBinFinished=1)}if(u&amp;&amp;n(u.size)&amp;&amp;n(x)){x=x&gt;u.size/1.9?u.size:u.size/Math.ceil(u.size/x);var A=u.start+(u.size-x)/2;b=A-x*Math.ceil((A-b)/x)}for(s=0;s&lt;y.length;s++)c=(l=y[s])[i+&quot;calendar&quot;],l._input[h]=l[h]={start:r.c2r(b,0,c),end:r.c2r(_,0,c),size:x},l._input[w]=l[w]}return f=e._pos0,delete e._pos0,[e[h],f]}function d(t,e,r,n,a){var o,s,l=g(t,e),c=!1,u=1/0,f=[e];for(o=0;o&lt;l.length;o++)if((s=l[o])===e)c=!0;else if(c){var h=p(t,s,r,n,!0),d=h[0],m=h[2];s._autoBinFinished=1,s._pos0=h[1],m?f.push(s):u=Math.min(u,d.size)}else u=Math.min(u,s[a].size);var v=new Array(f.length);for(o=0;o&lt;f.length;o++)for(var y=f[o]._pos0,x=0;x&lt;y.length;x++)if(void 0!==y[x]){v[o]=y[x];break}for(isFinite(u)||(u=i.distinctVals(v).minDiff),o=0;o&lt;f.length;o++){var b=(s=f[o])[n+&quot;calendar&quot;];s._input[a]=s[a]={start:r.c2r(v[o]-u/2,0,b),end:r.c2r(v[o]+u/2,0,b),size:u}}return e[a]}function g(t,e){for(var r=e.xaxis,n=e.yaxis,i=e.orientation,a=[],o=t._fullData,s=0;s&lt;o.length;s++){var l=o[s];&quot;histogram&quot;===l.type&amp;&amp;!0===l.visible&amp;&amp;l.orientation===i&amp;&amp;l.xaxis===r&amp;&amp;l.yaxis===n&amp;&amp;a.push(l)}return a}function m(t,e){if(t===1/0)return e;var r=v(t);return v(e)&lt;r?e:t}function v(t){return n(t)?t:&quot;string&quot;==typeof t&amp;&amp;&quot;M&quot;===t.charAt(0)?f*+t.substr(1):1/0}e.exports=function(t,e){if(!0===e.visible){var r,f=[],d=[],g=a.getFromId(t,&quot;h&quot;===e.orientation?e.yaxis||&quot;y&quot;:e.xaxis||&quot;x&quot;),m=&quot;h&quot;===e.orientation?&quot;y&quot;:&quot;x&quot;,v={x:&quot;y&quot;,y:&quot;x&quot;}[m],y=e[m+&quot;calendar&quot;],x=e.cumulative;u(e,g,m);var b,_,w,k=p(t,e,g,m),M=k[0],A=k[1],T=&quot;string&quot;==typeof M.size,S=[],E=T?S:M,C=[],L=[],z=[],P=0,O=e.histnorm,I=e.histfunc,D=-1!==O.indexOf(&quot;density&quot;);x.enabled&amp;&amp;D&amp;&amp;(O=O.replace(/ ?density$/,&quot;&quot;),D=!1);var R,B=&quot;max&quot;===I||&quot;min&quot;===I?null:0,F=s.count,N=l[O],j=!1,V=function(t){return g.r2c(t,0,y)};for(i.isArrayOrTypedArray(e[v])&amp;&amp;&quot;count&quot;!==I&amp;&amp;(R=e[v],j=&quot;avg&quot;===I,F=s[I]),r=V(M.start),_=V(M.end)+(r-a.tickIncrement(r,M.size,!1,y))/1e6;r&lt;_&amp;&amp;f.length&lt;1e6&amp;&amp;(b=a.tickIncrement(r,M.size,!1,y),f.push((r+b)/2),d.push(B),z.push([]),S.push(r),D&amp;&amp;C.push(1/(b-r)),j&amp;&amp;L.push(0),!(b&lt;=r));)r=b;S.push(r),T||&quot;date&quot;!==g.type||(E={start:V(E.start),end:V(E.end),size:E.size});var U,q=d.length,H=!0,G=1/0,W=1/0,Y={};for(r=0;r&lt;A.length;r++){var X=A[r];(w=i.findBin(X,E))&gt;=0&amp;&amp;w&lt;q&amp;&amp;(P+=F(w,r,d,R,L),H&amp;&amp;z[w].length&amp;&amp;X!==A[z[w][0]]&amp;&amp;(H=!1),z[w].push(r),Y[r]=w,G=Math.min(G,X-S[w]),W=Math.min(W,S[w+1]-X))}H||(U=h(G,W,S,g,y)),j&amp;&amp;(P=c(d,L)),N&amp;&amp;N(d,P,C),x.enabled&amp;&amp;function(t,e,r){var n,i,a;function o(e){a=t[e],t[e]/=2}function s(e){i=t[e],t[e]=a+i/2,a+=i}if(&quot;half&quot;===r)if(&quot;increasing&quot;===e)for(o(0),n=1;n&lt;t.length;n++)s(n);else for(o(t.length-1),n=t.length-2;n&gt;=0;n--)s(n);else if(&quot;increasing&quot;===e){for(n=1;n&lt;t.length;n++)t[n]+=t[n-1];&quot;exclude&quot;===r&amp;&amp;(t.unshift(0),t.pop())}else{for(n=t.length-2;n&gt;=0;n--)t[n]+=t[n+1];&quot;exclude&quot;===r&amp;&amp;(t.push(0),t.shift())}}(d,x.direction,x.currentbin);var Z=Math.min(f.length,d.length),$=[],J=0,K=Z-1;for(r=0;r&lt;Z;r++)if(d[r]){J=r;break}for(r=Z-1;r&gt;=J;r--)if(d[r]){K=r;break}for(r=J;r&lt;=K;r++)if(n(f[r])&amp;&amp;n(d[r])){var Q={p:f[r],s:d[r],b:0};x.enabled||(Q.pts=z[r],H?Q.ph0=Q.ph1=z[r].length?A[z[r][0]]:f[r]:(Q.ph0=U(S[r]),Q.ph1=U(S[r+1],!0))),$.push(Q)}return 1===$.length&amp;&amp;($[0].width1=a.tickIncrement($[0].p,M.size,!1,y)-$[0].p),o($,e),i.isArrayOrTypedArray(e.selectedpoints)&amp;&amp;i.tagSelected($,e,Y),$}}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../bar/arrays_to_calcdata&quot;:834,&quot;./average&quot;:962,&quot;./bin_functions&quot;:964,&quot;./bin_label_vals&quot;:965,&quot;./clean_bins&quot;:967,&quot;./norm_functions&quot;:972,&quot;fast-isnumeric&quot;:213}],967:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;).cleanDate,a=t(&quot;../../constants/numerical&quot;),o=a.ONEDAY,s=a.BADNUM;e.exports=function(t,e,r){var a=e.type,l=r+&quot;bins&quot;,c=t[l];c||(c=t[l]={});var u=&quot;date&quot;===a?function(t){return t||0===t?i(t,s,c.calendar):null}:function(t){return n(t)?Number(t):null};c.start=u(c.start),c.end=u(c.end);var f=&quot;date&quot;===a?o:1,h=c.size;if(n(h))c.size=h&gt;0?Number(h):f;else if(&quot;string&quot;!=typeof h)c.size=f;else{var p=h.charAt(0),d=h.substr(1);((d=n(d)?Number(d):0)&lt;=0||&quot;date&quot;!==a||&quot;M&quot;!==p||d!==Math.round(d))&amp;&amp;(c.size=f)}var g=&quot;autobin&quot;+r;&quot;boolean&quot;!=typeof t[g]&amp;&amp;(t[g]=t._fullInput[g]=t._input[g]=!((c.start||0===c.start)&amp;&amp;(c.end||0===c.end))),t[g]||(delete t[&quot;nbins&quot;+r],delete t._fullInput[&quot;nbins&quot;+r])}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;fast-isnumeric&quot;:213}],968:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;./bin_defaults&quot;),s=t(&quot;../bar/style_defaults&quot;),l=t(&quot;./attributes&quot;);e.exports=function(t,e,r,c){function u(r,n){return i.coerce(t,e,l,r,n)}var f=u(&quot;x&quot;),h=u(&quot;y&quot;);u(&quot;cumulative.enabled&quot;)&amp;&amp;(u(&quot;cumulative.direction&quot;),u(&quot;cumulative.currentbin&quot;)),u(&quot;text&quot;);var p=u(&quot;orientation&quot;,h&amp;&amp;!f?&quot;h&quot;:&quot;v&quot;),d=&quot;v&quot;===p?&quot;x&quot;:&quot;y&quot;,g=&quot;v&quot;===p?&quot;y&quot;:&quot;x&quot;,m=f&amp;&amp;h?Math.min(f.length&amp;&amp;h.length):(e[d]||[]).length;if(m){e._length=m,n.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;,&quot;y&quot;],c),e[g]&amp;&amp;u(&quot;histfunc&quot;),o(t,e,u,[d]),s(t,e,u,r,c);var v=n.getComponentMethod(&quot;errorbars&quot;,&quot;supplyDefaults&quot;);v(t,e,a.defaultLine,{axis:&quot;y&quot;}),v(t,e,a.defaultLine,{axis:&quot;x&quot;,inherit:&quot;y&quot;}),i.coerceSelectionMarkerOpacity(e,u)}else e.visible=!1}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;../bar/style_defaults&quot;:847,&quot;./attributes&quot;:961,&quot;./bin_defaults&quot;:963}],969:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i){if(t.x=&quot;xVal&quot;in e?e.xVal:e.x,t.y=&quot;yVal&quot;in e?e.yVal:e.y,e.xa&amp;&amp;(t.xaxis=e.xa),e.ya&amp;&amp;(t.yaxis=e.ya),!(r.cumulative||{}).enabled){var a,o=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;if(t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,r._indexToPoints){a=[];for(var s=0;s&lt;o.length;s++)a=a.concat(r._indexToPoints[o[s]])}else a=o;t.pointIndices=a}return t}},{}],970:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../bar/hover&quot;).hoverPoints,i=t(&quot;../../plots/cartesian/axes&quot;).hoverLabelText;e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o){var s=(t=o[0]).cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var c=&quot;h&quot;===l.orientation?&quot;y&quot;:&quot;x&quot;;t[c+&quot;Label&quot;]=i(t[c+&quot;a&quot;],s.ph0,s.ph1)}return o}}},{&quot;../../plots/cartesian/axes&quot;:742,&quot;../bar/hover&quot;:839}],971:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.layoutAttributes=t(&quot;../bar/layout_attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.supplyLayoutDefaults=t(&quot;../bar/layout_defaults&quot;),n.calc=t(&quot;./calc&quot;),n.crossTraceCalc=t(&quot;../bar/cross_trace_calc&quot;).crossTraceCalc,n.plot=t(&quot;../bar/plot&quot;),n.layerName=&quot;barlayer&quot;,n.style=t(&quot;../bar/style&quot;).style,n.styleOnSelect=t(&quot;../bar/style&quot;).styleOnSelect,n.colorbar=t(&quot;../scatter/marker_colorbar&quot;),n.hoverPoints=t(&quot;./hover&quot;),n.selectPoints=t(&quot;../bar/select&quot;),n.eventData=t(&quot;./event_data&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;histogram&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;bar&quot;,&quot;histogram&quot;,&quot;oriented&quot;,&quot;errorBarsOK&quot;,&quot;showLegend&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;../bar/cross_trace_calc&quot;:837,&quot;../bar/layout_attributes&quot;:841,&quot;../bar/layout_defaults&quot;:842,&quot;../bar/plot&quot;:843,&quot;../bar/select&quot;:844,&quot;../bar/style&quot;:846,&quot;../scatter/marker_colorbar&quot;:1050,&quot;./attributes&quot;:961,&quot;./calc&quot;:966,&quot;./defaults&quot;:968,&quot;./event_data&quot;:969,&quot;./hover&quot;:970}],972:[function(t,e,r){&quot;use strict&quot;;e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;i&lt;r;i++)t[i]*=n},probability:function(t,e){for(var r=t.length,n=0;n&lt;r;n++)t[n]/=e},density:function(t,e,r,n){var i=t.length;n=n||1;for(var a=0;a&lt;i;a++)t[a]*=r[a]*n},&quot;probability density&quot;:function(t,e,r,n){var i=t.length;n&amp;&amp;(e/=n);for(var a=0;a&lt;i;a++)t[a]*=r[a]/e}}},{}],973:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../histogram/attributes&quot;),i=t(&quot;../heatmap/attributes&quot;),a=t(&quot;../../components/colorscale/attributes&quot;),o=t(&quot;../../components/colorbar/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat;e.exports=s({x:n.x,y:n.y,z:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},marker:{color:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},editType:&quot;calc&quot;},histnorm:n.histnorm,histfunc:n.histfunc,autobinx:n.autobinx,nbinsx:n.nbinsx,xbins:n.xbins,autobiny:n.autobiny,nbinsy:n.nbinsy,ybins:n.ybins,xgap:i.xgap,ygap:i.ygap,zsmooth:i.zsmooth,zhoverformat:i.zhoverformat},a(&quot;&quot;,{cLetter:&quot;z&quot;,autoColorDflt:!1}),{colorbar:o})},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../heatmap/attributes&quot;:942,&quot;../histogram/attributes&quot;:961}],974:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../histogram/bin_functions&quot;),o=t(&quot;../histogram/norm_functions&quot;),s=t(&quot;../histogram/average&quot;),l=t(&quot;../histogram/clean_bins&quot;),c=t(&quot;../histogram/bin_label_vals&quot;);function u(t,e,r,n,a,o,s){var c=e+&quot;bins&quot;,u=&quot;autobin&quot;+e,f=t[c];l(t,n,e),!t[u]&amp;&amp;f&amp;&amp;null!==f.start&amp;&amp;null!==f.end||(f=i.autoBin(r,n,t[&quot;nbins&quot;+e],&quot;2d&quot;,s),&quot;histogram2dcontour&quot;===t.type&amp;&amp;(f.start=o(i.tickIncrement(a(f.start),f.size,!0,s)),f.end=o(i.tickIncrement(a(f.end),f.size,!1,s))),t._input[c]=t[c]=f,t._input[u]=t[u])}function f(t,e,r,n){var i,a=new Array(t);if(n)for(i=0;i&lt;t;i++)a[i]=1/(e[i+1]-e[i]);else{var o=1/r;for(i=0;i&lt;t;i++)a[i]=o}return a}function h(t,e){return{start:t(e.start),end:t(e.end),size:e.size}}function p(t,e,r,n,i,a){var o,s=t.length-1,l=new Array(s);if(e)for(o=0;o&lt;s;o++)l[o]=[e[o],e[o]];else{var u=c(r,n,t,i,a);for(o=0;o&lt;s;o++)l[o]=[u(t[o]),u(t[o+1],!0)]}return l}e.exports=function(t,e){var r,l,c,d,g=i.getFromId(t,e.xaxis||&quot;x&quot;),m=e.x?g.makeCalcdata(e,&quot;x&quot;):[],v=i.getFromId(t,e.yaxis||&quot;y&quot;),y=e.y?v.makeCalcdata(e,&quot;y&quot;):[],x=e.xcalendar,b=e.ycalendar,_=function(t){return g.r2c(t,0,x)},w=function(t){return v.r2c(t,0,b)},k=function(t){return g.c2r(t,0,x)},M=function(t){return v.c2r(t,0,b)},A=e._length;m.length&gt;A&amp;&amp;m.splice(A,m.length-A),y.length&gt;A&amp;&amp;y.splice(A,y.length-A),u(e,&quot;x&quot;,m,g,_,k,x),u(e,&quot;y&quot;,y,v,w,M,b);var T=[],S=[],E=[],C=&quot;string&quot;==typeof e.xbins.size,L=&quot;string&quot;==typeof e.ybins.size,z=[],P=[],O=C?z:e.xbins,I=L?P:e.ybins,D=0,R=[],B=[],F=e.histnorm,N=e.histfunc,j=-1!==F.indexOf(&quot;density&quot;),V=&quot;max&quot;===N||&quot;min&quot;===N?null:0,U=a.count,q=o[F],H=!1,G=[],W=[],Y=&quot;z&quot;in e?e.z:&quot;marker&quot;in e&amp;&amp;Array.isArray(e.marker.color)?e.marker.color:&quot;&quot;;Y&amp;&amp;&quot;count&quot;!==N&amp;&amp;(H=&quot;avg&quot;===N,U=a[N]);var X=e.xbins,Z=_(X.start),$=_(X.end)+(Z-i.tickIncrement(Z,X.size,!1,x))/1e6;for(r=Z;r&lt;$;r=i.tickIncrement(r,X.size,!1,x))S.push(V),z.push(r),H&amp;&amp;E.push(0);z.push(r);var J=S.length,K=_(e.xbins.start),Q=(r-K)/J,tt=k(K+Q/2);for(Z=w((X=e.ybins).start),$=w(X.end)+(Z-i.tickIncrement(Z,X.size,!1,b))/1e6,r=Z;r&lt;$;r=i.tickIncrement(r,X.size,!1,b)){T.push(S.slice()),P.push(r);var et=new Array(J);for(l=0;l&lt;J;l++)et[l]=[];B.push(et),H&amp;&amp;R.push(E.slice())}P.push(r);var rt=T.length,nt=w(e.ybins.start),it=(r-nt)/rt,at=M(nt+it/2);j&amp;&amp;(G=f(S.length,O,Q,C),W=f(T.length,I,it,L)),C||&quot;date&quot;!==g.type||(O=h(_,O)),L||&quot;date&quot;!==v.type||(I=h(w,I));var ot=!0,st=!0,lt=new Array(J),ct=new Array(rt),ut=1/0,ft=1/0,ht=1/0,pt=1/0;for(r=0;r&lt;A;r++){var dt=m[r],gt=y[r];c=n.findBin(dt,O),d=n.findBin(gt,I),c&gt;=0&amp;&amp;c&lt;J&amp;&amp;d&gt;=0&amp;&amp;d&lt;rt&amp;&amp;(D+=U(c,r,T[d],Y,R[d]),B[d][c].push(r),ot&amp;&amp;(void 0===lt[c]?lt[c]=dt:lt[c]!==dt&amp;&amp;(ot=!1)),st&amp;&amp;(void 0===ct[c]?ct[c]=gt:ct[c]!==gt&amp;&amp;(st=!1)),ut=Math.min(ut,dt-z[c]),ft=Math.min(ft,z[c+1]-dt),ht=Math.min(ht,gt-P[d]),pt=Math.min(pt,P[d+1]-gt))}if(H)for(d=0;d&lt;rt;d++)D+=s(T[d],R[d]);if(q)for(d=0;d&lt;rt;d++)q(T[d],D,G,W[d]);return{x:m,xRanges:p(z,ot&amp;&amp;lt,ut,ft,g,x),x0:tt,dx:Q,y:y,yRanges:p(P,st&amp;&amp;ct,ht,pt,v,b),y0:at,dy:it,z:T,pts:B}}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../histogram/average&quot;:962,&quot;../histogram/bin_functions&quot;:964,&quot;../histogram/bin_label_vals&quot;:965,&quot;../histogram/clean_bins&quot;:967,&quot;../histogram/norm_functions&quot;:972}],975:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./sample_defaults&quot;),a=t(&quot;../heatmap/style_defaults&quot;),o=t(&quot;../../components/colorscale/defaults&quot;),s=t(&quot;./attributes&quot;);e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&amp;&amp;(a(t,e,c,l),o(t,e,l,c,{prefix:&quot;&quot;,cLetter:&quot;z&quot;}))}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../lib&quot;:693,&quot;../heatmap/style_defaults&quot;:956,&quot;./attributes&quot;:973,&quot;./sample_defaults&quot;:978}],976:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../heatmap/hover&quot;),i=t(&quot;../../plots/cartesian/axes&quot;).hoverLabelText;e.exports=function(t,e,r,a,o,s){var l=n(t,e,r,a,o,s);if(l){var c=(t=l[0]).index,u=c[0],f=c[1],h=t.cd[0],p=h.xRanges[f],d=h.yRanges[u];return t.xLabel=i(t.xa,p[0],p[1]),t.yLabel=i(t.ya,d[0],d[1]),l}}},{&quot;../../plots/cartesian/axes&quot;:742,&quot;../heatmap/hover&quot;:949}],977:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;../heatmap/calc&quot;),n.plot=t(&quot;../heatmap/plot&quot;),n.layerName=&quot;heatmaplayer&quot;,n.colorbar=t(&quot;../heatmap/colorbar&quot;),n.style=t(&quot;../heatmap/style&quot;),n.hoverPoints=t(&quot;./hover&quot;),n.eventData=t(&quot;../histogram/event_data&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;histogram2d&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;2dMap&quot;,&quot;histogram&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;../heatmap/calc&quot;:943,&quot;../heatmap/colorbar&quot;:945,&quot;../heatmap/plot&quot;:954,&quot;../heatmap/style&quot;:955,&quot;../histogram/event_data&quot;:969,&quot;./attributes&quot;:973,&quot;./defaults&quot;:975,&quot;./hover&quot;:976}],978:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../histogram/bin_defaults&quot;);e.exports=function(t,e,r,a){var o=r(&quot;x&quot;),s=r(&quot;y&quot;);if(o&amp;&amp;o.length&amp;&amp;s&amp;&amp;s.length){e._length=Math.min(o.length,s.length),n.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;,&quot;y&quot;],a),(r(&quot;z&quot;)||r(&quot;marker.color&quot;))&amp;&amp;r(&quot;histfunc&quot;);i(t,e,r,[&quot;x&quot;,&quot;y&quot;])}else e.visible=!1}},{&quot;../../registry&quot;:825,&quot;../histogram/bin_defaults&quot;:963}],979:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../histogram2d/attributes&quot;),i=t(&quot;../contour/attributes&quot;),a=t(&quot;../../components/colorscale/attributes&quot;),o=t(&quot;../../components/colorbar/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat;e.exports=s({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,autobinx:n.autobinx,nbinsx:n.nbinsx,xbins:n.xbins,autobiny:n.autobiny,nbinsy:n.nbinsy,ybins:n.ybins,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:i.line,zhoverformat:n.zhoverformat},a(&quot;&quot;,{cLetter:&quot;z&quot;,editTypeOverride:&quot;calc&quot;}),{colorbar:o})},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../contour/attributes&quot;:913,&quot;../histogram2d/attributes&quot;:973}],980:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../histogram2d/sample_defaults&quot;),a=t(&quot;../contour/contours_defaults&quot;),o=t(&quot;../contour/style_defaults&quot;),s=t(&quot;./attributes&quot;);e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&amp;&amp;(a(t,e,c,function(r){return n.coerce2(t,e,s,r)}),o(t,e,c,l))}},{&quot;../../lib&quot;:693,&quot;../contour/contours_defaults&quot;:920,&quot;../contour/style_defaults&quot;:934,&quot;../histogram2d/sample_defaults&quot;:978,&quot;./attributes&quot;:979}],981:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;../contour/calc&quot;),n.plot=t(&quot;../contour/plot&quot;).plot,n.layerName=&quot;contourlayer&quot;,n.style=t(&quot;../contour/style&quot;),n.colorbar=t(&quot;../contour/colorbar&quot;),n.hoverPoints=t(&quot;../contour/hover&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;histogram2dcontour&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;2dMap&quot;,&quot;contour&quot;,&quot;histogram&quot;,&quot;showLegend&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;../contour/calc&quot;:914,&quot;../contour/colorbar&quot;:916,&quot;../contour/hover&quot;:926,&quot;../contour/plot&quot;:931,&quot;../contour/style&quot;:933,&quot;./attributes&quot;:979,&quot;./defaults&quot;:980}],982:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/attributes&quot;),i=t(&quot;../../components/colorbar/attributes&quot;),a=t(&quot;../surface/attributes&quot;),o=t(&quot;../../plots/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat;e.exports=s({x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},y:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},z:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},i:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},j:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},k:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},text:{valType:&quot;string&quot;,dflt:&quot;&quot;,arrayOk:!0,editType:&quot;calc&quot;},delaunayaxis:{valType:&quot;enumerated&quot;,values:[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],dflt:&quot;z&quot;,editType:&quot;calc&quot;},alphahull:{valType:&quot;number&quot;,dflt:-1,editType:&quot;calc&quot;},intensity:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},color:{valType:&quot;color&quot;,editType:&quot;calc&quot;},vertexcolor:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},facecolor:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;}},n(&quot;&quot;,{colorAttr:&quot;`intensity`&quot;,showScaleDflt:!0,editTypeOverride:&quot;calc&quot;}),{colorbar:i,opacity:a.opacity,flatshading:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},contour:{show:s({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:&quot;calc&quot;},lightposition:{x:s({},a.lightposition.x,{dflt:1e5}),y:s({},a.lightposition.y,{dflt:1e5}),z:s({},a.lightposition.z,{dflt:0}),editType:&quot;calc&quot;},lighting:s({vertexnormalsepsilon:{valType:&quot;number&quot;,min:0,max:1,dflt:1e-12,editType:&quot;calc&quot;},facenormalsepsilon:{valType:&quot;number&quot;,min:0,max:1,dflt:1e-6,editType:&quot;calc&quot;},editType:&quot;calc&quot;},a.lighting),hoverinfo:s({},o.hoverinfo,{editType:&quot;calc&quot;})})},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../surface/attributes&quot;:1119}],983:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/calc&quot;);e.exports=function(t,e){e.intensity&amp;&amp;n(e,e.intensity,&quot;&quot;,&quot;c&quot;)}},{&quot;../../components/colorscale/calc&quot;:575}],984:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-mesh3d&quot;),i=t(&quot;delaunay-triangulate&quot;),a=t(&quot;alpha-shape&quot;),o=t(&quot;convex-hull&quot;),s=t(&quot;../../lib/gl_format_color&quot;).parseColorScale,l=t(&quot;../../lib/str2rgbarray&quot;),c=t(&quot;../../plots/gl3d/zip3&quot;);function u(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=&quot;&quot;,this.color=&quot;#fff&quot;,this.data=null,this.showContour=!1}var f=u.prototype;function h(t){return t.map(l)}f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.text;return Array.isArray(r)&amp;&amp;void 0!==r[e]?t.textLabel=r[e]:r&amp;&amp;(t.textLabel=r),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}this.data=t;var u,f=c(n(r.xaxis,t.x,e.dataScale[0],t.xcalendar),n(r.yaxis,t.y,e.dataScale[1],t.ycalendar),n(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&amp;&amp;t.j&amp;&amp;t.k)u=c(t.i,t.j,t.k);else if(0===t.alphahull)u=o(f);else if(t.alphahull&gt;0)u=a(t.alphahull,f);else{var p=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;].indexOf(t.delaunayaxis);u=i(f.map(function(t){return[t[(p+1)%3],t[(p+2)%3]]}))}var d={positions:f,cells:u,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:l(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color=&quot;#fff&quot;,d.vertexIntensity=t.intensity,d.vertexIntensityBounds=[t.cmin,t.cmax],d.colormap=s(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolor[0],d.vertexColors=h(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],d.cellColors=h(t.facecolor)):(this.color=t.color,d.meshColor=l(t.color)),this.mesh.update(d)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new u(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{&quot;../../lib/gl_format_color&quot;:689,&quot;../../lib/str2rgbarray&quot;:717,&quot;../../plots/gl3d/zip3&quot;:795,&quot;alpha-shape&quot;:51,&quot;convex-hull&quot;:117,&quot;delaunay-triangulate&quot;:149,&quot;gl-mesh3d&quot;:267}],985:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../components/colorscale/defaults&quot;),o=t(&quot;./attributes&quot;);e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function c(t){var e=t.map(function(t){var e=l(t);return e&amp;&amp;i.isArrayOrTypedArray(e)?e:null});return e.every(function(t){return t&amp;&amp;t.length===e[0].length})&amp;&amp;e}var u=c([&quot;x&quot;,&quot;y&quot;,&quot;z&quot;]),f=c([&quot;i&quot;,&quot;j&quot;,&quot;k&quot;]);u?(f&amp;&amp;f.forEach(function(t){for(var e=0;e&lt;t.length;++e)t[e]|=0}),n.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],s),[&quot;lighting.ambient&quot;,&quot;lighting.diffuse&quot;,&quot;lighting.specular&quot;,&quot;lighting.roughness&quot;,&quot;lighting.fresnel&quot;,&quot;lighting.vertexnormalsepsilon&quot;,&quot;lighting.facenormalsepsilon&quot;,&quot;lightposition.x&quot;,&quot;lightposition.y&quot;,&quot;lightposition.z&quot;,&quot;contour.show&quot;,&quot;contour.color&quot;,&quot;contour.width&quot;,&quot;colorscale&quot;,&quot;reversescale&quot;,&quot;flatshading&quot;,&quot;alphahull&quot;,&quot;delaunayaxis&quot;,&quot;opacity&quot;].forEach(function(t){l(t)}),&quot;intensity&quot;in t?(l(&quot;intensity&quot;),a(t,e,s,l,{prefix:&quot;&quot;,cLetter:&quot;c&quot;})):(e.showscale=!1,&quot;facecolor&quot;in t?l(&quot;facecolor&quot;):&quot;vertexcolor&quot;in t?l(&quot;vertexcolor&quot;):l(&quot;color&quot;,r)),l(&quot;text&quot;),e._length=null):e.visible=!1}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./attributes&quot;:982}],986:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;./calc&quot;),n.colorbar={min:&quot;cmin&quot;,max:&quot;cmax&quot;},n.plot=t(&quot;./convert&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;mesh3d&quot;,n.basePlotModule=t(&quot;../../plots/gl3d&quot;),n.categories=[&quot;gl3d&quot;],n.meta={},e.exports=n},{&quot;../../plots/gl3d&quot;:784,&quot;./attributes&quot;:982,&quot;./calc&quot;:983,&quot;./convert&quot;:984,&quot;./defaults&quot;:985}],987:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).extendFlat,i=t(&quot;../scatter/attributes&quot;),a=t(&quot;../../components/drawing/attributes&quot;).dash,o=i.line;function s(t){return{line:{color:n({},o.color,{dflt:t}),width:o.width,dash:a,editType:&quot;style&quot;},editType:&quot;style&quot;}}e.exports={x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},open:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},high:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},low:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},close:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},line:{width:n({},o.width,{}),dash:n({},a,{}),editType:&quot;style&quot;},increasing:s(&quot;#3D9970&quot;),decreasing:s(&quot;#FF4136&quot;),text:{valType:&quot;string&quot;,dflt:&quot;&quot;,arrayOk:!0,editType:&quot;calc&quot;},tickwidth:{valType:&quot;number&quot;,min:0,max:.5,dflt:.3,editType:&quot;calc&quot;}}},{&quot;../../components/drawing/attributes&quot;:591,&quot;../../lib&quot;:693,&quot;../scatter/attributes&quot;:1032}],988:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=n._,a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;../../constants/numerical&quot;).BADNUM;function s(t,e,r,n){return{o:t,h:e,l:r,c:n}}function l(t,e,r,n,s){for(var l=n.makeCalcdata(e,&quot;open&quot;),c=n.makeCalcdata(e,&quot;high&quot;),u=n.makeCalcdata(e,&quot;low&quot;),f=n.makeCalcdata(e,&quot;close&quot;),h=Array.isArray(e.text),p=!0,d=null,g=[],m=0;m&lt;r.length;m++){var v=r[m],y=l[m],x=c[m],b=u[m],_=f[m];if(v!==o&amp;&amp;y!==o&amp;&amp;x!==o&amp;&amp;b!==o&amp;&amp;_!==o){_===y?null!==d&amp;&amp;_!==d&amp;&amp;(p=_&gt;d):p=_&gt;y,d=_;var w=s(y,x,b,_);w.pos=v,w.yc=(y+_)/2,w.i=m,w.dir=p?&quot;increasing&quot;:&quot;decreasing&quot;,h&amp;&amp;(w.tx=e.text[m]),g.push(w)}}return e._extremes[n._id]=a.findExtremes(n,u.concat(c),{padded:!0}),g.length&amp;&amp;(g[0].t={labels:{open:i(t,&quot;open:&quot;)+&quot; &quot;,high:i(t,&quot;high:&quot;)+&quot; &quot;,low:i(t,&quot;low:&quot;)+&quot; &quot;,close:i(t,&quot;close:&quot;)+&quot; &quot;}}),g}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),o=function(t,e,r){var i=r._minDiff;if(!i){var a,o=t._fullData,s=[];for(i=1/0,a=0;a&lt;o.length;a++){var l=o[a];if(&quot;ohlc&quot;===l.type&amp;&amp;!0===l.visible&amp;&amp;l.xaxis===e._id){s.push(l);var c=e.makeCalcdata(l,&quot;x&quot;);l._xcalc=c;var u=n.distinctVals(c).minDiff;u&amp;&amp;isFinite(u)&amp;&amp;(i=Math.min(i,u))}}for(i===1/0&amp;&amp;(i=1),a=0;a&lt;s.length;a++)s[a]._minDiff=i}return i*r.tickwidth}(t,r,e),c=e._minDiff;e._minDiff=null;var u=e._xcalc;e._xcalc=null;var f=l(t,e,u,i,s);return e._extremes[r._id]=a.findExtremes(r,u,{vpad:c/2}),f.length?(n.extendFlat(f[0].t,{wHover:c/2,tickLen:o}),f):[{t:{empty:!0}}]},calcCommon:l}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742}],989:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./ohlc_defaults&quot;),a=t(&quot;./attributes&quot;);function o(t,e,r,n){r(n+&quot;.line.color&quot;),r(n+&quot;.line.width&quot;,e.line.width),r(n+&quot;.line.dash&quot;,e.line.dash)}e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,a,r,i)}i(t,e,l,s)?(l(&quot;line.width&quot;),l(&quot;line.dash&quot;),o(t,e,l,&quot;increasing&quot;),o(t,e,l,&quot;decreasing&quot;),l(&quot;text&quot;),l(&quot;tickwidth&quot;),s._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{&quot;../../lib&quot;:693,&quot;./attributes&quot;:987,&quot;./ohlc_defaults&quot;:992}],990:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/cartesian/axes&quot;),i=t(&quot;../../components/fx&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;../scatter/fill_hover_text&quot;),s={increasing:&quot;\u25b2&quot;,decreasing:&quot;\u25bc&quot;};e.exports=function(t,e,r,l){var c=t.cd,u=t.xa,f=t.ya,h=c[0].trace,p=c[0].t,d=h.type,g=&quot;ohlc&quot;===d?&quot;l&quot;:&quot;min&quot;,m=&quot;ohlc&quot;===d?&quot;h&quot;:&quot;max&quot;,v=p.bPos||0,y=e-v,x=p.bdPos||p.tickLen,b=p.wHover,_=Math.min(1,x/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0]))),w=t.maxHoverDistance-_,k=t.maxSpikeDistance-_;function M(t){var e=t.pos-y;return i.inbox(e-b,e+b,w)}function A(t){return i.inbox(t[g]-r,t[m]-r,w)}function T(t){return(M(t)+A(t))/2}var S=i.getDistanceFunction(l,M,A,T);if(i.getClosest(c,S,t),!1===t.index)return[];var E=c[t.index],C=t.index=E.i,L=E.dir,z=h[L],P=z.line.color;function O(t){return p.labels[t]+n.hoverLabelText(f,h[t][C])}a.opacity(P)&amp;&amp;z.line.width?t.color=P:t.color=z.fillcolor,t.x0=u.c2p(E.pos+v-x,!0),t.x1=u.c2p(E.pos+v+x,!0),t.xLabelVal=E.pos,t.spikeDistance=T(E)*k/w,t.xSpike=u.c2p(E.pos,!0);var I=h.hoverinfo,D=I.split(&quot;+&quot;),R=&quot;all&quot;===I,B=R||-1!==D.indexOf(&quot;y&quot;),F=R||-1!==D.indexOf(&quot;text&quot;),N=B?[O(&quot;open&quot;),O(&quot;high&quot;),O(&quot;low&quot;),O(&quot;close&quot;)+&quot;  &quot;+s[L]]:[];return F&amp;&amp;o(E,h,N),t.extraText=N.join(&quot;&lt;br&gt;&quot;),t.y0=t.y1=f.c2p(E.yc,!0),[t]}},{&quot;../../components/color&quot;:567,&quot;../../components/fx&quot;:609,&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/fill_hover_text&quot;:1040}],991:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;trace&quot;,name:&quot;ohlc&quot;,basePlotModule:t(&quot;../../plots/cartesian&quot;),categories:[&quot;cartesian&quot;,&quot;svg&quot;,&quot;showLegend&quot;],meta:{},attributes:t(&quot;./attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),calc:t(&quot;./calc&quot;).calc,plot:t(&quot;./plot&quot;),style:t(&quot;./style&quot;),hoverPoints:t(&quot;./hover&quot;),selectPoints:t(&quot;./select&quot;)}},{&quot;../../plots/cartesian&quot;:753,&quot;./attributes&quot;:987,&quot;./calc&quot;:988,&quot;./defaults&quot;:989,&quot;./hover&quot;:990,&quot;./plot&quot;:993,&quot;./select&quot;:994,&quot;./style&quot;:995}],992:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;);e.exports=function(t,e,r,i){var a=r(&quot;x&quot;),o=r(&quot;open&quot;),s=r(&quot;high&quot;),l=r(&quot;low&quot;),c=r(&quot;close&quot;);if(n.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;],i),o&amp;&amp;s&amp;&amp;l&amp;&amp;c){var u=Math.min(o.length,s.length,l.length,c.length);return a&amp;&amp;(u=Math.min(u,a.length)),e._length=u,u}}},{&quot;../../registry&quot;:825}],993:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;);e.exports=function(t,e,r,a){var o=e.xaxis,s=e.yaxis;i.makeTraceGroups(a,r,&quot;trace ohlc&quot;).each(function(t){var r=n.select(this),a=t[0],l=a.t,c=a.trace;if(e.isRangePlot||(a.node3=r),!0!==c.visible||l.empty)r.remove();else{var u=l.tickLen,f=r.selectAll(&quot;path&quot;).data(i.identity);f.enter().append(&quot;path&quot;),f.exit().remove(),f.attr(&quot;d&quot;,function(t){var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-u,!0),n=o.c2p(t.pos+u,!0);return&quot;M&quot;+r+&quot;,&quot;+s.c2p(t.o,!0)+&quot;H&quot;+e+&quot;M&quot;+e+&quot;,&quot;+s.c2p(t.h,!0)+&quot;V&quot;+s.c2p(t.l,!0)+&quot;M&quot;+n+&quot;,&quot;+s.c2p(t.c,!0)+&quot;H&quot;+e})}})}},{&quot;../../lib&quot;:693,d3:147}],994:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r&lt;n.length;r++)n[r].selected=0;else for(r=0;r&lt;n.length;r++){var l=n[r];e.contains([i.c2p(l.pos+s),a.c2p(l.yc)],null,l.i,t)?(o.push({pointNumber:l.i,x:i.c2d(l.pos),y:a.c2d(l.yc)}),l.selected=1):l.selected=0}return o}},{}],995:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/drawing&quot;),a=t(&quot;../../components/color&quot;);e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(&quot;g.ohlclayer&quot;).selectAll(&quot;g.trace&quot;);r.style(&quot;opacity&quot;,function(t){return t[0].trace.opacity}),r.each(function(t){var e=t[0].trace;n.select(this).selectAll(&quot;path&quot;).each(function(t){var r=e[t.dir].line;n.select(this).style(&quot;fill&quot;,&quot;none&quot;).call(a.stroke,r.color).call(i.dashLine,r.dash,r.width).style(&quot;opacity&quot;,e.selectedpoints&amp;&amp;!t.selected?.3:1)})})}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,d3:147}],996:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/attributes&quot;),i=t(&quot;../../components/colorbar/attributes&quot;),a=t(&quot;../../plots/cartesian/layout_attributes&quot;),o=t(&quot;../../plots/font_attributes&quot;),s=t(&quot;../../plots/domain&quot;).attributes,l=t(&quot;../../lib/extend&quot;).extendFlat,c=t(&quot;../../plot_api/plot_template&quot;).templatedArray;e.exports={domain:s({name:&quot;parcoords&quot;,trace:!0,editType:&quot;calc&quot;}),labelfont:o({editType:&quot;calc&quot;}),tickfont:o({editType:&quot;calc&quot;}),rangefont:o({editType:&quot;calc&quot;}),dimensions:c(&quot;dimension&quot;,{label:{valType:&quot;string&quot;,editType:&quot;calc&quot;},tickvals:l({},a.tickvals,{editType:&quot;calc&quot;}),ticktext:l({},a.ticktext,{editType:&quot;calc&quot;}),tickformat:{valType:&quot;string&quot;,dflt:&quot;3s&quot;,editType:&quot;calc&quot;},visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},range:{valType:&quot;info_array&quot;,items:[{valType:&quot;number&quot;,editType:&quot;calc&quot;},{valType:&quot;number&quot;,editType:&quot;calc&quot;}],editType:&quot;calc&quot;},constraintrange:{valType:&quot;info_array&quot;,freeLength:!0,dimensions:&quot;1-2&quot;,items:[{valType:&quot;number&quot;,editType:&quot;calc&quot;},{valType:&quot;number&quot;,editType:&quot;calc&quot;}],editType:&quot;calc&quot;},multiselect:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},values:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},editType:&quot;calc&quot;}),line:l(n(&quot;line&quot;,{colorscaleDflt:&quot;Viridis&quot;,autoColorDflt:!1,editTypeOverride:&quot;calc&quot;}),{colorbar:i,editType:&quot;calc&quot;})}},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/layout_attributes&quot;:754,&quot;../../plots/domain&quot;:767,&quot;../../plots/font_attributes&quot;:768}],997:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;),i=t(&quot;d3&quot;),a=t(&quot;../../lib/gup&quot;).keyFun,o=t(&quot;../../lib/gup&quot;).repeat,s=t(&quot;../../lib&quot;).sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function f(t,e){return t*(1-u)+e*u}function h(t,e,r){if(d(e,r))return e;for(var n=t[0],i=n,a=1;a&lt;t.length;a++){var o=t[a];if(e&lt;f(n,o))return c(n,i);if(e&lt;o||a===t.length-1)return c(o,n);i=n,n=o}}function p(t,e,r){if(d(e,r))return e;for(var n=t[t.length-1],i=n,a=t.length-2;a&gt;=0;a--){var o=t[a];if(e&gt;f(n,o))return c(n,i);if(e&gt;o||a===t.length-1)return c(o,n);i=n,n=o}}function d(t,e){for(var r=0;r&lt;e.length;r++)if(t&gt;=e[r][0]&amp;&amp;t&lt;=e[r][1])return!0;return!1}function g(t){t.attr(&quot;x&quot;,-n.bar.captureWidth/2).attr(&quot;width&quot;,n.bar.captureWidth)}function m(t){t.attr(&quot;visibility&quot;,&quot;visible&quot;).style(&quot;visibility&quot;,&quot;visible&quot;).attr(&quot;fill&quot;,&quot;yellow&quot;).attr(&quot;opacity&quot;,0)}function v(t){if(!t.brush.filterSpecified)return&quot;0,&quot;+t.height;for(var e,r,n,i=y(t.brush.filter.getConsolidated(),t.height),a=[0],o=i.length?i[0][0]:null,s=0;s&lt;i.length;s++)r=(e=i[s])[1]-e[0],a.push(o),a.push(r),(n=s+1)&lt;i.length&amp;&amp;(o=i[n][0]-e[1]);return a.push(t.height),a}function y(t,e){return t.map(function(t){return t.map(function(t){return t*e}).sort(s)})}function x(){i.select(document.body).style(&quot;cursor&quot;,null)}function b(t){t.attr(&quot;stroke-dasharray&quot;,v)}function _(t,e){var r=i.select(t).selectAll(&quot;.highlight, .highlight-shadow&quot;);b(e?r.transition().duration(n.bar.snapDuration).each(&quot;end&quot;,e):r)}function w(t,e){var r,i=t.brush,a=NaN,o={};if(i.filterSpecified){var s=t.height,l=i.filter.getConsolidated(),c=y(l,s),u=NaN,f=NaN,h=NaN;for(r=0;r&lt;=c.length;r++){var p=c[r];if(p&amp;&amp;p[0]&lt;=e&amp;&amp;e&lt;=p[1]){u=r;break}if(f=r?r-1:NaN,p&amp;&amp;p[0]&gt;e){h=r;break}}if(a=u,isNaN(a)&amp;&amp;(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]&lt;c[h][0]-e?f:h),!isNaN(a)){var d=c[a],g=function(t,e){var r=n.bar.handleHeight;if(!(e&gt;t[1]+r||e&lt;t[0]-r))return e&gt;=.9*t[1]+.1*t[0]?&quot;n&quot;:e&lt;=.9*t[0]+.1*t[1]?&quot;s&quot;:&quot;ns&quot;}(d,e);g&amp;&amp;(o.interval=l[a],o.intervalPix=d,o.region=g)}}if(t.ordinal&amp;&amp;!o.region){var m=t.unitTickvals,v=t.unitToPaddedPx.invert(e);for(r=0;r&lt;m.length;r++){var x=[.25*m[Math.max(r-1,0)]+.75*m[r],.25*m[Math.min(r+1,m.length-1)]+.75*m[r]];if(v&gt;=x[0]&amp;&amp;v&lt;=x[1]){o.clickableOrdinalRange=x;break}}}return o}function k(t){t.on(&quot;mousemove&quot;,function(t){if(i.event.preventDefault(),!t.parent.inBrushDrag){var e=w(t,t.height-i.mouse(this)[1]-2*n.verticalPadding),r=&quot;crosshair&quot;;e.clickableOrdinalRange?r=&quot;pointer&quot;:e.region&amp;&amp;(r=e.region+&quot;-resize&quot;),i.select(document.body).style(&quot;cursor&quot;,r)}}).on(&quot;mouseleave&quot;,function(t){t.parent.inBrushDrag||x()}).call(i.behavior.drag().on(&quot;dragstart&quot;,function(t){i.event.sourceEvent.stopPropagation();var e=t.height-i.mouse(this)[1]-2*n.verticalPadding,r=t.unitToPaddedPx.invert(e),a=t.brush,o=w(t,e),s=o.interval,l=a.svgBrush;if(l.wasDragged=!1,l.grabbingBar=&quot;ns&quot;===o.region,l.grabbingBar){var c=s.map(t.unitToPaddedPx);l.grabPoint=e-c[0]-n.verticalPadding,l.barLength=c[1]-c[0]}l.clickableOrdinalRange=o.clickableOrdinalRange,l.stayingIntervals=t.multiselect&amp;&amp;a.filterSpecified?a.filter.getConsolidated():[],s&amp;&amp;(l.stayingIntervals=l.stayingIntervals.filter(function(t){return t[0]!==s[0]&amp;&amp;t[1]!==s[1]})),l.startExtent=o.region?s[&quot;s&quot;===o.region?1:0]:r,t.parent.inBrushDrag=!0,l.brushStartCallback()}).on(&quot;drag&quot;,function(t){i.event.sourceEvent.stopPropagation();var e=t.height-i.mouse(this)[1]-2*n.verticalPadding,r=t.brush.svgBrush;r.wasDragged=!0,r.grabbingBar?r.newExtent=[e-r.grabPoint,e+r.barLength-r.grabPoint].map(t.unitToPaddedPx.invert):r.newExtent=[r.startExtent,t.unitToPaddedPx.invert(e)].sort(s);var a=Math.max(0,-r.newExtent[0]),o=Math.max(0,r.newExtent[1]-1);r.newExtent[0]+=a,r.newExtent[1]-=o,r.grabbingBar&amp;&amp;(r.newExtent[1]+=a,r.newExtent[0]-=o),t.brush.filterSpecified=!0,r.extent=r.stayingIntervals.concat([r.newExtent]),r.brushCallback(t),_(this.parentNode)}).on(&quot;dragend&quot;,function(t){i.event.sourceEvent.stopPropagation();var e=t.brush,r=e.filter,n=e.svgBrush,a=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,t.parent.inBrushDrag=!1,x(),!n.wasDragged)return n.wasDragged=void 0,n.clickableOrdinalRange?e.filterSpecified&amp;&amp;t.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],e.filterSpecified=!0):a?(n.extent=n.stayingIntervals,0===n.extent.length&amp;&amp;A(e)):A(e),n.brushCallback(t),_(this.parentNode),void n.brushEndCallback(e.filterSpecified?r.getConsolidated():[]);var o=function(){r.set(r.getConsolidated())};if(t.ordinal){var s=t.unitTickvals;s[s.length-1]&lt;s[0]&amp;&amp;s.reverse(),n.newExtent=[h(s,n.newExtent[0],n.stayingIntervals),p(s,n.newExtent[1],n.stayingIntervals)];var l=n.newExtent[1]&gt;n.newExtent[0];n.extent=n.stayingIntervals.concat(l?[n.newExtent]:[]),n.extent.length||A(e),n.brushCallback(t),l?_(this.parentNode,o):(o(),_(this.parentNode))}else o();n.brushEndCallback(e.filterSpecified?r.getConsolidated():[])}))}function M(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[0,1]]}function T(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&amp;&amp;i[0]&lt;=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){r=n.map(function(t){return t.slice().sort(s)}).sort(M),t=T(r),e=r.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map(function(t){return t.slice()})}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t){var e=t.selectAll(&quot;.&quot;+n.cn.axisBrush).data(o,a);e.enter().append(&quot;g&quot;).classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(&quot;.background&quot;).data(o);e.enter().append(&quot;rect&quot;).classed(&quot;background&quot;,!0).call(g).call(m).style(&quot;pointer-events&quot;,&quot;auto&quot;).attr(&quot;transform&quot;,&quot;translate(0 &quot;+n.verticalPadding+&quot;)&quot;),e.call(k).attr(&quot;height&quot;,function(t){return t.height-n.verticalPadding});var r=t.selectAll(&quot;.highlight-shadow&quot;).data(o);r.enter().append(&quot;line&quot;).classed(&quot;highlight-shadow&quot;,!0).attr(&quot;x&quot;,-n.bar.width/2).attr(&quot;stroke-width&quot;,n.bar.width+n.bar.strokeWidth).attr(&quot;stroke&quot;,n.bar.strokeColor).attr(&quot;opacity&quot;,n.bar.strokeOpacity).attr(&quot;stroke-linecap&quot;,&quot;butt&quot;),r.attr(&quot;y1&quot;,function(t){return t.height}).call(b);var i=t.selectAll(&quot;.highlight&quot;).data(o);i.enter().append(&quot;line&quot;).classed(&quot;highlight&quot;,!0).attr(&quot;x&quot;,-n.bar.width/2).attr(&quot;stroke-width&quot;,n.bar.width-n.bar.strokeWidth).attr(&quot;stroke&quot;,n.bar.fillColor).attr(&quot;opacity&quot;,n.bar.fillOpacity).attr(&quot;stroke-linecap&quot;,&quot;butt&quot;),i.attr(&quot;y1&quot;,function(t){return t.height}).call(b)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?T(t.sort(M)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[h(r,t[0],[]),p(r,t[1],[])];if(e[1]&gt;e[0])return e}).filter(function(t){return t})).length)return}return t.length&gt;1?t:t[0]}}},{&quot;../../lib&quot;:693,&quot;../../lib/gup&quot;:690,&quot;./constants&quot;:1e3,d3:147}],998:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../plots/get_data&quot;).getModuleCalcData,a=t(&quot;./plot&quot;),o=t(&quot;../../constants/xmlns_namespaces&quot;);r.name=&quot;parcoords&quot;,r.plot=function(t){var e=i(t.calcdata,&quot;parcoords&quot;)[0];e.length&amp;&amp;a(t,e)},r.clean=function(t,e,r,n){var i=n._has&amp;&amp;n._has(&quot;parcoords&quot;),a=e._has&amp;&amp;e._has(&quot;parcoords&quot;);i&amp;&amp;!a&amp;&amp;(n._paperdiv.selectAll(&quot;.parcoords&quot;).remove(),n._glimages.selectAll(&quot;*&quot;).remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(&quot;.svg-container&quot;);r.filter(function(t,e){return e===r.size()-1}).selectAll(&quot;.gl-canvas-context, .gl-canvas-focus&quot;).each(function(){var t=this.toDataURL(&quot;image/png&quot;);e.append(&quot;svg:image&quot;).attr({xmlns:o.svg,&quot;xlink:href&quot;:t,preserveAspectRatio:&quot;none&quot;,x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll(&quot;#filterBarPattern&quot;).attr(&quot;id&quot;,&quot;filterBarPattern&quot;)},60)}},{&quot;../../constants/xmlns_namespaces&quot;:671,&quot;../../plots/get_data&quot;:778,&quot;./plot&quot;:1006,d3:147}],999:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/has_colorscale&quot;),i=t(&quot;../../components/colorscale/calc&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;../../lib/gup&quot;).wrap;e.exports=function(t,e){var r=!!e.line.colorscale&amp;&amp;a.isArrayOrTypedArray(e.line.color),s=r?e.line.color:function(t){for(var e=new Array(t),r=0;r&lt;t;r++)e[r]=.5;return e}(e._length),l=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,&quot;line&quot;)&amp;&amp;i(e,s,&quot;line&quot;,&quot;c&quot;),o({lineColor:s,cscale:l})}},{&quot;../../components/colorscale/calc&quot;:575,&quot;../../components/colorscale/has_colorscale&quot;:581,&quot;../../lib&quot;:693,&quot;../../lib/gup&quot;:690}],1000:[function(t,e,r){&quot;use strict&quot;;e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:[&quot;contextLineLayer&quot;,&quot;focusLineLayer&quot;,&quot;pickLineLayer&quot;],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:&quot;magenta&quot;,fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeColor:&quot;white&quot;,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:&quot;axis-extent-text&quot;,parcoordsLineLayers:&quot;parcoords-line-layers&quot;,parcoordsLineLayer:&quot;parcoords-lines&quot;,parcoords:&quot;parcoords&quot;,parcoordsControlView:&quot;parcoords-control-view&quot;,yAxis:&quot;y-axis&quot;,axisOverlays:&quot;axis-overlays&quot;,axis:&quot;axis&quot;,axisHeading:&quot;axis-heading&quot;,axisTitle:&quot;axis-title&quot;,axisExtent:&quot;axis-extent&quot;,axisExtentTop:&quot;axis-extent-top&quot;,axisExtentTopText:&quot;axis-extent-top-text&quot;,axisExtentBottom:&quot;axis-extent-bottom&quot;,axisExtentBottomText:&quot;axis-extent-bottom-text&quot;,axisBrush:&quot;axis-brush&quot;},id:{filterBarPattern:&quot;filter-bar-pattern&quot;}}},{}],1001:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/colorscale/has_colorscale&quot;),a=t(&quot;../../components/colorscale/defaults&quot;),o=t(&quot;../../plots/domain&quot;).defaults,s=t(&quot;../../plots/array_container_defaults&quot;),l=t(&quot;./attributes&quot;),c=t(&quot;./axisbrush&quot;),u=t(&quot;./constants&quot;).maxDimensionCount,f=t(&quot;./merge_length&quot;);function h(t,e){function r(r,i){return n.coerce(t,e,l.dimensions,r,i)}var i=r(&quot;values&quot;),a=r(&quot;visible&quot;);if(i&amp;&amp;i.length||(a=e.visible=!1),a){r(&quot;label&quot;),r(&quot;tickvals&quot;),r(&quot;ticktext&quot;),r(&quot;tickformat&quot;),r(&quot;range&quot;),r(&quot;multiselect&quot;);var o=r(&quot;constraintrange&quot;);o&amp;&amp;(e.constraintrange=c.cleanRanges(o,e))}}e.exports=function(t,e,r,c){function p(r,i){return n.coerce(t,e,l,r,i)}var d=t.dimensions;Array.isArray(d)&amp;&amp;d.length&gt;u&amp;&amp;(n.log(&quot;parcoords traces support up to &quot;+u+&quot; dimensions at the moment&quot;),d.splice(u));var g=s(t,e,{name:&quot;dimensions&quot;,handleItemDefaults:h}),m=function(t,e,r,o,s){var l=s(&quot;line.color&quot;,r);if(i(t,&quot;line&quot;)&amp;&amp;n.isArrayOrTypedArray(l)){if(l.length)return s(&quot;line.colorscale&quot;),a(t,e,o,s,{prefix:&quot;line.&quot;,cLetter:&quot;c&quot;}),l.length;e.line.color=r}return 1/0}(t,e,r,c,p);o(e,c,p),Array.isArray(g)&amp;&amp;g.length||(e.visible=!1),f(e,g,&quot;values&quot;,m);var v={family:c.font.family,size:Math.round(c.font.size/1.2),color:c.font.color};n.coerceFont(p,&quot;labelfont&quot;,v),n.coerceFont(p,&quot;tickfont&quot;,v),n.coerceFont(p,&quot;rangefont&quot;,v)}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../components/colorscale/has_colorscale&quot;:581,&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;../../plots/domain&quot;:767,&quot;./attributes&quot;:996,&quot;./axisbrush&quot;:997,&quot;./constants&quot;:1e3,&quot;./merge_length&quot;:1004}],1002:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.colorbar={container:&quot;line&quot;,min:&quot;cmin&quot;,max:&quot;cmax&quot;},n.moduleType=&quot;trace&quot;,n.name=&quot;parcoords&quot;,n.basePlotModule=t(&quot;./base_plot&quot;),n.categories=[&quot;gl&quot;,&quot;regl&quot;,&quot;noOpacity&quot;],n.meta={},e.exports=n},{&quot;./attributes&quot;:996,&quot;./base_plot&quot;:998,&quot;./calc&quot;:999,&quot;./defaults&quot;:1001,&quot;./plot&quot;:1006}],1003:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=n([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 p0, p1, p2, p3,\n               p4, p5, p6, p7,\n               p8, p9, pa, pb,\n               pc, pd, pe;\n\nattribute vec4 pf;\n\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution,\n             viewBoxPosition,\n             viewBoxSize;\n\nuniform sampler2D palette;\nuniform sampler2D mask;\nuniform float maskHeight;\n\nuniform vec2 colorClamp;\n\nvarying vec4 fragColor;\n\nvec4 unit_1 = vec4(1, 1, 1, 1);\n\nfloat val(mat4 p, mat4 v) {\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\n}\n\nfloat axisY(\n        float x,\n        mat4 d[4],\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\n    ) {\n\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\n    return y1 * (1.0 - x) + y2 * x;\n}\n\nconst int bitsPerByte = 8;\n\nint mod2(int a) {\n    return a - 2 * (a / 2);\n}\n\nint mod8(int a) {\n    return a - 8 * (a / 8);\n}\n\nvec4 zero = vec4(0, 0, 0, 0);\nvec4 unit_0 = vec4(1, 1, 1, 1);\nvec2 xyProjection = vec2(1, 1);\n\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\n    return mat4(clamp(m[0], lo[0], hi[0]),\n                clamp(m[1], lo[1], hi[1]),\n                clamp(m[2], lo[2], hi[2]),\n                clamp(m[3], lo[3], hi[3]));\n}\n\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\n    return mclamp(p, lo, hi) == p;\n}\n\nbool withinBoundingBox(\n        mat4 d[4],\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\n    ) {\n\n    return mshow(d[0], loA, hiA) &amp;&amp;\n           mshow(d[1], loB, hiB) &amp;&amp;\n           mshow(d[2], loC, hiC) &amp;&amp;\n           mshow(d[3], loD, hiD);\n}\n\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\n    bool result = true;\n    int bitInByteStepper;\n    float valY, valueY, scaleX;\n    int hit, bitmask, valX;\n    for(int i = 0; i &lt; 4; i++) {\n        for(int j = 0; j &lt; 4; j++) {\n            for(int k = 0; k &lt; 4; k++) {\n                bitInByteStepper = mod8(j * 4 + k);\n                valX = i * 2 + j / 2;\n                valY = d[i][j][k];\n                valueY = valY * (height - 1.0) + 0.5;\n                scaleX = (float(valX) + 0.5) / 8.0;\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\n                result = result &amp;&amp; mod2(hit) == 1;\n            }\n        }\n    }\n    return result;\n}\n\nvec4 position(\n        float depth,\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\n        mat4 dims[4],\n        float signum,\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\n        sampler2D mask, float maskHeight\n    ) {\n\n    float x = 0.5 * signum + 0.5;\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\n\n    float show = float(\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\n                         &amp;&amp; withinRasterMask(dims, mask, maskHeight)\n                      );\n\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\n    float depthOrHide = depth + 2.0 * (1.0 - show);\n\n    return vec4(\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\n        depthOrHide,\n        1.0\n    );\n}\n\nvoid main() {\n\n    float prominence = abs(pf[3]);\n\n    mat4 p[4];\n    p[0] = mat4(p0, p1, p2, p3);\n    p[1] = mat4(p4, p5, p6, p7);\n    p[2] = mat4(p8, p9, pa, pb);\n    p[3] = mat4(pc, pd, pe, abs(pf));\n\n    gl_Position = position(\n        1.0 - prominence,\n        resolution, viewBoxPosition, viewBoxSize,\n        p,\n        sign(pf[3]),\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\n        mask, maskHeight\n    );\n\n    float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\n    fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\n}\n&quot;]),a=n([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 p0, p1, p2, p3,\n               p4, p5, p6, p7,\n               p8, p9, pa, pb,\n               pc, pd, pe;\n\nattribute vec4 pf;\n\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D;\n\nuniform vec2 resolution,\n             viewBoxPosition,\n             viewBoxSize;\n\nuniform sampler2D palette;\n\nuniform vec2 colorClamp;\n\nvarying vec4 fragColor;\n\nvec2 xyProjection = vec2(1, 1);\n\nvec4 unit = vec4(1, 1, 1, 1);\n\nfloat val(mat4 p, mat4 v) {\n    return dot(matrixCompMult(p, v) * unit, unit);\n}\n\nfloat axisY(\n        float x,\n        mat4 d[4],\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\n    ) {\n\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\n    return y1 * (1.0 - x) + y2 * x;\n}\n\nvec4 position(\n        float depth,\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\n        mat4 dims[4],\n        float signum,\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\n    ) {\n\n    float x = 0.5 * signum + 0.5;\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\n\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\n\n    return vec4(\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\n        depth,\n        1.0\n    );\n}\n\nvoid main() {\n\n    float prominence = abs(pf[3]);\n\n    mat4 p[4];\n    p[0] = mat4(p0, p1, p2, p3);\n    p[1] = mat4(p4, p5, p6, p7);\n    p[2] = mat4(p8, p9, pa, pb);\n    p[3] = mat4(pc, pd, pe, abs(pf));\n\n    gl_Position = position(\n        1.0 - prominence,\n        resolution, viewBoxPosition, viewBoxSize,\n        p,\n        sign(pf[3]),\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D\n    );\n\n    float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\n    fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\n}\n&quot;]),o=n([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 p0, p1, p2, p3,\n               p4, p5, p6, p7,\n               p8, p9, pa, pb,\n               pc, pd, pe;\n\nattribute vec4 pf;\n\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution,\n             viewBoxPosition,\n             viewBoxSize;\n\nuniform sampler2D mask;\nuniform float maskHeight;\n\nuniform vec2 colorClamp;\n\nvarying vec4 fragColor;\n\nvec4 unit_1 = vec4(1, 1, 1, 1);\n\nfloat val(mat4 p, mat4 v) {\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\n}\n\nfloat axisY(\n        float x,\n        mat4 d[4],\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\n    ) {\n\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\n    return y1 * (1.0 - x) + y2 * x;\n}\n\nconst int bitsPerByte = 8;\n\nint mod2(int a) {\n    return a - 2 * (a / 2);\n}\n\nint mod8(int a) {\n    return a - 8 * (a / 8);\n}\n\nvec4 zero = vec4(0, 0, 0, 0);\nvec4 unit_0 = vec4(1, 1, 1, 1);\nvec2 xyProjection = vec2(1, 1);\n\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\n    return mat4(clamp(m[0], lo[0], hi[0]),\n                clamp(m[1], lo[1], hi[1]),\n                clamp(m[2], lo[2], hi[2]),\n                clamp(m[3], lo[3], hi[3]));\n}\n\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\n    return mclamp(p, lo, hi) == p;\n}\n\nbool withinBoundingBox(\n        mat4 d[4],\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\n    ) {\n\n    return mshow(d[0], loA, hiA) &amp;&amp;\n           mshow(d[1], loB, hiB) &amp;&amp;\n           mshow(d[2], loC, hiC) &amp;&amp;\n           mshow(d[3], loD, hiD);\n}\n\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\n    bool result = true;\n    int bitInByteStepper;\n    float valY, valueY, scaleX;\n    int hit, bitmask, valX;\n    for(int i = 0; i &lt; 4; i++) {\n        for(int j = 0; j &lt; 4; j++) {\n            for(int k = 0; k &lt; 4; k++) {\n                bitInByteStepper = mod8(j * 4 + k);\n                valX = i * 2 + j / 2;\n                valY = d[i][j][k];\n                valueY = valY * (height - 1.0) + 0.5;\n                scaleX = (float(valX) + 0.5) / 8.0;\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\n                result = result &amp;&amp; mod2(hit) == 1;\n            }\n        }\n    }\n    return result;\n}\n\nvec4 position(\n        float depth,\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\n        mat4 dims[4],\n        float signum,\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\n        sampler2D mask, float maskHeight\n    ) {\n\n    float x = 0.5 * signum + 0.5;\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\n\n    float show = float(\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\n                         &amp;&amp; withinRasterMask(dims, mask, maskHeight)\n                      );\n\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\n    float depthOrHide = depth + 2.0 * (1.0 - show);\n\n    return vec4(\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\n        depthOrHide,\n        1.0\n    );\n}\n\nvoid main() {\n\n    float prominence = abs(pf[3]);\n\n    mat4 p[4];\n    p[0] = mat4(p0, p1, p2, p3);\n    p[1] = mat4(p4, p5, p6, p7);\n    p[2] = mat4(p8, p9, pa, pb);\n    p[3] = mat4(pc, pd, pe, abs(pf));\n\n    gl_Position = position(\n        1.0 - prominence,\n        resolution, viewBoxPosition, viewBoxSize,\n        p,\n        sign(pf[3]),\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\n        mask, maskHeight\n    );\n\n    fragColor = vec4(pf.rgb, 1.0);\n}\n&quot;]),s=n([&quot;precision lowp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n    gl_FragColor = fragColor;\n}\n&quot;]),l=t(&quot;../../lib&quot;),c=1e-6,u=1e-7,f=2048,h=64,p=2,d=4,g=8,m=h/g,v=[119,119,119],y=new Uint8Array(4),x=new Uint8Array(4),b={shape:[256,1],format:&quot;rgba&quot;,type:&quot;uint8&quot;,mag:&quot;nearest&quot;,min:&quot;nearest&quot;};function _(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function w(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:y})}(t),r.drawCompleted=!0),function s(l){var c;c=Math.min(n,i-l*n),a.offset=p*l*n,a.count=p*c,0===l&amp;&amp;(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],_(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(e(a),l*n+c&lt;i&amp;&amp;(r.currentRafs[o]=window.requestAnimationFrame(function(){s(l+1)})),r.drawCompleted=!1)}(0)}function k(t,e){return(t&gt;&gt;&gt;8*e)%256/255}function M(t,e,r){var n,i,a,o=[];for(i=0;i&lt;t;i++)for(a=0;a&lt;p;a++)for(n=0;n&lt;d;n++)o.push(e[i*h+r*d+n]),r*d+n===h-1&amp;&amp;a%2==0&amp;&amp;(o[o.length-1]*=-1);return o}e.exports=function(t,e){var r,n,p,d,y,A=e.context,T=e.pick,S=e.regl,E={currentRafs:{},drawCompleted:!0,clearOnly:!1},C=function(t){for(var e={},r=0;r&lt;16;r++)e[&quot;p&quot;+r.toString(16)]=t.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array(0)});return e}(S),L=S.texture(b);P(e);var z=S({profile:!1,blend:{enable:A,func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:1,dstAlpha:1},equation:{rgb:&quot;add&quot;,alpha:&quot;add&quot;},color:[0,0,0,0]},depth:{enable:!A,mask:!0,func:&quot;less&quot;,range:[0,1]},cull:{enable:!0,face:&quot;back&quot;},scissor:{enable:!0,box:{x:S.prop(&quot;scissorX&quot;),y:S.prop(&quot;scissorY&quot;),width:S.prop(&quot;scissorWidth&quot;),height:S.prop(&quot;scissorHeight&quot;)}},viewport:{x:S.prop(&quot;viewportX&quot;),y:S.prop(&quot;viewportY&quot;),width:S.prop(&quot;viewportWidth&quot;),height:S.prop(&quot;viewportHeight&quot;)},dither:!1,vert:T?o:A?a:i,frag:s,primitive:&quot;lines&quot;,lineWidth:1,attributes:C,uniforms:{resolution:S.prop(&quot;resolution&quot;),viewBoxPosition:S.prop(&quot;viewBoxPosition&quot;),viewBoxSize:S.prop(&quot;viewBoxSize&quot;),dim1A:S.prop(&quot;dim1A&quot;),dim2A:S.prop(&quot;dim2A&quot;),dim1B:S.prop(&quot;dim1B&quot;),dim2B:S.prop(&quot;dim2B&quot;),dim1C:S.prop(&quot;dim1C&quot;),dim2C:S.prop(&quot;dim2C&quot;),dim1D:S.prop(&quot;dim1D&quot;),dim2D:S.prop(&quot;dim2D&quot;),loA:S.prop(&quot;loA&quot;),hiA:S.prop(&quot;hiA&quot;),loB:S.prop(&quot;loB&quot;),hiB:S.prop(&quot;hiB&quot;),loC:S.prop(&quot;loC&quot;),hiC:S.prop(&quot;hiC&quot;),loD:S.prop(&quot;loD&quot;),hiD:S.prop(&quot;hiD&quot;),palette:L,mask:S.prop(&quot;maskTexture&quot;),maskHeight:S.prop(&quot;maskHeight&quot;),colorClamp:S.prop(&quot;colorClamp&quot;)},offset:S.prop(&quot;offset&quot;),count:S.prop(&quot;count&quot;)});function P(t){r=t.model,n=t.viewModel,p=n.dimensions.slice(),d=p[0]?p[0].values.length:0;var e=r.lines,i=T?e.color.map(function(t,r){return r/e.color.length}):e.color,a=Math.max(1/255,Math.pow(1/i.length,1/3)),o=function(t,e,r){for(var n,i=e.length,a=[],o=0;o&lt;t;o++)for(var s=0;s&lt;h;s++)a.push(s&lt;i?e[s].paddedUnitValues[o]:s===h-1?(n=r[o],Math.max(c,Math.min(1-c,n))):s&gt;=h-4?k(o,h-2-s):.5);return a}(d,p,i);!function(t,e,r){for(var n=0;n&lt;16;n++)t[&quot;p&quot;+n.toString(16)](M(e,r,n))}(C,d,o),L=S.texture(l.extendFlat({data:function(t,e,r){for(var n=[],i=0;i&lt;256;i++){var a=t(i/255);n.push((e?v:a).concat(r))}return n}(r.unitToColor,A,Math.round(255*(A?a:1)))},b))}var O=[0,1];var I=[];function D(t,e,n,i,a,o,s,c,u,f,h){var p,d,g,m,v=[t,e],y=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(p=0;p&lt;2;p++)for(m=v[p],d=0;d&lt;4;d++)for(g=0;g&lt;16;g++)y[p][d][g]=g+16*d===m?1:0;var x=r.lines.canvasOverdrag,b=r.domain,_=r.canvasWidth,w=r.canvasHeight;return l.extendFlat({key:s,resolution:[_,w],viewBoxPosition:[n+x,i],viewBoxSize:[a,o],i:t,ii:e,dim1A:y[0][0],dim1B:y[0][1],dim1C:y[0][2],dim1D:y[0][3],dim2A:y[1][0],dim2B:y[1][1],dim2C:y[1][2],dim2D:y[1][3],colorClamp:O,scissorX:(c===u?0:n+x)+(r.pad.l-x)+r.layoutWidth*b.x[0],scissorWidth:(c===f?_-n+x:a+.5)+(c===u?n+x:0),scissorY:i+r.pad.b+r.layoutHeight*b.y[0],scissorHeight:o,viewportX:r.pad.l-x+r.layoutWidth*b.x[0],viewportY:r.pad.b+r.layoutHeight*b.y[0],viewportWidth:_,viewportHeight:w},h)}return{setColorDomain:function(t){O[0]=t[0],O[1]=t[1]},render:function(t,e,n){var i,a,o,s=t.length,l=1/0,c=-1/0;for(i=0;i&lt;s;i++)t[i].dim2.canvasX&gt;c&amp;&amp;(c=t[i].dim2.canvasX,o=i),t[i].dim1.canvasX&lt;l&amp;&amp;(l=t[i].dim1.canvasX,a=i);0===s&amp;&amp;_(S,0,0,r.canvasWidth,r.canvasHeight);var h=A?{}:function(){var t,e,r,n=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(t=0;t&lt;2;t++)for(e=0;e&lt;4;e++)for(r=0;r&lt;16;r++){var i,a=r+16*e;i=a&lt;p.length?p[a].brush.filter.getBounds()[t]:t,n[t][e][r]=i+(2*t-1)*u}function o(t,e){var r=f-1;return[Math.max(0,Math.floor(e[0]*r)),Math.min(r,Math.ceil(e[1]*r))]}for(var s=Array.apply(null,new Array(f*m)).map(function(){return 255}),l=0;l&lt;p.length;l++){var c=l%g,h=(l-c)/g,d=Math.pow(2,c),v=p[l],x=v.brush.filter.get();if(!(x.length&lt;2))for(var b=o(0,x[0])[1],_=1;_&lt;x.length;_++){for(var w=o(0,x[_]),k=b+1;k&lt;w[0];k++)s[k*m+h]&amp;=~d;b=Math.max(b,w[1])}}var M={shape:[m,f],format:&quot;alpha&quot;,type:&quot;uint8&quot;,mag:&quot;nearest&quot;,min:&quot;nearest&quot;,data:s};return y?y(M):y=S.texture(M),{maskTexture:y,maskHeight:f,loA:n[0][0],loB:n[0][1],loC:n[0][2],loD:n[0][3],hiA:n[1][0],hiB:n[1][1],hiC:n[1][2],hiD:n[1][3]}}();for(i=0;i&lt;s;i++){var v=t[i],x=v.dim1,b=x.crossfilterDimensionIndex,k=v.canvasX,M=v.canvasY,T=v.dim2.crossfilterDimensionIndex,C=v.panelSizeX,L=v.panelSizeY,P=k+C;if(e||!I[b]||I[b][0]!==k||I[b][1]!==P){I[b]=[k,P];var O=D(b,T,k,M,C,L,x.crossfilterDimensionIndex,i,a,o,h);E.clearOnly=n,w(S,z,E,e?r.lines.blockLineCount:d,d,O)}}},readPixel:function(t,e){return S.read({x:t,y:e,width:1,height:1,data:x}),x},readPixels:function(t,e,r,n){var i=new Uint8Array(4*r*n);return S.read({x:t,y:e,width:r,height:n,data:i}),i},destroy:function(){for(var e in t.style[&quot;pointer-events&quot;]=&quot;none&quot;,L.destroy(),y&amp;&amp;y.destroy(),C)C[e].destroy()},update:P}}},{&quot;../../lib&quot;:693,glslify:390}],1004:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var i,a;for(n||(n=1/0),i=0;i&lt;e.length;i++)(a=e[i]).visible&amp;&amp;(n=Math.min(n,a[r].length));for(n===1/0&amp;&amp;(n=0),t._length=n,i=0;i&lt;e.length;i++)(a=e[i]).visible&amp;&amp;(a._length=n);return n}},{}],1005:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lines&quot;),i=t(&quot;./constants&quot;),a=t(&quot;../../lib&quot;),o=t(&quot;d3&quot;),s=t(&quot;../../components/drawing&quot;),l=t(&quot;../../lib/gup&quot;),c=l.keyFun,u=l.repeat,f=l.unwrap,h=t(&quot;./axisbrush&quot;);function p(t){return!(&quot;visible&quot;in t)||t.visible}function d(t){var e=t.range?t.range[0]:a.aggNums(Math.min,null,t.values,t._length),r=t.range?t.range[1]:a.aggNums(Math.max,null,t.values,t._length);return!isNaN(e)&amp;&amp;isFinite(e)||(e=0),!isNaN(r)&amp;&amp;isFinite(r)||(r=0),e===r&amp;&amp;(0===e?(e-=1,r+=1):(e*=.9,r*=1.1)),[e,r]}function g(t){return t.dimensions.some(function(t){return t.brush.filterSpecified})}function m(t,e,r){var n=f(e),s=n.trace,l=n.lineColor,c=n.cscale,u=s.line,h=s.domain,g=s.dimensions,m=t.width,v=s.labelfont,y=s.tickfont,x=s.rangefont,b=a.extendDeepNoArrays({},u,{color:l.map(o.scale.linear().domain(d({values:l,range:[u.cmin,u.cmax],_length:s._length}))),blockLineCount:i.blockLineCount,canvasOverdrag:i.overdrag*i.canvasPixelRatio}),_=Math.floor(m*(h.x[1]-h.x[0])),w=Math.floor(t.height*(h.y[1]-h.y[0])),k=t.margin||{l:80,r:80,t:100,b:80},M=_,A=w;return{key:r,colCount:g.filter(p).length,dimensions:g,tickDistance:i.tickDistance,unitToColor:function(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return o.rgb(t[1])}),n=&quot;rgb&quot;.split(&quot;&quot;).map(function(t){return o.scale.linear().clamp(!0).domain(e).range(r.map((n=t,function(t){return t[n]})));var n});return function(t){return n.map(function(e){return e(t)})}}(c),lines:b,labelFont:v,tickFont:y,rangeFont:x,layoutWidth:m,layoutHeight:t.height,domain:h,translateX:h.x[0]*m,translateY:t.height-h.y[1]*t.height,pad:k,canvasWidth:M*i.canvasPixelRatio+2*b.canvasOverdrag,canvasHeight:A*i.canvasPixelRatio,width:M,height:A,canvasPixelRatio:i.canvasPixelRatio}}function v(t,e,r){var n=r.width,s=r.height,l=r.dimensions,c=r.canvasPixelRatio,u=function(t){return n*t/Math.max(1,r.colCount-1)},f=i.verticalPadding/s,m=function(t,e){return o.scale.linear().range([e,t-e])}(s,i.verticalPadding),v={key:r.key,xScale:u,model:r,inBrushDrag:!1},y={};return v.dimensions=l.filter(p).map(function(n,l){var p=function(t,e){return o.scale.linear().domain(d(t)).range([e,1-e])}(n,f),x=y[n.label];y[n.label]=(x||0)+1;var b=n.label+(x?&quot;__&quot;+x:&quot;&quot;),_=n.constraintrange,w=_&amp;&amp;_.length;w&amp;&amp;!Array.isArray(_[0])&amp;&amp;(_=[_]);var k=w?_.map(function(t){return t.map(p)}):[[0,1]],M=n.values;M.length&gt;n._length&amp;&amp;(M=M.slice(0,n._length));var A,T=n.tickvals;function S(t,e){return{val:t,text:A[e]}}function E(t,e){return t.val-e.val}if(Array.isArray(T)&amp;&amp;T.length){A=n.ticktext,Array.isArray(A)&amp;&amp;A.length?A.length&gt;T.length?A=A.slice(0,T.length):T.length&gt;A.length&amp;&amp;(T=T.slice(0,A.length)):A=T.map(o.format(n.tickformat));for(var C=1;C&lt;T.length;C++)if(T[C]&lt;T[C-1]){for(var L=T.map(S).sort(E),z=0;z&lt;T.length;z++)T[z]=L[z].val,A[z]=L[z].text;break}}else T=void 0;return{key:b,label:n.label,tickFormat:n.tickformat,tickvals:T,ticktext:A,ordinal:!!T,multiselect:n.multiselect,xIndex:l,crossfilterDimensionIndex:l,visibleIndex:n._index,height:s,values:M,paddedUnitValues:M.map(p),unitTickvals:T&amp;&amp;T.map(p),xScale:u,x:u(l),canvasX:u(l)*c,unitToPaddedPx:m,domainScale:function(t,e,r,n,i){var a,s,l=d(r);return n?o.scale.ordinal().domain(n.map((a=o.format(r.tickformat),s=i,s?function(t,e){var r=s[e];return null==r?a(t):r}:a))).range(n.map(function(r){var n=(r-l[0])/(l[1]-l[0]);return t-e+n*(2*e-t)})):o.scale.linear().domain(l).range([t-e,e])}(s,i.verticalPadding,n,T,A),ordinalScale:function(t){if(t.tickvals){var e=d(t);return o.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}}(n),parent:v,model:r,brush:h.makeBrush(t,w,k,function(){t.linePickActive(!1)},function(){var e=v;e.focusLayer&amp;&amp;e.focusLayer.render(e.panels,!0);var r=g(e);!t.contextShown()&amp;&amp;r?(e.contextLayer&amp;&amp;e.contextLayer.render(e.panels,!0),t.contextShown(!0)):t.contextShown()&amp;&amp;!r&amp;&amp;(e.contextLayer&amp;&amp;e.contextLayer.render(e.panels,!0,!0),t.contextShown(!1))},function(r){var i=v;if(i.focusLayer.render(i.panels,!0),i.pickLayer&amp;&amp;i.pickLayer.render(i.panels,!0),t.linePickActive(!0),e&amp;&amp;e.filterChanged){var o=p.invert,s=r.map(function(t){return t.map(o).sort(a.sorterAsc)}).sort(function(t,e){return t[0]-e[0]});e.filterChanged(i.key,n._index,s)}})}}),v}function y(t){t.classed(i.cn.axisExtentText,!0).attr(&quot;text-anchor&quot;,&quot;middle&quot;).style(&quot;cursor&quot;,&quot;default&quot;).style(&quot;user-select&quot;,&quot;none&quot;)}e.exports=function(t,e,r,l,p,d){var x,b,_=(x=!0,b=!1,{linePickActive:function(t){return arguments.length?x=!!t:x},contextShown:function(t){return arguments.length?b=!!t:b}}),w=l.filter(function(t){return f(t).trace.visible}).map(m.bind(0,p)).map(v.bind(0,_,d));r.each(function(t,e){return a.extendFlat(t,w[e])});var k=r.selectAll(&quot;.gl-canvas&quot;).each(function(t){t.viewModel=w[0],t.model=t.viewModel?t.viewModel.model:null}),M=null;k.filter(function(t){return t.pick}).style(&quot;pointer-events&quot;,&quot;auto&quot;).on(&quot;mousemove&quot;,function(t){if(_.linePickActive()&amp;&amp;t.lineLayer&amp;&amp;d&amp;&amp;d.hover){var e=o.event,r=this.width,n=this.height,i=o.mouse(this),a=i[0],s=i[1];if(a&lt;0||s&lt;0||a&gt;=r||s&gt;=n)return;var l=t.lineLayer.readPixel(a,n-1-s),c=0!==l[3],u=c?l[2]+256*(l[1]+256*l[0]):null,f={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:u};u!==M&amp;&amp;(c?d.hover(f):d.unhover&amp;&amp;d.unhover(f),M=u)}}),k.style(&quot;opacity&quot;,function(t){return t.pick?.01:1}),e.style(&quot;background&quot;,&quot;rgba(255, 255, 255, 0)&quot;);var A=e.selectAll(&quot;.&quot;+i.cn.parcoords).data(w,c);A.exit().remove(),A.enter().append(&quot;g&quot;).classed(i.cn.parcoords,!0).style(&quot;shape-rendering&quot;,&quot;crispEdges&quot;).style(&quot;pointer-events&quot;,&quot;none&quot;),A.attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.model.translateX+&quot;,&quot;+t.model.translateY+&quot;)&quot;});var T=A.selectAll(&quot;.&quot;+i.cn.parcoordsControlView).data(u,c);T.enter().append(&quot;g&quot;).classed(i.cn.parcoordsControlView,!0),T.attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.model.pad.l+&quot;,&quot;+t.model.pad.t+&quot;)&quot;});var S=T.selectAll(&quot;.&quot;+i.cn.yAxis).data(function(t){return t.dimensions},c);function E(t,e){for(var r=e.panels||(e.panels=[]),n=t.data(),i=n.length-1,a=0;a&lt;i;a++){var o=r[a]||(r[a]={}),s=n[a],l=n[a+1];o.dim1=s,o.dim2=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=e.model.canvasHeight,o.y=0,o.canvasY=0}}S.enter().append(&quot;g&quot;).classed(i.cn.yAxis,!0),T.each(function(t){E(S,t)}),k.each(function(t){t.viewModel&amp;&amp;(t.lineLayer?t.lineLayer.update(t):t.lineLayer=n(this,t),t.viewModel[t.key]=t.lineLayer,t.lineLayer.render(t.viewModel.panels,!t.context))}),S.attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.xScale(t.xIndex)+&quot;, 0)&quot;}),S.call(o.behavior.drag().origin(function(t){return t}).on(&quot;drag&quot;,function(t){var e=t.parent;_.linePickActive(!1),t.x=Math.max(-i.overdrag,Math.min(t.model.width+i.overdrag,o.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,S.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),E(S,e),S.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.xScale(t.xIndex)+&quot;, 0)&quot;}),o.select(this).attr(&quot;transform&quot;,&quot;translate(&quot;+t.x+&quot;, 0)&quot;),S.each(function(r,n,i){i===t.parent.key&amp;&amp;(e.dimensions[n]=r)}),e.contextLayer&amp;&amp;e.contextLayer.render(e.panels,!1,!g(e)),e.focusLayer.render&amp;&amp;e.focusLayer.render(e.panels)}).on(&quot;dragend&quot;,function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,E(S,e),o.select(this).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.x+&quot;, 0)&quot;}),e.contextLayer&amp;&amp;e.contextLayer.render(e.panels,!1,!g(e)),e.focusLayer&amp;&amp;e.focusLayer.render(e.panels),e.pickLayer&amp;&amp;e.pickLayer.render(e.panels,!0),_.linePickActive(!0),d&amp;&amp;d.axesMoved&amp;&amp;d.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),S.exit().remove();var C=S.selectAll(&quot;.&quot;+i.cn.axisOverlays).data(u,c);C.enter().append(&quot;g&quot;).classed(i.cn.axisOverlays,!0),C.selectAll(&quot;.&quot;+i.cn.axis).remove();var L=C.selectAll(&quot;.&quot;+i.cn.axis).data(u,c);L.enter().append(&quot;g&quot;).classed(i.cn.axis,!0),L.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain();o.select(this).call(o.svg.axis().orient(&quot;left&quot;).tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n:null).tickFormat(t.ordinal?function(t){return t}:null).scale(r)),s.font(L.selectAll(&quot;text&quot;),t.model.tickFont)}),L.selectAll(&quot;.domain, .tick&gt;line&quot;).attr(&quot;fill&quot;,&quot;none&quot;).attr(&quot;stroke&quot;,&quot;black&quot;).attr(&quot;stroke-opacity&quot;,.25).attr(&quot;stroke-width&quot;,&quot;1px&quot;),L.selectAll(&quot;text&quot;).style(&quot;text-shadow&quot;,&quot;1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff&quot;).style(&quot;cursor&quot;,&quot;default&quot;).style(&quot;user-select&quot;,&quot;none&quot;);var z=C.selectAll(&quot;.&quot;+i.cn.axisHeading).data(u,c);z.enter().append(&quot;g&quot;).classed(i.cn.axisHeading,!0);var P=z.selectAll(&quot;.&quot;+i.cn.axisTitle).data(u,c);P.enter().append(&quot;text&quot;).classed(i.cn.axisTitle,!0).attr(&quot;text-anchor&quot;,&quot;middle&quot;).style(&quot;cursor&quot;,&quot;ew-resize&quot;).style(&quot;user-select&quot;,&quot;none&quot;).style(&quot;pointer-events&quot;,&quot;auto&quot;),P.attr(&quot;transform&quot;,&quot;translate(0,&quot;+-i.axisTitleOffset+&quot;)&quot;).text(function(t){return t.label}).each(function(t){s.font(o.select(this),t.model.labelFont)});var O=C.selectAll(&quot;.&quot;+i.cn.axisExtent).data(u,c);O.enter().append(&quot;g&quot;).classed(i.cn.axisExtent,!0);var I=O.selectAll(&quot;.&quot;+i.cn.axisExtentTop).data(u,c);I.enter().append(&quot;g&quot;).classed(i.cn.axisExtentTop,!0),I.attr(&quot;transform&quot;,&quot;translate(0,&quot;+-i.axisExtentOffset+&quot;)&quot;);var D=I.selectAll(&quot;.&quot;+i.cn.axisExtentTopText).data(u,c);function R(t,e){if(t.ordinal)return&quot;&quot;;var r=t.domainScale.domain();return o.format(t.tickFormat)(r[e?r.length-1:0])}D.enter().append(&quot;text&quot;).classed(i.cn.axisExtentTopText,!0).call(y),D.text(function(t){return R(t,!0)}).each(function(t){s.font(o.select(this),t.model.rangeFont)});var B=O.selectAll(&quot;.&quot;+i.cn.axisExtentBottom).data(u,c);B.enter().append(&quot;g&quot;).classed(i.cn.axisExtentBottom,!0),B.attr(&quot;transform&quot;,function(t){return&quot;translate(0,&quot;+(t.model.height+i.axisExtentOffset)+&quot;)&quot;});var F=B.selectAll(&quot;.&quot;+i.cn.axisExtentBottomText).data(u,c);F.enter().append(&quot;text&quot;).classed(i.cn.axisExtentBottomText,!0).attr(&quot;dy&quot;,&quot;0.75em&quot;).call(y),F.text(function(t){return R(t)}).each(function(t){s.font(o.select(this),t.model.rangeFont)}),h.ensureAxisBrush(C)}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../../lib/gup&quot;:690,&quot;./axisbrush&quot;:997,&quot;./constants&quot;:1e3,&quot;./lines&quot;:1003,d3:147}],1006:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./parcoords&quot;),i=t(&quot;../../lib/prepare_regl&quot;);e.exports=function(t,e){var r=t._fullLayout,a=r._toppaper,o=r._paperdiv,s=r._glcontainer;if(i(t)){var l={},c={},u=r._size;e.forEach(function(e,r){l[r]=t.data[r].dimensions,c[r]=t.data[r].dimensions.slice()});n(o,a,s,e,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:function(e,r,n){var i=c[e][r],a=n.map(function(t){return t.slice()});a.length?(1===a.length&amp;&amp;(a=a[0]),i.constraintrange=a,a=[a]):(delete i.constraintrange,a=null);var o={};o[&quot;dimensions[&quot;+r+&quot;].constraintrange&quot;]=a,t.emit(&quot;plotly_restyle&quot;,[o,[e]])},hover:function(e){t.emit(&quot;plotly_hover&quot;,e)},unhover:function(e){t.emit(&quot;plotly_unhover&quot;,e)},axesMoved:function(e,r){function n(t){return!(&quot;visible&quot;in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&amp;&amp;(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(c[e].filter(n));l[e].sort(a),c[e].filter(function(t){return!n(t)}).sort(function(t){return c[e].indexOf(t)}).forEach(function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(c[e].indexOf(t),0,t)}),t.emit(&quot;plotly_restyle&quot;)}})}}},{&quot;../../lib/prepare_regl&quot;:707,&quot;./parcoords&quot;:1005}],1007:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color/attributes&quot;),i=t(&quot;../../plots/font_attributes&quot;),a=t(&quot;../../plots/attributes&quot;),o=t(&quot;../../plots/domain&quot;).attributes,s=t(&quot;../../lib/extend&quot;).extendFlat,l=i({editType:&quot;calc&quot;,colorEditType:&quot;style&quot;});e.exports={labels:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},label0:{valType:&quot;number&quot;,dflt:0,editType:&quot;calc&quot;},dlabel:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},values:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},marker:{colors:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},line:{color:{valType:&quot;color&quot;,dflt:n.defaultLine,arrayOk:!0,editType:&quot;style&quot;},width:{valType:&quot;number&quot;,min:0,dflt:0,arrayOk:!0,editType:&quot;style&quot;},editType:&quot;calc&quot;},editType:&quot;calc&quot;},text:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},hovertext:{valType:&quot;string&quot;,dflt:&quot;&quot;,arrayOk:!0,editType:&quot;style&quot;},scalegroup:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;},textinfo:{valType:&quot;flaglist&quot;,flags:[&quot;label&quot;,&quot;text&quot;,&quot;value&quot;,&quot;percent&quot;],extras:[&quot;none&quot;],editType:&quot;calc&quot;},hoverinfo:s({},a.hoverinfo,{flags:[&quot;label&quot;,&quot;text&quot;,&quot;value&quot;,&quot;percent&quot;,&quot;name&quot;]}),textposition:{valType:&quot;enumerated&quot;,values:[&quot;inside&quot;,&quot;outside&quot;,&quot;auto&quot;,&quot;none&quot;],dflt:&quot;auto&quot;,arrayOk:!0,editType:&quot;calc&quot;},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),domain:o({name:&quot;pie&quot;,trace:!0,editType:&quot;calc&quot;}),hole:{valType:&quot;number&quot;,min:0,max:1,dflt:0,editType:&quot;calc&quot;},sort:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},direction:{valType:&quot;enumerated&quot;,values:[&quot;clockwise&quot;,&quot;counterclockwise&quot;],dflt:&quot;counterclockwise&quot;,editType:&quot;calc&quot;},rotation:{valType:&quot;number&quot;,min:-360,max:360,dflt:0,editType:&quot;calc&quot;},pull:{valType:&quot;number&quot;,min:0,max:1,dflt:0,arrayOk:!0,editType:&quot;calc&quot;}}},{&quot;../../components/color/attributes&quot;:566,&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../../plots/domain&quot;:767,&quot;../../plots/font_attributes&quot;:768}],1008:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../plots/get_data&quot;).getModuleCalcData;r.name=&quot;pie&quot;,r.plot=function(t){var e=n.getModule(&quot;pie&quot;),r=i(t.calcdata,e)[0];r.length&amp;&amp;e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&amp;&amp;n._has(&quot;pie&quot;),a=e._has&amp;&amp;e._has(&quot;pie&quot;);i&amp;&amp;!a&amp;&amp;n._pielayer.selectAll(&quot;g.trace&quot;).remove()}},{&quot;../../plots/get_data&quot;:778,&quot;../../registry&quot;:825}],1009:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;).isArrayOrTypedArray,a=t(&quot;tinycolor2&quot;),o=t(&quot;../../components/color&quot;),s=t(&quot;./helpers&quot;);r.calc=function(t,e){var r,l,c,u,f,h=e.values,p=i(h)&amp;&amp;h.length,d=e.labels,g=e.marker.colors||[],m=[],v=t._fullLayout,y=v._piecolormap,x={},b=0,_=v.hiddenlabels||[];if(e.dlabel)for(d=new Array(h.length),r=0;r&lt;h.length;r++)d[r]=String(e.label0+r*e.dlabel);function w(t,e){return!!t&amp;&amp;(!!(t=a(t)).isValid()&amp;&amp;(t=o.addOpacity(t,t.getAlpha()),y[e]||(y[e]=t),t))}var k=(p?h:d).length;for(r=0;r&lt;k;r++){if(p){if(l=h[r],!n(l))continue;if((l=+l)&lt;0)continue}else l=1;void 0!==(c=d[r])&amp;&amp;&quot;&quot;!==c||(c=r);var M=x[c=String(c)];void 0===M?(x[c]=m.length,(u=-1!==_.indexOf(c))||(b+=l),m.push({v:l,label:c,color:w(g[r],c),i:r,pts:[r],hidden:u})):((f=m[M]).v+=l,f.pts.push(r),f.hidden||(b+=l),!1===f.color&amp;&amp;g[r]&amp;&amp;(f.color=w(g[r],c)))}if(e.sort&amp;&amp;m.sort(function(t,e){return e.v-t.v}),m[0]&amp;&amp;(m[0].vTotal=b),e.textinfo&amp;&amp;&quot;none&quot;!==e.textinfo){var A,T=-1!==e.textinfo.indexOf(&quot;label&quot;),S=-1!==e.textinfo.indexOf(&quot;text&quot;),E=-1!==e.textinfo.indexOf(&quot;value&quot;),C=-1!==e.textinfo.indexOf(&quot;percent&quot;),L=v.separators;for(r=0;r&lt;m.length;r++){if(f=m[r],A=T?[f.label]:[],S){var z=s.getFirstFilled(e.text,f.pts);z&amp;&amp;A.push(z)}E&amp;&amp;A.push(s.formatPieValue(f.v,L)),C&amp;&amp;A.push(s.formatPiePercent(f.v/b,L)),f.text=A.join(&quot;&lt;br&gt;&quot;)}}return m},r.crossTraceCalc=function(t){var e=t._fullLayout,r=t.calcdata,n=e.piecolorway,i=e._piecolormap;e.extendpiecolors&amp;&amp;(n=function(t){var e,r=JSON.stringify(t),n=l[r];if(!n){for(n=t.slice(),e=0;e&lt;t.length;e++)n.push(a(t[e]).lighten(20).toHexString());for(e=0;e&lt;t.length;e++)n.push(a(t[e]).darken(20).toHexString());l[r]=n}return n}(n));var o,s,c,u,f=0;for(o=0;o&lt;r.length;o++)if(&quot;pie&quot;===(c=r[o])[0].trace.type)for(s=0;s&lt;c.length;s++)!1===(u=c[s]).color&amp;&amp;(i[u.label]?u.color=i[u.label]:(i[u.label]=u.color=n[f%n.length],f++))};var l={}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;./helpers&quot;:1012,&quot;fast-isnumeric&quot;:213,tinycolor2:511}],1010:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./attributes&quot;),a=t(&quot;../../plots/domain&quot;).defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}var l,c=n.coerceFont,u=s(&quot;values&quot;),f=n.isArrayOrTypedArray(u),h=s(&quot;labels&quot;);if(Array.isArray(h)?(l=h.length,f&amp;&amp;(l=Math.min(l,u.length))):f&amp;&amp;(l=u.length,s(&quot;label0&quot;),s(&quot;dlabel&quot;)),l){e._length=l,s(&quot;marker.line.width&quot;)&amp;&amp;s(&quot;marker.line.color&quot;),s(&quot;marker.colors&quot;),s(&quot;scalegroup&quot;);var p=s(&quot;text&quot;),d=s(&quot;textinfo&quot;,Array.isArray(p)?&quot;text+percent&quot;:&quot;percent&quot;);if(s(&quot;hovertext&quot;),d&amp;&amp;&quot;none&quot;!==d){var g=s(&quot;textposition&quot;),m=Array.isArray(g)||&quot;auto&quot;===g,v=m||&quot;inside&quot;===g,y=m||&quot;outside&quot;===g;if(v||y){var x=c(s,&quot;textfont&quot;,o.font);v&amp;&amp;c(s,&quot;insidetextfont&quot;,x),y&amp;&amp;c(s,&quot;outsidetextfont&quot;,x)}}a(e,o,s),s(&quot;hole&quot;),s(&quot;sort&quot;),s(&quot;direction&quot;),s(&quot;rotation&quot;),s(&quot;pull&quot;)}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../../plots/domain&quot;:767,&quot;./attributes&quot;:1007}],1011:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/fx/helpers&quot;).appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,v:t.v};return 1===t.pts.length&amp;&amp;(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),r}},{&quot;../../components/fx/helpers&quot;:606}],1012:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(&quot;.&quot;)&amp;&amp;(r=r.replace(/[.]?0+$/,&quot;&quot;)),n.numSeparate(r,e)+&quot;%&quot;},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(&quot;.&quot;)&amp;&amp;(r=r.replace(/[.]?0+$/,&quot;&quot;)),n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r&lt;e.length;r++){var n=t[e[r]];if(n||0===n)return n}},r.castOption=function(t,e){return Array.isArray(t)?r.getFirstFilled(t,e):t||void 0}},{&quot;../../lib&quot;:693}],1013:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.supplyLayoutDefaults=t(&quot;./layout_defaults&quot;),n.layoutAttributes=t(&quot;./layout_attributes&quot;);var i=t(&quot;./calc&quot;);n.calc=i.calc,n.crossTraceCalc=i.crossTraceCalc,n.plot=t(&quot;./plot&quot;),n.style=t(&quot;./style&quot;),n.styleOne=t(&quot;./style_one&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;pie&quot;,n.basePlotModule=t(&quot;./base_plot&quot;),n.categories=[&quot;pie&quot;,&quot;showLegend&quot;],n.meta={},e.exports=n},{&quot;./attributes&quot;:1007,&quot;./base_plot&quot;:1008,&quot;./calc&quot;:1009,&quot;./defaults&quot;:1010,&quot;./layout_attributes&quot;:1014,&quot;./layout_defaults&quot;:1015,&quot;./plot&quot;:1016,&quot;./style&quot;:1017,&quot;./style_one&quot;:1018}],1014:[function(t,e,r){&quot;use strict&quot;;e.exports={hiddenlabels:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},piecolorway:{valType:&quot;colorlist&quot;,editType:&quot;calc&quot;},extendpiecolors:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;}}},{}],1015:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./layout_attributes&quot;);e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(&quot;hiddenlabels&quot;),r(&quot;piecolorway&quot;,e.colorway),r(&quot;extendpiecolors&quot;)}},{&quot;../../lib&quot;:693,&quot;./layout_attributes&quot;:1014}],1016:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/fx&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;../../components/drawing&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../lib/svg_text_utils&quot;),c=t(&quot;./helpers&quot;),u=t(&quot;./event_data&quot;);function f(t,e){if(t.v===e.vTotal&amp;&amp;!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function h(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r&lt;0&amp;&amp;(i*=-1),n&lt;0&amp;&amp;(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i&gt;0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}e.exports=function(t,e){var r=t._fullLayout;!function(t,e){var r,n,i,a,o,s,l,c,u,f=[];for(i=0;i&lt;t.length;i++){if(o=t[i][0],s=o.trace,r=e.w*(s.domain.x[1]-s.domain.x[0]),n=e.h*(s.domain.y[1]-s.domain.y[0]),l=s.pull,Array.isArray(l))for(l=0,a=0;a&lt;s.pull.length;a++)s.pull[a]&gt;l&amp;&amp;(l=s.pull[a]);o.r=Math.min(r,n)/(2+2*l),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(2-s.domain.y[1]-s.domain.y[0])/2,s.scalegroup&amp;&amp;-1===f.indexOf(s.scalegroup)&amp;&amp;f.push(s.scalegroup)}for(a=0;a&lt;f.length;a++){for(u=1/0,c=f[a],i=0;i&lt;t.length;i++)(o=t[i][0]).trace.scalegroup===c&amp;&amp;(u=Math.min(u,o.r*o.r/o.vTotal));for(i=0;i&lt;t.length;i++)(o=t[i][0]).trace.scalegroup===c&amp;&amp;(o.r=Math.sqrt(u*o.vTotal))}}(e,r._size);var p=s.makeTraceGroups(r._pielayer,e,&quot;trace&quot;).each(function(e){var p=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.trace,o=a.rotation*Math.PI/180,s=2*Math.PI/i.vTotal,l=&quot;px0&quot;,c=&quot;px1&quot;;if(&quot;counterclockwise&quot;===a.direction){for(e=0;e&lt;t.length&amp;&amp;t[e].hidden;e++);if(e===t.length)return;o+=s*t[e].v,s*=-1,l=&quot;px1&quot;,c=&quot;px0&quot;}function u(t){return[i.r*Math.sin(t),-i.r*Math.cos(t)]}for(n=u(o),e=0;e&lt;t.length;e++)(r=t[e]).hidden||(r[l]=n,o+=s*r.v/2,r.pxmid=u(o),r.midangle=o,o+=s*r.v/2,n=u(o),r[c]=n,r.largeArc=r.v&gt;i.vTotal/2?1:0)}(e),p.attr(&quot;stroke-linejoin&quot;,&quot;round&quot;),p.each(function(){var p=n.select(this).selectAll(&quot;g.slice&quot;).data(e);p.enter().append(&quot;g&quot;).classed(&quot;slice&quot;,!0),p.exit().remove();var m=[[[],[]],[[],[]]],v=!1;p.each(function(e){if(e.hidden)n.select(this).selectAll(&quot;path,g&quot;).remove();else{e.pointNumber=e.i,e.curveNumber=g.index,m[e.pxmid[1]&lt;0?0:1][e.pxmid[0]&lt;0?0:1].push(e);var a=d.cx,p=d.cy,y=n.select(this),x=y.selectAll(&quot;path.surface&quot;).data([e]),b=!1,_=!1;if(x.enter().append(&quot;path&quot;).classed(&quot;surface&quot;,!0).style({&quot;pointer-events&quot;:&quot;all&quot;}),y.select(&quot;path.textline&quot;).remove(),y.on(&quot;mouseover&quot;,function(){var o=t._fullLayout,s=t._fullData[g.index];if(!t._dragging&amp;&amp;!1!==o.hovermode){var l=s.hoverinfo;if(Array.isArray(l)&amp;&amp;(l=i.castHoverinfo({hoverinfo:[c.castOption(l,e.pts)],_module:g._module},o,0)),&quot;all&quot;===l&amp;&amp;(l=&quot;label+text+value+percent+name&quot;),&quot;none&quot;!==l&amp;&amp;&quot;skip&quot;!==l&amp;&amp;l){var h=f(e,d),m=a+e.pxmid[0]*(1-h),v=p+e.pxmid[1]*(1-h),y=r.separators,x=[];if(-1!==l.indexOf(&quot;label&quot;)&amp;&amp;x.push(e.label),-1!==l.indexOf(&quot;text&quot;)){var w=c.castOption(s.hovertext||s.text,e.pts);w&amp;&amp;x.push(w)}-1!==l.indexOf(&quot;value&quot;)&amp;&amp;x.push(c.formatPieValue(e.v,y)),-1!==l.indexOf(&quot;percent&quot;)&amp;&amp;x.push(c.formatPiePercent(e.v/d.vTotal,y));var k=g.hoverlabel,M=k.font;i.loneHover({x0:m-h*d.r,x1:m+h*d.r,y:v,text:x.join(&quot;&lt;br&gt;&quot;),name:-1!==l.indexOf(&quot;name&quot;)?s.name:void 0,idealAlign:e.pxmid[0]&lt;0?&quot;left&quot;:&quot;right&quot;,color:c.castOption(k.bgcolor,e.pts)||e.color,borderColor:c.castOption(k.bordercolor,e.pts),fontFamily:c.castOption(M.family,e.pts),fontSize:c.castOption(M.size,e.pts),fontColor:c.castOption(M.color,e.pts)},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t}),b=!0}t.emit(&quot;plotly_hover&quot;,{points:[u(e,s)],event:n.event}),_=!0}}).on(&quot;mouseout&quot;,function(r){var a=t._fullLayout,o=t._fullData[g.index];_&amp;&amp;(r.originalEvent=n.event,t.emit(&quot;plotly_unhover&quot;,{points:[u(e,o)],event:n.event}),_=!1),b&amp;&amp;(i.loneUnhover(a._hoverlayer.node()),b=!1)}).on(&quot;click&quot;,function(){var r=t._fullLayout,a=t._fullData[g.index];t._dragging||!1===r.hovermode||(t._hoverdata=[u(e,a)],i.click(t,n.event))}),g.pull){var w=+c.castOption(g.pull,e.pts)||0;w&gt;0&amp;&amp;(a+=w*e.pxmid[0],p+=w*e.pxmid[1])}e.cxFinal=a,e.cyFinal=p;var k=g.hole;if(e.v===d.vTotal){var M=&quot;M&quot;+(a+e.px0[0])+&quot;,&quot;+(p+e.px0[1])+C(e.px0,e.pxmid,!0,1)+C(e.pxmid,e.px0,!0,1)+&quot;Z&quot;;k?x.attr(&quot;d&quot;,&quot;M&quot;+(a+k*e.px0[0])+&quot;,&quot;+(p+k*e.px0[1])+C(e.px0,e.pxmid,!1,k)+C(e.pxmid,e.px0,!1,k)+&quot;Z&quot;+M):x.attr(&quot;d&quot;,M)}else{var A=C(e.px0,e.px1,!0,1);if(k){var T=1-k;x.attr(&quot;d&quot;,&quot;M&quot;+(a+k*e.px1[0])+&quot;,&quot;+(p+k*e.px1[1])+C(e.px1,e.px0,!1,k)+&quot;l&quot;+T*e.px0[0]+&quot;,&quot;+T*e.px0[1]+A+&quot;Z&quot;)}else x.attr(&quot;d&quot;,&quot;M&quot;+a+&quot;,&quot;+p+&quot;l&quot;+e.px0[0]+&quot;,&quot;+e.px0[1]+A+&quot;Z&quot;)}var S=c.castOption(g.textposition,e.pts),E=y.selectAll(&quot;g.slicetext&quot;).data(e.text&amp;&amp;&quot;none&quot;!==S?[0]:[]);E.enter().append(&quot;g&quot;).classed(&quot;slicetext&quot;,!0),E.exit().remove(),E.each(function(){var r=s.ensureSingle(n.select(this),&quot;text&quot;,&quot;&quot;,function(t){t.attr(&quot;data-notex&quot;,1)});r.text(e.text).attr({class:&quot;slicetext&quot;,transform:&quot;&quot;,&quot;text-anchor&quot;:&quot;middle&quot;}).call(o.font,&quot;outside&quot;===S?g.outsidetextfont:g.insidetextfont).call(l.convertToTspans,t);var i,c=o.bBox(r.node());&quot;outside&quot;===S?i=h(c,e):(i=function(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),i=t.width/t.height,a=Math.PI*Math.min(e.v/r.vTotal,.5),o=1-r.trace.hole,s=f(e,r),l={scale:s*r.r*2/n,rCenter:1-s,rotate:0};if(l.scale&gt;=1)return l;var c=i+1/(2*Math.tan(a)),u=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),o/(Math.sqrt(i*i+o/2)+i)),h={scale:2*u/t.height,rCenter:Math.cos(u/r.r)-u*i/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},p=1/i,d=p+1/(2*Math.tan(a)),g=r.r*Math.min(1/(Math.sqrt(d*d+.5)+d),o/(Math.sqrt(p*p+o/2)+p)),m={scale:2*g/t.width,rCenter:Math.cos(g/r.r)-g/i/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},v=m.scale&gt;h.scale?m:h;return l.scale&lt;1&amp;&amp;v.scale&gt;l.scale?v:l}(c,e,d),&quot;auto&quot;===S&amp;&amp;i.scale&lt;1&amp;&amp;(r.call(o.font,g.outsidetextfont),g.outsidetextfont.family===g.insidetextfont.family&amp;&amp;g.outsidetextfont.size===g.insidetextfont.size||(c=o.bBox(r.node())),i=h(c,e)));var u=a+e.pxmid[0]*i.rCenter+(i.x||0),m=p+e.pxmid[1]*i.rCenter+(i.y||0);i.outside&amp;&amp;(e.yLabelMin=m-c.height/2,e.yLabelMid=m,e.yLabelMax=m+c.height/2,e.labelExtraX=0,e.labelExtraY=0,v=!0),r.attr(&quot;transform&quot;,&quot;translate(&quot;+u+&quot;,&quot;+m+&quot;)&quot;+(i.scale&lt;1?&quot;scale(&quot;+i.scale+&quot;)&quot;:&quot;&quot;)+(i.rotate?&quot;rotate(&quot;+i.rotate+&quot;)&quot;:&quot;&quot;)+&quot;translate(&quot;+-(c.left+c.right)/2+&quot;,&quot;+-(c.top+c.bottom)/2+&quot;)&quot;)})}function C(t,r,n,i){return&quot;a&quot;+i*d.r+&quot;,&quot;+i*d.r+&quot; 0 &quot;+e.largeArc+(n?&quot; 1 &quot;:&quot; 0 &quot;)+i*(r[0]-t[0])+&quot;,&quot;+i*(r[1]-t[1])}}),v&amp;&amp;function(t,e){var r,n,i,a,o,s,l,u,f,h,p,d,g;function m(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,u,f,p,d,g,m=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),v=n?t.yLabelMin:t.yLabelMax,y=n?t.yLabelMax:t.yLabelMin,x=t.cyFinal+o(t.px0[1],t.px1[1]),b=m-v;if(b*l&gt;0&amp;&amp;(t.labelExtraY=b),Array.isArray(e.pull))for(u=0;u&lt;h.length;u++)(f=h[u])===t||(c.castOption(e.pull,t.pts)||0)&gt;=(c.castOption(e.pull,f.pts)||0)||((t.pxmid[1]-f.pxmid[1])*l&gt;0?(p=f.cyFinal+o(f.px0[1],f.px1[1]),(b=p-v-t.labelExtraY)*l&gt;0&amp;&amp;(t.labelExtraY+=b)):(y+t.labelExtraY-x)*l&gt;0&amp;&amp;(i=3*s*Math.abs(u-h.indexOf(t)),d=f.cxFinal+a(f.px0[0],f.px1[0]),(g=d+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s&gt;0&amp;&amp;(t.labelExtraX+=g)))}for(n=0;n&lt;2;n++)for(i=n?m:v,o=n?Math.max:Math.min,l=n?1:-1,r=0;r&lt;2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(i),f=t[1-n][r],h=f.concat(u),d=[],p=0;p&lt;u.length;p++)void 0!==u[p].yLabelMid&amp;&amp;d.push(u[p]);for(g=!1,p=0;n&amp;&amp;p&lt;f.length;p++)if(void 0!==f[p].yLabelMid){g=f[p];break}for(p=0;p&lt;d.length;p++){var x=p&amp;&amp;d[p-1];g&amp;&amp;!p&amp;&amp;(x=g),y(d[p],x)}}}(m,g),p.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=n.select(this),r=e.select(&quot;g.slicetext text&quot;);r.attr(&quot;transform&quot;,&quot;translate(&quot;+t.labelExtraX+&quot;,&quot;+t.labelExtraY+&quot;)&quot;+r.attr(&quot;transform&quot;));var i=t.cxFinal+t.pxmid[0],o=&quot;M&quot;+i+&quot;,&quot;+(t.cyFinal+t.pxmid[1]),s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]&lt;0?-1:1)/4;if(t.labelExtraX){var l=t.labelExtraX*t.pxmid[1]/t.pxmid[0],c=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(l)&gt;Math.abs(c)?o+=&quot;l&quot;+c*t.pxmid[0]/t.pxmid[1]+&quot;,&quot;+c+&quot;H&quot;+(i+t.labelExtraX+s):o+=&quot;l&quot;+t.labelExtraX+&quot;,&quot;+l+&quot;v&quot;+(c-l)+&quot;h&quot;+s}else o+=&quot;V&quot;+(t.yLabelMid+t.labelExtraY)+&quot;h&quot;+s;e.append(&quot;path&quot;).classed(&quot;textline&quot;,!0).call(a.stroke,g.outsidetextfont.color).attr({&quot;stroke-width&quot;:Math.min(2,g.outsidetextfont.size/8),d:o,fill:&quot;none&quot;})}})})});setTimeout(function(){p.selectAll(&quot;tspan&quot;).each(function(){var t=n.select(this);t.attr(&quot;dy&quot;)&amp;&amp;t.attr(&quot;dy&quot;,t.attr(&quot;dy&quot;))})},0)}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../../lib/svg_text_utils&quot;:718,&quot;./event_data&quot;:1011,&quot;./helpers&quot;:1012,d3:147}],1017:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;./style_one&quot;);e.exports=function(t){t._fullLayout._pielayer.selectAll(&quot;.trace&quot;).each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(&quot;path.surface&quot;).each(function(t){n.select(this).call(i,t,e)})})}},{&quot;./style_one&quot;:1018,d3:147}],1018:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;./helpers&quot;).castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style({&quot;stroke-width&quot;:s}).call(n.fill,e.color).call(n.stroke,o)}},{&quot;../../components/color&quot;:567,&quot;./helpers&quot;:1012}],1019:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;);e.exports={x:n.x,y:n.y,xy:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},indices:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},xbounds:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},ybounds:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},text:n.text,marker:{color:{valType:&quot;color&quot;,arrayOk:!1,editType:&quot;calc&quot;},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1,arrayOk:!1,editType:&quot;calc&quot;},blend:{valType:&quot;boolean&quot;,dflt:null,editType:&quot;calc&quot;},sizemin:{valType:&quot;number&quot;,min:.1,max:2,dflt:.5,editType:&quot;calc&quot;},sizemax:{valType:&quot;number&quot;,min:.1,dflt:20,editType:&quot;calc&quot;},border:{color:{valType:&quot;color&quot;,arrayOk:!1,editType:&quot;calc&quot;},arearatio:{valType:&quot;number&quot;,min:0,max:1,dflt:0,editType:&quot;calc&quot;},editType:&quot;calc&quot;},editType:&quot;calc&quot;}}},{&quot;../scatter/attributes&quot;:1032}],1020:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-pointcloud2d&quot;),i=t(&quot;../../lib/str2rgbarray&quot;),a=t(&quot;../../plots/cartesian/autorange&quot;).findExtremes,o=t(&quot;../scatter/get_trace_color&quot;);function s(t,e){this.scene=t,this.uid=e,this.type=&quot;pointcloud&quot;,this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color=&quot;rgb(0, 0, 0)&quot;,this.name=&quot;&quot;,this.hoverinfo=&quot;all&quot;,this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&amp;&amp;t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length&gt;&gt;&gt;1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;l&lt;e;l++)o=n[2*l],s=n[2*l+1],o&lt;d[0]&amp;&amp;(d[0]=o),o&gt;d[2]&amp;&amp;(d[2]=o),s&lt;d[1]&amp;&amp;(d[1]=s),s&gt;d[3]&amp;&amp;(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;l&lt;e;l++)r[l]=l}else for(e=c.length,n=new Float32Array(2*e),r=new Int32Array(e),l=0;l&lt;e;l++)o=c[l],s=u[l],r[l]=l,n[2*l]=o,n[2*l+1]=s,o&lt;d[0]&amp;&amp;(d[0]=o),o&gt;d[2]&amp;&amp;(d[2]=o),s&lt;d[1]&amp;&amp;(d[1]=s),s&gt;d[3]&amp;&amp;(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length&lt;100||u.length&lt;100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{&quot;../../lib/str2rgbarray&quot;:717,&quot;../../plots/cartesian/autorange&quot;:741,&quot;../scatter/get_trace_color&quot;:1042,&quot;gl-pointcloud2d&quot;:278}],1021:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./attributes&quot;);e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a(&quot;x&quot;),a(&quot;y&quot;),a(&quot;xbounds&quot;),a(&quot;ybounds&quot;),t.xy&amp;&amp;t.xy instanceof Float32Array&amp;&amp;(e.xy=t.xy),t.indices&amp;&amp;t.indices instanceof Int32Array&amp;&amp;(e.indices=t.indices),a(&quot;text&quot;),a(&quot;marker.color&quot;,r),a(&quot;marker.opacity&quot;),a(&quot;marker.blend&quot;),a(&quot;marker.sizemin&quot;),a(&quot;marker.sizemax&quot;),a(&quot;marker.border.color&quot;,r),a(&quot;marker.border.arearatio&quot;),e._length=null}},{&quot;../../lib&quot;:693,&quot;./attributes&quot;:1019}],1022:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;../scatter3d/calc&quot;),n.plot=t(&quot;./convert&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;pointcloud&quot;,n.basePlotModule=t(&quot;../../plots/gl2d&quot;),n.categories=[&quot;gl&quot;,&quot;gl2d&quot;,&quot;showLegend&quot;],n.meta={},e.exports=n},{&quot;../../plots/gl2d&quot;:781,&quot;../scatter3d/calc&quot;:1060,&quot;./attributes&quot;:1019,&quot;./convert&quot;:1020,&quot;./defaults&quot;:1021}],1023:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/font_attributes&quot;),i=t(&quot;../../plots/attributes&quot;),a=t(&quot;../../components/color/attributes&quot;),o=t(&quot;../../components/fx/attributes&quot;),s=t(&quot;../../plots/domain&quot;).attributes,l=t(&quot;../../lib/extend&quot;).extendFlat,c=t(&quot;../../plot_api/edit_types&quot;).overrideAll;e.exports=c({hoverinfo:l({},i.hoverinfo,{flags:[&quot;label&quot;,&quot;text&quot;,&quot;value&quot;,&quot;percent&quot;,&quot;name&quot;]}),hoverlabel:o.hoverlabel,domain:s({name:&quot;sankey&quot;,trace:!0}),orientation:{valType:&quot;enumerated&quot;,values:[&quot;v&quot;,&quot;h&quot;],dflt:&quot;h&quot;},valueformat:{valType:&quot;string&quot;,dflt:&quot;.3s&quot;},valuesuffix:{valType:&quot;string&quot;,dflt:&quot;&quot;},arrangement:{valType:&quot;enumerated&quot;,values:[&quot;snap&quot;,&quot;perpendicular&quot;,&quot;freeform&quot;,&quot;fixed&quot;],dflt:&quot;snap&quot;},textfont:n({}),node:{label:{valType:&quot;data_array&quot;,dflt:[]},color:{valType:&quot;color&quot;,arrayOk:!0},line:{color:{valType:&quot;color&quot;,dflt:a.defaultLine,arrayOk:!0},width:{valType:&quot;number&quot;,min:0,dflt:.5,arrayOk:!0}},pad:{valType:&quot;number&quot;,arrayOk:!1,min:0,dflt:20},thickness:{valType:&quot;number&quot;,arrayOk:!1,min:1,dflt:20}},link:{label:{valType:&quot;data_array&quot;,dflt:[]},color:{valType:&quot;color&quot;,arrayOk:!0},line:{color:{valType:&quot;color&quot;,dflt:a.defaultLine,arrayOk:!0},width:{valType:&quot;number&quot;,min:0,dflt:0,arrayOk:!0}},source:{valType:&quot;data_array&quot;,dflt:[]},target:{valType:&quot;data_array&quot;,dflt:[]},value:{valType:&quot;data_array&quot;,dflt:[]}}},&quot;calc&quot;,&quot;nested&quot;)},{&quot;../../components/color/attributes&quot;:566,&quot;../../components/fx/attributes&quot;:601,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/attributes&quot;:739,&quot;../../plots/domain&quot;:767,&quot;../../plots/font_attributes&quot;:768}],1024:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plot_api/edit_types&quot;).overrideAll,i=t(&quot;../../plots/get_data&quot;).getModuleCalcData,a=t(&quot;./plot&quot;),o=t(&quot;../../components/fx/layout_attributes&quot;);r.name=&quot;sankey&quot;,r.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},&quot;plot&quot;,&quot;nested&quot;),r.plot=function(t){var e=i(t.calcdata,&quot;sankey&quot;)[0];a(t,e)},r.clean=function(t,e,r,n){var i=n._has&amp;&amp;n._has(&quot;sankey&quot;),a=e._has&amp;&amp;e._has(&quot;sankey&quot;);i&amp;&amp;!a&amp;&amp;n._paperdiv.selectAll(&quot;.sankey&quot;).remove()}},{&quot;../../components/fx/layout_attributes&quot;:610,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/get_data&quot;:778,&quot;./plot&quot;:1029}],1025:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;strongly-connected-components&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../lib/gup&quot;).wrap;e.exports=function(t,e){return function(t,e,r){for(var a=t.length,o=i.init2dArray(a,0),s=0;s&lt;Math.min(e.length,r.length);s++)if(i.isIndex(e[s],a)&amp;&amp;i.isIndex(r[s],a)){if(e[s]===r[s])return!0;o[e[s]].push(r[s])}return n(o).components.some(function(t){return t.length&gt;1})}(e.node.label,e.link.source,e.link.target)&amp;&amp;(i.error(&quot;Circularity is present in the Sankey data. Removing all nodes and links.&quot;),e.link.label=[],e.link.source=[],e.link.target=[],e.link.value=[],e.link.color=[],e.node.label=[],e.node.color=[]),a({link:e.link,node:e.node})}},{&quot;../../lib&quot;:693,&quot;../../lib/gup&quot;:690,&quot;strongly-connected-components&quot;:503}],1026:[function(t,e,r){&quot;use strict&quot;;e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:&quot;cubic-in-out&quot;,cn:{sankey:&quot;sankey&quot;,sankeyLinks:&quot;sankey-links&quot;,sankeyLink:&quot;sankey-link&quot;,sankeyNodeSet:&quot;sankey-node-set&quot;,sankeyNode:&quot;sankey-node&quot;,nodeRect:&quot;node-rect&quot;,nodeCapture:&quot;node-capture&quot;,nodeCentered:&quot;node-entered&quot;,nodeLabelGuide:&quot;node-label-guide&quot;,nodeLabel:&quot;node-label&quot;,nodeLabelTextPath:&quot;node-label-text-path&quot;}}},{}],1027:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./attributes&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;tinycolor2&quot;),s=t(&quot;../../plots/domain&quot;).defaults;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}c(&quot;node.label&quot;),c(&quot;node.pad&quot;),c(&quot;node.thickness&quot;),c(&quot;node.line.color&quot;),c(&quot;node.line.width&quot;);var u=l.colorway;c(&quot;node.color&quot;,e.node.label.map(function(t,e){return a.addOpacity(function(t){return u[t%u.length]}(e),.8)})),c(&quot;link.label&quot;),c(&quot;link.source&quot;),c(&quot;link.target&quot;),c(&quot;link.value&quot;),c(&quot;link.line.color&quot;),c(&quot;link.line.width&quot;),c(&quot;link.color&quot;,e.link.value.map(function(){return o(l.paper_bgcolor).getLuminance()&lt;.333?&quot;rgba(255, 255, 255, 0.6)&quot;:&quot;rgba(0, 0, 0, 0.2)&quot;})),s(e,l,c),c(&quot;orientation&quot;),c(&quot;valueformat&quot;),c(&quot;valuesuffix&quot;),c(&quot;arrangement&quot;),n.coerceFont(c,&quot;textfont&quot;,n.extendFlat({},l.font)),e._length=null}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../../plots/domain&quot;:767,&quot;./attributes&quot;:1023,tinycolor2:511}],1028:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;sankey&quot;,n.basePlotModule=t(&quot;./base_plot&quot;),n.categories=[&quot;noOpacity&quot;],n.meta={},e.exports=n},{&quot;./attributes&quot;:1023,&quot;./base_plot&quot;:1024,&quot;./calc&quot;:1025,&quot;./defaults&quot;:1027,&quot;./plot&quot;:1029}],1029:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;./render&quot;),a=t(&quot;../../components/fx&quot;),o=t(&quot;../../components/color&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;./constants&quot;).cn,c=s._;function u(t){return&quot;&quot;!==t}function f(t,e){return t.filter(function(t){return t.key===e.traceId})}function h(t,e){n.select(t).select(&quot;path&quot;).style(&quot;fill-opacity&quot;,e),n.select(t).select(&quot;rect&quot;).style(&quot;fill-opacity&quot;,e)}function p(t){n.select(t).select(&quot;text.name&quot;).style(&quot;fill&quot;,&quot;black&quot;)}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(t,e,r){e&amp;&amp;r&amp;&amp;f(r,e).selectAll(&quot;.&quot;+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function v(t,e,r){e&amp;&amp;r&amp;&amp;f(r,e).selectAll(&quot;.&quot;+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var i=n.datum().link.label;n.style(&quot;fill-opacity&quot;,.4),i&amp;&amp;f(e,t).selectAll(&quot;.&quot;+l.sankeyLink).filter(function(t){return t.link.label===i}).style(&quot;fill-opacity&quot;,.4),r&amp;&amp;f(e,t).selectAll(&quot;.&quot;+l.sankeyNode).filter(g(t)).call(m)}function x(t,e,r,n){var i=n.datum().link.label;n.style(&quot;fill-opacity&quot;,function(t){return t.tinyColorAlpha}),i&amp;&amp;f(e,t).selectAll(&quot;.&quot;+l.sankeyLink).filter(function(t){return t.link.label===i}).style(&quot;fill-opacity&quot;,function(t){return t.tinyColorAlpha}),r&amp;&amp;f(e,t).selectAll(l.sankeyNode).filter(g(t)).call(v)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&amp;&amp;n}e.exports=function(t,e){var r=t._fullLayout,s=r._paper,f=r._size,d=c(t,&quot;source:&quot;)+&quot; &quot;,g=c(t,&quot;target:&quot;)+&quot; &quot;,_=c(t,&quot;incoming flow count:&quot;)+&quot; &quot;,w=c(t,&quot;outgoing flow count:&quot;)+&quot; &quot;;i(s,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&amp;&amp;(n.select(e).call(y.bind(0,r,i,!0)),t.emit(&quot;plotly_hover&quot;,{event:n.event,points:[r.link]}))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var s=i.link.trace,l=t._fullLayout._paperdiv.node().getBoundingClientRect(),c=e.getBoundingClientRect(),f=c.left+c.width/2,m=c.top+c.height/2,v=a.loneHover({x:f-l.left,y:m-l.top,name:n.format(i.valueFormat)(i.link.value)+i.valueSuffix,text:[i.link.label||&quot;&quot;,d+i.link.source.label,g+i.link.target.label].filter(u).join(&quot;&lt;br&gt;&quot;),color:b(s,&quot;bgcolor&quot;)||o.addOpacity(i.tinyColorHue,1),borderColor:b(s,&quot;bordercolor&quot;),fontFamily:b(s,&quot;font.family&quot;),fontSize:b(s,&quot;font.size&quot;),fontColor:b(s,&quot;font.color&quot;),idealAlign:n.event.x&lt;f?&quot;right&quot;:&quot;left&quot;},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(v,.65),p(v)}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&amp;&amp;(n.select(e).call(x.bind(0,i,o,!0)),t.emit(&quot;plotly_unhover&quot;,{event:n.event,points:[i.link]}),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r){var i=r.link;i.originalEvent=n.event,t._hoverdata=[i],a.click(t,{target:!0})}},nodeEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&amp;&amp;(n.select(e).call(m,r,i),t.emit(&quot;plotly_hover&quot;,{event:n.event,points:[r.node]}))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var o=i.node.trace,s=n.select(e).select(&quot;.&quot;+l.nodeRect),c=t._fullLayout._paperdiv.node().getBoundingClientRect(),f=s.node().getBoundingClientRect(),d=f.left-2-c.left,g=f.right+2-c.left,m=f.top+f.height/4-c.top,v=a.loneHover({x0:d,x1:g,y:m,name:n.format(i.valueFormat)(i.node.value)+i.valueSuffix,text:[i.node.label,_+i.node.targetLinks.length,w+i.node.sourceLinks.length].filter(u).join(&quot;&lt;br&gt;&quot;),color:b(o,&quot;bgcolor&quot;)||i.tinyColorHue,borderColor:b(o,&quot;bordercolor&quot;),fontFamily:b(o,&quot;font.family&quot;),fontSize:b(o,&quot;font.size&quot;),fontColor:b(o,&quot;font.color&quot;),idealAlign:&quot;left&quot;},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(v,.85),p(v)}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&amp;&amp;(n.select(e).call(v,i,o),t.emit(&quot;plotly_unhover&quot;,{event:n.event,points:[i.node]}),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(v,r,i),a.click(t,{target:!0})}}})}},{&quot;../../components/color&quot;:567,&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;./constants&quot;:1026,&quot;./render&quot;:1030,d3:147}],1030:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;),i=t(&quot;d3&quot;),a=t(&quot;tinycolor2&quot;),o=t(&quot;../../components/color&quot;),s=t(&quot;../../components/drawing&quot;),l=t(&quot;@plotly/d3-sankey&quot;).sankey,c=t(&quot;d3-force&quot;),u=t(&quot;../../lib&quot;),f=u.isArrayOrTypedArray,h=u.isIndex,p=t(&quot;../../lib/gup&quot;),d=p.keyFun,g=p.repeat,m=p.unwrap;function v(t){t.lastDraggedX=t.x,t.lastDraggedY=t.y}function y(t){return function(e){return e.node.originalX===t.node.originalX}}function x(t){for(var e=0;e&lt;t.length;e++)t[e].y=t[e].y+t[e].dy/2}function b(t){t.attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.node.x.toFixed(3)+&quot;, &quot;+(t.node.y-t.node.dy/2).toFixed(3)+&quot;)&quot;})}function _(t){var e=t.sankey.nodes();!function(t){for(var e=0;e&lt;t.length;e++)t[e].y=t[e].y-t[e].dy/2}(e);var r=t.sankey.link()(t.link);return x(e),r}function w(t){t.call(b)}function k(t,e){t.call(w),e.attr(&quot;d&quot;,_)}function M(t){t.attr(&quot;width&quot;,function(t){return t.visibleWidth}).attr(&quot;height&quot;,function(t){return t.visibleHeight})}function A(t){return t.link.dy&gt;1||t.linkLineWidth&gt;0}function T(t){return&quot;translate(&quot;+t.translateX+&quot;,&quot;+t.translateY+&quot;)&quot;+(t.horizontal?&quot;matrix(1 0 0 1 0 0)&quot;:&quot;matrix(0 1 1 0 0 0)&quot;)}function S(t){return&quot;translate(&quot;+(t.horizontal?0:t.labelY)+&quot; &quot;+(t.horizontal?t.labelY:0)+&quot;)&quot;}function E(t){return i.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function C(t){return t.horizontal?&quot;matrix(1 0 0 1 0 0)&quot;:&quot;matrix(0 1 1 0 0 0)&quot;}function L(t){return t.horizontal?&quot;scale(1 1)&quot;:&quot;scale(-1 1)&quot;}function z(t){return t.darkBackground&amp;&amp;!t.horizontal?&quot;rgb(255,255,255)&quot;:&quot;rgb(0,0,0)&quot;}function P(t){return t.horizontal&amp;&amp;t.left?&quot;100%&quot;:&quot;0%&quot;}function O(t,e,r){t.on(&quot;.basic&quot;,null).on(&quot;mouseover.basic&quot;,function(t){t.interactionState.dragInProgress||(r.hover(this,t,e),t.interactionState.hovered=[this,t])}).on(&quot;mousemove.basic&quot;,function(t){t.interactionState.dragInProgress||(r.follow(this,t),t.interactionState.hovered=[this,t])}).on(&quot;mouseout.basic&quot;,function(t){t.interactionState.dragInProgress||(r.unhover(this,t,e),t.interactionState.hovered=!1)}).on(&quot;click.basic&quot;,function(t){t.interactionState.hovered&amp;&amp;(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||r.select(this,t,e)})}function I(t,e,r){var a=i.behavior.drag().origin(function(t){return t.node}).on(&quot;dragstart&quot;,function(i){if(&quot;fixed&quot;!==i.arrangement&amp;&amp;(u.raiseToTop(this),i.interactionState.dragInProgress=i.node,v(i.node),i.interactionState.hovered&amp;&amp;(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),&quot;snap&quot;===i.arrangement)){var a=i.traceId+&quot;|&quot;+Math.floor(i.node.originalX);i.forceLayouts[a]?i.forceLayouts[a].alpha(1):function(t,e,r){var i=r.sankey.nodes().filter(function(t){return t.originalX===r.node.originalX});r.forceLayouts[e]=c.forceSimulation(i).alphaDecay(0).force(&quot;collide&quot;,c.forceCollide().radius(function(t){return t.dy/2+r.nodePad/2}).strength(1).iterations(n.forceIterations)).force(&quot;constrain&quot;,function(t,e,r,i){return function(){for(var t=0,a=0;a&lt;r.length;a++){var o=r[a];o===i.interactionState.dragInProgress?(o.x=o.lastDraggedX,o.y=o.lastDraggedY):(o.vx=(o.originalX-o.x)/n.forceTicksPerFrame,o.y=Math.min(i.size-o.dy/2,Math.max(o.dy/2,o.y))),t=Math.max(t,Math.abs(o.vx),Math.abs(o.vy))}!i.interactionState.dragInProgress&amp;&amp;t&lt;.1&amp;&amp;i.forceLayouts[e].alpha()&gt;0&amp;&amp;i.forceLayouts[e].alpha(0)}}(0,e,i,r)).stop()}(0,a,i),function(t,e,r,i){window.requestAnimationFrame(function a(){for(var o=0;o&lt;n.forceTicksPerFrame;o++)r.forceLayouts[i].tick();r.sankey.relayout(),k(t.filter(y(r)),e),r.forceLayouts[i].alpha()&gt;0&amp;&amp;window.requestAnimationFrame(a)})}(t,e,i,a)}}).on(&quot;drag&quot;,function(r){if(&quot;fixed&quot;!==r.arrangement){var n=i.event.x,a=i.event.y;&quot;snap&quot;===r.arrangement?(r.node.x=n,r.node.y=a):(&quot;freeform&quot;===r.arrangement&amp;&amp;(r.node.x=n),r.node.y=Math.max(r.node.dy/2,Math.min(r.size-r.node.dy/2,a))),v(r.node),&quot;snap&quot;!==r.arrangement&amp;&amp;(r.sankey.relayout(),k(t.filter(y(r)),e))}}).on(&quot;dragend&quot;,function(t){t.interactionState.dragInProgress=!1});t.on(&quot;.drag&quot;,null).call(a)}e.exports=function(t,e,r,i){var c=t.selectAll(&quot;.&quot;+n.cn.sankey).data(e.filter(function(t){return m(t).trace.visible}).map(function(t,e,r){var i,a=m(e).trace,o=a.domain,s=a.node,c=a.link,u=a.arrangement,p=&quot;h&quot;===a.orientation,d=a.node.pad,g=a.node.thickness,v=a.node.line.color,y=a.node.line.width,b=a.link.line.color,_=a.link.line.width,w=a.valueformat,k=a.valuesuffix,M=a.textfont,A=t.width*(o.x[1]-o.x[0]),T=t.height*(o.y[1]-o.y[0]),S=[],E=f(c.color),C={},L=s.label.length;for(i=0;i&lt;c.value.length;i++){var z=c.value[i],P=c.source[i],O=c.target[i];z&gt;0&amp;&amp;h(P,L)&amp;&amp;h(O,L)&amp;&amp;(O=+O,C[P=+P]=C[O]=!0,S.push({pointNumber:i,label:c.label[i],color:E?c.color[i]:c.color,source:P,target:O,value:+z}))}var I=f(s.color),D=[],R=!1,B={};for(i=0;i&lt;L;i++)if(C[i]){var F=s.label[i];B[i]=D.length,D.push({pointNumber:i,label:F,color:I?s.color[i]:s.color})}else R=!0;if(R)for(i=0;i&lt;S.length;i++)S[i].source=B[S[i].source],S[i].target=B[S[i].target];for(var N,j=l().size(p?[A,T]:[T,A]).nodeWidth(g).nodePadding(d).nodes(D).links(S).layout(n.sankeyIterations),V=j.nodes(),U=0;U&lt;V.length;U++)(N=V[U]).width=A,N.height=T;return x(D),{key:r,trace:a,guid:Math.floor(1e12*(1+Math.random())),horizontal:p,width:A,height:T,nodePad:d,nodeLineColor:v,nodeLineWidth:y,linkLineColor:b,linkLineWidth:_,valueFormat:w,valueSuffix:k,textFont:M,translateX:o.x[0]*t.width+t.margin.l,translateY:t.height-o.y[1]*t.height+t.margin.t,dragParallel:p?T:A,dragPerpendicular:p?A:T,nodes:D,links:S,arrangement:u,sankey:j,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,r)),d);c.exit().remove(),c.enter().append(&quot;g&quot;).classed(n.cn.sankey,!0).style(&quot;box-sizing&quot;,&quot;content-box&quot;).style(&quot;position&quot;,&quot;absolute&quot;).style(&quot;left&quot;,0).style(&quot;shape-rendering&quot;,&quot;geometricPrecision&quot;).style(&quot;pointer-events&quot;,&quot;auto&quot;).attr(&quot;transform&quot;,T),c.transition().ease(n.ease).duration(n.duration).attr(&quot;transform&quot;,T);var u=c.selectAll(&quot;.&quot;+n.cn.sankeyLinks).data(g,d);u.enter().append(&quot;g&quot;).classed(n.cn.sankeyLinks,!0).style(&quot;fill&quot;,&quot;none&quot;);var p=u.selectAll(&quot;.&quot;+n.cn.sankeyLink).data(function(t){return t.sankey.links().filter(function(t){return t.value}).map(function(t,e,r){var n=a(r.color),i=r.source.label+&quot;|&quot;+r.target.label,s=t[i];t[i]=(s||0)+1;var l=i+&quot;__&quot;+t[i];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:l,traceId:e.key,link:r,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,interactionState:e.interactionState}}.bind(null,{},t))},d);p.enter().append(&quot;path&quot;).classed(n.cn.sankeyLink,!0).attr(&quot;d&quot;,_).call(O,c,i.linkEvents),p.style(&quot;stroke&quot;,function(t){return A(t)?o.tinyRGB(a(t.linkLineColor)):t.tinyColorHue}).style(&quot;stroke-opacity&quot;,function(t){return A(t)?o.opacity(t.linkLineColor):t.tinyColorAlpha}).style(&quot;stroke-width&quot;,function(t){return A(t)?t.linkLineWidth:1}).style(&quot;fill&quot;,function(t){return t.tinyColorHue}).style(&quot;fill-opacity&quot;,function(t){return t.tinyColorAlpha}),p.transition().ease(n.ease).duration(n.duration).attr(&quot;d&quot;,_),p.exit().transition().ease(n.ease).duration(n.duration).style(&quot;opacity&quot;,0).remove();var v=c.selectAll(&quot;.&quot;+n.cn.sankeyNodeSet).data(g,d);v.enter().append(&quot;g&quot;).classed(n.cn.sankeyNodeSet,!0),v.style(&quot;cursor&quot;,function(t){switch(t.arrangement){case&quot;fixed&quot;:return&quot;default&quot;;case&quot;perpendicular&quot;:return&quot;ns-resize&quot;;default:return&quot;move&quot;}});var y=v.selectAll(&quot;.&quot;+n.cn.sankeyNode).data(function(t){var e=t.sankey.nodes();return function(t){var e,r=[];for(e=0;e&lt;t.length;e++)t[e].originalX=t[e].x,t[e].originalY=t[e].y,-1===r.indexOf(t[e].x)&amp;&amp;r.push(t[e].x);for(r.sort(function(t,e){return t-e}),e=0;e&lt;t.length;e++)t[e].originalLayerIndex=r.indexOf(t[e].originalX),t[e].originalLayer=t[e].originalLayerIndex/(r.length-1)}(e),e.filter(function(t){return t.value}).map(function(t,e,r){var i=a(r.color),s=n.nodePadAcross,l=e.nodePad/2,c=r.dx,u=Math.max(.5,r.dy),f=r.label,h=t[f];t[f]=(h||0)+1;var p=f+&quot;__&quot;+t[f];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:p,traceId:e.key,node:r,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(c),visibleHeight:u,zoneX:-s,zoneY:-l,zoneWidth:c+2*s,zoneHeight:u+2*l,labelY:e.horizontal?r.dy/2+1:r.dx/2+1,left:1===r.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:i.getBrightness()&lt;=128,tinyColorHue:o.tinyRGB(i),tinyColorAlpha:i.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,p].join(&quot; &quot;),interactionState:e.interactionState}}.bind(null,{},t))},d);y.enter().append(&quot;g&quot;).classed(n.cn.sankeyNode,!0).call(b).call(O,c,i.nodeEvents),y.call(I,p,i),y.transition().ease(n.ease).duration(n.duration).call(b),y.exit().transition().ease(n.ease).duration(n.duration).style(&quot;opacity&quot;,0).remove();var w=y.selectAll(&quot;.&quot;+n.cn.nodeRect).data(g);w.enter().append(&quot;rect&quot;).classed(n.cn.nodeRect,!0).call(M),w.style(&quot;stroke-width&quot;,function(t){return t.nodeLineWidth}).style(&quot;stroke&quot;,function(t){return o.tinyRGB(a(t.nodeLineColor))}).style(&quot;stroke-opacity&quot;,function(t){return o.opacity(t.nodeLineColor)}).style(&quot;fill&quot;,function(t){return t.tinyColorHue}).style(&quot;fill-opacity&quot;,function(t){return t.tinyColorAlpha}),w.transition().ease(n.ease).duration(n.duration).call(M);var k=y.selectAll(&quot;.&quot;+n.cn.nodeCapture).data(g);k.enter().append(&quot;rect&quot;).classed(n.cn.nodeCapture,!0).style(&quot;fill-opacity&quot;,0),k.attr(&quot;x&quot;,function(t){return t.zoneX}).attr(&quot;y&quot;,function(t){return t.zoneY}).attr(&quot;width&quot;,function(t){return t.zoneWidth}).attr(&quot;height&quot;,function(t){return t.zoneHeight});var D=y.selectAll(&quot;.&quot;+n.cn.nodeCentered).data(g);D.enter().append(&quot;g&quot;).classed(n.cn.nodeCentered,!0).attr(&quot;transform&quot;,S),D.transition().ease(n.ease).duration(n.duration).attr(&quot;transform&quot;,S);var R=D.selectAll(&quot;.&quot;+n.cn.nodeLabelGuide).data(g);R.enter().append(&quot;path&quot;).classed(n.cn.nodeLabelGuide,!0).attr(&quot;id&quot;,function(t){return t.uniqueNodeLabelPathId}).attr(&quot;d&quot;,E).attr(&quot;transform&quot;,C),R.transition().ease(n.ease).duration(n.duration).attr(&quot;d&quot;,E).attr(&quot;transform&quot;,C);var B=D.selectAll(&quot;.&quot;+n.cn.nodeLabel).data(g);B.enter().append(&quot;text&quot;).classed(n.cn.nodeLabel,!0).attr(&quot;transform&quot;,L).style(&quot;user-select&quot;,&quot;none&quot;).style(&quot;cursor&quot;,&quot;default&quot;).style(&quot;fill&quot;,&quot;black&quot;),B.style(&quot;text-shadow&quot;,function(t){return t.horizontal?&quot;-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff&quot;:&quot;none&quot;}).each(function(t){s.font(B,t.textFont)}),B.transition().ease(n.ease).duration(n.duration).attr(&quot;transform&quot;,L);var F=B.selectAll(&quot;.&quot;+n.cn.nodeLabelTextPath).data(g);F.enter().append(&quot;textPath&quot;).classed(n.cn.nodeLabelTextPath,!0).attr(&quot;alignment-baseline&quot;,&quot;middle&quot;).attr(&quot;xlink:href&quot;,function(t){return&quot;#&quot;+t.uniqueNodeLabelPathId}).attr(&quot;startOffset&quot;,P).style(&quot;fill&quot;,z),F.text(function(t){return t.horizontal||t.node.dy&gt;5?t.node.label:&quot;&quot;}).attr(&quot;text-anchor&quot;,function(t){return t.horizontal&amp;&amp;t.left?&quot;end&quot;:&quot;start&quot;}),F.transition().ease(n.ease).duration(n.duration).attr(&quot;startOffset&quot;,P).style(&quot;fill&quot;,z)}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../../lib/gup&quot;:690,&quot;./constants&quot;:1026,&quot;@plotly/d3-sankey&quot;:45,d3:147,&quot;d3-force&quot;:143,tinycolor2:511}],1031:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t,e){for(var r=0;r&lt;t.length;r++)t[r].i=r;n.mergeArray(e.text,t,&quot;tx&quot;),n.mergeArray(e.hovertext,t,&quot;htx&quot;),n.mergeArray(e.customdata,t,&quot;data&quot;),n.mergeArray(e.textposition,t,&quot;tp&quot;),e.textfont&amp;&amp;(n.mergeArray(e.textfont.size,t,&quot;ts&quot;),n.mergeArray(e.textfont.color,t,&quot;tc&quot;),n.mergeArray(e.textfont.family,t,&quot;tf&quot;));var i=e.marker;if(i){n.mergeArray(i.size,t,&quot;ms&quot;),n.mergeArray(i.opacity,t,&quot;mo&quot;),n.mergeArray(i.symbol,t,&quot;mx&quot;),n.mergeArray(i.color,t,&quot;mc&quot;);var a=i.line;i.line&amp;&amp;(n.mergeArray(a.color,t,&quot;mlc&quot;),n.mergeArray(a.width,t,&quot;mlw&quot;));var o=i.gradient;o&amp;&amp;&quot;none&quot;!==o.type&amp;&amp;(n.mergeArray(o.type,t,&quot;mgt&quot;),n.mergeArray(o.color,t,&quot;mgc&quot;))}}},{&quot;../../lib&quot;:693}],1032:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/attributes&quot;),i=t(&quot;../../components/colorbar/attributes&quot;),a=t(&quot;../../plots/font_attributes&quot;),o=t(&quot;../../components/drawing/attributes&quot;).dash,s=t(&quot;../../components/drawing&quot;),l=(t(&quot;./constants&quot;),t(&quot;../../lib/extend&quot;).extendFlat);e.exports={x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},x0:{valType:&quot;any&quot;,dflt:0,editType:&quot;calc+clearAxisTypes&quot;},dx:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},y:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},y0:{valType:&quot;any&quot;,dflt:0,editType:&quot;calc+clearAxisTypes&quot;},dy:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},stackgroup:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;},orientation:{valType:&quot;enumerated&quot;,values:[&quot;v&quot;,&quot;h&quot;],editType:&quot;calc&quot;},groupnorm:{valType:&quot;enumerated&quot;,values:[&quot;&quot;,&quot;fraction&quot;,&quot;percent&quot;],dflt:&quot;&quot;,editType:&quot;calc&quot;},stackgaps:{valType:&quot;enumerated&quot;,values:[&quot;infer zero&quot;,&quot;interpolate&quot;],dflt:&quot;infer zero&quot;,editType:&quot;calc&quot;},text:{valType:&quot;string&quot;,dflt:&quot;&quot;,arrayOk:!0,editType:&quot;calc&quot;},hovertext:{valType:&quot;string&quot;,dflt:&quot;&quot;,arrayOk:!0,editType:&quot;style&quot;},mode:{valType:&quot;flaglist&quot;,flags:[&quot;lines&quot;,&quot;markers&quot;,&quot;text&quot;],extras:[&quot;none&quot;],editType:&quot;calc&quot;},hoveron:{valType:&quot;flaglist&quot;,flags:[&quot;points&quot;,&quot;fills&quot;],editType:&quot;style&quot;},line:{color:{valType:&quot;color&quot;,editType:&quot;style&quot;},width:{valType:&quot;number&quot;,min:0,dflt:2,editType:&quot;style&quot;},shape:{valType:&quot;enumerated&quot;,values:[&quot;linear&quot;,&quot;spline&quot;,&quot;hv&quot;,&quot;vh&quot;,&quot;hvh&quot;,&quot;vhv&quot;],dflt:&quot;linear&quot;,editType:&quot;plot&quot;},smoothing:{valType:&quot;number&quot;,min:0,max:1.3,dflt:1,editType:&quot;plot&quot;},dash:l({},o,{editType:&quot;style&quot;}),simplify:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;plot&quot;},editType:&quot;plot&quot;},connectgaps:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},cliponaxis:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;plot&quot;},fill:{valType:&quot;enumerated&quot;,values:[&quot;none&quot;,&quot;tozeroy&quot;,&quot;tozerox&quot;,&quot;tonexty&quot;,&quot;tonextx&quot;,&quot;toself&quot;,&quot;tonext&quot;],editType:&quot;calc&quot;},fillcolor:{valType:&quot;color&quot;,editType:&quot;style&quot;},marker:l({symbol:{valType:&quot;enumerated&quot;,values:s.symbolList,dflt:&quot;circle&quot;,arrayOk:!0,editType:&quot;style&quot;},opacity:{valType:&quot;number&quot;,min:0,max:1,arrayOk:!0,editType:&quot;style&quot;},size:{valType:&quot;number&quot;,min:0,dflt:6,arrayOk:!0,editType:&quot;calc&quot;},maxdisplayed:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;plot&quot;},sizeref:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},sizemin:{valType:&quot;number&quot;,min:0,dflt:0,editType:&quot;calc&quot;},sizemode:{valType:&quot;enumerated&quot;,values:[&quot;diameter&quot;,&quot;area&quot;],dflt:&quot;diameter&quot;,editType:&quot;calc&quot;},colorbar:i,line:l({width:{valType:&quot;number&quot;,min:0,arrayOk:!0,editType:&quot;style&quot;},editType:&quot;calc&quot;},n(&quot;marker.line&quot;)),gradient:{type:{valType:&quot;enumerated&quot;,values:[&quot;radial&quot;,&quot;horizontal&quot;,&quot;vertical&quot;,&quot;none&quot;],arrayOk:!0,dflt:&quot;none&quot;,editType:&quot;calc&quot;},color:{valType:&quot;color&quot;,arrayOk:!0,editType:&quot;calc&quot;},editType:&quot;calc&quot;},editType:&quot;calc&quot;},n(&quot;marker&quot;)),selected:{marker:{opacity:{valType:&quot;number&quot;,min:0,max:1,editType:&quot;style&quot;},color:{valType:&quot;color&quot;,editType:&quot;style&quot;},size:{valType:&quot;number&quot;,min:0,editType:&quot;style&quot;},editType:&quot;style&quot;},textfont:{color:{valType:&quot;color&quot;,editType:&quot;style&quot;},editType:&quot;style&quot;},editType:&quot;style&quot;},unselected:{marker:{opacity:{valType:&quot;number&quot;,min:0,max:1,editType:&quot;style&quot;},color:{valType:&quot;color&quot;,editType:&quot;style&quot;},size:{valType:&quot;number&quot;,min:0,editType:&quot;style&quot;},editType:&quot;style&quot;},textfont:{color:{valType:&quot;color&quot;,editType:&quot;style&quot;},editType:&quot;style&quot;},editType:&quot;style&quot;},textposition:{valType:&quot;enumerated&quot;,values:[&quot;top left&quot;,&quot;top center&quot;,&quot;top right&quot;,&quot;middle left&quot;,&quot;middle center&quot;,&quot;middle right&quot;,&quot;bottom left&quot;,&quot;bottom center&quot;,&quot;bottom right&quot;],dflt:&quot;middle center&quot;,arrayOk:!0,editType:&quot;calc&quot;},textfont:a({editType:&quot;calc&quot;,colorEditType:&quot;style&quot;,arrayOk:!0}),r:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},t:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;}}},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../components/drawing&quot;:592,&quot;../../components/drawing/attributes&quot;:591,&quot;../../lib/extend&quot;:682,&quot;../../plots/font_attributes&quot;:768,&quot;./constants&quot;:1037}],1033:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;../../constants/numerical&quot;).BADNUM,s=t(&quot;./subtypes&quot;),l=t(&quot;./colorscale_calc&quot;),c=t(&quot;./arrays_to_calcdata&quot;),u=t(&quot;./calc_selection&quot;);function f(t,e,r,n,i,o,l){var c=e._length,u=t._fullLayout,f=r._id,h=n._id,p=u._firstScatter[d(e)]===e.uid,m=(g(e,u,r,n)||{}).orientation,v=e.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};l&amp;&amp;(y.ppad=x.ppad=l);var b=c&lt;2||i[0]!==i[c-1]||o[0]!==o[c-1];b&amp;&amp;(&quot;tozerox&quot;===v||&quot;tonextx&quot;===v&amp;&amp;(p||&quot;h&quot;===m))?y.tozero=!0:(e.error_y||{}).visible||&quot;tonexty&quot;!==v&amp;&amp;&quot;tozeroy&quot;!==v&amp;&amp;(s.hasMarkers(e)||s.hasText(e))||(y.padded=!1,y.ppad=0),b&amp;&amp;(&quot;tozeroy&quot;===v||&quot;tonexty&quot;===v&amp;&amp;(p||&quot;v&quot;===m))?x.tozero=!0:&quot;tonextx&quot;!==v&amp;&amp;&quot;tozerox&quot;!==v||(x.padded=!1),f&amp;&amp;(e._extremes[f]=a.findExtremes(r,i,y)),h&amp;&amp;(e._extremes[h]=a.findExtremes(n,o,x))}function h(t,e){if(s.hasMarkers(t)){var r,n=t.marker,o=1.6*(t.marker.sizeref||1);if(r=&quot;area&quot;===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/o),3)}:function(t){return Math.max((t||0)/o,3)},i.isArrayOrTypedArray(n.size)){var l={type:&quot;linear&quot;};a.setConvert(l);for(var c=l.makeCalcdata(t.marker,&quot;size&quot;),u=new Array(e),f=0;f&lt;e;f++)u[f]=r(c[f]);return u}return r(n.size)}}function p(t,e){var r=d(e),n=t._firstScatter;n[r]||(n[r]=e.uid)}function d(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?&quot;-&quot;+e:&quot;&quot;)}function g(t,e,r,n){var i=t.stackgroup;if(i){var a=e._scatterStackOpts[r._id+n._id][i],o=&quot;v&quot;===a.orientation?n:r;return&quot;linear&quot;===o.type||&quot;log&quot;===o.type?a:void 0}}e.exports={calc:function(t,e){var r,s,d,m,v,y,x=t._fullLayout,b=a.getFromId(t,e.xaxis||&quot;x&quot;),_=a.getFromId(t,e.yaxis||&quot;y&quot;),w=b.makeCalcdata(e,&quot;x&quot;),k=_.makeCalcdata(e,&quot;y&quot;),M=e._length,A=new Array(M),T=e.ids,S=g(e,x,b,_),E=!1;p(x,e);var C,L=&quot;x&quot;,z=&quot;y&quot;;for(S?(S.traceIndices.push(e.index),(r=&quot;v&quot;===S.orientation)?(z=&quot;s&quot;,C=&quot;x&quot;):(L=&quot;s&quot;,C=&quot;y&quot;),v=&quot;interpolate&quot;===S.stackgaps):f(t,e,b,_,w,k,h(e,M)),s=0;s&lt;M;s++){var P=A[s]={},O=n(w[s]),I=n(k[s]);O&amp;&amp;I?(P[L]=w[s],P[z]=k[s]):S&amp;&amp;(r?O:I)?(P[C]=r?w[s]:k[s],P.gap=!0,v?(P.s=o,E=!0):P.s=0):P[L]=P[z]=o,T&amp;&amp;(P.id=String(T[s]))}if(c(A,e),l(e),u(A,e),S){for(s=0;s&lt;A.length;)A[s][C]===o?A.splice(s,1):s++;if(i.sort(A,function(t,e){return t[C]-e[C]||t.i-e.i}),E){for(s=0;s&lt;A.length-1&amp;&amp;A[s].gap;)s++;for((y=A[s].s)||(y=A[s].s=0),d=0;d&lt;s;d++)A[d].s=y;for(m=A.length-1;m&gt;s&amp;&amp;A[m].gap;)m--;for(y=A[m].s,d=A.length-1;d&gt;m;d--)A[d].s=y;for(;s&lt;m;)if(A[++s].gap){for(d=s+1;A[d].gap;)d++;for(var D=A[s-1][C],R=A[s-1].s,B=(A[d].s-R)/(A[d][C]-D);s&lt;d;)A[s].s=R+(A[s][C]-D)*B,s++}}}return A},calcMarkerSize:h,calcAxisExpansion:f,setFirstScatter:p,getStackOpts:g}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;./arrays_to_calcdata&quot;:1031,&quot;./calc_selection&quot;:1034,&quot;./colorscale_calc&quot;:1036,&quot;./subtypes&quot;:1056,&quot;fast-isnumeric&quot;:213}],1034:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&amp;&amp;n.tagSelected(t,e)}},{&quot;../../lib&quot;:693}],1035:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=0;e&lt;t.length;e++){var r=t[e];if(&quot;scatter&quot;===r.type){var n=r.fill;if(&quot;none&quot;!==n&amp;&amp;&quot;toself&quot;!==n&amp;&amp;(r.opacity=void 0,&quot;tonexty&quot;===n||&quot;tonextx&quot;===n))for(var i=e-1;i&gt;=0;i--){var a=t[i];if(&quot;scatter&quot;===a.type&amp;&amp;a.xaxis===r.xaxis&amp;&amp;a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],1036:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/has_colorscale&quot;),i=t(&quot;../../components/colorscale/calc&quot;),a=t(&quot;./subtypes&quot;);e.exports=function(t){a.hasLines(t)&amp;&amp;n(t,&quot;line&quot;)&amp;&amp;i(t,t.line.color,&quot;line&quot;,&quot;c&quot;),a.hasMarkers(t)&amp;&amp;(n(t,&quot;marker&quot;)&amp;&amp;i(t,t.marker.color,&quot;marker&quot;,&quot;c&quot;),n(t,&quot;marker.line&quot;)&amp;&amp;i(t,t.marker.line.color,&quot;marker.line&quot;,&quot;c&quot;))}},{&quot;../../components/colorscale/calc&quot;:575,&quot;../../components/colorscale/has_colorscale&quot;:581,&quot;./subtypes&quot;:1056}],1037:[function(t,e,r){&quot;use strict&quot;;e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20}},{}],1038:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./calc&quot;);function i(t,e,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,t.splice(e,0,s),e&amp;&amp;r===t[e-1][o]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&amp;&amp;(s.s=function(t,e,r,n){var i=t[e-1],a=t[e+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}e.exports=function(t,e){var r=e.xaxis,a=e.yaxis,o=r._id+a._id,s=t._fullLayout._scatterStackOpts[o];if(s){var l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,k=t.calcdata;for(var M in s){var A=(v=s[M]).traceIndices;if(A.length){for(y=&quot;interpolate&quot;===v.stackgaps,x=v.groupnorm,&quot;v&quot;===v.orientation?(b=&quot;x&quot;,_=&quot;y&quot;):(b=&quot;y&quot;,_=&quot;x&quot;),w=new Array(A.length),l=0;l&lt;w.length;l++)w[l]=!1;p=k[A[0]];var T=new Array(p.length);for(l=0;l&lt;p.length;l++)T[l]=p[l][b];for(l=1;l&lt;A.length;l++){for(h=k[A[l]],c=u=0;c&lt;h.length;c++){for(d=h[c][b];d&gt;T[u]&amp;&amp;u&lt;T.length;u++)i(h,c,T[u],l,w,y,b),c++;if(d!==T[u]){for(f=0;f&lt;l;f++)i(k[A[f]],u,d,f,w,y,b);T.splice(u,0,d)}u++}for(;u&lt;T.length;u++)i(h,c,T[u],l,w,y,b),c++}var S=T.length;for(c=0;c&lt;p.length;c++){for(g=p[c][_]=p[c].s,l=1;l&lt;A.length;l++)(h=k[A[l]])[0].trace._rawLength=h[0].trace._length,h[0].trace._length=S,g+=h[c].s,h[c][_]=g;if(x)for(m=(&quot;fraction&quot;===x?g:g/100)||1,l=0;l&lt;A.length;l++){var E=k[A[l]][c];E[_]/=m,E.sNorm=E.s/m}}for(l=0;l&lt;A.length;l++){var C=(h=k[A[l]])[0].trace,L=n.calcMarkerSize(C,C._rawLength),z=Array.isArray(L);if(L&amp;&amp;w[l]||z){var P=L;for(L=new Array(S),c=0;c&lt;S;c++)L[c]=h[c].gap?0:z?P[h[c].i]:P}var O=new Array(S),I=new Array(S);for(c=0;c&lt;S;c++)O[c]=h[c].x,I[c]=h[c].y;n.calcAxisExpansion(t,C,r,a,O,I,L),h[0].t.orientation=v.orientation}}}}}},{&quot;./calc&quot;:1033}],1039:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;./attributes&quot;),o=t(&quot;./constants&quot;),s=t(&quot;./subtypes&quot;),l=t(&quot;./xy_defaults&quot;),c=t(&quot;./stack_defaults&quot;),u=t(&quot;./marker_defaults&quot;),f=t(&quot;./line_defaults&quot;),h=t(&quot;./line_shape_defaults&quot;),p=t(&quot;./text_defaults&quot;),d=t(&quot;./fillcolor_defaults&quot;);e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,a,r,i)}var v=l(t,e,g,m);if(v||(e.visible=!1),e.visible){var y=c(t,e,g,m),x=!y&amp;&amp;v&lt;o.PTS_LINESONLY?&quot;lines+markers&quot;:&quot;lines&quot;;m(&quot;text&quot;),m(&quot;hovertext&quot;),m(&quot;mode&quot;,x),s.hasLines(e)&amp;&amp;(f(t,e,r,g,m),h(t,e,m),m(&quot;connectgaps&quot;),m(&quot;line.simplify&quot;)),s.hasMarkers(e)&amp;&amp;u(t,e,r,g,m,{gradient:!0}),s.hasText(e)&amp;&amp;p(t,e,g,m);var b=[];(s.hasMarkers(e)||s.hasText(e))&amp;&amp;(m(&quot;cliponaxis&quot;),m(&quot;marker.maxdisplayed&quot;),b.push(&quot;points&quot;)),m(&quot;fill&quot;,y?y.fillDflt:&quot;none&quot;),&quot;none&quot;!==e.fill&amp;&amp;(d(t,e,r,m),s.hasLines(e)||h(t,e,m)),&quot;tonext&quot;!==e.fill&amp;&amp;&quot;toself&quot;!==e.fill||b.push(&quot;fills&quot;),m(&quot;hoveron&quot;,b.join(&quot;+&quot;)||&quot;points&quot;);var _=i.getComponentMethod(&quot;errorbars&quot;,&quot;supplyDefaults&quot;);_(t,e,r,{axis:&quot;y&quot;}),_(t,e,r,{axis:&quot;x&quot;,inherit:&quot;y&quot;}),n.coerceSelectionMarkerOpacity(e,m)}}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./attributes&quot;:1032,&quot;./constants&quot;:1037,&quot;./fillcolor_defaults&quot;:1041,&quot;./line_defaults&quot;:1045,&quot;./line_shape_defaults&quot;:1047,&quot;./marker_defaults&quot;:1051,&quot;./stack_defaults&quot;:1054,&quot;./subtypes&quot;:1056,&quot;./text_defaults&quot;:1057,&quot;./xy_defaults&quot;:1058}],1040:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);function i(t){return t||0===t}e.exports=function(t,e,r){var a=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},o=n.extractOption(t,e,&quot;htx&quot;,&quot;hovertext&quot;);if(i(o))return a(o);var s=n.extractOption(t,e,&quot;tx&quot;,&quot;text&quot;);return i(s)?a(s):void 0}},{&quot;../../lib&quot;:693}],1041:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;../../lib&quot;).isArrayOrTypedArray;e.exports=function(t,e,r,a){var o=!1;if(e.marker){var s=e.marker.color,l=(e.marker.line||{}).color;s&amp;&amp;!i(s)?o=s:l&amp;&amp;!i(l)&amp;&amp;(o=l)}a(&quot;fillcolor&quot;,n.addOpacity((e.line||{}).color||o||r,.5))}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693}],1042:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;./subtypes&quot;);e.exports=function(t,e){var r,a;if(&quot;lines&quot;===t.mode)return(r=t.line.color)&amp;&amp;n.opacity(r)?r:t.fillcolor;if(&quot;none&quot;===t.mode)return t.fill?t.fillcolor:&quot;&quot;;var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&amp;&amp;n.opacity(o)?o:s&amp;&amp;n.opacity(s)&amp;&amp;(e.mlw||((t.marker||{}).line||{}).width)?s:&quot;&quot;)?n.opacity(a)&lt;.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&amp;&amp;n.opacity(r)&amp;&amp;i.hasLines(t)&amp;&amp;t.line.width?r:t.fillcolor}},{&quot;../../components/color&quot;:567,&quot;./subtypes&quot;:1056}],1043:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/fx&quot;),a=t(&quot;../../registry&quot;),o=t(&quot;./get_trace_color&quot;),s=t(&quot;../../components/color&quot;),l=t(&quot;./fill_hover_text&quot;);e.exports=function(t,e,r,c){var u=t.cd,f=u[0].trace,h=t.xa,p=t.ya,d=h.c2p(e),g=p.c2p(r),m=[d,g],v=f.hoveron||&quot;&quot;,y=-1!==f.mode.indexOf(&quot;markers&quot;)?3:.5;if(-1!==v.indexOf(&quot;points&quot;)){var x=function(t){var e=Math.max(y,t.mrc||0),r=h.c2p(t.x)-d,n=p.c2p(t.y)-g;return Math.max(Math.sqrt(r*r+n*n)-e,1-y/e)},b=i.getDistanceFunction(c,function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(h.c2p(t.x)-d);return n&lt;e?r*n/e:n-e+r},function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(p.c2p(t.y)-g);return n&lt;e?r*n/e:n-e+r},x);if(i.getClosest(u,b,t),!1!==t.index){var _=u[t.index],w=h.c2p(_.x,!0),k=p.c2p(_.y,!0),M=_.mrc||1;t.index=_.i;var A=u[0].t.orientation,T=A&amp;&amp;(_.sNorm||_.s),S=&quot;h&quot;===A?T:_.x,E=&quot;v&quot;===A?T:_.y;return n.extendFlat(t,{color:o(f,_),x0:w-M,x1:w+M,xLabelVal:S,y0:k-M,y1:k+M,yLabelVal:E,spikeDistance:x(_)}),l(_,f,t),a.getComponentMethod(&quot;errorbars&quot;,&quot;hoverInfo&quot;)(_,f,t),[t]}}if(-1!==v.indexOf(&quot;fills&quot;)&amp;&amp;f._polygons){var C,L,z,P,O,I,D,R,B,F=f._polygons,N=[],j=!1,V=1/0,U=-1/0,q=1/0,H=-1/0;for(C=0;C&lt;F.length;C++)(z=F[C]).contains(m)&amp;&amp;(j=!j,N.push(z),q=Math.min(q,z.ymin),H=Math.max(H,z.ymax));if(j){var G=((q=Math.max(q,0))+(H=Math.min(H,p._length)))/2;for(C=0;C&lt;N.length;C++)for(P=N[C].pts,L=1;L&lt;P.length;L++)(R=P[L-1][1])&gt;G!=(B=P[L][1])&gt;=G&amp;&amp;(I=P[L-1][0],D=P[L][0],B-R&amp;&amp;(O=I+(D-I)*(G-R)/(B-R),V=Math.min(V,O),U=Math.max(U,O)));V=Math.max(V,0),U=Math.min(U,h._length);var W=s.defaultLine;return s.opacity(f.fillcolor)?W=f.fillcolor:s.opacity((f.line||{}).color)&amp;&amp;(W=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:V,x1:U,y0:G,y1:G,color:W}),delete t.index,f.text&amp;&amp;!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{&quot;../../components/color&quot;:567,&quot;../../components/fx&quot;:609,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./fill_hover_text&quot;:1040,&quot;./get_trace_color&quot;:1042}],1044:[function(t,e,r){&quot;use strict&quot;;var n={},i=t(&quot;./subtypes&quot;);n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.cleanData=t(&quot;./clean_data&quot;),n.calc=t(&quot;./calc&quot;).calc,n.crossTraceCalc=t(&quot;./cross_trace_calc&quot;),n.arraysToCalcdata=t(&quot;./arrays_to_calcdata&quot;),n.plot=t(&quot;./plot&quot;),n.colorbar=t(&quot;./marker_colorbar&quot;),n.style=t(&quot;./style&quot;).style,n.styleOnSelect=t(&quot;./style&quot;).styleOnSelect,n.hoverPoints=t(&quot;./hover&quot;),n.selectPoints=t(&quot;./select&quot;),n.animatable=!0,n.moduleType=&quot;trace&quot;,n.name=&quot;scatter&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;cartesian&quot;,&quot;svg&quot;,&quot;symbols&quot;,&quot;errorBarsOK&quot;,&quot;showLegend&quot;,&quot;scatter-like&quot;,&quot;zoomScale&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;./arrays_to_calcdata&quot;:1031,&quot;./attributes&quot;:1032,&quot;./calc&quot;:1033,&quot;./clean_data&quot;:1035,&quot;./cross_trace_calc&quot;:1038,&quot;./defaults&quot;:1039,&quot;./hover&quot;:1043,&quot;./marker_colorbar&quot;:1050,&quot;./plot&quot;:1052,&quot;./select&quot;:1053,&quot;./style&quot;:1055,&quot;./subtypes&quot;:1056}],1045:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;).isArrayOrTypedArray,i=t(&quot;../../components/colorscale/has_colorscale&quot;),a=t(&quot;../../components/colorscale/defaults&quot;);e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;(s(&quot;line.color&quot;,r),i(t,&quot;line&quot;))?a(t,e,o,s,{prefix:&quot;line.&quot;,cLetter:&quot;c&quot;,noScale:!0}):s(&quot;line.color&quot;,!n(c)&amp;&amp;c||r);s(&quot;line.width&quot;),(l||{}).noDash||s(&quot;line.dash&quot;)}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../components/colorscale/has_colorscale&quot;:581,&quot;../../lib&quot;:693}],1046:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../constants/numerical&quot;),i=n.BADNUM,a=n.LOG_CLIP,o=a+.5,s=a-.5,l=t(&quot;../../lib&quot;),c=l.segmentsIntersect,u=l.constrain,f=t(&quot;./constants&quot;);e.exports=function(t,e){var r,n,a,h,p,d,g,m,v,y,x,b,_,w,k,M,A,T,S=e.xaxis,E=e.yaxis,C=&quot;log&quot;===S.type,L=&quot;log&quot;===E.type,z=S._length,P=E._length,O=e.connectGaps,I=e.baseTolerance,D=e.shape,R=&quot;linear&quot;===D,B=[],F=f.minTolerance,N=new Array(t.length),j=0;function V(e){var r=t[e];if(!r)return!1;var n=S.c2p(r.x),a=E.c2p(r.y);if(n===i){if(C&amp;&amp;(n=S.c2p(r.x,!0)),n===i)return!1;L&amp;&amp;a===i&amp;&amp;(n*=Math.abs(S._m*P*(S._m&gt;0?o:s)/(E._m*z*(E._m&gt;0?o:s)))),n*=1e3}if(a===i){if(L&amp;&amp;(a=E.c2p(r.y,!0)),a===i)return!1;a*=1e3}return[n,a]}function U(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,c=i*o+a*s;if(c&gt;0&amp;&amp;c&lt;l){var u=o*a-s*i;if(u*u&lt;l)return!0}}function q(t,e){var r=t[0]/z,n=t[1]/P,i=Math.max(0,-r,r-1,-n,n-1);return i&amp;&amp;void 0!==A&amp;&amp;U(r,n,A,T)&amp;&amp;(i=0),i&amp;&amp;e&amp;&amp;U(r,n,e[0]/z,e[1]/P)&amp;&amp;(i=0),(1+f.toleranceGrowth*i)*I}function H(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}var G,W,Y,X,Z,$,J,K=f.maxScreensAway,Q=-z*K,tt=z*(1+K),et=-P*K,rt=P*(1+K),nt=[[Q,et,tt,et],[tt,et,tt,rt],[tt,rt,Q,rt],[Q,rt,Q,et]];function it(t){if(t[0]&lt;Q||t[0]&gt;tt||t[1]&lt;et||t[1]&gt;rt)return[u(t[0],Q,tt),u(t[1],et,rt)]}function at(t,e){return t[0]===e[0]&amp;&amp;(t[0]===Q||t[0]===tt)||(t[1]===e[1]&amp;&amp;(t[1]===et||t[1]===rt)||void 0)}function ot(t,e,r){return function(n,i){var a=it(n),o=it(i),s=[];if(a&amp;&amp;o&amp;&amp;at(a,o))return s;a&amp;&amp;s.push(a),o&amp;&amp;s.push(o);var c=2*l.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);c&amp;&amp;((a&amp;&amp;o?c&gt;0==a[t]&gt;o[t]?a:o:a||o)[t]+=c);return s}}function st(t){var e=t[0],r=t[1],n=e===N[j-1][0],i=r===N[j-1][1];if(!n||!i)if(j&gt;1){var a=e===N[j-2][0],o=r===N[j-2][1];n&amp;&amp;(e===Q||e===tt)&amp;&amp;a?o?j--:N[j-1]=t:i&amp;&amp;(r===et||r===rt)&amp;&amp;o?a?j--:N[j-1]=t:N[j++]=t}else N[j++]=t}function lt(t){N[j-1][0]!==t[0]&amp;&amp;N[j-1][1]!==t[1]&amp;&amp;st([Y,X]),st(t),Z=null,Y=X=0}function ct(t){if(A=t[0]/z,T=t[1]/P,G=t[0]&lt;Q?Q:t[0]&gt;tt?tt:0,W=t[1]&lt;et?et:t[1]&gt;rt?rt:0,G||W){if(j)if(Z){var e=J(Z,t);e.length&gt;1&amp;&amp;(lt(e[0]),N[j++]=e[1])}else $=J(N[j-1],t)[0],N[j++]=$;else N[j++]=[G||t[0],W||t[1]];var r=N[j-1];G&amp;&amp;W&amp;&amp;(r[0]!==G||r[1]!==W)?(Z&amp;&amp;(Y!==G&amp;&amp;X!==W?st(Y&amp;&amp;X?(n=Z,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a&gt;0?[o&gt;0?Q:tt,rt]:[o&gt;0?tt:Q,et]):[Y||G,X||W]):Y&amp;&amp;X&amp;&amp;st([Y,X])),st([G,W])):Y-G&amp;&amp;X-W&amp;&amp;st([G||Y,W||X]),Z=t,Y=G,X=W}else Z&amp;&amp;lt(J(Z,t)[0]),N[j++]=t;var n,i,a,o}for(&quot;linear&quot;===D||&quot;spline&quot;===D?J=function(t,e){for(var r=[],n=0,i=0;i&lt;4;i++){var a=nt[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&amp;&amp;(!n||Math.abs(o.x-r[0][0])&gt;1||Math.abs(o.y-r[0][1])&gt;1)&amp;&amp;(o=[o.x,o.y],n&amp;&amp;H(o,t)&lt;H(r[0],t)?r.unshift(o):r.push(o),n++)}return r}:&quot;hv&quot;===D||&quot;vh&quot;===D?J=function(t,e){var r=[],n=it(t),i=it(e);return n&amp;&amp;i&amp;&amp;at(n,i)?r:(n&amp;&amp;r.push(n),i&amp;&amp;r.push(i),r)}:&quot;hvh&quot;===D?J=ot(0,Q,tt):&quot;vhv&quot;===D&amp;&amp;(J=ot(1,et,rt)),r=0;r&lt;t.length;r++)if(n=V(r)){for(j=0,Z=null,ct(n),r++;r&lt;t.length;r++){if(!(h=V(r))){if(O)continue;break}if(R&amp;&amp;e.simplify){var ut=V(r+1);if(!((y=H(h,n))&lt;q(h,ut)*F)){for(m=[(h[0]-n[0])/y,(h[1]-n[1])/y],p=n,x=y,b=w=k=0,g=!1,a=h,r++;r&lt;t.length;r++){if(d=ut,ut=V(r+1),!d){if(O)continue;break}if(M=(v=[d[0]-n[0],d[1]-n[1]])[0]*m[1]-v[1]*m[0],w=Math.min(w,M),(k=Math.max(k,M))-w&gt;q(d,ut))break;a=d,(_=v[0]*m[0]+v[1]*m[1])&gt;x?(x=_,h=d,g=!1):_&lt;b&amp;&amp;(b=_,p=d,g=!0)}if(g?(ct(h),a!==p&amp;&amp;ct(p)):(p!==n&amp;&amp;ct(p),a!==h&amp;&amp;ct(h)),ct(a),r&gt;=t.length||!d)break;ct(d),n=d}}else ct(h)}Z&amp;&amp;st([Y||Z[0],X||Z[1]]),B.push(N.slice(0,j))}return B}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;./constants&quot;:1037}],1047:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){&quot;spline&quot;===r(&quot;line.shape&quot;)&amp;&amp;r(&quot;line.smoothing&quot;)}},{}],1048:[function(t,e,r){&quot;use strict&quot;;var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var i,a,o,s,l,c={},u=!1,f=-1,h=0,p=-1;for(a=0;a&lt;r.length;a++)(o=(i=r[a][0].trace).stackgroup||&quot;&quot;)?o in c?l=c[o]:(l=c[o]=h,h++):i.fill in n&amp;&amp;p&gt;=0?l=p:(l=p=h,h++),l&lt;f&amp;&amp;(u=!0),i._groupIndex=f=l;var d=r.slice();u&amp;&amp;d.sort(function(t,e){var r=t[0].trace,n=e[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index});var g={};for(a=0;a&lt;d.length;a++)o=(i=d[a][0].trace).stackgroup||&quot;&quot;,!0===i.visible?(i._nexttrace=null,i.fill in n&amp;&amp;(s=g[o],i._prevtrace=s||null,s&amp;&amp;(s._nexttrace=i)),g[o]=i):i._prevtrace=i._nexttrace=null;return d}},{}],1049:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;);e.exports=function(t){var e=t.marker,r=e.sizeref||1,i=e.sizemin||0,a=&quot;area&quot;===e.sizemode?function(t){return Math.sqrt(t/r)}:function(t){return t/r};return function(t){var e=a(t/2);return n(e)&amp;&amp;e&gt;0?Math.max(e,i):0}}},{&quot;fast-isnumeric&quot;:213}],1050:[function(t,e,r){&quot;use strict&quot;;e.exports={container:&quot;marker&quot;,min:&quot;cmin&quot;,max:&quot;cmax&quot;}},{}],1051:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;../../components/colorscale/has_colorscale&quot;),a=t(&quot;../../components/colorscale/defaults&quot;),o=t(&quot;./subtypes&quot;);e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;(c=c||{},f&amp;&amp;(r=f),l(&quot;marker.symbol&quot;),l(&quot;marker.opacity&quot;,u?.7:1),l(&quot;marker.size&quot;),l(&quot;marker.color&quot;,r),i(t,&quot;marker&quot;)&amp;&amp;a(t,e,s,l,{prefix:&quot;marker.&quot;,cLetter:&quot;c&quot;}),c.noSelect||(l(&quot;selected.marker.color&quot;),l(&quot;unselected.marker.color&quot;),l(&quot;selected.marker.size&quot;),l(&quot;unselected.marker.size&quot;)),c.noLine||(l(&quot;marker.line.color&quot;,f&amp;&amp;!Array.isArray(f)&amp;&amp;e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,&quot;marker.line&quot;)&amp;&amp;a(t,e,s,l,{prefix:&quot;marker.line.&quot;,cLetter:&quot;c&quot;}),l(&quot;marker.line.width&quot;,u?1:0)),u&amp;&amp;(l(&quot;marker.sizeref&quot;),l(&quot;marker.sizemin&quot;),l(&quot;marker.sizemode&quot;)),c.gradient)&amp;&amp;(&quot;none&quot;!==l(&quot;marker.gradient.type&quot;)&amp;&amp;l(&quot;marker.gradient.color&quot;))}},{&quot;../../components/color&quot;:567,&quot;../../components/colorscale/defaults&quot;:577,&quot;../../components/colorscale/has_colorscale&quot;:581,&quot;./subtypes&quot;:1056}],1052:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../lib&quot;),o=a.ensureSingle,s=a.identity,l=t(&quot;../../components/drawing&quot;),c=t(&quot;./subtypes&quot;),u=t(&quot;./line_points&quot;),f=t(&quot;./link_traces&quot;),h=t(&quot;../../lib/polygon&quot;).tester;function p(t,e,r,f,p,d,g){var m;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(!c.hasMarkers(h))return;var p=h.marker.maxdisplayed;if(0===p)return;var d=i.filter(function(t){return t.x&gt;=u[0]&amp;&amp;t.x&lt;=u[1]&amp;&amp;t.y&gt;=f[0]&amp;&amp;t.y&lt;=f[1]}),g=Math.ceil(d.length/p),m=0;o.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&amp;&amp;n.marker.maxdisplayed&gt;0&amp;&amp;r&lt;e&amp;&amp;m++});var v=Math.round(m*g/3+Math.floor(m/3)*g/7.1);i.forEach(function(t){delete t.vis}),d.forEach(function(t,e){0===Math.round((e+v)%g)&amp;&amp;(t.vis=!0)})}(0,e,r,f,p);var v=!!g&amp;&amp;g.duration&gt;0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,k=n.select(d),M=o(k,&quot;g&quot;,&quot;errorbars&quot;),A=o(k,&quot;g&quot;,&quot;lines&quot;),T=o(k,&quot;g&quot;,&quot;points&quot;),S=o(k,&quot;g&quot;,&quot;text&quot;);if(i.getComponentMethod(&quot;errorbars&quot;,&quot;plot&quot;)(M,r,g),!0===_.visible){var E,C;y(k).style(&quot;opacity&quot;,_.opacity);var L=_.fill.charAt(_.fill.length-1);&quot;x&quot;!==L&amp;&amp;&quot;y&quot;!==L&amp;&amp;(L=&quot;&quot;),r.isRangePlot||(f[0].node3=k);var z=&quot;&quot;,P=[],O=_._prevtrace;O&amp;&amp;(z=O._prevRevpath||&quot;&quot;,C=O._nextFill,P=O._polygons);var I,D,R,B,F,N,j,V,U,q=&quot;&quot;,H=&quot;&quot;,G=[],W=a.noop;if(E=_._ownFill,c.hasLines(_)||&quot;none&quot;!==_.fill){for(C&amp;&amp;C.datum(f),-1!==[&quot;hv&quot;,&quot;vh&quot;,&quot;hvh&quot;,&quot;vhv&quot;].indexOf(w.shape)?(R=l.steps(w.shape),B=l.steps(w.shape.split(&quot;&quot;).reverse().join(&quot;&quot;))):R=B=&quot;spline&quot;===w.shape?function(t){var e=t[t.length-1];return t.length&gt;1&amp;&amp;t[0][0]===e[0]&amp;&amp;t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return&quot;M&quot;+t.join(&quot;L&quot;)},F=function(t){return B(t.reverse())},G=u(f,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify}),U=_._polygons=new Array(G.length),m=0;m&lt;G.length;m++)_._polygons[m]=h(G[m]);G.length&amp;&amp;(N=G[0][0],V=(j=G[G.length-1])[j.length-1]),W=function(t){return function(e){if(I=R(e),D=F(e),q?L?(q+=&quot;L&quot;+I.substr(1),H=D+&quot;L&quot;+H.substr(1)):(q+=&quot;Z&quot;+I,H=D+&quot;Z&quot;+H):(q=I,H=D),c.hasLines(_)&amp;&amp;e.length&gt;1){var r=n.select(this);if(r.datum(f),t)y(r.style(&quot;opacity&quot;,0).attr(&quot;d&quot;,I).call(l.lineGroupStyle)).style(&quot;opacity&quot;,1);else{var i=y(r);i.attr(&quot;d&quot;,I),l.singleLineStyle(f,i)}}}}}var Y=A.selectAll(&quot;.js-line&quot;).data(G);y(Y.exit()).style(&quot;opacity&quot;,0).remove(),Y.each(W(!1)),Y.enter().append(&quot;path&quot;).classed(&quot;js-line&quot;,!0).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;).call(l.lineGroupStyle).each(W(!0)),l.setClipUrl(Y,r.layerClipId),G.length?(E?(E.datum(f),N&amp;&amp;V&amp;&amp;(L?(&quot;y&quot;===L?N[1]=V[1]=b.c2p(0,!0):&quot;x&quot;===L&amp;&amp;(N[0]=V[0]=x.c2p(0,!0)),y(E).attr(&quot;d&quot;,&quot;M&quot;+V+&quot;L&quot;+N+&quot;L&quot;+q.substr(1)).call(l.singleFillStyle)):y(E).attr(&quot;d&quot;,q+&quot;Z&quot;).call(l.singleFillStyle))):C&amp;&amp;(&quot;tonext&quot;===_.fill.substr(0,6)&amp;&amp;q&amp;&amp;z?(&quot;tonext&quot;===_.fill?y(C).attr(&quot;d&quot;,q+&quot;Z&quot;+z+&quot;Z&quot;).call(l.singleFillStyle):y(C).attr(&quot;d&quot;,q+&quot;L&quot;+z.substr(1)+&quot;Z&quot;).call(l.singleFillStyle),_._polygons=_._polygons.concat(P)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=U):(E?Z(E):C&amp;&amp;Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),T.datum(f),S.datum(f),function(e,i,a){var o,u=a[0].trace,f=c.hasMarkers(u),h=c.hasText(u),p=tt(u),d=et,g=et;if(f||h){var m=s,_=u.stackgroup,w=_&amp;&amp;&quot;infer zero&quot;===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?J:$:_&amp;&amp;!w&amp;&amp;(m=K),f&amp;&amp;(d=m),h&amp;&amp;(g=m)}var k,M=(o=e.selectAll(&quot;path.point&quot;).data(d,p)).enter().append(&quot;path&quot;).classed(&quot;point&quot;,!0);v&amp;&amp;M.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(&quot;opacity&quot;,0).transition().style(&quot;opacity&quot;,1),o.order(),f&amp;&amp;(k=l.makePointStyleFns(u)),o.each(function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,k,t),r.layerClipId&amp;&amp;l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&amp;&amp;i.classed(&quot;plotly-customdata&quot;,null!==e.data&amp;&amp;void 0!==e.data)):a.remove()}),v?o.exit().transition().style(&quot;opacity&quot;,0).remove():o.exit().remove(),(o=i.selectAll(&quot;g&quot;).data(g,p)).enter().append(&quot;g&quot;).classed(&quot;textpoint&quot;,!0).append(&quot;text&quot;),o.order(),o.each(function(t){var e=n.select(this),i=y(e.select(&quot;text&quot;));l.translatePoint(t,i,x,b)?r.layerClipId&amp;&amp;l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()}),o.selectAll(&quot;text&quot;).call(l.textPointStyle,u,t).each(function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll(&quot;tspan.line&quot;).each(function(){y(n.select(this)).attr({x:e,y:r})})}),o.exit().remove()}(T,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(T,X),l.setClipUrl(S,X)}function Z(t){y(t).attr(&quot;d&quot;,&quot;M0,0Z&quot;)}function $(t){return t.filter(function(t){return!t.gap&amp;&amp;t.vis})}function J(t){return t.filter(function(t){return t.vis})}function K(t){return t.filter(function(t){return!t.gap})}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&amp;&amp;a.duration&gt;0,m=f(t,e,r);((u=i.selectAll(&quot;g.trace&quot;).data(m,function(t){return t[0].trace.uid})).enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return&quot;trace scatter trace&quot;+t[0].trace.uid}).style(&quot;stroke-miterlimit&quot;,2),u.order(),function(t,e,r){e.each(function(t){var e=o(n.select(this),&quot;g&quot;,&quot;fills&quot;);l.setClipUrl(e,r.layerClipId);var i=t[0].trace,a=[];i.fill&amp;&amp;(&quot;tozero&quot;===i.fill.substr(0,6)||&quot;toself&quot;===i.fill||&quot;to&quot;===i.fill.substr(0,2)&amp;&amp;!i._prevtrace)&amp;&amp;(a=[&quot;_ownFill&quot;]),i._nexttrace&amp;&amp;a.push(&quot;_nextFill&quot;);var c=e.selectAll(&quot;g&quot;).data(a,s);c.enter().append(&quot;g&quot;),c.exit().each(function(t){i[t]=null}).remove(),c.order().each(function(t){i[t]=o(n.select(this),&quot;path&quot;,&quot;js-fill&quot;)})})}(0,u,e),g)?(c&amp;&amp;(h=c()),n.transition().duration(a.duration).ease(a.easing).each(&quot;end&quot;,function(){h&amp;&amp;h()}).each(&quot;interrupt&quot;,function(){h&amp;&amp;h()}).each(function(){i.selectAll(&quot;g.trace&quot;).each(function(r,n){p(t,n,e,r,m,this,a)})})):u.each(function(r,n){p(t,n,e,r,m,this,a)});d&amp;&amp;u.exit().remove(),i.selectAll(&quot;path:not([d])&quot;).remove()}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../../lib/polygon&quot;:706,&quot;../../registry&quot;:825,&quot;./line_points&quot;:1046,&quot;./link_traces&quot;:1048,&quot;./subtypes&quot;:1056,d3:147}],1053:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./subtypes&quot;);e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&amp;&amp;!n.hasText(f))return[];if(!1===e)for(r=0;r&lt;s.length;r++)s[r].selected=0;else for(r=0;r&lt;s.length;r++)i=s[r],a=l.c2p(i.x),o=c.c2p(i.y),null!==i.i&amp;&amp;e.contains([a,o],!1,r,t)?(u.push({pointNumber:i.i,x:l.c2d(i.x),y:c.c2d(i.y)}),i.selected=1):i.selected=0;return u}},{&quot;./subtypes&quot;:1056}],1054:[function(t,e,r){&quot;use strict&quot;;var n=[&quot;orientation&quot;,&quot;groupnorm&quot;,&quot;stackgaps&quot;];e.exports=function(t,e,r,i){var a=r._scatterStackOpts,o=i(&quot;stackgroup&quot;);if(o){var s=e.xaxis+e.yaxis,l=a[s];l||(l=a[s]={});var c=l[o],u=!1;c?c.traces.push(e):(c=l[o]={traceIndices:[],traces:[e]},u=!0);for(var f={orientation:e.x&amp;&amp;!e.y?&quot;h&quot;:&quot;v&quot;},h=0;h&lt;n.length;h++){var p=n[h],d=p+&quot;Found&quot;;if(!c[d]){var g=void 0!==t[p],m=&quot;orientation&quot;===p;if((g||u)&amp;&amp;(c[p]=i(p,f[p]),m&amp;&amp;(c.fillDflt=&quot;h&quot;===c[p]?&quot;tonextx&quot;:&quot;tonexty&quot;),g&amp;&amp;(c[d]=!0,!u&amp;&amp;(delete c.traces[0][p],m))))for(var v=0;v&lt;c.traces.length-1;v++){var y=c.traces[v];y._input.fill!==y.fill&amp;&amp;(y.fill=c.fillDflt)}}}return c}}},{}],1055:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/drawing&quot;),a=t(&quot;../../registry&quot;);function o(t,e,r){i.pointStyle(t.selectAll(&quot;path.point&quot;),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll(&quot;text&quot;),e,r)}e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(&quot;g.trace.scatter&quot;);r.style(&quot;opacity&quot;,function(t){return t[0].trace.opacity}),r.selectAll(&quot;g.points&quot;).each(function(e){o(n.select(this),e.trace||e[0].trace,t)}),r.selectAll(&quot;g.text&quot;).each(function(e){s(n.select(this),e.trace||e[0].trace,t)}),r.selectAll(&quot;g.trace path.js-line&quot;).call(i.lineGroupStyle),r.selectAll(&quot;g.trace path.js-fill&quot;).call(i.fillGroupStyle),a.getComponentMethod(&quot;errorbars&quot;,&quot;style&quot;)(r)},stylePoints:o,styleText:s,styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll(&quot;path.point&quot;),n),i.selectedTextStyle(r.selectAll(&quot;text&quot;),n)):(o(r,n,t),s(r,n,t))}}},{&quot;../../components/drawing&quot;:592,&quot;../../registry&quot;:825,d3:147}],1056:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports={hasLines:function(t){return t.visible&amp;&amp;t.mode&amp;&amp;-1!==t.mode.indexOf(&quot;lines&quot;)},hasMarkers:function(t){return t.visible&amp;&amp;(t.mode&amp;&amp;-1!==t.mode.indexOf(&quot;markers&quot;)||&quot;splom&quot;===t.type)},hasText:function(t){return t.visible&amp;&amp;t.mode&amp;&amp;-1!==t.mode.indexOf(&quot;text&quot;)},isBubble:function(t){return n.isPlainObject(t.marker)&amp;&amp;n.isArrayOrTypedArray(t.marker.size)}}},{&quot;../../lib&quot;:693}],1057:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;);e.exports=function(t,e,r,i,a){a=a||{},i(&quot;textposition&quot;),n.coerceFont(i,&quot;textfont&quot;,r.font),a.noSelect||(i(&quot;selected.textfont.color&quot;),i(&quot;unselected.textfont.color&quot;))}},{&quot;../../lib&quot;:693}],1058:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;);e.exports=function(t,e,r,i){var a,o=i(&quot;x&quot;),s=i(&quot;y&quot;);if(n.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;,&quot;y&quot;],r),o)s?a=Math.min(o.length,s.length):(a=o.length,i(&quot;y0&quot;),i(&quot;dy&quot;));else{if(!s)return 0;a=e.y.length,i(&quot;x0&quot;),i(&quot;dx&quot;)}return e._length=a,a}},{&quot;../../registry&quot;:825}],1059:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;),i=t(&quot;../../components/colorscale/attributes&quot;),a=t(&quot;../../plots/attributes&quot;),o=t(&quot;../../constants/gl3d_dashes&quot;),s=t(&quot;../../constants/gl3d_markers&quot;),l=t(&quot;../../lib/extend&quot;).extendFlat,c=t(&quot;../../plot_api/edit_types&quot;).overrideAll,u=n.line,f=n.marker,h=f.line,p=l({width:u.width,dash:{valType:&quot;enumerated&quot;,values:Object.keys(o),dflt:&quot;solid&quot;}},i(&quot;line&quot;));delete p.showscale,delete p.colorbar;var d=e.exports=c({x:n.x,y:n.y,z:{valType:&quot;data_array&quot;},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),mode:l({},n.mode,{dflt:&quot;lines+markers&quot;}),surfaceaxis:{valType:&quot;enumerated&quot;,values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:&quot;color&quot;},projection:{x:{show:{valType:&quot;boolean&quot;,dflt:!1},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1},scale:{valType:&quot;number&quot;,min:0,max:10,dflt:2/3}},y:{show:{valType:&quot;boolean&quot;,dflt:!1},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1},scale:{valType:&quot;number&quot;,min:0,max:10,dflt:2/3}},z:{show:{valType:&quot;boolean&quot;,dflt:!1},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1},scale:{valType:&quot;number&quot;,min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:p,marker:l({symbol:{valType:&quot;enumerated&quot;,values:Object.keys(s),dflt:&quot;circle&quot;,arrayOk:!0},size:l({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:l({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:l({width:l({},h.width,{arrayOk:!1})},i(&quot;marker.line&quot;))},i(&quot;marker&quot;)),textposition:l({},n.textposition,{dflt:&quot;top center&quot;,arrayOk:!1}),textfont:{color:n.textfont.color,size:n.textfont.size,family:l({},n.textfont.family,{arrayOk:!1})},hoverinfo:l({},a.hoverinfo)},&quot;calc&quot;,&quot;nested&quot;);d.x.editType=d.y.editType=d.z.editType=&quot;calc+clearAxisTypes&quot;},{&quot;../../components/colorscale/attributes&quot;:574,&quot;../../constants/gl3d_dashes&quot;:667,&quot;../../constants/gl3d_markers&quot;:668,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/attributes&quot;:739,&quot;../scatter/attributes&quot;:1032}],1060:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/arrays_to_calcdata&quot;),i=t(&quot;../scatter/colorscale_calc&quot;);e.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(e),r}},{&quot;../scatter/arrays_to_calcdata&quot;:1031,&quot;../scatter/colorscale_calc&quot;:1036}],1061:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;);function i(t,e,r,i){if(!e||!e.visible)return null;for(var a=n.getComponentMethod(&quot;errorbars&quot;,&quot;makeComputeError&quot;)(e),o=new Array(t.length),s=0;s&lt;t.length;s++){var l=a(+t[s],s);if(&quot;log&quot;===i.type){var c=i.c2l(t[s]),u=t[s]-l[0],f=t[s]+l[1];if(o[s]=[(i.c2l(u,!0)-c)*r,(i.c2l(f,!0)-c)*r],u&gt;0){var h=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e&lt;t.length;e++)if(t[e])return t[e].length;return 0}(n);if(0===a)return null;for(var o=new Array(a),s=0;s&lt;a;s++){for(var l=[[0,0,0],[0,0,0]],c=0;c&lt;3;c++)if(n[c])for(var u=0;u&lt;2;u++)l[u][c]=n[c][s][u];o[s]=l}return o}},{&quot;../../registry&quot;:825}],1062:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-line3d&quot;),i=t(&quot;gl-scatter3d&quot;),a=t(&quot;gl-error3d&quot;),o=t(&quot;gl-mesh3d&quot;),s=t(&quot;delaunay-triangulate&quot;),l=t(&quot;../../lib&quot;),c=t(&quot;../../lib/str2rgbarray&quot;),u=t(&quot;../../lib/gl_format_color&quot;).formatColor,f=t(&quot;../scatter/make_bubble_size_func&quot;),h=t(&quot;../../constants/gl3d_dashes&quot;),p=t(&quot;../../constants/gl3d_markers&quot;),d=t(&quot;./calc_errors&quot;);function g(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=&quot;&quot;,this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var m=g.prototype;function v(t,e){return e(4*t)}function y(t){return p[t]}function x(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o&lt;e;o++)void 0===t[o]?a[o]=n:a[o]=r(t[o],i)}else a=r(t,l.identity);return a}function b(t,e){var r,n,i,a,o,s,h,p,g=[],m=t.fullSceneLayout,b=t.dataScale,_=m.xaxis,w=m.yaxis,k=m.zaxis,M=e.marker,A=e.line,T=e.x||[],S=e.y||[],E=e.z||[],C=T.length,L=e.xcalendar,z=e.ycalendar,P=e.zcalendar;for(n=0;n&lt;C;n++)i=_.d2l(T[n],0,L)*b[0],a=w.d2l(S[n],0,z)*b[1],o=k.d2l(E[n],0,P)*b[2],g[n]=[i,a,o];if(Array.isArray(e.text))s=e.text;else if(void 0!==e.text)for(s=new Array(C),n=0;n&lt;C;n++)s[n]=e.text;if(r={position:g,mode:e.mode,text:s},&quot;line&quot;in e&amp;&amp;(r.lineColor=u(A,1,C),r.lineWidth=A.width,r.lineDashes=A.dash),&quot;marker&quot;in e){var O=f(e);r.scatterColor=u(M,1,C),r.scatterSize=x(M.size,C,v,20,O),r.scatterMarker=x(M.symbol,C,y,&quot;\u25cf&quot;),r.scatterLineWidth=M.line.width,r.scatterLineColor=u(M.line,1,C),r.scatterAngle=0}&quot;textposition&quot;in e&amp;&amp;(r.textOffset=(h=e.textposition,p=[0,0],Array.isArray(h)?[0,-1]:(h.indexOf(&quot;bottom&quot;)&gt;=0&amp;&amp;(p[1]+=1),h.indexOf(&quot;top&quot;)&gt;=0&amp;&amp;(p[1]-=1),h.indexOf(&quot;left&quot;)&gt;=0&amp;&amp;(p[0]-=1),h.indexOf(&quot;right&quot;)&gt;=0&amp;&amp;(p[0]+=1),p)),r.textColor=u(e.textfont,1,C),r.textSize=x(e.textfont.size,C,l.identity,12),r.textFont=e.textfont.family,r.textAngle=0);var I=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;];for(r.project=[!1,!1,!1],r.projectScale=[1,1,1],r.projectOpacity=[1,1,1],n=0;n&lt;3;++n){var D=e.projection[I[n]];(r.project[n]=D.show)&amp;&amp;(r.projectOpacity[n]=D.opacity,r.projectScale[n]=D.scale)}r.errorBounds=d(e,b,m);var R=function(t){for(var e=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i&lt;3;i++){var a=t[i];a&amp;&amp;!1!==a.copy_zstyle&amp;&amp;!1!==t[2].visible&amp;&amp;(a=t[2]),a&amp;&amp;a.visible&amp;&amp;(e[i]=a.width/2,r[i]=c(a.color),n[i]=a.thickness)}return{capSize:e,color:r,lineWidth:n}}([e.error_x,e.error_y,e.error_z]);return r.errorColor=R.color,r.errorLineWidth=R.lineWidth,r.errorCapSize=R.capSize,r.delaunayAxis=e.surfaceaxis,r.delaunayColor=c(e.surfacecolor),r}function _(t){if(Array.isArray(t)){var e=t[0];return Array.isArray(e)&amp;&amp;(t=e),&quot;rgb(&quot;+t.slice(0,3).map(function(t){return Math.round(255*t)})+&quot;)&quot;}return null}m.handlePick=function(t){if(t.object&amp;&amp;(t.object===this.linePlot||t.object===this.delaunayMesh||t.object===this.textMarkers||t.object===this.scatterPlot)){var e=t.index=t.data.index;return t.object.highlight&amp;&amp;t.object.highlight(null),this.scatterPlot&amp;&amp;(t.object=this.scatterPlot,this.scatterPlot.highlight(t.data)),t.textLabel=&quot;&quot;,this.textLabels&amp;&amp;(Array.isArray(this.textLabels)?(this.textLabels[e]||0===this.textLabels[e])&amp;&amp;(t.textLabel=this.textLabels[e]):t.textLabel=this.textLabels),t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},m.update=function(t){var e,r,l,c,u=this.scene.glplot.gl,f=h.solid;this.data=t;var p=b(this.scene,t);&quot;mode&quot;in p&amp;&amp;(this.mode=p.mode),&quot;lineDashes&quot;in p&amp;&amp;p.lineDashes in h&amp;&amp;(f=h[p.lineDashes]),this.color=_(p.scatterColor)||_(p.lineColor),this.dataPoints=p.position,e={gl:u,position:p.position,color:p.lineColor,lineWidth:p.lineWidth||1,dashes:f[0],dashScale:f[1],opacity:t.opacity,connectGaps:t.connectgaps},-1!==this.mode.indexOf(&quot;lines&quot;)?this.linePlot?this.linePlot.update(e):(this.linePlot=n(e),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&amp;&amp;(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var d=t.opacity;if(t.marker&amp;&amp;t.marker.opacity&amp;&amp;(d*=t.marker.opacity),r={gl:u,position:p.position,color:p.scatterColor,size:p.scatterSize,glyph:p.scatterMarker,opacity:d,orthographic:!0,lineWidth:p.scatterLineWidth,lineColor:p.scatterLineColor,project:p.project,projectScale:p.projectScale,projectOpacity:p.projectOpacity},-1!==this.mode.indexOf(&quot;markers&quot;)?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=i(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&amp;&amp;(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),c={gl:u,position:p.position,glyph:p.text,color:p.textColor,size:p.textSize,angle:p.textAngle,alignment:p.textOffset,font:p.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:t.opacity},this.textLabels=t.hovertext||t.text,-1!==this.mode.indexOf(&quot;text&quot;)?this.textMarkers?this.textMarkers.update(c):(this.textMarkers=i(c),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&amp;&amp;(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),l={gl:u,position:p.position,color:p.errorColor,error:p.errorBounds,lineWidth:p.errorLineWidth,capSize:p.errorCapSize,opacity:t.opacity},this.errorBars?p.errorBounds?this.errorBars.update(l):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):p.errorBounds&amp;&amp;(this.errorBars=a(l),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),p.delaunayAxis&gt;=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n&lt;t.length;++n){var c=t[n];!isNaN(c[i])&amp;&amp;isFinite(c[i])&amp;&amp;!isNaN(c[a])&amp;&amp;isFinite(c[a])&amp;&amp;(o.push([c[i],c[a]]),l.push(n))}var u=s(o);for(n=0;n&lt;u.length;++n)for(var f=u[n],h=0;h&lt;f.length;++h)f[h]=l[f[h]];return{positions:t,cells:u,meshColor:e}}(p.position,p.delaunayColor,p.delaunayAxis);g.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(g):(g.gl=u,this.delaunayMesh=o(g),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&amp;&amp;(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},m.dispose=function(){this.linePlot&amp;&amp;(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&amp;&amp;(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&amp;&amp;(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&amp;&amp;(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&amp;&amp;(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=function(t,e){var r=new g(t,e.uid);return r.update(e),r}},{&quot;../../constants/gl3d_dashes&quot;:667,&quot;../../constants/gl3d_markers&quot;:668,&quot;../../lib&quot;:693,&quot;../../lib/gl_format_color&quot;:689,&quot;../../lib/str2rgbarray&quot;:717,&quot;../scatter/make_bubble_size_func&quot;:1049,&quot;./calc_errors&quot;:1061,&quot;delaunay-triangulate&quot;:149,&quot;gl-error3d&quot;:236,&quot;gl-line3d&quot;:244,&quot;gl-mesh3d&quot;:267,&quot;gl-scatter3d&quot;:282}],1063:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../scatter/subtypes&quot;),o=t(&quot;../scatter/marker_defaults&quot;),s=t(&quot;../scatter/line_defaults&quot;),l=t(&quot;../scatter/text_defaults&quot;),c=t(&quot;./attributes&quot;);e.exports=function(t,e,r,u){function f(r,n){return i.coerce(t,e,c,r,n)}if(function(t,e,r,i){var a=0,o=r(&quot;x&quot;),s=r(&quot;y&quot;),l=r(&quot;z&quot;);n.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],i),o&amp;&amp;s&amp;&amp;l&amp;&amp;(a=Math.min(o.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=a);return a}(t,e,f,u)){f(&quot;text&quot;),f(&quot;hovertext&quot;),f(&quot;mode&quot;),a.hasLines(e)&amp;&amp;(f(&quot;connectgaps&quot;),s(t,e,r,u,f)),a.hasMarkers(e)&amp;&amp;o(t,e,r,u,f,{noSelect:!0}),a.hasText(e)&amp;&amp;l(t,e,u,f,{noSelect:!0});var h=(e.line||{}).color,p=(e.marker||{}).color;f(&quot;surfaceaxis&quot;)&gt;=0&amp;&amp;f(&quot;surfacecolor&quot;,h||p);for(var d=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],g=0;g&lt;3;++g){var m=&quot;projection.&quot;+d[g];f(m+&quot;.show&quot;)&amp;&amp;(f(m+&quot;.opacity&quot;),f(m+&quot;.scale&quot;))}var v=n.getComponentMethod(&quot;errorbars&quot;,&quot;supplyDefaults&quot;);v(t,e,r,{axis:&quot;z&quot;}),v(t,e,r,{axis:&quot;y&quot;,inherit:&quot;z&quot;}),v(t,e,r,{axis:&quot;x&quot;,inherit:&quot;z&quot;})}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;./attributes&quot;:1059}],1064:[function(t,e,r){&quot;use strict&quot;;var n={};n.plot=t(&quot;./convert&quot;),n.attributes=t(&quot;./attributes&quot;),n.markerSymbols=t(&quot;../../constants/gl3d_markers&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar=t(&quot;../scatter/marker_colorbar&quot;),n.calc=t(&quot;./calc&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;scatter3d&quot;,n.basePlotModule=t(&quot;../../plots/gl3d&quot;),n.categories=[&quot;gl3d&quot;,&quot;symbols&quot;,&quot;showLegend&quot;],n.meta={},e.exports=n},{&quot;../../constants/gl3d_markers&quot;:668,&quot;../../plots/gl3d&quot;:784,&quot;../scatter/marker_colorbar&quot;:1050,&quot;./attributes&quot;:1059,&quot;./calc&quot;:1060,&quot;./convert&quot;:1062,&quot;./defaults&quot;:1063}],1065:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;),i=t(&quot;../../plots/attributes&quot;),a=t(&quot;../../components/colorscale/attributes&quot;),o=t(&quot;../../components/colorbar/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat,l=n.marker,c=n.line,u=l.line;e.exports={carpet:{valType:&quot;string&quot;,editType:&quot;calc&quot;},a:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},b:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},mode:s({},n.mode,{dflt:&quot;markers&quot;}),text:s({},n.text,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:s({},c.shape,{values:[&quot;linear&quot;,&quot;spline&quot;]}),smoothing:c.smoothing,editType:&quot;calc&quot;},connectgaps:n.connectgaps,fill:s({},n.fill,{values:[&quot;none&quot;,&quot;toself&quot;,&quot;tonext&quot;],dflt:&quot;none&quot;}),fillcolor:n.fillcolor,marker:s({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({width:u.width,editType:&quot;calc&quot;},a(&quot;marker.line&quot;)),gradient:l.gradient,editType:&quot;calc&quot;},a(&quot;marker&quot;),{colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[&quot;a&quot;,&quot;b&quot;,&quot;text&quot;,&quot;name&quot;]}),hoveron:n.hoveron}},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../scatter/attributes&quot;:1032}],1066:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../scatter/colorscale_calc&quot;),a=t(&quot;../scatter/arrays_to_calcdata&quot;),o=t(&quot;../scatter/calc_selection&quot;),s=t(&quot;../scatter/calc&quot;).calcMarkerSize,l=t(&quot;../carpet/lookup_carpetid&quot;);e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&amp;&amp;r.visible&amp;&amp;&quot;legendonly&quot;!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e._length,p=new Array(h),d=!1;for(c=0;c&lt;h;c++)if(u=e.a[c],f=e.b[c],n(u)&amp;&amp;n(f)){var g=r.ab2xy(+u,+f,!0),m=r.isVisible(+u,+f);m||(d=!0),p[c]={x:g[0],y:g[1],a:u,b:f,vis:m}}else p[c]={x:!1,y:!1};return e._needsCull=d,p[0].carpet=r,p[0].trace=e,s(e,h),i(e),a(p,e),o(p,e),p}}},{&quot;../carpet/lookup_carpetid&quot;:891,&quot;../scatter/arrays_to_calcdata&quot;:1031,&quot;../scatter/calc&quot;:1033,&quot;../scatter/calc_selection&quot;:1034,&quot;../scatter/colorscale_calc&quot;:1036,&quot;fast-isnumeric&quot;:213}],1067:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatter/constants&quot;),a=t(&quot;../scatter/subtypes&quot;),o=t(&quot;../scatter/marker_defaults&quot;),s=t(&quot;../scatter/line_defaults&quot;),l=t(&quot;../scatter/line_shape_defaults&quot;),c=t(&quot;../scatter/text_defaults&quot;),u=t(&quot;../scatter/fillcolor_defaults&quot;),f=t(&quot;./attributes&quot;);e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}p(&quot;carpet&quot;),e.xaxis=&quot;x&quot;,e.yaxis=&quot;y&quot;;var d=p(&quot;a&quot;),g=p(&quot;b&quot;),m=Math.min(d.length,g.length);if(m){e._length=m,p(&quot;text&quot;),p(&quot;mode&quot;,m&lt;i.PTS_LINESONLY?&quot;lines+markers&quot;:&quot;lines&quot;),a.hasLines(e)&amp;&amp;(s(t,e,r,h,p),l(t,e,p),p(&quot;connectgaps&quot;)),a.hasMarkers(e)&amp;&amp;o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&amp;&amp;c(t,e,h,p);var v=[];(a.hasMarkers(e)||a.hasText(e))&amp;&amp;(p(&quot;marker.maxdisplayed&quot;),v.push(&quot;points&quot;)),p(&quot;fill&quot;),&quot;none&quot;!==e.fill&amp;&amp;(u(t,e,r,p),a.hasLines(e)||l(t,e,p)),&quot;tonext&quot;!==e.fill&amp;&amp;&quot;toself&quot;!==e.fill||v.push(&quot;fills&quot;),p(&quot;hoveron&quot;,v.join(&quot;+&quot;)||&quot;points&quot;),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../scatter/constants&quot;:1037,&quot;../scatter/fillcolor_defaults&quot;:1041,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/line_shape_defaults&quot;:1047,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;./attributes&quot;:1065}],1068:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i){var a=n[i];return t.a=a.a,t.b=a.b,t}},{}],1069:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/hover&quot;);e.exports=function(t,e,r,i){var a=n(t,e,r,i);if(a&amp;&amp;!1!==a[0].index){var o=a[0];if(void 0===o.index){var s=1-o.y0/t.ya._length,l=t.xa._length,c=l*s/2,u=l-c;return o.x0=Math.max(Math.min(o.x0,u),c),o.x1=Math.max(Math.min(o.x1,u),c),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,p=h._carpet,d=(f.hi||h.hoverinfo).split(&quot;+&quot;),g=[];-1!==d.indexOf(&quot;all&quot;)&amp;&amp;(d=[&quot;a&quot;,&quot;b&quot;]),-1!==d.indexOf(&quot;a&quot;)&amp;&amp;w(p.aaxis,f.a),-1!==d.indexOf(&quot;b&quot;)&amp;&amp;w(p.baxis,f.b);var m=p.ab2ij([f.a,f.b]),v=Math.floor(m[0]),y=m[0]-v,x=Math.floor(m[1]),b=m[1]-x,_=p.evalxy([],v,x,y,b);return g.push(&quot;y: &quot;+_[1].toFixed(3)),o.extraText=g.join(&quot;&lt;br&gt;&quot;),a}function w(t,e){var r;r=t.labelprefix&amp;&amp;t.labelprefix.length&gt;0?t.labelprefix.replace(/ = $/,&quot;&quot;):t._hovertitle,g.push(r+&quot;: &quot;+e.toFixed(3)+t.labelsuffix)}}},{&quot;../scatter/hover&quot;:1043}],1070:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar=t(&quot;../scatter/marker_colorbar&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.style=t(&quot;../scatter/style&quot;).style,n.styleOnSelect=t(&quot;../scatter/style&quot;).styleOnSelect,n.hoverPoints=t(&quot;./hover&quot;),n.selectPoints=t(&quot;../scatter/select&quot;),n.eventData=t(&quot;./event_data&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;scattercarpet&quot;,n.basePlotModule=t(&quot;../../plots/cartesian&quot;),n.categories=[&quot;svg&quot;,&quot;carpet&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;carpetDependent&quot;,&quot;zoomScale&quot;],n.meta={},e.exports=n},{&quot;../../plots/cartesian&quot;:753,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scatter/select&quot;:1053,&quot;../scatter/style&quot;:1055,&quot;./attributes&quot;:1065,&quot;./calc&quot;:1066,&quot;./defaults&quot;:1067,&quot;./event_data&quot;:1068,&quot;./hover&quot;:1069,&quot;./plot&quot;:1071}],1071:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/plot&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../components/drawing&quot;);e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f={xaxis:i.getFromId(t,u.xaxis||&quot;x&quot;),yaxis:i.getFromId(t,u.yaxis||&quot;y&quot;),plot:e.plot};for(n(t,f,r,o),s=0;s&lt;r.length;s++)l=r[s][0].trace,c=o.selectAll(&quot;g.trace&quot;+l.uid+&quot; .js-line&quot;),a.setClipUrl(c,u._clipPathId)}},{&quot;../../components/drawing&quot;:592,&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/plot&quot;:1052}],1072:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;),i=t(&quot;../../plots/attributes&quot;),a=t(&quot;../../components/colorscale/attributes&quot;),o=t(&quot;../../components/drawing/attributes&quot;).dash,s=t(&quot;../../lib/extend&quot;).extendFlat,l=t(&quot;../../plot_api/edit_types&quot;).overrideAll,c=n.marker,u=n.line,f=c.line;e.exports=l({lon:{valType:&quot;data_array&quot;},lat:{valType:&quot;data_array&quot;},locations:{valType:&quot;data_array&quot;},locationmode:{valType:&quot;enumerated&quot;,values:[&quot;ISO-3&quot;,&quot;USA-states&quot;,&quot;country names&quot;],dflt:&quot;ISO-3&quot;},mode:s({},n.mode,{dflt:&quot;markers&quot;}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),textfont:n.textfont,textposition:n.textposition,line:{color:u.color,width:u.width,dash:o},connectgaps:n.connectgaps,marker:s({symbol:c.symbol,opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,colorbar:c.colorbar,line:s({width:f.width},a(&quot;marker.line&quot;)),gradient:c.gradient},a(&quot;marker&quot;)),fill:{valType:&quot;enumerated&quot;,values:[&quot;none&quot;,&quot;toself&quot;],dflt:&quot;none&quot;},fillcolor:n.fillcolor,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[&quot;lon&quot;,&quot;lat&quot;,&quot;location&quot;,&quot;text&quot;,&quot;name&quot;]})},&quot;calc&quot;,&quot;nested&quot;)},{&quot;../../components/colorscale/attributes&quot;:574,&quot;../../components/drawing/attributes&quot;:591,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/attributes&quot;:739,&quot;../scatter/attributes&quot;:1032}],1073:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../constants/numerical&quot;).BADNUM,a=t(&quot;../scatter/colorscale_calc&quot;),o=t(&quot;../scatter/arrays_to_calcdata&quot;),s=t(&quot;../scatter/calc_selection&quot;),l=t(&quot;../../lib&quot;)._;e.exports=function(t,e){for(var r=Array.isArray(e.locations),c=r?e.locations.length:e._length,u=new Array(c),f=0;f&lt;c;f++){var h=u[f]={};if(r){var p=e.locations[f];h.loc=&quot;string&quot;==typeof p?p:null}else{var d=e.lon[f],g=e.lat[f];n(d)&amp;&amp;n(g)?h.lonlat=[+d,+g]:h.lonlat=[i,i]}}return o(u,e),a(e),s(u,e),c&amp;&amp;(u[0].t={labels:{lat:l(t,&quot;lat:&quot;)+&quot; &quot;,lon:l(t,&quot;lon:&quot;)+&quot; &quot;}}),u}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../scatter/arrays_to_calcdata&quot;:1031,&quot;../scatter/calc_selection&quot;:1034,&quot;../scatter/colorscale_calc&quot;:1036,&quot;fast-isnumeric&quot;:213}],1074:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatter/subtypes&quot;),a=t(&quot;../scatter/marker_defaults&quot;),o=t(&quot;../scatter/line_defaults&quot;),s=t(&quot;../scatter/text_defaults&quot;),l=t(&quot;../scatter/fillcolor_defaults&quot;),c=t(&quot;./attributes&quot;);e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}!function(t,e,r){var n,i,a=0,o=r(&quot;locations&quot;);if(o)return r(&quot;locationmode&quot;),a=o.length;return n=r(&quot;lon&quot;)||[],i=r(&quot;lat&quot;)||[],a=Math.min(n.length,i.length),e._length=a,a}(0,e,f)?e.visible=!1:(f(&quot;text&quot;),f(&quot;hovertext&quot;),f(&quot;mode&quot;),i.hasLines(e)&amp;&amp;(o(t,e,r,u,f),f(&quot;connectgaps&quot;)),i.hasMarkers(e)&amp;&amp;a(t,e,r,u,f,{gradient:!0}),i.hasText(e)&amp;&amp;s(t,e,u,f),f(&quot;fill&quot;),&quot;none&quot;!==e.fill&amp;&amp;l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f))}},{&quot;../../lib&quot;:693,&quot;../scatter/fillcolor_defaults&quot;:1041,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;./attributes&quot;:1072}],1075:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.location=e.loc?e.loc:null,t}},{}],1076:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/fx&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../constants/numerical&quot;).BADNUM,o=t(&quot;../scatter/get_trace_color&quot;),s=t(&quot;../scatter/fill_hover_text&quot;),l=t(&quot;./attributes&quot;);e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.xa,h=t.ya,p=t.subplot,d=p.projection.isLonLatOverEdges,g=p.project;if(n.getClosest(c,function(t){var n=t.lonlat;if(n[0]===a)return 1/0;if(d(n))return 1/0;var i=g(n),o=g([e,r]),s=Math.abs(i[0]-o[0]),l=Math.abs(i[1]-o[1]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)},t),!1!==t.index){var m=c[t.index],v=m.lonlat,y=[f.c2p(v),h.c2p(v)],x=m.mrc||1;return t.x0=y[0]-x,t.x1=y[0]+x,t.y0=y[1]-x,t.y1=y[1]+x,t.loc=m.loc,t.lon=v[0],t.lat=v[1],t.color=o(u,m),t.extraText=function(t,e,r,n){var a=e.hi||t.hoverinfo,o=&quot;all&quot;===a?l.hoverinfo.flags:a.split(&quot;+&quot;),c=-1!==o.indexOf(&quot;location&quot;)&amp;&amp;Array.isArray(t.locations),u=-1!==o.indexOf(&quot;lon&quot;),f=-1!==o.indexOf(&quot;lat&quot;),h=-1!==o.indexOf(&quot;text&quot;),p=[];function d(t){return i.tickText(r,r.c2l(t),&quot;hover&quot;).text+&quot;\xb0&quot;}c?p.push(e.loc):u&amp;&amp;f?p.push(&quot;(&quot;+d(e.lonlat[0])+&quot;, &quot;+d(e.lonlat[1])+&quot;)&quot;):u?p.push(n.lon+d(e.lonlat[0])):f&amp;&amp;p.push(n.lat+d(e.lonlat[1]));h&amp;&amp;s(e,t,p);return p.join(&quot;&lt;br&gt;&quot;)}(u,m,p.mockAxis,c[0].t.labels),[t]}}},{&quot;../../components/fx&quot;:609,&quot;../../constants/numerical&quot;:670,&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/fill_hover_text&quot;:1040,&quot;../scatter/get_trace_color&quot;:1042,&quot;./attributes&quot;:1072}],1077:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar=t(&quot;../scatter/marker_colorbar&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.style=t(&quot;./style&quot;),n.styleOnSelect=t(&quot;../scatter/style&quot;).styleOnSelect,n.hoverPoints=t(&quot;./hover&quot;),n.eventData=t(&quot;./event_data&quot;),n.selectPoints=t(&quot;./select&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;scattergeo&quot;,n.basePlotModule=t(&quot;../../plots/geo&quot;),n.categories=[&quot;geo&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;scatter-like&quot;],n.meta={},e.exports=n},{&quot;../../plots/geo&quot;:772,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scatter/style&quot;:1055,&quot;./attributes&quot;:1072,&quot;./calc&quot;:1073,&quot;./defaults&quot;:1074,&quot;./event_data&quot;:1075,&quot;./hover&quot;:1076,&quot;./plot&quot;:1078,&quot;./select&quot;:1079,&quot;./style&quot;:1080}],1078:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../constants/numerical&quot;).BADNUM,o=t(&quot;../../lib/topojson_utils&quot;).getTopojsonFeatures,s=t(&quot;../../lib/geo_location_utils&quot;).locationToFeature,l=t(&quot;../../lib/geojson_utils&quot;),c=t(&quot;../scatter/subtypes&quot;),u=t(&quot;./style&quot;);function f(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),i=r.locationmode,l=0;l&lt;t.length;l++){var c=t[l],u=s(i,c.loc,n);c.lonlat=u?u.properties.ct:[a,a]}}e.exports=function(t,e,r){for(var o=0;o&lt;r.length;o++)f(r[o],e.topojson);function s(t,e){t.lonlat[0]===a&amp;&amp;n.select(e).remove()}var h=e.layers.frontplot.select(&quot;.scatterlayer&quot;),p=i.makeTraceGroups(h,r,&quot;trace scattergeo&quot;);p.selectAll(&quot;*&quot;).remove(),p.each(function(e){var r=e[0].node3=n.select(this),a=e[0].trace;if(c.hasLines(a)||&quot;none&quot;!==a.fill){var o=l.calcTraceToLineCoords(e),f=&quot;none&quot;!==a.fill?l.makePolygon(o):l.makeLine(o);r.selectAll(&quot;path.js-line&quot;).data([{geojson:f,trace:a}]).enter().append(&quot;path&quot;).classed(&quot;js-line&quot;,!0).style(&quot;stroke-miterlimit&quot;,2)}c.hasMarkers(a)&amp;&amp;r.selectAll(&quot;path.point&quot;).data(i.identity).enter().append(&quot;path&quot;).classed(&quot;point&quot;,!0).each(function(t){s(t,this)}),c.hasText(a)&amp;&amp;r.selectAll(&quot;g&quot;).data(i.identity).enter().append(&quot;g&quot;).append(&quot;text&quot;).each(function(t){s(t,this)}),u(t,e)})}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../lib/geo_location_utils&quot;:685,&quot;../../lib/geojson_utils&quot;:686,&quot;../../lib/topojson_utils&quot;:721,&quot;../scatter/subtypes&quot;:1056,&quot;./style&quot;:1080,d3:147}],1079:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/subtypes&quot;),i=t(&quot;../../constants/numerical&quot;).BADNUM;e.exports=function(t,e){var r,a,o,s,l,c=t.cd,u=t.xaxis,f=t.yaxis,h=[],p=c[0].trace;if(!n.hasMarkers(p)&amp;&amp;!n.hasText(p))return[];if(!1===e)for(l=0;l&lt;c.length;l++)c[l].selected=0;else for(l=0;l&lt;c.length;l++)(a=(r=c[l]).lonlat)[0]!==i&amp;&amp;(o=u.c2p(a),s=f.c2p(a),e.contains([o,s],null,l,t)?(h.push({pointNumber:l,lon:a[0],lat:a[1]}),r.selected=1):r.selected=0);return h}},{&quot;../../constants/numerical&quot;:670,&quot;../scatter/subtypes&quot;:1056}],1080:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/drawing&quot;),a=t(&quot;../../components/color&quot;),o=t(&quot;../scatter/style&quot;),s=o.stylePoints,l=o.styleText;e.exports=function(t,e){e&amp;&amp;function(t,e){var r=e[0].trace,o=e[0].node3;o.style(&quot;opacity&quot;,e[0].trace.opacity),s(o,r,t),l(o,r,t),o.selectAll(&quot;path.js-line&quot;).style(&quot;fill&quot;,&quot;none&quot;).each(function(t){var e=n.select(this),r=t.trace,o=r.line||{};e.call(a.stroke,o.color).call(i.dashLine,o.dash||&quot;&quot;,o.width||0),&quot;none&quot;!==r.fill&amp;&amp;e.call(a.fill,r.fillcolor)})}(t,e)}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,&quot;../scatter/style&quot;:1055,d3:147}],1081:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/attributes&quot;),i=t(&quot;../scatter/attributes&quot;),a=t(&quot;../../components/colorscale/attributes&quot;),o=t(&quot;../../lib/extend&quot;).extendFlat,s=t(&quot;../../plot_api/edit_types&quot;).overrideAll,l=t(&quot;./constants&quot;).DASHES,c=i.line,u=i.marker,f=u.line,h=e.exports=s({x:i.x,x0:i.x0,dx:i.dx,y:i.y,y0:i.y0,dy:i.dy,text:o({},i.text,{}),hovertext:i.hovertext,textposition:i.textposition,textfont:i.textfont,mode:{valType:&quot;flaglist&quot;,flags:[&quot;lines&quot;,&quot;markers&quot;,&quot;text&quot;],extras:[&quot;none&quot;]},line:{color:c.color,width:c.width,dash:{valType:&quot;enumerated&quot;,values:Object.keys(l),dflt:&quot;solid&quot;}},marker:o({},a(&quot;marker&quot;),{symbol:u.symbol,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:o({},a(&quot;marker.line&quot;),{width:f.width})}),connectgaps:i.connectgaps,fill:o({},i.fill,{dflt:&quot;none&quot;}),fillcolor:i.fillcolor,selected:{marker:i.selected.marker,textfont:i.selected.textfont},unselected:{marker:i.unselected.marker,textfont:i.unselected.textfont},opacity:n.opacity},&quot;calc&quot;,&quot;nested&quot;);h.x.editType=h.y.editType=h.x0.editType=h.y0.editType=&quot;calc+clearAxisTypes&quot;},{&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/attributes&quot;:739,&quot;../scatter/attributes&quot;:1032,&quot;./constants&quot;:1082}],1082:[function(t,e,r){&quot;use strict&quot;;e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],1083:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;svg-path-sdf&quot;),a=t(&quot;color-normalize&quot;),o=t(&quot;../../registry&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../components/drawing&quot;),c=t(&quot;../../plots/cartesian/axis_ids&quot;),u=t(&quot;../../lib/gl_format_color&quot;).formatColor,f=t(&quot;../scatter/subtypes&quot;),h=t(&quot;../scatter/make_bubble_size_func&quot;),p=t(&quot;./constants&quot;),d=t(&quot;../../constants/interactions&quot;).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1};function m(t){var e,r=t._length,i=t.textfont,a=t.textposition,o=Array.isArray(a)?a:[a],s=i.color,l=i.size,c=i.family,u={};for(u.text=t.text,u.opacity=t.opacity,u.font={},u.align=[],u.baseline=[],e=0;e&lt;o.length;e++){var f=o[e].split(/\s+/);switch(f[1]){case&quot;left&quot;:u.align.push(&quot;right&quot;);break;case&quot;right&quot;:u.align.push(&quot;left&quot;);break;default:u.align.push(f[1])}switch(f[0]){case&quot;top&quot;:u.baseline.push(&quot;bottom&quot;);break;case&quot;bottom&quot;:u.baseline.push(&quot;top&quot;);break;default:u.baseline.push(f[0])}}if(Array.isArray(s))for(u.color=new Array(r),e=0;e&lt;r;e++)u.color[e]=s[e];else u.color=s;if(Array.isArray(l)||Array.isArray(c))for(u.font=new Array(r),e=0;e&lt;r;e++){var h=u.font[e]={};h.size=Array.isArray(l)?n(l[e])?l[e]:0:l,h.family=Array.isArray(c)?c[e]:c}else u.font={size:l,family:c};return u}function v(t){var e,r,n=t._length,i=t.marker,o={},l=Array.isArray(i.symbol),c=s.isArrayOrTypedArray(i.color),f=s.isArrayOrTypedArray(i.line.color),d=s.isArrayOrTypedArray(i.opacity),g=s.isArrayOrTypedArray(i.size),m=s.isArrayOrTypedArray(i.line.width);if(l||(r=p.OPEN_RE.test(i.symbol)),l||c||f||d){o.colors=new Array(n),o.borderColors=new Array(n);var v=u(i,i.opacity,n),y=u(i.line,i.opacity,n);if(!Array.isArray(y[0])){var x=y;for(y=Array(n),e=0;e&lt;n;e++)y[e]=x}if(!Array.isArray(v[0])){var b=v;for(v=Array(n),e=0;e&lt;n;e++)v[e]=b}for(o.colors=v,o.borderColors=y,e=0;e&lt;n;e++){if(l){var _=i.symbol[e];r=p.OPEN_RE.test(_)}r&amp;&amp;(y[e]=v[e].slice(),v[e]=v[e].slice(),v[e][3]=0)}o.opacity=t.opacity}else r?(o.color=a(i.color,&quot;uint8&quot;),o.color[3]=0,o.borderColor=a(i.color,&quot;uint8&quot;)):(o.color=a(i.color,&quot;uint8&quot;),o.borderColor=a(i.line.color,&quot;uint8&quot;)),o.opacity=t.opacity*i.opacity;if(l)for(o.markers=new Array(n),e=0;e&lt;n;e++)o.markers[e]=T(i.symbol[e]);else o.marker=T(i.symbol);var w,k=h(t);if(g||m){var M,A=o.sizes=new Array(n),S=o.borderSizes=new Array(n),E=0;if(g){for(e=0;e&lt;n;e++)A[e]=k(i.size[e]),E+=A[e];M=E/n}else for(w=k(i.size),e=0;e&lt;n;e++)A[e]=w;if(m)for(e=0;e&lt;n;e++)S[e]=i.line.width[e]/2;else for(w=i.line.width/2,e=0;e&lt;n;e++)S[e]=w;o.sizeAvg=M}else o.size=k(i&amp;&amp;i.size||10),o.borderSizes=k(i.line.width);return o}function y(t,e){var r=t.marker,n={};return e?(e.marker&amp;&amp;e.marker.symbol?n=v(s.extendFlat({},r,e.marker)):e.marker&amp;&amp;(e.marker.size&amp;&amp;(n.size=e.marker.size/2),e.marker.color&amp;&amp;(n.colors=e.marker.color),void 0!==e.marker.opacity&amp;&amp;(n.opacity=e.marker.opacity)),n):n}function x(t,e){var r={};if(!e)return r;if(e.textfont){var n={opacity:1,text:t.text,textposition:t.textposition,textfont:s.extendFlat({},t.textfont)};e.textfont&amp;&amp;s.extendFlat(n.textfont,e.textfont),r=m(n)}return r}function b(t,e){var r={capSize:2*e.width,lineWidth:e.thickness,color:e.color};return e.copy_ystyle&amp;&amp;(r=t.error_y),r}var _=p.SYMBOL_SDF_SIZE,w=p.SYMBOL_SIZE,k=p.SYMBOL_STROKE,M={},A=l.symbolFuncs[0](.05*w);function T(t){if(&quot;circle&quot;===t)return null;var e,r,n=l.symbolNumber(t),a=l.symbolFuncs[n%100],o=!!l.symbolNoDot[n%100],s=!!l.symbolNoFill[n%100],c=p.DOT_RE.test(t);return M[t]?M[t]:(e=c&amp;&amp;!o?a(1.1*w)+A:a(w),r=i(e,{w:_,h:_,viewBox:[-w,-w,w,w],stroke:s?k:-k}),M[t]=r,r||null)}e.exports={style:function(t,e){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0};if(!0!==e.visible)return n;if(f.hasText(e)&amp;&amp;(n.text=m(e),n.textSel=x(e,e.selected),n.textUnsel=x(e,e.unselected)),f.hasMarkers(e)&amp;&amp;(n.marker=v(e),n.markerSel=y(e,e.selected),n.markerUnsel=y(e,e.unselected),!e.unselected&amp;&amp;Array.isArray(e.marker.opacity))){var i=e.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r&lt;i.length;r++)n.markerUnsel.opacity[r]=d*i[r]}if(f.hasLines(e)){n.line={overlay:!0,thickness:e.line.width,color:e.line.color,opacity:e.opacity};var a=(p.DASHES[e.line.dash]||[1]).slice();for(r=0;r&lt;a.length;++r)a[r]*=e.line.width;n.line.dashes=a}return e.error_x&amp;&amp;e.error_x.visible&amp;&amp;(n.errorX=b(e,e.error_x)),e.error_y&amp;&amp;e.error_y.visible&amp;&amp;(n.errorY=b(e,e.error_y)),e.fill&amp;&amp;&quot;none&quot;!==e.fill&amp;&amp;(n.fill={closed:!0,fill:e.fillcolor,thickness:0}),n},markerStyle:v,markerSelection:y,linePositions:function(t,e,r){var n,i,a=r.length/2;if(f.hasLines(e)&amp;&amp;a)if(&quot;hv&quot;===e.line.shape){for(n=[],i=0;i&lt;a-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?(n.push(NaN),n.push(NaN),n.push(NaN),n.push(NaN)):(n.push(r[2*i]),n.push(r[2*i+1]),n.push(r[2*i+2]),n.push(r[2*i+1]));n.push(r[r.length-2]),n.push(r[r.length-1])}else if(&quot;vh&quot;===e.line.shape){for(n=[],i=0;i&lt;a-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?(n.push(NaN),n.push(NaN),n.push(NaN),n.push(NaN)):(n.push(r[2*i]),n.push(r[2*i+1]),n.push(r[2*i]),n.push(r[2*i+3]));n.push(r[r.length-2]),n.push(r[r.length-1])}else n=r;var o=!1;for(i=0;i&lt;n.length;i++)if(isNaN(n[i])){o=!0;break}var s=o||n.length&gt;p.TOO_MANY_POINTS?&quot;rect&quot;:f.hasMarkers(e)?&quot;rect&quot;:&quot;round&quot;;if(o&amp;&amp;e.connectgaps){var l=n[0],c=n[1];for(i=0;i&lt;n.length;i+=2)isNaN(n[i])||isNaN(n[i+1])?(n[i]=l,n[i+1]=c):(l=n[i],c=n[i+1])}return{join:s,positions:n}},errorBarPositions:function(t,e,r,i,a){var s=o.getComponentMethod(&quot;errorbars&quot;,&quot;makeComputeError&quot;),l=c.getFromId(t,e.xaxis),u=c.getFromId(t,e.yaxis),f=r.length/2,h={};function p(t,i){var a=i._id.charAt(0),o=e[&quot;error_&quot;+a];if(o&amp;&amp;o.visible&amp;&amp;(&quot;linear&quot;===i.type||&quot;log&quot;===i.type)){for(var l=s(o),c={x:0,y:1}[a],u={x:[0,1,2,3],y:[2,3,0,1]}[a],p=new Float64Array(4*f),d=1/0,g=-1/0,m=0,v=0;m&lt;f;m++,v+=4){var y=t[m];if(n(y)){var x=r[2*m+c],b=l(y,m),_=b[0],w=b[1];if(n(_)&amp;&amp;n(w)){var k=y-_,M=y+w;p[v+u[0]]=x-i.c2l(k),p[v+u[1]]=i.c2l(M)-x,p[v+u[2]]=0,p[v+u[3]]=0,d=Math.min(d,y-_),g=Math.max(g,y+w)}}}h[a]={positions:r,errors:p,_bnds:[d,g]}}}return p(i,l),p(a,u),h},textPosition:function(t,e,r,n){var i,a=e._length,o={};if(f.hasMarkers(e)){var s=r.font,l=r.align,c=r.baseline;for(o.offset=new Array(a),i=0;i&lt;a;i++){var u=n.sizes?n.sizes[i]:n.size,h=Array.isArray(s)?s[i].size:s.size,p=Array.isArray(l)?l.length&gt;1?l[i]:l[0]:l,d=Array.isArray(c)?c.length&gt;1?c[i]:c[0]:c,m=g[p],v=g[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[m*y/h,x/h]}}return o}}},{&quot;../../components/drawing&quot;:592,&quot;../../constants/interactions&quot;:669,&quot;../../lib&quot;:693,&quot;../../lib/gl_format_color&quot;:689,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;../../registry&quot;:825,&quot;../scatter/make_bubble_size_func&quot;:1049,&quot;../scatter/subtypes&quot;:1056,&quot;./constants&quot;:1082,&quot;color-normalize&quot;:107,&quot;fast-isnumeric&quot;:213,&quot;svg-path-sdf&quot;:509}],1084:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;./attributes&quot;),o=t(&quot;../scatter/constants&quot;),s=t(&quot;../scatter/subtypes&quot;),l=t(&quot;../scatter/xy_defaults&quot;),c=t(&quot;../scatter/marker_defaults&quot;),u=t(&quot;../scatter/line_defaults&quot;),f=t(&quot;../scatter/fillcolor_defaults&quot;),h=t(&quot;../scatter/text_defaults&quot;);e.exports=function(t,e,r,p){function d(r,i){return n.coerce(t,e,a,r,i)}var g=!!t.marker&amp;&amp;/-open/.test(t.marker.symbol),m=s.isBubble(t),v=l(t,e,p,d);if(v){var y=v&lt;o.PTS_LINESONLY?&quot;lines+markers&quot;:&quot;lines&quot;;d(&quot;text&quot;),d(&quot;hovertext&quot;),d(&quot;mode&quot;,y),s.hasLines(e)&amp;&amp;(d(&quot;connectgaps&quot;),u(t,e,r,p,d)),s.hasMarkers(e)&amp;&amp;(c(t,e,r,p,d),d(&quot;marker.line.width&quot;,g||m?1:0)),s.hasText(e)&amp;&amp;h(t,e,p,d),d(&quot;fill&quot;),&quot;none&quot;!==e.fill&amp;&amp;f(t,e,r,d);var x=i.getComponentMethod(&quot;errorbars&quot;,&quot;supplyDefaults&quot;);x(t,e,r,{axis:&quot;y&quot;}),x(t,e,r,{axis:&quot;x&quot;,inherit:&quot;y&quot;}),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;../scatter/constants&quot;:1037,&quot;../scatter/fillcolor_defaults&quot;:1041,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;../scatter/xy_defaults&quot;:1058,&quot;./attributes&quot;:1081}],1085:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;regl-scatter2d&quot;),i=t(&quot;regl-line2d&quot;),a=t(&quot;regl-error2d&quot;),o=t(&quot;point-cluster&quot;),s=t(&quot;array-range&quot;),l=t(&quot;gl-text&quot;),c=t(&quot;../../registry&quot;),u=t(&quot;../../lib&quot;),f=t(&quot;../../lib/prepare_regl&quot;),h=t(&quot;../../plots/cartesian/axis_ids&quot;),p=t(&quot;../../plots/cartesian/autorange&quot;).findExtremes,d=t(&quot;../../components/color&quot;),g=t(&quot;../scatter/subtypes&quot;),m=t(&quot;../scatter/calc&quot;),v=m.calcMarkerSize,y=m.calcAxisExpansion,x=m.setFirstScatter,b=t(&quot;../scatter/colorscale_calc&quot;),_=t(&quot;../scatter/link_traces&quot;),w=t(&quot;../scatter/get_trace_color&quot;),k=t(&quot;../scatter/fill_hover_text&quot;),M=t(&quot;./convert&quot;),A=t(&quot;../../constants/numerical&quot;).BADNUM,T=t(&quot;./constants&quot;).TOO_MANY_POINTS,S=t(&quot;../../constants/interactions&quot;).DESELECTDIM;function E(t,e,r){var n=t._extremes[e._id],i=p(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}function C(t,e,r,n,i,a){var o=M.style(t,r);if(o.marker&amp;&amp;(o.marker.positions=n),o.line&amp;&amp;n.length&gt;1&amp;&amp;u.extendFlat(o.line,M.linePositions(t,r,n)),o.errorX||o.errorY){var s=M.errorBarPositions(t,r,n,i,a);o.errorX&amp;&amp;u.extendFlat(o.errorX,s.x),o.errorY&amp;&amp;u.extendFlat(o.errorY,s.y)}return o.text&amp;&amp;(u.extendFlat(o.text,{positions:n},M.textPosition(t,r,o.text,o.marker)),u.extendFlat(o.textSel,{positions:n},M.textPosition(t,r,o.text,o.markerSel)),u.extendFlat(o.textUnsel,{positions:n},M.textPosition(t,r,o.text,o.markerUnsel))),o}function L(t,e){var r=e._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[]},i={selectBatch:null,unselectBatch:null,fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:null};return e._scene||((r=e._scene={}).init=function(){u.extendFlat(r,i,n)},r.init(),r.update=function(t){var e=u.repeat(t,r.count);if(r.fill2d&amp;&amp;r.fill2d.update(e),r.scatter2d&amp;&amp;r.scatter2d.update(e),r.line2d&amp;&amp;r.line2d.update(e),r.error2d&amp;&amp;r.error2d.update(e.concat(e)),r.select2d&amp;&amp;r.select2d.update(e),r.glText)for(var n=0;n&lt;r.count;n++)r.glText[n].update(t);r.draw()},r.draw=function(){var t;for(t=0;t&lt;r.count;t++)r.fill2d&amp;&amp;r.fillOptions[t]&amp;&amp;r.fill2d.draw(t);for(t=0;t&lt;r.count;t++)r.line2d&amp;&amp;r.lineOptions[t]&amp;&amp;r.line2d.draw(t),r.error2d&amp;&amp;r.errorXOptions[t]&amp;&amp;r.error2d.draw(t),r.error2d&amp;&amp;r.errorYOptions[t]&amp;&amp;r.error2d.draw(t+r.count),!r.scatter2d||!r.markerOptions[t]||r.selectBatch&amp;&amp;r.selectBatch[t]||r.scatter2d.draw(t);for(r.scatter2d&amp;&amp;r.select2d&amp;&amp;r.selectBatch&amp;&amp;(r.select2d.draw(r.selectBatch),r.scatter2d.draw(r.unselectBatch)),t=0;t&lt;r.count;t++)r.glText[t]&amp;&amp;r.textOptions[t]&amp;&amp;r.glText[t].render();r.dirty=!1},r.clear=function(){var n=z(t._fullLayout,e.xaxis,e.yaxis);r.select2d&amp;&amp;P(r.select2d,n);var i=r.scatter2d||r.line2d||(r.glText||[])[0]||r.fill2d||r.error2d;i&amp;&amp;P(i,n)},r.destroy=function(){r.fill2d&amp;&amp;r.fill2d.destroy(),r.scatter2d&amp;&amp;r.scatter2d.destroy(),r.error2d&amp;&amp;r.error2d.destroy(),r.line2d&amp;&amp;r.line2d.destroy(),r.select2d&amp;&amp;r.select2d.destroy(),r.glText&amp;&amp;r.glText.forEach(function(t){t.destroy()}),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.markerSelectedOptions=null,r.markerUnselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.textOptions=null,r.textSelectedOptions=null,r.textUnselectedOptions=null,r.selectBatch=null,r.unselectBatch=null,e._scene=null}),r.dirty||u.extendFlat(r,n),r}function z(t,e,r){var n=t._size,i=t.width,a=t.height;return[n.l+e.domain[0]*n.w,n.b+r.domain[0]*n.h,i-n.r-(1-e.domain[1])*n.w,a-n.t-(1-r.domain[1])*n.h]}function P(t,e){var r=t.regl._gl;r.enable(r.SCISSOR_TEST),r.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT)}function O(t,e,r,n){var i=t.xa,a=t.ya,o=t.distance,s=t.dxy,l=t.index,f={pointNumber:l,x:e[l],y:r[l]};f.tx=Array.isArray(n.text)?n.text[l]:n.text,f.htx=Array.isArray(n.hovertext)?n.hovertext[l]:n.hovertext,f.data=Array.isArray(n.customdata)?n.customdata[l]:n.customdata,f.tp=Array.isArray(n.textposition)?n.textposition[l]:n.textposition;var h=n.textfont;h&amp;&amp;(f.ts=Array.isArray(h.size)?h.size[l]:h.size,f.tc=Array.isArray(h.color)?h.color[l]:h.color,f.tf=Array.isArray(h.family)?h.family[l]:h.family);var p=n.marker;p&amp;&amp;(f.ms=u.isArrayOrTypedArray(p.size)?p.size[l]:p.size,f.mo=u.isArrayOrTypedArray(p.opacity)?p.opacity[l]:p.opacity,f.mx=Array.isArray(p.symbol)?p.symbol[l]:p.symbol,f.mc=u.isArrayOrTypedArray(p.color)?p.color[l]:p.color);var d=p&amp;&amp;p.line;d&amp;&amp;(f.mlc=Array.isArray(d.color)?d.color[l]:d.color,f.mlw=u.isArrayOrTypedArray(d.width)?d.width[l]:d.width);var g=p&amp;&amp;p.gradient;g&amp;&amp;&quot;none&quot;!==g.type&amp;&amp;(f.mgt=Array.isArray(g.type)?g.type[l]:g.type,f.mgc=Array.isArray(g.color)?g.color[l]:g.color);var m=i.c2p(f.x,!0),v=a.c2p(f.y,!0),y=f.mrc||1,x=n.hoverlabel;x&amp;&amp;(f.hbg=Array.isArray(x.bgcolor)?x.bgcolor[l]:x.bgcolor,f.hbc=Array.isArray(x.bordercolor)?x.bordercolor[l]:x.bordercolor,f.hts=Array.isArray(x.font.size)?x.font.size[l]:x.font.size,f.htc=Array.isArray(x.font.color)?x.font.color[l]:x.font.color,f.htf=Array.isArray(x.font.family)?x.font.family[l]:x.font.family,f.hnl=Array.isArray(x.namelength)?x.namelength[l]:x.namelength);var b=n.hoverinfo;b&amp;&amp;(f.hi=Array.isArray(b)?b[l]:b);var _={};return _[t.index]=f,u.extendFlat(t,{color:w(n,f),x0:m-y,x1:m+y,xLabelVal:f.x,y0:v-y,y1:v+y,yLabelVal:f.y,cd:_,distance:o,spikeDistance:s}),f.htx?t.text=f.htx:f.tx?t.text=f.tx:n.text&amp;&amp;(t.text=n.text),k(f,n,t),c.getComponentMethod(&quot;errorbars&quot;,&quot;hoverInfo&quot;)(f,n,t),t}function I(t){var e,r,n=t[0].t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],c=i.textSelectedOptions[a]||{},f=i.textUnselectedOptions[a]||{},h=u.extendFlat({},l);if(o&amp;&amp;s){var p=c.color,g=f.color,m=l.color,v=Array.isArray(m);for(h.color=new Array(n.count),e=0;e&lt;o.length;e++)r=o[e],h.color[r]=p||(v?m[r]:m);for(e=0;e&lt;s.length;e++){r=s[e];var y=v?m[r]:m;h.color[r]=g||(p?y:d.addOpacity(y,S))}}i.glText[a].update(h)}e.exports={moduleType:&quot;trace&quot;,name:&quot;scattergl&quot;,basePlotModule:t(&quot;../../plots/cartesian&quot;),categories:[&quot;gl&quot;,&quot;regl&quot;,&quot;cartesian&quot;,&quot;symbols&quot;,&quot;errorBarsOK&quot;,&quot;showLegend&quot;,&quot;scatter-like&quot;],attributes:t(&quot;./attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),cleanData:t(&quot;../scatter/clean_data&quot;),colorbar:t(&quot;../scatter/marker_colorbar&quot;),calc:function(t,e){var r,n,i,a=t._fullLayout,s=h.getFromId(t,e.xaxis),l=h.getFromId(t,e.yaxis),c=a._plots[e.xaxis+e.yaxis],u=e._length,f=2*u,p={},d=s.makeCalcdata(e,&quot;x&quot;),g=l.makeCalcdata(e,&quot;y&quot;),m=new Array(f);for(r=0;r&lt;u;r++)n=d[r],i=g[r],m[2*r]=n===A?NaN:n,m[2*r+1]=i===A?NaN:i;if(&quot;log&quot;===s.type)for(r=0;r&lt;f;r+=2)m[r]=s.c2l(m[r]);if(&quot;log&quot;===l.type)for(r=1;r&lt;f;r+=2)m[r]=l.c2l(m[r]);if(&quot;log&quot;!==s.type&amp;&amp;&quot;log&quot;!==l.type)p.tree=o(m);else{var _=p.ids=new Array(u);for(r=0;r&lt;u;r++)_[r]=r}b(e);var w,k=C(t,0,e,m,d,g),M=L(t,c);return x(a,e),u&lt;T?w=v(e,u):k.marker&amp;&amp;(w=2*(k.marker.sizeAvg||Math.max(k.marker.size,3))),y(t,e,s,l,d,g,w),k.errorX&amp;&amp;E(e,s,k.errorX),k.errorY&amp;&amp;E(e,l,k.errorY),k.fill&amp;&amp;!M.fill2d&amp;&amp;(M.fill2d=!0),k.marker&amp;&amp;!M.scatter2d&amp;&amp;(M.scatter2d=!0),k.line&amp;&amp;!M.line2d&amp;&amp;(M.line2d=!0),!k.errorX&amp;&amp;!k.errorY||M.error2d||(M.error2d=!0),k.text&amp;&amp;!M.glText&amp;&amp;(M.glText=!0),k.marker&amp;&amp;u&gt;=T&amp;&amp;(k.marker.cluster=p.tree),M.lineOptions.push(k.line),M.errorXOptions.push(k.errorX),M.errorYOptions.push(k.errorY),M.fillOptions.push(k.fill),M.markerOptions.push(k.marker),M.markerSelectedOptions.push(k.markerSel),M.markerUnselectedOptions.push(k.markerUnsel),M.textOptions.push(k.text),M.textSelectedOptions.push(k.textSel),M.textUnselectedOptions.push(k.textUnsel),p._scene=M,p.index=M.count,p.x=d,p.y=g,p.positions=m,p.count=u,M.count++,[{x:!1,y:!1,t:p,trace:e}]},plot:function(t,e,r){if(r.length){var o,s,c=t._fullLayout,h=e._scene,p=e.xaxis,d=e.yaxis;if(h)if(f(t,[&quot;ANGLE_instanced_arrays&quot;,&quot;OES_element_index_uint&quot;])){var g=c._glcanvas.data()[0].regl;if(_(t,e,r),h.dirty){if(!0===h.error2d&amp;&amp;(h.error2d=a(g)),!0===h.line2d&amp;&amp;(h.line2d=i(g)),!0===h.scatter2d&amp;&amp;(h.scatter2d=n(g)),!0===h.fill2d&amp;&amp;(h.fill2d=i(g)),!0===h.glText)for(h.glText=new Array(h.count),o=0;o&lt;h.count;o++)h.glText[o]=new l(g);if(h.glText)for(o=0;o&lt;h.count;o++)h.glText[o].update(h.textOptions[o]);if(h.line2d&amp;&amp;h.line2d.update(h.lineOptions),h.error2d){var m=(h.errorXOptions||[]).concat(h.errorYOptions||[]);h.error2d.update(m)}h.scatter2d&amp;&amp;h.scatter2d.update(h.markerOptions),h.fill2d&amp;&amp;(h.fillOptions=h.fillOptions.map(function(t,e){var n=r[e];if(t&amp;&amp;n&amp;&amp;n[0]&amp;&amp;n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,c=h.lineOptions[e],u=[],f=c&amp;&amp;c.positions||l.positions;if(&quot;tozeroy&quot;===s.fill)(u=(u=[f[0],0]).concat(f)).push(f[f.length-2]),u.push(0);else if(&quot;tozerox&quot;===s.fill)(u=(u=[0,f[1]]).concat(f)).push(0),u.push(f[f.length-1]);else if(&quot;toself&quot;===s.fill||&quot;tonext&quot;===s.fill){for(u=[],i=0,a=0;a&lt;f.length;a+=2)(isNaN(f[a])||isNaN(f[a+1]))&amp;&amp;((u=u.concat(f.slice(i,a))).push(f[i],f[i+1]),i=a+2);u=u.concat(f.slice(i)),i&amp;&amp;u.push(f[i],f[i+1])}else{var p=s._nexttrace;if(p){var d=h.lineOptions[e+1];if(d){var g=d.positions;if(&quot;tonexty&quot;===s.fill){for(u=f.slice(),e=Math.floor(g.length/2);e--;){var m=g[2*e],v=g[2*e+1];isNaN(m)||isNaN(v)||(u.push(m),u.push(v))}t.fill=p.fillcolor}}}}if(s._prevtrace&amp;&amp;&quot;tonext&quot;===s._prevtrace.fill){var y=h.lineOptions[e-1].positions,x=u.length/2,b=[i=x];for(a=0;a&lt;y.length;a+=2)(isNaN(y[a])||isNaN(y[a+1]))&amp;&amp;(b.push(a/2+x+1),i=a+2);u=u.concat(y),t.hole=b}return t.opacity=s.opacity,t.positions=u,t}}),h.fill2d.update(h.fillOptions))}h.selectBatch=null,h.unselectBatch=null;var v=c.dragmode,y=&quot;lasso&quot;===v||&quot;select&quot;===v,x=c.clickmode.indexOf(&quot;select&quot;)&gt;-1;for(o=0;o&lt;r.length;o++){var b=r[o][0],w=b.trace,k=b.t,M=k.index,A=k.x,T=k.y;if(w.selectedpoints||y||x){if(y||(y=!0),h.selectBatch||(h.selectBatch=[],h.unselectBatch=[]),w.selectedpoints){var S=h.selectBatch[M]=u.selIndices2selPoints(w),E={};for(s=0;s&lt;S.length;s++)E[S[s]]=1;var C=[];for(s=0;s&lt;k.count;s++)E[s]||C.push(s);h.unselectBatch[M]=C}var L=k.xpx=new Array(k.count),P=k.ypx=new Array(k.count);for(s=0;s&lt;k.count;s++)L[s]=p.c2p(A[s]),P[s]=d.c2p(T[s])}else k.xpx=k.ypx=null}y?(h.select2d||(h.select2d=n(c._glcanvas.data()[1].regl)),h.scatter2d&amp;&amp;h.selectBatch&amp;&amp;h.selectBatch.length&amp;&amp;h.scatter2d.update(h.markerUnselectedOptions.map(function(t,e){return h.selectBatch[e]?t:null})),h.select2d&amp;&amp;(h.select2d.update(h.markerOptions),h.select2d.update(h.markerSelectedOptions)),h.glText&amp;&amp;r.forEach(function(t){t&amp;&amp;t[0]&amp;&amp;t[0].trace&amp;&amp;I(t)})):h.scatter2d&amp;&amp;h.scatter2d.update(h.markerOptions);var O={viewport:z(c,p,d),range:[(p._rl||p.range)[0],(d._rl||d.range)[0],(p._rl||p.range)[1],(d._rl||d.range)[1]]},D=u.repeat(O,h.count);h.fill2d&amp;&amp;h.fill2d.update(D),h.line2d&amp;&amp;h.line2d.update(D),h.error2d&amp;&amp;h.error2d.update(D.concat(D)),h.scatter2d&amp;&amp;h.scatter2d.update(D),h.select2d&amp;&amp;h.select2d.update(D),h.glText&amp;&amp;h.glText.forEach(function(t){t.update(O)}),h.draw()}else h.init()}},hoverPoints:function(t,e,r,n){var i,a,o,s,l,c,u,f,h,p=t.cd,d=p[0].t,g=p[0].trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=m.c2p(e),_=v.c2p(r),w=t.distance;if(d.tree){var k=m.p2c(b-w),M=m.p2c(b+w),A=v.p2c(_-w),T=v.p2c(_+w);i=&quot;x&quot;===n?d.tree.range(Math.min(k,M),Math.min(v._rl[0],v._rl[1]),Math.max(k,M),Math.max(v._rl[0],v._rl[1])):d.tree.range(Math.min(k,M),Math.min(A,T),Math.max(k,M),Math.max(A,T))}else{if(!d.ids)return[t];i=d.ids}var S=w;if(&quot;x&quot;===n)for(l=0;l&lt;i.length;l++)o=y[i[l]],(c=Math.abs(m.c2p(o)-b))&lt;S&amp;&amp;(S=c,u=v.c2p(x[i[l]])-_,h=Math.sqrt(c*c+u*u),a=i[l]);else for(l=0;l&lt;i.length;l++)o=y[i[l]],s=x[i[l]],c=m.c2p(o)-b,u=v.c2p(s)-_,(f=Math.sqrt(c*c+u*u))&lt;S&amp;&amp;(S=h=f,a=i[l]);return t.index=a,t.distance=S,t.dxy=h,void 0===a?[t]:(O(t,y,x,g),[t])},style:function(t,e){if(e){var r=e[0][0].t._scene;t._fullLayout._has(&quot;splom&quot;)||r.clear(),r.draw()}},selectPoints:function(t,e){var r=t.cd,n=[],i=r[0].trace,a=r[0].t,o=a.x,l=a.y,c=a._scene;if(!c)return n;var u=g.hasText(i),f=g.hasMarkers(i),h=!f&amp;&amp;!u;if(!0!==i.visible||h)return n;var p,d=null,m=null;if(!1===e||e.degenerate)m=s(a.count);else for(d=[],m=[],p=0;p&lt;a.count;p++)e.contains([a.xpx[p],a.ypx[p]],!1,p,t)?(d.push(p),n.push({pointNumber:p,x:o[p],y:l[p]})):m.push(p);if(c.selectBatch||(c.selectBatch=[],c.unselectBatch=[]),!c.selectBatch[a.index]){for(p=0;p&lt;c.count;p++)c.selectBatch[p]=[],c.unselectBatch[p]=[];f&amp;&amp;c.scatter2d.update(c.markerUnselectedOptions)}return c.selectBatch[a.index]=d,c.unselectBatch[a.index]=m,u&amp;&amp;I(r),n},sceneOptions:C,sceneUpdate:L,calcHover:O,meta:{}}},{&quot;../../components/color&quot;:567,&quot;../../constants/interactions&quot;:669,&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../lib/prepare_regl&quot;:707,&quot;../../plots/cartesian&quot;:753,&quot;../../plots/cartesian/autorange&quot;:741,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;../../registry&quot;:825,&quot;../scatter/calc&quot;:1033,&quot;../scatter/clean_data&quot;:1035,&quot;../scatter/colorscale_calc&quot;:1036,&quot;../scatter/fill_hover_text&quot;:1040,&quot;../scatter/get_trace_color&quot;:1042,&quot;../scatter/link_traces&quot;:1048,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scatter/subtypes&quot;:1056,&quot;./attributes&quot;:1081,&quot;./constants&quot;:1082,&quot;./convert&quot;:1083,&quot;./defaults&quot;:1084,&quot;array-range&quot;:54,&quot;gl-text&quot;:302,&quot;point-cluster&quot;:449,&quot;regl-error2d&quot;:470,&quot;regl-line2d&quot;:471,&quot;regl-scatter2d&quot;:472}],1086:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scattergeo/attributes&quot;),i=t(&quot;../scatter/attributes&quot;),a=t(&quot;../../plots/mapbox/layout_attributes&quot;),o=t(&quot;../../plots/attributes&quot;),s=t(&quot;../../components/colorbar/attributes&quot;),l=t(&quot;../../lib/extend&quot;).extendFlat,c=t(&quot;../../plot_api/edit_types&quot;).overrideAll,u=n.line,f=n.marker;e.exports=c({lon:n.lon,lat:n.lat,mode:l({},i.mode,{dflt:&quot;markers&quot;}),text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),line:{color:u.color,width:u.width},connectgaps:i.connectgaps,marker:{symbol:{valType:&quot;string&quot;,dflt:&quot;circle&quot;,arrayOk:!0},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,color:f.color,colorscale:f.colorscale,cauto:f.cauto,cmax:f.cmax,cmin:f.cmin,autocolorscale:f.autocolorscale,reversescale:f.reversescale,showscale:f.showscale,colorbar:s},fill:n.fill,fillcolor:i.fillcolor,textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,selected:{marker:i.selected.marker},unselected:{marker:i.unselected.marker},hoverinfo:l({},o.hoverinfo,{flags:[&quot;lon&quot;,&quot;lat&quot;,&quot;text&quot;,&quot;name&quot;]})},&quot;calc&quot;,&quot;nested&quot;)},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/attributes&quot;:739,&quot;../../plots/mapbox/layout_attributes&quot;:801,&quot;../scatter/attributes&quot;:1032,&quot;../scattergeo/attributes&quot;:1072}],1087:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../constants/numerical&quot;).BADNUM,o=t(&quot;../../lib/geojson_utils&quot;),s=t(&quot;../../components/colorscale&quot;),l=t(&quot;../../components/drawing&quot;),c=t(&quot;../scatter/make_bubble_size_func&quot;),u=t(&quot;../scatter/subtypes&quot;),f=t(&quot;../../plots/mapbox/convert_text_opts&quot;);function h(){return{geojson:o.makeBlank(),layout:{visibility:&quot;none&quot;},paint:{}}}function p(t){return i.isArrayOrTypedArray(t)?function(t){return t}:t?function(){return t}:d}function d(){return&quot;&quot;}function g(t){return t[0]===a}e.exports=function(t){var e,r=t[0].trace,a=!0===r.visible,m=&quot;none&quot;!==r.fill,v=u.hasLines(r),y=u.hasMarkers(r),x=u.hasText(r),b=y&amp;&amp;&quot;circle&quot;===r.marker.symbol,_=y&amp;&amp;&quot;circle&quot;!==r.marker.symbol,w=h(),k=h(),M=h(),A=h(),T={fill:w,line:k,circle:M,symbol:A};if(!a)return T;if((m||v)&amp;&amp;(e=o.calcTraceToLineCoords(t)),m&amp;&amp;(w.geojson=o.makePolygon(e),w.layout.visibility=&quot;visible&quot;,i.extendFlat(w.paint,{&quot;fill-color&quot;:r.fillcolor})),v&amp;&amp;(k.geojson=o.makeLine(e),k.layout.visibility=&quot;visible&quot;,i.extendFlat(k.paint,{&quot;line-width&quot;:r.line.width,&quot;line-color&quot;:r.line.color,&quot;line-opacity&quot;:r.opacity})),b){var S=function(t){var e,r,a,o,u=t[0].trace,f=u.marker,h=u.selectedpoints,p=i.isArrayOrTypedArray(f.color),d=i.isArrayOrTypedArray(f.size),m=i.isArrayOrTypedArray(f.opacity);function v(t){return u.opacity*t}p&amp;&amp;(r=s.hasColorscale(u,&quot;marker&quot;)?s.makeColorScaleFunc(s.extractScale(f.colorscale,f.cmin,f.cmax)):i.identity);d&amp;&amp;(a=c(u));m&amp;&amp;(o=function(t){var e=n(t)?+i.constrain(t,0,1):0;return v(e)});var y,x=[];for(e=0;e&lt;t.length;e++){var b=t[e],_=b.lonlat;if(!g(_)){var w={};r&amp;&amp;(w.mcc=b.mcc=r(b.mc)),a&amp;&amp;(w.mrc=b.mrc=a(b.ms)),o&amp;&amp;(w.mo=o(b.mo)),h&amp;&amp;(w.selected=b.selected||0),x.push({type:&quot;Feature&quot;,geometry:{type:&quot;Point&quot;,coordinates:_},properties:w})}}if(h)for(y=l.makeSelectedPointStyleFns(u),e=0;e&lt;x.length;e++){var k=x[e].properties;y.selectedOpacityFn&amp;&amp;(k.mo=v(y.selectedOpacityFn(k))),y.selectedColorFn&amp;&amp;(k.mcc=y.selectedColorFn(k)),y.selectedSizeFn&amp;&amp;(k.mrc=y.selectedSizeFn(k))}return{geojson:{type:&quot;FeatureCollection&quot;,features:x},mcc:p||y&amp;&amp;y.selectedColorFn?{type:&quot;identity&quot;,property:&quot;mcc&quot;}:f.color,mrc:d||y&amp;&amp;y.selectedSizeFn?{type:&quot;identity&quot;,property:&quot;mrc&quot;}:(M=f.size,M/2),mo:m||y&amp;&amp;y.selectedOpacityFn?{type:&quot;identity&quot;,property:&quot;mo&quot;}:v(f.opacity)};var M}(t);M.geojson=S.geojson,M.layout.visibility=&quot;visible&quot;,i.extendFlat(M.paint,{&quot;circle-color&quot;:S.mcc,&quot;circle-radius&quot;:S.mrc,&quot;circle-opacity&quot;:S.mo})}if((_||x)&amp;&amp;(A.geojson=function(t){for(var e=t[0].trace,r=(e.marker||{}).symbol,n=e.text,i=&quot;circle&quot;!==r?p(r):d,a=u.hasText(e)?p(n):d,o=[],s=0;s&lt;t.length;s++){var l=t[s];g(l.lonlat)||o.push({type:&quot;Feature&quot;,geometry:{type:&quot;Point&quot;,coordinates:l.lonlat},properties:{symbol:i(l.mx),text:a(l.tx)}})}return{type:&quot;FeatureCollection&quot;,features:o}}(t),i.extendFlat(A.layout,{visibility:&quot;visible&quot;,&quot;icon-image&quot;:&quot;{symbol}-15&quot;,&quot;text-field&quot;:&quot;{text}&quot;}),_&amp;&amp;(i.extendFlat(A.layout,{&quot;icon-size&quot;:r.marker.size/10}),i.extendFlat(A.paint,{&quot;icon-opacity&quot;:r.opacity*r.marker.opacity,&quot;icon-color&quot;:r.marker.color})),x)){var E=(r.marker||{}).size,C=f(r.textposition,E);i.extendFlat(A.layout,{&quot;text-size&quot;:r.textfont.size,&quot;text-anchor&quot;:C.anchor,&quot;text-offset&quot;:C.offset}),i.extendFlat(A.paint,{&quot;text-color&quot;:r.textfont.color,&quot;text-opacity&quot;:r.opacity})}return T}},{&quot;../../components/colorscale&quot;:582,&quot;../../components/drawing&quot;:592,&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../lib/geojson_utils&quot;:686,&quot;../../plots/mapbox/convert_text_opts&quot;:798,&quot;../scatter/make_bubble_size_func&quot;:1049,&quot;../scatter/subtypes&quot;:1056,&quot;fast-isnumeric&quot;:213}],1088:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatter/subtypes&quot;),a=t(&quot;../scatter/marker_defaults&quot;),o=t(&quot;../scatter/line_defaults&quot;),s=t(&quot;../scatter/text_defaults&quot;),l=t(&quot;../scatter/fillcolor_defaults&quot;),c=t(&quot;./attributes&quot;);e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}if(function(t,e,r){var n=r(&quot;lon&quot;)||[],i=r(&quot;lat&quot;)||[],a=Math.min(n.length,i.length);return e._length=a,a}(0,e,f)){if(f(&quot;text&quot;),f(&quot;hovertext&quot;),f(&quot;mode&quot;),i.hasLines(e)&amp;&amp;(o(t,e,r,u,f,{noDash:!0}),f(&quot;connectgaps&quot;)),i.hasMarkers(e)){a(t,e,r,u,f,{noLine:!0});var h=e.marker;&quot;circle&quot;!==h.symbol&amp;&amp;(n.isArrayOrTypedArray(h.size)&amp;&amp;(h.size=h.size[0]),n.isArrayOrTypedArray(h.color)&amp;&amp;(h.color=h.color[0]))}i.hasText(e)&amp;&amp;s(t,e,u,f,{noSelect:!0}),f(&quot;fill&quot;),&quot;none&quot;!==e.fill&amp;&amp;l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../scatter/fillcolor_defaults&quot;:1041,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;./attributes&quot;:1086}],1089:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t}},{}],1090:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/fx&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../scatter/get_trace_color&quot;),o=t(&quot;../scatter/fill_hover_text&quot;),s=t(&quot;../../constants/numerical&quot;).BADNUM;e.exports=function(t,e,r){var l=t.cd,c=l[0].trace,u=t.xa,f=t.ya,h=t.subplot,p=360*(e&gt;=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=h.project([n,a]),l=o.x-u.c2p([d,a]),c=o.y-f.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)},t),!1!==t.index){var g=l[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;return t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b,t.color=a(c,g),t.extraText=function(t,e,r){var n=(e.hi||t.hoverinfo).split(&quot;+&quot;),i=-1!==n.indexOf(&quot;all&quot;),a=-1!==n.indexOf(&quot;lon&quot;),s=-1!==n.indexOf(&quot;lat&quot;),l=e.lonlat,c=[];function u(t){return t+&quot;\xb0&quot;}i||a&amp;&amp;s?c.push(&quot;(&quot;+u(l[0])+&quot;, &quot;+u(l[1])+&quot;)&quot;):a?c.push(r.lon+u(l[0])):s&amp;&amp;c.push(r.lat+u(l[1]));(i||-1!==n.indexOf(&quot;text&quot;))&amp;&amp;o(e,t,c);return c.join(&quot;&lt;br&gt;&quot;)}(c,g,l[0].t.labels),[t]}}},{&quot;../../components/fx&quot;:609,&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../scatter/fill_hover_text&quot;:1040,&quot;../scatter/get_trace_color&quot;:1042}],1091:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar=t(&quot;../scatter/marker_colorbar&quot;),n.calc=t(&quot;../scattergeo/calc&quot;),n.plot=t(&quot;./plot&quot;),n.hoverPoints=t(&quot;./hover&quot;),n.eventData=t(&quot;./event_data&quot;),n.selectPoints=t(&quot;./select&quot;),n.style=function(t,e){e&amp;&amp;e[0].trace._glTrace.update(e)},n.moduleType=&quot;trace&quot;,n.name=&quot;scattermapbox&quot;,n.basePlotModule=t(&quot;../../plots/mapbox&quot;),n.categories=[&quot;mapbox&quot;,&quot;gl&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;scatterlike&quot;],n.meta={},e.exports=n},{&quot;../../plots/mapbox&quot;:799,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scattergeo/calc&quot;:1073,&quot;./attributes&quot;:1086,&quot;./defaults&quot;:1088,&quot;./event_data&quot;:1089,&quot;./hover&quot;:1090,&quot;./plot&quot;:1092,&quot;./select&quot;:1093}],1092:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./convert&quot;);function i(t,e){this.subplot=t,this.uid=e,this.sourceIds={fill:e+&quot;-source-fill&quot;,line:e+&quot;-source-line&quot;,circle:e+&quot;-source-circle&quot;,symbol:e+&quot;-source-symbol&quot;},this.layerIds={fill:e+&quot;-layer-fill&quot;,line:e+&quot;-layer-line&quot;,circle:e+&quot;-layer-circle&quot;,symbol:e+&quot;-layer-symbol&quot;},this.order=[&quot;fill&quot;,&quot;line&quot;,&quot;circle&quot;,&quot;symbol&quot;]}var a=i.prototype;a.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:&quot;geojson&quot;,data:e.geojson})},a.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},a.addLayer=function(t,e){this.subplot.map.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint})},a.update=function(t){for(var e=this.subplot,r=n(t),i=0;i&lt;this.order.length;i++){var a=this.order[i],o=r[a];e.setOptions(this.layerIds[a],&quot;setLayoutProperty&quot;,o.layout),&quot;visible&quot;===o.layout.visibility&amp;&amp;(this.setSourceData(a,o),e.setOptions(this.layerIds[a],&quot;setPaintProperty&quot;,o.paint))}t[0].trace._glTrace=this},a.dispose=function(){for(var t=this.subplot.map,e=0;e&lt;this.order.length;e++){var r=this.order[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=new i(t,e[0].trace.uid),a=n(e),o=0;o&lt;r.order.length;o++){var s=r.order[o],l=a[s];r.addSource(s,l),r.addLayer(s,l)}return e[0].trace._glTrace=r,r}},{&quot;./convert&quot;:1087}],1093:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatter/subtypes&quot;),a=t(&quot;../../constants/numerical&quot;).BADNUM;e.exports=function(t,e){var r,o=t.cd,s=t.xaxis,l=t.yaxis,c=[],u=o[0].trace;if(!i.hasMarkers(u))return[];if(!1===e)for(r=0;r&lt;o.length;r++)o[r].selected=0;else for(r=0;r&lt;o.length;r++){var f=o[r],h=f.lonlat;if(h[0]!==a){var p=[n.modHalf(h[0],360),h[1]],d=[s.c2p(p),l.c2p(p)];e.contains(d,null,r,t)?(c.push({pointNumber:r,lon:h[0],lat:h[1]}),f.selected=1):f.selected=0}}return c}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../scatter/subtypes&quot;:1056}],1094:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib/extend&quot;).extendFlat,i=t(&quot;../scatter/attributes&quot;),a=t(&quot;../../plots/attributes&quot;),o=i.line;e.exports={mode:i.mode,r:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},theta:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},r0:{valType:&quot;any&quot;,dflt:0,editType:&quot;calc+clearAxisTypes&quot;},dr:{valType:&quot;number&quot;,dflt:1,editType:&quot;calc&quot;},theta0:{valType:&quot;any&quot;,dflt:0,editType:&quot;calc+clearAxisTypes&quot;},dtheta:{valType:&quot;number&quot;,editType:&quot;calc&quot;},thetaunit:{valType:&quot;enumerated&quot;,values:[&quot;radians&quot;,&quot;degrees&quot;,&quot;gradians&quot;],dflt:&quot;degrees&quot;,editType:&quot;calc+clearAxisTypes&quot;},text:i.text,hovertext:i.hovertext,line:{color:o.color,width:o.width,dash:o.dash,shape:n({},o.shape,{values:[&quot;linear&quot;,&quot;spline&quot;]}),smoothing:o.smoothing,editType:&quot;calc&quot;},connectgaps:i.connectgaps,marker:i.marker,cliponaxis:n({},i.cliponaxis,{dflt:!1}),textposition:i.textposition,textfont:i.textfont,fill:n({},i.fill,{values:[&quot;none&quot;,&quot;toself&quot;,&quot;tonext&quot;],dflt:&quot;none&quot;}),fillcolor:i.fillcolor,hoverinfo:n({},a.hoverinfo,{flags:[&quot;r&quot;,&quot;theta&quot;,&quot;text&quot;,&quot;name&quot;]}),hoveron:i.hoveron,selected:i.selected,unselected:i.unselected}},{&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../scatter/attributes&quot;:1032}],1095:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../../constants/numerical&quot;).BADNUM,a=t(&quot;../../plots/cartesian/axes&quot;),o=t(&quot;../scatter/colorscale_calc&quot;),s=t(&quot;../scatter/arrays_to_calcdata&quot;),l=t(&quot;../scatter/calc_selection&quot;),c=t(&quot;../scatter/calc&quot;).calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,u=e.subplot,f=r[u].radialaxis,h=r[u].angularaxis,p=f.makeCalcdata(e,&quot;r&quot;),d=h.makeCalcdata(e,&quot;theta&quot;),g=e._length,m=new Array(g),v=0;v&lt;g;v++){var y=p[v],x=d[v],b=m[v]={};n(y)&amp;&amp;n(x)?(b.r=y,b.theta=x):b.r=i}var _=c(e,g);return e._extremes.x=a.findExtremes(f,p,{ppad:_}),o(e),s(m,e),l(m,e),m}},{&quot;../../constants/numerical&quot;:670,&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/arrays_to_calcdata&quot;:1031,&quot;../scatter/calc&quot;:1033,&quot;../scatter/calc_selection&quot;:1034,&quot;../scatter/colorscale_calc&quot;:1036,&quot;fast-isnumeric&quot;:213}],1096:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatter/subtypes&quot;),a=t(&quot;../scatter/marker_defaults&quot;),o=t(&quot;../scatter/line_defaults&quot;),s=t(&quot;../scatter/line_shape_defaults&quot;),l=t(&quot;../scatter/text_defaults&quot;),c=t(&quot;../scatter/fillcolor_defaults&quot;),u=t(&quot;../scatter/constants&quot;).PTS_LINESONLY,f=t(&quot;./attributes&quot;);function h(t,e,r,n){var i,a=n(&quot;r&quot;),o=n(&quot;theta&quot;);if(a)o?i=Math.min(a.length,o.length):(i=a.length,n(&quot;theta0&quot;),n(&quot;dtheta&quot;));else{if(!o)return 0;i=e.theta.length,n(&quot;r0&quot;),n(&quot;dr&quot;)}return e._length=i,i}e.exports={handleRThetaDefaults:h,supplyDefaults:function(t,e,r,p){function d(r,i){return n.coerce(t,e,f,r,i)}var g=h(0,e,0,d);if(g){d(&quot;thetaunit&quot;),d(&quot;mode&quot;,g&lt;u?&quot;lines+markers&quot;:&quot;lines&quot;),d(&quot;text&quot;),d(&quot;hovertext&quot;),i.hasLines(e)&amp;&amp;(o(t,e,r,p,d),s(t,e,d),d(&quot;connectgaps&quot;)),i.hasMarkers(e)&amp;&amp;a(t,e,r,p,d,{gradient:!0}),i.hasText(e)&amp;&amp;l(t,e,p,d);var m=[];(i.hasMarkers(e)||i.hasText(e))&amp;&amp;(d(&quot;cliponaxis&quot;),d(&quot;marker.maxdisplayed&quot;),m.push(&quot;points&quot;)),d(&quot;fill&quot;),&quot;none&quot;!==e.fill&amp;&amp;(c(t,e,r,d),i.hasLines(e)||s(t,e,d)),&quot;tonext&quot;!==e.fill&amp;&amp;&quot;toself&quot;!==e.fill||m.push(&quot;fills&quot;),d(&quot;hoveron&quot;,m.join(&quot;+&quot;)||&quot;points&quot;),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}}},{&quot;../../lib&quot;:693,&quot;../scatter/constants&quot;:1037,&quot;../scatter/fillcolor_defaults&quot;:1041,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/line_shape_defaults&quot;:1047,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;./attributes&quot;:1094}],1097:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/hover&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../../lib&quot;);function o(t,e,r,n){var o=r.radialAxis,s=r.angularAxis,l=(t.hi||e.hoverinfo).split(&quot;+&quot;),c=[];function u(t,e){c.push(t._hovertitle+&quot;: &quot;+i.tickText(t,e,&quot;hover&quot;).text)}if(o._hovertitle=&quot;r&quot;,s._hovertitle=&quot;\u03b8&quot;,-1!==l.indexOf(&quot;all&quot;)&amp;&amp;(l=[&quot;r&quot;,&quot;theta&quot;,&quot;text&quot;]),-1!==l.indexOf(&quot;r&quot;)&amp;&amp;u(o,o.c2l(t.r)),-1!==l.indexOf(&quot;theta&quot;)){var f=t.theta;u(s,&quot;degrees&quot;===s.thetaunit?a.rad2deg(f):f)}-1!==l.indexOf(&quot;text&quot;)&amp;&amp;n.text&amp;&amp;(c.push(n.text),delete n.text),n.extraText=c.join(&quot;&lt;br&gt;&quot;)}e.exports={hoverPoints:function(t,e,r,i){var a=n(t,e,r,i);if(a&amp;&amp;!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,o(c,u,l,s),a}},makeHoverPointText:o}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/hover&quot;:1043}],1098:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;trace&quot;,name:&quot;scatterpolar&quot;,basePlotModule:t(&quot;../../plots/polar&quot;),categories:[&quot;polar&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;scatter-like&quot;],attributes:t(&quot;./attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;).supplyDefaults,colorbar:t(&quot;../scatter/marker_colorbar&quot;),calc:t(&quot;./calc&quot;),plot:t(&quot;./plot&quot;),style:t(&quot;../scatter/style&quot;).style,hoverPoints:t(&quot;./hover&quot;).hoverPoints,selectPoints:t(&quot;../scatter/select&quot;),meta:{}}},{&quot;../../plots/polar&quot;:808,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scatter/select&quot;:1053,&quot;../scatter/style&quot;:1055,&quot;./attributes&quot;:1094,&quot;./calc&quot;:1095,&quot;./defaults&quot;:1096,&quot;./hover&quot;:1097,&quot;./plot&quot;:1099}],1099:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/plot&quot;),i=t(&quot;../../constants/numerical&quot;).BADNUM;e.exports=function(t,e,r){for(var a=e.layers.frontplot.select(&quot;g.scatterlayer&quot;),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=e.radialAxis,l=e.angularAxis,c=0;c&lt;r.length;c++)for(var u=r[c],f=0;f&lt;u.length;f++){var h=u[f],p=h.r;if(p===i)h.x=h.y=i;else{var d=s.c2g(p),g=l.c2g(h.theta);h.x=d*Math.cos(g),h.y=d*Math.sin(g)}}n(t,o,r,a)}},{&quot;../../constants/numerical&quot;:670,&quot;../scatter/plot&quot;:1052}],1100:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatterpolar/attributes&quot;),i=t(&quot;../scattergl/attributes&quot;);e.exports={mode:n.mode,r:n.r,theta:n.theta,r0:n.r0,dr:n.dr,theta0:n.theta0,dtheta:n.dtheta,thetaunit:n.thetaunit,text:n.text,hovertext:n.hovertext,line:i.line,connectgaps:i.connectgaps,marker:i.marker,fill:i.fill,fillcolor:i.fillcolor,textposition:i.textposition,textfont:i.textfont,hoverinfo:n.hoverinfo,selected:n.selected,unselected:n.unselected}},{&quot;../scattergl/attributes&quot;:1081,&quot;../scatterpolar/attributes&quot;:1094}],1101:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatter/subtypes&quot;),a=t(&quot;../scatterpolar/defaults&quot;).handleRThetaDefaults,o=t(&quot;../scatter/marker_defaults&quot;),s=t(&quot;../scatter/line_defaults&quot;),l=t(&quot;../scatter/text_defaults&quot;),c=t(&quot;../scatter/fillcolor_defaults&quot;),u=t(&quot;../scatter/constants&quot;).PTS_LINESONLY,f=t(&quot;./attributes&quot;);e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d=a(t,e,h,p);d?(p(&quot;thetaunit&quot;),p(&quot;mode&quot;,d&lt;u?&quot;lines+markers&quot;:&quot;lines&quot;),p(&quot;text&quot;),p(&quot;hovertext&quot;),i.hasLines(e)&amp;&amp;(s(t,e,r,h,p),p(&quot;connectgaps&quot;)),i.hasMarkers(e)&amp;&amp;o(t,e,r,h,p),i.hasText(e)&amp;&amp;l(t,e,h,p),p(&quot;fill&quot;),&quot;none&quot;!==e.fill&amp;&amp;c(t,e,r,p),n.coerceSelectionMarkerOpacity(e,p)):e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../scatter/constants&quot;:1037,&quot;../scatter/fillcolor_defaults&quot;:1041,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;../scatterpolar/defaults&quot;:1096,&quot;./attributes&quot;:1100}],1102:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;point-cluster&quot;),i=t(&quot;fast-isnumeric&quot;),a=t(&quot;../scattergl&quot;),o=t(&quot;../scatter/colorscale_calc&quot;),s=t(&quot;../../plots/cartesian/axes&quot;),l=t(&quot;../scatterpolar/hover&quot;).makeHoverPointText,c=t(&quot;../scatter/subtypes&quot;),u=t(&quot;../scattergl/constants&quot;).TOO_MANY_POINTS;e.exports={moduleType:&quot;trace&quot;,name:&quot;scatterpolargl&quot;,basePlotModule:t(&quot;../../plots/polar&quot;),categories:[&quot;gl&quot;,&quot;regl&quot;,&quot;polar&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;scatter-like&quot;],attributes:t(&quot;./attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),colorbar:t(&quot;../scatter/marker_colorbar&quot;),calc:function(t,e){var r=t._fullLayout,n=e.subplot,i=r[n].radialaxis,a=r[n].angularaxis,l=i.makeCalcdata(e,&quot;r&quot;),c=a.makeCalcdata(e,&quot;theta&quot;),u={};return e._length&lt;l.length&amp;&amp;(l=l.slice(0,e._length)),e._length&lt;c.length&amp;&amp;(c=c.slice(0,e._length)),o(e),u.r=l,u.theta=c,e._extremes.x=s.findExtremes(i,l,{tozero:!0}),[{x:!1,y:!1,t:u,trace:e}]},plot:function(t,e,r){var o=e.radialAxis,s=e.angularAxis,l=a.sceneUpdate(t,e);return r.forEach(function(f,h){if(f&amp;&amp;f[0]&amp;&amp;f[0].trace){var p,d=f[0],g=d.trace,m=d.t,v=m.r,y=m.theta,x=v.slice(),b=y.slice();for(p=0;p&lt;v.length;p++)e.isPtInside({r:v[p],theta:y[p]})||(x[p]=NaN,b[p]=NaN);var _=v.length,w=new Array(2*_),k=Array(_),M=Array(_);for(p=0;p&lt;_;p++){var A,T,S=x[p];if(i(S)){var E=o.c2g(S),C=s.c2g(b[p],g.thetaunit);A=E*Math.cos(C),T=E*Math.sin(C)}else A=T=NaN;k[p]=w[2*p]=A,M[p]=w[2*p+1]=T}var L=a.sceneOptions(t,e,g,w);L.fill&amp;&amp;!l.fill2d&amp;&amp;(l.fill2d=!0),L.marker&amp;&amp;!l.scatter2d&amp;&amp;(l.scatter2d=!0),L.line&amp;&amp;!l.line2d&amp;&amp;(l.line2d=!0),!L.errorX&amp;&amp;!L.errorY||l.error2d||(l.error2d=!0),L.text&amp;&amp;!l.glText&amp;&amp;(l.glText=!0),m.tree=n(w),L.marker&amp;&amp;_&gt;=u&amp;&amp;(L.marker.cluster=m.tree),c.hasMarkers(g)&amp;&amp;(L.markerSel.positions=L.markerUnsel.positions=L.marker.positions),l.lineOptions.push(L.line),l.errorXOptions.push(L.errorX),l.errorYOptions.push(L.errorY),l.fillOptions.push(L.fill),l.markerOptions.push(L.marker),l.markerSelectedOptions.push(L.markerSel),l.markerUnselectedOptions.push(L.markerUnsel),l.textOptions.push(L.text),l.textSelectedOptions.push(L.textSel),l.textUnselectedOptions.push(L.textUnsel),l.count=r.length,m._scene=l,m.index=h,m.x=k,m.y=M,m.rawx=k,m.rawy=M,m.r=v,m.theta=y,m.positions=w,m.count=_}}),a.plot(t,e,r)},hoverPoints:function(t,e,r,n){var i=t.cd[0].t,o=i.r,s=i.theta,c=a.hoverPoints(t,e,r,n);if(c&amp;&amp;!1!==c[0].index){var u=c[0];if(void 0===u.index)return c;var f=t.subplot,h=u.cd[u.index],p=u.trace;if(h.r=o[u.index],h.theta=s[u.index],f.isPtInside(h))return u.xLabelVal=void 0,u.yLabelVal=void 0,l(h,p,f,u),c}},style:a.style,selectPoints:a.selectPoints,meta:{}}},{&quot;../../plots/cartesian/axes&quot;:742,&quot;../../plots/polar&quot;:808,&quot;../scatter/colorscale_calc&quot;:1036,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scatter/subtypes&quot;:1056,&quot;../scattergl&quot;:1085,&quot;../scattergl/constants&quot;:1082,&quot;../scatterpolar/hover&quot;:1097,&quot;./attributes&quot;:1100,&quot;./defaults&quot;:1101,&quot;fast-isnumeric&quot;:213,&quot;point-cluster&quot;:449}],1103:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/attributes&quot;),i=t(&quot;../../plots/attributes&quot;),a=t(&quot;../../components/colorscale/attributes&quot;),o=t(&quot;../../components/colorbar/attributes&quot;),s=t(&quot;../../components/drawing/attributes&quot;).dash,l=t(&quot;../../lib/extend&quot;).extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={a:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},b:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},c:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},sum:{valType:&quot;number&quot;,dflt:0,min:0,editType:&quot;calc&quot;},mode:l({},n.mode,{dflt:&quot;markers&quot;}),text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:s,shape:l({},u.shape,{values:[&quot;linear&quot;,&quot;spline&quot;]}),smoothing:u.smoothing,editType:&quot;calc&quot;},connectgaps:n.connectgaps,cliponaxis:n.cliponaxis,fill:l({},n.fill,{values:[&quot;none&quot;,&quot;toself&quot;,&quot;tonext&quot;],dflt:&quot;none&quot;}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:&quot;calc&quot;},a(&quot;marker.line&quot;)),gradient:c.gradient,editType:&quot;calc&quot;},a(&quot;marker&quot;),{colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;text&quot;,&quot;name&quot;]}),hoveron:n.hoveron}},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../components/drawing/attributes&quot;:591,&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../scatter/attributes&quot;:1032}],1104:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;fast-isnumeric&quot;),i=t(&quot;../scatter/colorscale_calc&quot;),a=t(&quot;../scatter/arrays_to_calcdata&quot;),o=t(&quot;../scatter/calc_selection&quot;),s=t(&quot;../scatter/calc&quot;).calcMarkerSize,l=[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],c={a:[&quot;b&quot;,&quot;c&quot;],b:[&quot;a&quot;,&quot;c&quot;],c:[&quot;a&quot;,&quot;b&quot;]};e.exports=function(t,e){var r,u,f,h,p,d,g=t._fullLayout[e.subplot].sum,m=e.sum||g,v={a:e.a,b:e.b,c:e.c};for(r=0;r&lt;l.length;r++)if(!v[f=l[r]]){for(p=v[c[f][0]],d=v[c[f][1]],h=new Array(p.length),u=0;u&lt;p.length;u++)h[u]=m-p[u]-d[u];v[f]=h}var y,x,b,_,w,k,M=e._length,A=new Array(M);for(r=0;r&lt;M;r++)y=v.a[r],x=v.b[r],b=v.c[r],n(y)&amp;&amp;n(x)&amp;&amp;n(b)?(1!==(_=g/((y=+y)+(x=+x)+(b=+b)))&amp;&amp;(y*=_,x*=_,b*=_),k=y,w=b-x,A[r]={x:w,y:k,a:y,b:x,c:b}):A[r]={x:!1,y:!1};return s(e,M),i(e),a(A,e),o(A,e),A}},{&quot;../scatter/arrays_to_calcdata&quot;:1031,&quot;../scatter/calc&quot;:1033,&quot;../scatter/calc_selection&quot;:1034,&quot;../scatter/colorscale_calc&quot;:1036,&quot;fast-isnumeric&quot;:213}],1105:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../scatter/constants&quot;),a=t(&quot;../scatter/subtypes&quot;),o=t(&quot;../scatter/marker_defaults&quot;),s=t(&quot;../scatter/line_defaults&quot;),l=t(&quot;../scatter/line_shape_defaults&quot;),c=t(&quot;../scatter/text_defaults&quot;),u=t(&quot;../scatter/fillcolor_defaults&quot;),f=t(&quot;./attributes&quot;);e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d,g=p(&quot;a&quot;),m=p(&quot;b&quot;),v=p(&quot;c&quot;);if(g?(d=g.length,m?(d=Math.min(d,m.length),v&amp;&amp;(d=Math.min(d,v.length))):d=v?Math.min(d,v.length):0):m&amp;&amp;v&amp;&amp;(d=Math.min(m.length,v.length)),d){e._length=d,p(&quot;sum&quot;),p(&quot;text&quot;),p(&quot;hovertext&quot;),p(&quot;mode&quot;,d&lt;i.PTS_LINESONLY?&quot;lines+markers&quot;:&quot;lines&quot;),a.hasLines(e)&amp;&amp;(s(t,e,r,h,p),l(t,e,p),p(&quot;connectgaps&quot;)),a.hasMarkers(e)&amp;&amp;o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&amp;&amp;c(t,e,h,p);var y=[];(a.hasMarkers(e)||a.hasText(e))&amp;&amp;(p(&quot;cliponaxis&quot;),p(&quot;marker.maxdisplayed&quot;),y.push(&quot;points&quot;)),p(&quot;fill&quot;),&quot;none&quot;!==e.fill&amp;&amp;(u(t,e,r,p),a.hasLines(e)||l(t,e,p)),&quot;tonext&quot;!==e.fill&amp;&amp;&quot;toself&quot;!==e.fill||y.push(&quot;fills&quot;),p(&quot;hoveron&quot;,y.join(&quot;+&quot;)||&quot;points&quot;),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../scatter/constants&quot;:1037,&quot;../scatter/fillcolor_defaults&quot;:1041,&quot;../scatter/line_defaults&quot;:1045,&quot;../scatter/line_shape_defaults&quot;:1047,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;../scatter/text_defaults&quot;:1057,&quot;./attributes&quot;:1103}],1106:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i){if(e.xa&amp;&amp;(t.xaxis=e.xa),e.ya&amp;&amp;(t.yaxis=e.ya),n[i]){var a=n[i];t.a=a.a,t.b=a.b,t.c=a.c}else t.a=e.a,t.b=e.b,t.c=e.c;return t}},{}],1107:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/hover&quot;),i=t(&quot;../../plots/cartesian/axes&quot;);e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o&amp;&amp;!1!==o[0].index){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,c=t.xa._length,u=c*l/2,f=c-u;return s.x0=Math.max(Math.min(s.x0,f),u),s.x1=Math.max(Math.min(s.x1,f),u),o}var h=s.cd[s.index];s.a=h.a,s.b=h.b,s.c=h.c,s.xLabelVal=void 0,s.yLabelVal=void 0;var p=s.trace,d=s.subplot,g=(h.hi||p.hoverinfo).split(&quot;+&quot;),m=[];return-1!==g.indexOf(&quot;all&quot;)&amp;&amp;(g=[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]),-1!==g.indexOf(&quot;a&quot;)&amp;&amp;v(d.aaxis,h.a),-1!==g.indexOf(&quot;b&quot;)&amp;&amp;v(d.baxis,h.b),-1!==g.indexOf(&quot;c&quot;)&amp;&amp;v(d.caxis,h.c),s.extraText=m.join(&quot;&lt;br&gt;&quot;),o}function v(t,e){m.push(t._hovertitle+&quot;: &quot;+i.tickText(t,e,&quot;hover&quot;).text)}}},{&quot;../../plots/cartesian/axes&quot;:742,&quot;../scatter/hover&quot;:1043}],1108:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar=t(&quot;../scatter/marker_colorbar&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.style=t(&quot;../scatter/style&quot;).style,n.styleOnSelect=t(&quot;../scatter/style&quot;).styleOnSelect,n.hoverPoints=t(&quot;./hover&quot;),n.selectPoints=t(&quot;../scatter/select&quot;),n.eventData=t(&quot;./event_data&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;scatterternary&quot;,n.basePlotModule=t(&quot;../../plots/ternary&quot;),n.categories=[&quot;ternary&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;scatter-like&quot;],n.meta={},e.exports=n},{&quot;../../plots/ternary&quot;:821,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scatter/select&quot;:1053,&quot;../scatter/style&quot;:1055,&quot;./attributes&quot;:1103,&quot;./calc&quot;:1104,&quot;./defaults&quot;:1105,&quot;./event_data&quot;:1106,&quot;./hover&quot;:1107,&quot;./plot&quot;:1109}],1109:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scatter/plot&quot;);e.exports=function(t,e,r){var i=e.plotContainer;i.select(&quot;.scatterlayer&quot;).selectAll(&quot;*&quot;).remove();var a={xaxis:e.xaxis,yaxis:e.yaxis,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select(&quot;g.scatterlayer&quot;);n(t,a,r,o)}},{&quot;../scatter/plot&quot;:1052}],1110:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../scattergl/attributes&quot;),i=t(&quot;../../plots/cartesian/constants&quot;).idRegex,a=t(&quot;../../plot_api/plot_template&quot;).templatedArray;function o(t){return{valType:&quot;info_array&quot;,freeLength:!0,editType:&quot;calc&quot;,items:{valType:&quot;subplotid&quot;,regex:i[t],editType:&quot;plot&quot;}}}e.exports={dimensions:a(&quot;dimension&quot;,{visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},label:{valType:&quot;string&quot;,editType:&quot;calc&quot;},values:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},axis:{type:{valType:&quot;enumerated&quot;,values:[&quot;linear&quot;,&quot;log&quot;,&quot;date&quot;,&quot;category&quot;],editType:&quot;calc+clearAxisTypes&quot;},editType:&quot;calc+clearAxisTypes&quot;},editType:&quot;calc+clearAxisTypes&quot;}),text:n.text,marker:n.marker,xaxes:o(&quot;x&quot;),yaxes:o(&quot;y&quot;),diagonal:{visible:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},editType:&quot;calc&quot;},showupperhalf:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},showlowerhalf:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},selected:{marker:n.selected.marker,editType:&quot;calc&quot;},unselected:{marker:n.unselected.marker,editType:&quot;calc&quot;},opacity:n.opacity}},{&quot;../../plot_api/plot_template&quot;:732,&quot;../../plots/cartesian/constants&quot;:747,&quot;../scattergl/attributes&quot;:1081}],1111:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;regl-line2d&quot;),i=t(&quot;../../registry&quot;),a=t(&quot;../../lib/prepare_regl&quot;),o=t(&quot;../../plots/get_data&quot;).getModuleCalcData,s=t(&quot;../../plots/cartesian&quot;),l=t(&quot;../../plots/cartesian/axis_ids&quot;).getFromId,c=t(&quot;../../plots/cartesian/axes&quot;).shouldShowZeroLine,u=&quot;splom&quot;;function f(t,e,r,n){for(var i=n.matrixOptions.data.length,a=r.visibleDims,o=new Array(i),s=0;s&lt;a.length;s++){var c=a[s],u=o[s]=new Array(4),f=l(t,e._diag[c][0]);f&amp;&amp;(u[0]=f.r2l(f.range[0]),u[2]=f.r2l(f.range[1]));var h=l(t,e._diag[c][1]);h&amp;&amp;(u[1]=h.r2l(h.range[0]),u[3]=h.r2l(h.range[1]))}n.selectBatch?(n.matrix.update({ranges:o},{ranges:o}),n.matrix.draw(n.unselectBatch,n.selectBatch)):(n.matrix.update({ranges:o}),n.matrix.draw())}function h(t){var e=t._fullLayout,r=e._glcanvas.data()[0].regl,i=e._splomGrid;i||(i=e._splomGrid=n(r)),i.update(function(t){var e,r=t._fullLayout,n=r._size,i=[0,0,r.width,r.height],a={};function o(t,e,r,n,o,s){var l=e[t+&quot;color&quot;],c=e[t+&quot;width&quot;],u=String(l+c);u in a?a[u].data.push(NaN,NaN,r,n,o,s):a[u]={data:[r,n,o,s],join:&quot;rect&quot;,thickness:c,color:l,viewport:i,range:i,overlay:!1}}for(e in r._splomSubplots){var s,l,u=r._plots[e],f=u.xaxis,h=u.yaxis,p=f._vals,d=h._vals,g=n.b+h.domain[0]*n.h,m=-h._m,v=-m*h.r2l(h.range[0],h.calendar);if(f.showgrid)for(e=0;e&lt;p.length;e++)s=f._offset+f.l2p(p[e].x),o(&quot;grid&quot;,f,s,g,s,g+h._length);if(h.showgrid)for(e=0;e&lt;d.length;e++)l=g+v+m*d[e].x,o(&quot;grid&quot;,h,f._offset,l,f._offset+f._length,l);c(t,f,h)&amp;&amp;(s=f._offset+f.l2p(0),o(&quot;zeroline&quot;,f,s,g,s,g+h._length)),c(t,h,f)&amp;&amp;(l=g+v+0,o(&quot;zeroline&quot;,h,f._offset,l,f._offset+f._length,l))}var y=[];for(e in a)y.push(a[e]);return y}(t)),i.draw()}e.exports={name:u,attr:s.attr,attrRegex:s.attrRegex,layoutAttributes:s.layoutAttributes,supplyLayoutDefaults:s.supplyLayoutDefaults,drawFramework:s.drawFramework,plot:function(t){var e=t._fullLayout,r=i.getModule(u),n=o(t.calcdata,r)[0];a(t,[&quot;ANGLE_instanced_arrays&quot;,&quot;OES_element_index_uint&quot;])&amp;&amp;(e._hasOnlyLargeSploms&amp;&amp;h(t),r.plot(t,{},n))},drag:function(t){var e=t.calcdata;t._fullLayout._hasOnlyLargeSploms&amp;&amp;h(t);for(var r=0;r&lt;e.length;r++){var n=e[r][0],i=n.trace,a=n.t,o=a._scene;&quot;splom&quot;===i.type&amp;&amp;o&amp;&amp;o.matrix&amp;&amp;f(t,i,a,o)}},clean:function(t,e,r,n,i){var a,o,l,c=n._modules||[],u=e._modules||[];for(l=0;l&lt;c.length;l++)if(&quot;splom&quot;===c[l].name){a=!0;break}for(l=0;l&lt;u.length;l++)if(&quot;splom&quot;===u[l].name){o=!0;break}if(a&amp;&amp;!o)for(l=0;l&lt;i.length;l++){var f=i[l][0],h=f.trace,p=f.t._scene;&quot;splom&quot;===h.type&amp;&amp;p&amp;&amp;p.matrix&amp;&amp;p.matrix.destroy&amp;&amp;(p.matrix.destroy(),f.t._scene=null)}n._splomGrid&amp;&amp;!e._hasOnlyLargeSploms&amp;&amp;n._hasOnlyLargeSploms&amp;&amp;(n._splomGrid.destroy(),n._splomGrid=null),s.clean(t,e,r,n)},updateFx:function(t){s.updateFx(t);var e=t._fullLayout.dragmode;if(&quot;zoom&quot;===e||&quot;pan&quot;===e)for(var r=t.calcdata,n=0;n&lt;r.length;n++){var i=r[n][0];if(&quot;splom&quot;===i.trace.type){var a=i.t._scene;null===a.selectBatch&amp;&amp;a.matrix.update(a.matrixOptions,null)}}},toSVG:s.toSVG}},{&quot;../../lib/prepare_regl&quot;:707,&quot;../../plots/cartesian&quot;:753,&quot;../../plots/cartesian/axes&quot;:742,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;../../plots/get_data&quot;:778,&quot;../../registry&quot;:825,&quot;regl-line2d&quot;:471}],1112:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/array_container_defaults&quot;),a=t(&quot;./attributes&quot;),o=t(&quot;../scatter/subtypes&quot;),s=t(&quot;../scatter/marker_defaults&quot;),l=t(&quot;../parcoords/merge_length&quot;),c=/-open/;function u(t,e){function r(r,i){return n.coerce(t,e,a.dimensions,r,i)}r(&quot;label&quot;);var i=r(&quot;values&quot;);i&amp;&amp;i.length?r(&quot;visible&quot;):e.visible=!1,r(&quot;axis.type&quot;)}function f(t,e){for(var r=new Array(e),n=0;n&lt;e;n++)r[n]=t+(n?n+1:&quot;&quot;);return r}function h(t,e,r){if(e){var n=e.charAt(0),i=t._splomAxes[n];if(!(e in i)){var a=i[e]={};r&amp;&amp;(a.label=r.label||&quot;&quot;,r.visible&amp;&amp;r.axis&amp;&amp;(a.type=r.axis.type))}}}function p(t){for(var e={},r=0;r&lt;t.length;r++)e[t[r]]=1;return e}e.exports=function(t,e,r,d){function g(r,i){return n.coerce(t,e,a,r,i)}var m=i(t,e,{name:&quot;dimensions&quot;,handleItemDefaults:u}),v=g(&quot;diagonal.visible&quot;),y=g(&quot;showupperhalf&quot;),x=g(&quot;showlowerhalf&quot;);if(l(e,m,&quot;values&quot;)&amp;&amp;(v||y||x)){g(&quot;text&quot;),s(t,e,r,d,g);var b=c.test(e.marker.symbol),_=o.isBubble(e);g(&quot;marker.line.width&quot;,b||_?1:0),function(t,e,r,n){var i,a,o=e.dimensions,s=o.length,l=e.showupperhalf,c=e.showlowerhalf,u=e.diagonal.visible,d=u||l&amp;&amp;c?s:s-1,g=n(&quot;xaxes&quot;,f(&quot;x&quot;,d)),m=n(&quot;yaxes&quot;,f(&quot;y&quot;,d));e._xaxes=p(g),e._yaxes=p(m);var v=Math.min(d,g.length,m.length);for(i=0;i&lt;v;i++)for(a=0;a&lt;v;a++){var y=g[i]+m[a];i&gt;a&amp;&amp;l?r._splomSubplots[y]=1:i&lt;a&amp;&amp;c?r._splomSubplots[y]=1:i!==a||!u&amp;&amp;c&amp;&amp;l||(r._splomSubplots[y]=1)}var x=e._diag=new Array(s),b=u||c?0:-1,_=u||l?0:-1;for(i=0;i&lt;s;i++){var w=o[i],k=g[i+b],M=m[i+_];h(r,k,w),h(r,M,w),x[i]=[k,M]}c||(r._splomGridDflt.xside=&quot;bottom&quot;,r._splomGridDflt.yside=&quot;left&quot;)}(0,e,d,g),n.coerceSelectionMarkerOpacity(e,g)}else e.visible=!1}},{&quot;../../lib&quot;:693,&quot;../../plots/array_container_defaults&quot;:738,&quot;../parcoords/merge_length&quot;:1004,&quot;../scatter/marker_defaults&quot;:1051,&quot;../scatter/subtypes&quot;:1056,&quot;./attributes&quot;:1110}],1113:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;regl-splom&quot;),i=t(&quot;array-range&quot;),a=t(&quot;../../registry&quot;),o=t(&quot;../../components/grid&quot;),s=t(&quot;../../lib&quot;),l=t(&quot;../../plots/cartesian/axis_ids&quot;),c=t(&quot;../scatter/subtypes&quot;),u=t(&quot;../scatter/calc&quot;).calcMarkerSize,f=t(&quot;../scatter/calc&quot;).calcAxisExpansion,h=t(&quot;../scatter/colorscale_calc&quot;),p=t(&quot;../scattergl/convert&quot;).markerSelection,d=t(&quot;../scattergl/convert&quot;).markerStyle,g=t(&quot;../scattergl&quot;).calcHover,m=t(&quot;../../constants/numerical&quot;).BADNUM,v=t(&quot;../scattergl/constants&quot;).TOO_MANY_POINTS;function y(t,e){var r,i,a,o,s,c=t._fullLayout,u=c._size,f=e.trace,h=e.t,p=h._scene,d=p.matrixOptions,g=d.cdata,m=c._glcanvas.data()[0].regl,v=c.dragmode;if(0!==g.length){d.lower=f.showupperhalf,d.upper=f.showlowerhalf,d.diagonal=f.diagonal.visible;var y=h.visibleDims,x=g.length,b={};for(b.ranges=new Array(x),b.domains=new Array(x),s=0;s&lt;y.length;s++){a=y[s];var _=b.ranges[s]=new Array(4),w=b.domains[s]=new Array(4);(r=l.getFromId(t,f._diag[a][0]))&amp;&amp;(_[0]=r._rl[0],_[2]=r._rl[1],w[0]=r.domain[0],w[2]=r.domain[1]),(i=l.getFromId(t,f._diag[a][1]))&amp;&amp;(_[1]=i._rl[0],_[3]=i._rl[1],w[1]=i.domain[0],w[3]=i.domain[1])}b.viewport=[u.l,u.b,u.w+u.l,u.h+u.b],!0===p.matrix&amp;&amp;(p.matrix=n(m));var k=c.clickmode.indexOf(&quot;select&quot;)&gt;-1,M=&quot;lasso&quot;===v||&quot;select&quot;===v||!!f.selectedpoints||k;if(p.selectBatch=null,p.unselectBatch=null,M){var A=f._length;if(p.selectBatch||(p.selectBatch=[],p.unselectBatch=[]),f.selectedpoints){p.selectBatch=f.selectedpoints;var T=f.selectedpoints,S={};for(a=0;a&lt;T.length;a++)S[T[a]]=!0;var E=[];for(a=0;a&lt;A;a++)S[a]||E.push(a);p.unselectBatch=E}var C=h.xpx=new Array(x),L=h.ypx=new Array(x);for(s=0;s&lt;y.length;s++){if(a=y[s],r=l.getFromId(t,f._diag[a][0]))for(C[s]=new Array(A),o=0;o&lt;A;o++)C[s][o]=r.c2p(g[s][o]);if(i=l.getFromId(t,f._diag[a][1]))for(L[s]=new Array(A),o=0;o&lt;A;o++)L[s][o]=i.c2p(g[s][o])}p.selectBatch?(p.matrix.update(d,d),p.matrix.update(p.unselectedOptions,p.selectedOptions),p.matrix.update(b,b)):p.matrix.update(b,null)}else p.matrix.update(d,null),p.matrix.update(b,null),h.xpx=h.ypx=null;p.draw()}}function x(t,e,r){for(var n=r._id,i={x:0,y:1}[n.charAt(0)],a=e.visibleDims,o=0;o&lt;a.length;o++){var s=a[o];if(t._diag[s][i]===n)return o}return!1}e.exports={moduleType:&quot;trace&quot;,name:&quot;splom&quot;,basePlotModule:t(&quot;./base_plot&quot;),categories:[&quot;gl&quot;,&quot;regl&quot;,&quot;cartesian&quot;,&quot;symbols&quot;,&quot;showLegend&quot;,&quot;scatter-like&quot;],attributes:t(&quot;./attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),colorbar:t(&quot;../scatter/marker_colorbar&quot;),calc:function(t,e){var r,n,i,a,o,c=e.dimensions,g=e._length,y={},x={},b=x.cdata=[],_=x.data=[],w=y.visibleDims=[];function k(t,r){for(var n=t.makeCalcdata({v:r.values,vcalendar:e.calendar},&quot;v&quot;),i=0;i&lt;n.length;i++)n[i]=n[i]===m?NaN:n[i];b.push(n),_.push(&quot;log&quot;===t.type?s.simpleMap(n,t.c2l):n)}for(r=0;r&lt;c.length;r++)if((i=c[r]).visible){if(a=l.getFromId(t,e._diag[r][0]),o=l.getFromId(t,e._diag[r][1]),a&amp;&amp;o&amp;&amp;a.type!==o.type){s.log(&quot;Skipping splom dimension &quot;+r+&quot; with conflicting axis types&quot;);continue}a?(k(a,i),o&amp;&amp;&quot;category&quot;===o.type&amp;&amp;(o._categories=a._categories.slice())):k(o,i),w.push(r)}h(e),s.extendFlat(x,d(e));var M=b.length*g&gt;v;for(n=0;n&lt;w.length;n++){var A;i=c[r=w[n]],a=l.getFromId(t,e._diag[r][0])||{},o=l.getFromId(t,e._diag[r][1])||{},A=M?2*(x.sizeAvg||Math.max(x.size,3)):u(e,g),f(t,e,a,o,b[n],b[n],A)}var T=y._scene=function(t,e){var r=e._scene,n={dirty:!0};return r||((r=e._scene=s.extendFlat({},n,{selectBatch:null,unselectBatch:null,matrix:!1,select:null})).draw=function(){r.matrix&amp;&amp;r.selectBatch?r.matrix.draw(r.unselectBatch,r.selectBatch):r.matrix&amp;&amp;r.matrix.draw(),r.dirty=!1},r.destroy=function(){r.matrix&amp;&amp;r.matrix.destroy(),r.matrixOptions=null,r.selectBatch=null,r.unselectBatch=null,e._scene=null}),r.dirty||s.extendFlat(r,n),r}(0,y);return T.matrix||(T.matrix=!0),T.matrixOptions=x,T.selectedOptions=p(e,e.selected),T.unselectedOptions=p(e,e.unselected),[{x:!1,y:!1,t:y,trace:e}]},plot:function(t,e,r){if(r.length)for(var n=0;n&lt;r.length;n++)y(t,r[n][0])},hoverPoints:function(t,e,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=a._scene.matrixOptions.cdata,s=t.xa,l=t.ya,c=s.c2p(e),u=l.c2p(r),f=t.distance,h=x(i,a,s),p=x(i,a,l);if(!1===h||!1===p)return[t];for(var d,m,v=o[h],y=o[p],b=f,_=0;_&lt;v.length;_++){var w=v[_],k=y[_],M=s.c2p(w)-c,A=l.c2p(k)-u,T=Math.sqrt(M*M+A*A);T&lt;b&amp;&amp;(b=m=T,d=_)}return t.index=d,t.distance=b,t.dxy=m,void 0===d?[t]:(g(t,v,y,i),[t])},selectPoints:function(t,e){var r,n=t.cd,a=n[0].trace,o=n[0].t,s=o._scene,l=s.matrixOptions.cdata,u=t.xaxis,f=t.yaxis,h=[];if(!s)return h;var p=!c.hasMarkers(a)&amp;&amp;!c.hasText(a);if(!0!==a.visible||p)return h;var d=x(a,o,u),g=x(a,o,f);if(!1===d||!1===g)return h;var m=o.xpx[d],v=o.ypx[g],y=l[d],b=l[g],_=null,w=null;if(!1===e||e.degenerate)w=i(o.count);else for(_=[],w=[],r=0;r&lt;y.length;r++)e.contains([m[r],v[r]],null,r,t)?(_.push(r),h.push({pointNumber:r,x:y[r],y:b[r]})):w.push(r);if(s.selectBatch||(s.selectBatch=[],s.unselectBatch=[]),!s.selectBatch){for(r=0;r&lt;s.count;r++)s.selectBatch=[],s.unselectBatch=[];s.matrix.update(s.unselectedOptions,s.selectedOptions)}return s.selectBatch=_,s.unselectBatch=w,h},style:function(t,e){if(e){var r=t._fullLayout;e[0][0].t._scene.matrix.regl.clear({color:!0,depth:!0}),r._splomGrid&amp;&amp;r._splomGrid.draw();for(var n=0;n&lt;e.length;n++)e[n][0].t._scene.draw();if(r._has(&quot;cartesian&quot;))for(var i in r._plots){var a=r._plots[i];a._scene&amp;&amp;a._scene.draw()}}},meta:{}},a.register(o)},{&quot;../../components/grid&quot;:613,&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axis_ids&quot;:745,&quot;../../registry&quot;:825,&quot;../scatter/calc&quot;:1033,&quot;../scatter/colorscale_calc&quot;:1036,&quot;../scatter/marker_colorbar&quot;:1050,&quot;../scatter/subtypes&quot;:1056,&quot;../scattergl&quot;:1085,&quot;../scattergl/constants&quot;:1082,&quot;../scattergl/convert&quot;:1083,&quot;./attributes&quot;:1110,&quot;./base_plot&quot;:1111,&quot;./defaults&quot;:1112,&quot;array-range&quot;:54,&quot;regl-splom&quot;:474}],1114:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/attributes&quot;),i=t(&quot;../../components/colorbar/attributes&quot;),a=t(&quot;../mesh3d/attributes&quot;),o=t(&quot;../../plots/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat,l={x:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},y:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},z:{valType:&quot;data_array&quot;,editType:&quot;calc+clearAxisTypes&quot;},u:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},v:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},w:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},starts:{x:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},y:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},z:{valType:&quot;data_array&quot;,editType:&quot;calc&quot;},editType:&quot;calc&quot;},maxdisplayed:{valType:&quot;integer&quot;,min:0,dflt:1e3,editType:&quot;calc&quot;},sizeref:{valType:&quot;number&quot;,editType:&quot;calc&quot;,min:0,dflt:1},text:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;}};s(l,n(&quot;&quot;,{colorAttr:&quot;u/v/w norm&quot;,showScaleDflt:!0,editTypeOverride:&quot;calc&quot;}),{colorbar:i});[&quot;opacity&quot;,&quot;lightposition&quot;,&quot;lighting&quot;].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:&quot;calc&quot;,flags:[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;,&quot;u&quot;,&quot;v&quot;,&quot;w&quot;,&quot;norm&quot;,&quot;divergence&quot;,&quot;text&quot;,&quot;name&quot;],dflt:&quot;x+y+z+norm+text+name&quot;}),e.exports=l},{&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plots/attributes&quot;:739,&quot;../mesh3d/attributes&quot;:982}],1115:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/calc&quot;);e.exports=function(t,e){var r,i,a,o,s=e.u,l=e.v,c=e.w,u=e.x,f=e.y,h=e.z,p=Math.min(u.length,f.length,h.length,s.length,l.length,c.length),d=0;e.starts&amp;&amp;(i=e.starts.x||[],a=e.starts.y||[],o=e.starts.z||[],d=Math.min(i.length,a.length,o.length));var g=0,m=1/0;for(r=0;r&lt;p;r++){var v=s[r],y=l[r],x=c[r],b=Math.sqrt(v*v+y*y+x*x);g=Math.max(g,b),m=Math.min(m,b)}n(e,[m,g],&quot;&quot;,&quot;c&quot;);var _=-1/0,w=1/0,k=-1/0,M=1/0,A=-1/0,T=1/0;for(r=0;r&lt;p;r++){var S=u[r];_=Math.max(_,S),w=Math.min(w,S);var E=f[r];k=Math.max(k,E),M=Math.min(M,E);var C=h[r];A=Math.max(A,C),T=Math.min(T,C)}for(r=0;r&lt;d;r++){var L=i[r];_=Math.max(_,L),w=Math.min(w,L);var z=a[r];k=Math.max(k,z),M=Math.min(M,z);var P=o[r];A=Math.max(A,P),T=Math.min(T,P)}e._len=p,e._slen=d,e._normMax=g,e._xbnds=[w,_],e._ybnds=[M,k],e._zbnds=[T,A]}},{&quot;../../components/colorscale/calc&quot;:575}],1116:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-streamtube3d&quot;),i=n.createTubeMesh,a=t(&quot;../../lib&quot;),o=t(&quot;../../lib/gl_format_color&quot;).parseColorScale,s=t(&quot;../../plots/gl3d/zip3&quot;),l={xaxis:0,yaxis:1,zaxis:2};function c(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var u=c.prototype;function f(t){return a.distinctVals(t).vals}function h(t){var e=t.length;return e&gt;2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,c=e._len,u={};function d(t,e){var n=r[e],o=i[l[e]];return a.simpleMap(t,function(t){return n.d2l(t)*o})}u.vectors=s(d(e.u,&quot;xaxis&quot;),d(e.v,&quot;yaxis&quot;),d(e.w,&quot;zaxis&quot;),c);var g=f(e.x.slice(0,c)),m=f(e.y.slice(0,c)),v=f(e.z.slice(0,c));if(g.length*m.length*v.length&gt;c)return{positions:[],cells:[]};var y=d(g,&quot;xaxis&quot;),x=d(m,&quot;yaxis&quot;),b=d(v,&quot;zaxis&quot;);if(u.meshgrid=[y,x,b],e.starts){var _=e._slen;u.startingPositions=s(d(e.starts.x.slice(0,_),&quot;xaxis&quot;),d(e.starts.y.slice(0,_),&quot;yaxis&quot;),d(e.starts.z.slice(0,_),&quot;zaxis&quot;))}else{for(var w=x[0],k=h(y),M=h(b),A=new Array(k.length*M.length),T=0,S=0;S&lt;k.length;S++)for(var E=0;E&lt;M.length;E++)A[T++]=[k[S],w,M[E]];u.startingPositions=A}u.colormap=o(e.colorscale),u.tubeSize=e.sizeref,u.maxLength=e.maxdisplayed;var C=d(e._xbnds,&quot;xaxis&quot;),L=d(e._ybnds,&quot;yaxis&quot;),z=d(e._zbnds,&quot;zaxis&quot;),P=p(y),O=p(x),I=p(b),D=[[C[0]-P[0],L[0]-O[0],z[0]-I[0]],[C[1]+P[1],L[1]+O[1],z[1]+I[1]]],R=n(u,D);R.vertexIntensityBounds=[e.cmin/e._normMax,e.cmax/e._normMax];var B=e.lightposition;return R.lightPosition=[B.x,B.y,B.z],R.ambient=e.lighting.ambient,R.diffuse=e.lighting.diffuse,R.specular=e.lighting.specular,R.roughness=e.lighting.roughness,R.fresnel=e.lighting.fresnel,R.opacity=e.opacity,e._pad=R.tubeScale*e.sizeref*2,R}u.handlePick=function(t){var e=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(t,n){var i=e[n],a=r[l[n]];return i.l2c(t)/a}if(t.object===this.mesh){var i=t.data.position,a=t.data.velocity;return t.traceCoordinate=[n(i[0],&quot;xaxis&quot;),n(i[1],&quot;yaxis&quot;),n(i[2],&quot;zaxis&quot;),n(a[0],&quot;xaxis&quot;),n(a[1],&quot;yaxis&quot;),n(a[2],&quot;zaxis&quot;),t.data.intensity*this.data._normMax,t.data.divergence],t.textLabel=this.data.text,!0}},u.update=function(t){this.data=t;var e=d(this.scene,t);this.mesh.update(e)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=d(t,e),a=i(r,n),o=new c(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{&quot;../../lib&quot;:693,&quot;../../lib/gl_format_color&quot;:689,&quot;../../plots/gl3d/zip3&quot;:795,&quot;gl-streamtube3d&quot;:299}],1117:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/colorscale/defaults&quot;),a=t(&quot;./attributes&quot;);e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(&quot;u&quot;),c=s(&quot;v&quot;),u=s(&quot;w&quot;),f=s(&quot;x&quot;),h=s(&quot;y&quot;),p=s(&quot;z&quot;);l&amp;&amp;l.length&amp;&amp;c&amp;&amp;c.length&amp;&amp;u&amp;&amp;u.length&amp;&amp;f&amp;&amp;f.length&amp;&amp;h&amp;&amp;h.length&amp;&amp;p&amp;&amp;p.length?(s(&quot;starts.x&quot;),s(&quot;starts.y&quot;),s(&quot;starts.z&quot;),s(&quot;maxdisplayed&quot;),s(&quot;sizeref&quot;),s(&quot;lighting.ambient&quot;),s(&quot;lighting.diffuse&quot;),s(&quot;lighting.specular&quot;),s(&quot;lighting.roughness&quot;),s(&quot;lighting.fresnel&quot;),s(&quot;lightposition.x&quot;),s(&quot;lightposition.y&quot;),s(&quot;lightposition.z&quot;),i(t,e,o,s,{prefix:&quot;&quot;,cLetter:&quot;c&quot;}),s(&quot;text&quot;),e._length=null):e.visible=!1}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../lib&quot;:693,&quot;./attributes&quot;:1114}],1118:[function(t,e,r){&quot;use strict&quot;;e.exports={moduleType:&quot;trace&quot;,name:&quot;streamtube&quot;,basePlotModule:t(&quot;../../plots/gl3d&quot;),categories:[&quot;gl3d&quot;],attributes:t(&quot;./attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),colorbar:{min:&quot;cmin&quot;,max:&quot;cmax&quot;},calc:t(&quot;./calc&quot;),plot:t(&quot;./convert&quot;),eventData:function(t,e){return t.tubex=t.x,t.tubey=t.y,t.tubez=t.z,t.tubeu=e.traceCoordinate[3],t.tubev=e.traceCoordinate[4],t.tubew=e.traceCoordinate[5],t.norm=e.traceCoordinate[6],t.divergence=e.traceCoordinate[7],delete t.x,delete t.y,delete t.z,t},meta:{}}},{&quot;../../plots/gl3d&quot;:784,&quot;./attributes&quot;:1114,&quot;./calc&quot;:1115,&quot;./convert&quot;:1116,&quot;./defaults&quot;:1117}],1119:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/color&quot;),i=t(&quot;../../components/colorscale/attributes&quot;),a=t(&quot;../../components/colorbar/attributes&quot;),o=t(&quot;../../plots/attributes&quot;),s=t(&quot;../../lib/extend&quot;).extendFlat,l=t(&quot;../../plot_api/edit_types&quot;).overrideAll;function c(t){return{show:{valType:&quot;boolean&quot;,dflt:!1},project:{x:{valType:&quot;boolean&quot;,dflt:!1},y:{valType:&quot;boolean&quot;,dflt:!1},z:{valType:&quot;boolean&quot;,dflt:!1}},color:{valType:&quot;color&quot;,dflt:n.defaultLine},usecolormap:{valType:&quot;boolean&quot;,dflt:!1},width:{valType:&quot;number&quot;,min:1,max:16,dflt:2},highlight:{valType:&quot;boolean&quot;,dflt:!0},highlightcolor:{valType:&quot;color&quot;,dflt:n.defaultLine},highlightwidth:{valType:&quot;number&quot;,min:1,max:16,dflt:2}}}var u=e.exports=l(s({z:{valType:&quot;data_array&quot;},x:{valType:&quot;data_array&quot;},y:{valType:&quot;data_array&quot;},text:{valType:&quot;string&quot;,dflt:&quot;&quot;,arrayOk:!0},surfacecolor:{valType:&quot;data_array&quot;}},i(&quot;&quot;,{colorAttr:&quot;z or surfacecolor&quot;,showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:&quot;calc&quot;}),{colorbar:a,contours:{x:c(),y:c(),z:c()},hidesurface:{valType:&quot;boolean&quot;,dflt:!1},lightposition:{x:{valType:&quot;number&quot;,min:-1e5,max:1e5,dflt:10},y:{valType:&quot;number&quot;,min:-1e5,max:1e5,dflt:1e4},z:{valType:&quot;number&quot;,min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:&quot;number&quot;,min:0,max:1,dflt:.8},diffuse:{valType:&quot;number&quot;,min:0,max:1,dflt:.8},specular:{valType:&quot;number&quot;,min:0,max:2,dflt:.05},roughness:{valType:&quot;number&quot;,min:0,max:1,dflt:.5},fresnel:{valType:&quot;number&quot;,min:0,max:5,dflt:.2}},opacity:{valType:&quot;number&quot;,min:0,max:1,dflt:1},_deprecated:{zauto:s({},i.zauto,{}),zmin:s({},i.zmin,{}),zmax:s({},i.zmax,{})},hoverinfo:s({},o.hoverinfo)}),&quot;calc&quot;,&quot;nested&quot;);u.x.editType=u.y.editType=u.z.editType=&quot;calc+clearAxisTypes&quot;},{&quot;../../components/color&quot;:567,&quot;../../components/colorbar/attributes&quot;:568,&quot;../../components/colorscale/attributes&quot;:574,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/attributes&quot;:739}],1120:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/colorscale/calc&quot;);e.exports=function(t,e){e.surfacecolor?n(e,e.surfacecolor,&quot;&quot;,&quot;c&quot;):n(e,e.z,&quot;&quot;,&quot;c&quot;)}},{&quot;../../components/colorscale/calc&quot;:575}],1121:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-surface3d&quot;),i=t(&quot;ndarray&quot;),a=t(&quot;ndarray-homography&quot;),o=t(&quot;ndarray-fill&quot;),s=t(&quot;ndarray-ops&quot;),l=t(&quot;../../lib&quot;).isArrayOrTypedArray,c=t(&quot;../../lib/gl_format_color&quot;).parseColorScale,u=t(&quot;../../lib/str2rgbarray&quot;),f=128;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.dataScale=1}var p=h.prototype;function d(t){var e=t.shape,r=[e[0]+2,e[1]+2],n=i(new Float32Array(r[0]*r[1]),r);return s.assign(n.lo(1,1).hi(e[0],e[1]),t),s.assign(n.lo(1).hi(e[0],1),t.hi(e[0],1)),s.assign(n.lo(1,r[1]-1).hi(e[0],1),t.lo(0,e[1]-1).hi(e[0],1)),s.assign(n.lo(0,1).hi(1,e[1]),t.hi(1)),s.assign(n.lo(r[0]-1,1).hi(1,e[1]),t.lo(e[0]-1)),n.set(0,0,t.get(0,0)),n.set(0,r[1]-1,t.get(0,e[1]-1)),n.set(r[0]-1,0,t.get(e[0]-1,0)),n.set(r[0]-1,r[1]-1,t.get(e[0]-1,e[1]-1)),n}p.handlePick=function(t){if(t.object===this.surface){var e=t.index=[Math.min(0|Math.round(t.data.index[0]/this.dataScale-1),this.data.z[0].length-1),Math.min(0|Math.round(t.data.index[1]/this.dataScale-1),this.data.z.length-1)],r=[0,0,0];l(this.data.x)?l(this.data.x[0])?r[0]=this.data.x[e[1]][e[0]]:r[0]=this.data.x[e[0]]:r[0]=e[0],l(this.data.y)?l(this.data.y[0])?r[1]=this.data.y[e[1]][e[0]]:r[1]=this.data.y[e[1]]:r[1]=e[1],r[2]=this.data.z[e[1]][e[0]],t.traceCoordinate=r;var n=this.scene.fullSceneLayout;t.dataCoordinate=[n.xaxis.d2l(r[0],0,this.data.xcalendar)*this.scene.dataScale[0],n.yaxis.d2l(r[1],0,this.data.ycalendar)*this.scene.dataScale[1],n.zaxis.d2l(r[2],0,this.data.zcalendar)*this.scene.dataScale[2]];var i=this.data.text;return Array.isArray(i)&amp;&amp;i[e[1]]&amp;&amp;void 0!==i[e[1]][e[0]]?t.textLabel=i[e[1]][e[0]]:t.textLabel=i||&quot;&quot;,t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}},p.setContourLevels=function(){for(var t=[[],[],[]],e=!1,r=0;r&lt;3;++r)this.showContour[r]&amp;&amp;(e=!0,t[r]=this.scene.contourLevels[r]);e&amp;&amp;this.surface.update({levels:t})},p.update=function(t){var e,r=this.scene,n=r.fullSceneLayout,s=this.surface,h=t.opacity,p=c(t.colorscale,h),g=t.z,m=t.x,v=t.y,y=n.xaxis,x=n.yaxis,b=n.zaxis,_=r.dataScale,w=g[0].length,k=t._ylength,M=[i(new Float32Array(w*k),[w,k]),i(new Float32Array(w*k),[w,k]),i(new Float32Array(w*k),[w,k])],A=M[0],T=M[1],S=r.contourLevels;this.data=t;var E=t.xcalendar,C=t.ycalendar,L=t.zcalendar;o(M[2],function(t,e){return b.d2l(g[e][t],0,L)*_[2]}),l(m)?l(m[0])?o(A,function(t,e){return y.d2l(m[e][t],0,E)*_[0]}):o(A,function(t){return y.d2l(m[t],0,E)*_[0]}):o(A,function(t){return y.d2l(t,0,E)*_[0]}),l(m)?l(v[0])?o(T,function(t,e){return x.d2l(v[e][t],0,C)*_[1]}):o(T,function(t,e){return x.d2l(v[e],0,C)*_[1]}):o(T,function(t,e){return x.d2l(e,0,E)*_[1]});var z={colormap:p,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!t.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacity:t.opacity};if(z.intensityBounds=[t.cmin,t.cmax],t.surfacecolor){var P=i(new Float32Array(w*k),[w,k]);o(P,function(e,r){return t.surfacecolor[r][e]}),M.push(P)}else z.intensityBounds[0]*=_[2],z.intensityBounds[1]*=_[2];this.dataScale=function(t){var e=Math.max(t[0].shape[0],t[0].shape[1]);if(e&lt;f){for(var r=f/e,n=[0|Math.floor(t[0].shape[0]*r+1),0|Math.floor(t[0].shape[1]*r+1)],o=n[0]*n[1],s=0;s&lt;t.length;++s){var l=d(t[s]),c=i(new Float32Array(o),n);a(c,l,[r,0,0,0,r,0,0,0,1]),t[s]=c}return r}return 1}(M),t.surfacecolor&amp;&amp;(z.intensity=M.pop());var O=[!0,!0,!0],I=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;];for(e=0;e&lt;3;++e){var D=t.contours[I[e]];O[e]=D.highlight,z.showContour[e]=D.show||D.highlight,z.showContour[e]&amp;&amp;(z.contourProject[e]=[D.project.x,D.project.y,D.project.z],D.show?(this.showContour[e]=!0,z.levels[e]=S[e],s.highlightColor[e]=z.contourColor[e]=u(D.color),D.usecolormap?s.highlightTint[e]=z.contourTint[e]=0:s.highlightTint[e]=z.contourTint[e]=1,z.contourWidth[e]=D.width):this.showContour[e]=!1,D.highlight&amp;&amp;(z.dynamicColor[e]=u(D.highlightcolor),z.dynamicWidth[e]=D.highlightwidth))}(function(t){var e=t[0].rgb,r=t[t.length-1].rgb;return e[0]===r[0]&amp;&amp;e[1]===r[1]&amp;&amp;e[2]===r[2]&amp;&amp;e[3]===r[3]})(p)&amp;&amp;(z.vertexColor=!0),z.coords=M,s.update(z),s.visible=t.visible,s.enableDynamic=O,s.enableHighlight=O,s.snapToData=!0,&quot;lighting&quot;in t&amp;&amp;(s.ambientLight=t.lighting.ambient,s.diffuseLight=t.lighting.diffuse,s.specularLight=t.lighting.specular,s.roughness=t.lighting.roughness,s.fresnel=t.lighting.fresnel),&quot;lightposition&quot;in t&amp;&amp;(s.lightPosition=[t.lightposition.x,t.lightposition.y,t.lightposition.z]),h&amp;&amp;h&lt;1&amp;&amp;(s.supportsTransparency=!0)},p.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{&quot;../../lib&quot;:693,&quot;../../lib/gl_format_color&quot;:689,&quot;../../lib/str2rgbarray&quot;:717,&quot;gl-surface3d&quot;:301,ndarray:430,&quot;ndarray-fill&quot;:420,&quot;ndarray-homography&quot;:422,&quot;ndarray-ops&quot;:424}],1122:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../registry&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../components/colorscale/defaults&quot;),o=t(&quot;./attributes&quot;);function s(t,e,r){e in t&amp;&amp;!(r in t)&amp;&amp;(t[r]=t[e])}e.exports=function(t,e,r,l){var c,u;function f(r,n){return i.coerce(t,e,o,r,n)}var h=f(&quot;z&quot;);if(h){var p=f(&quot;x&quot;);f(&quot;y&quot;),e._xlength=Array.isArray(p)&amp;&amp;i.isArrayOrTypedArray(p[0])?h.length:h[0].length,e._ylength=h.length,n.getComponentMethod(&quot;calendars&quot;,&quot;handleTraceDefaults&quot;)(t,e,[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],l),f(&quot;text&quot;),[&quot;lighting.ambient&quot;,&quot;lighting.diffuse&quot;,&quot;lighting.specular&quot;,&quot;lighting.roughness&quot;,&quot;lighting.fresnel&quot;,&quot;lightposition.x&quot;,&quot;lightposition.y&quot;,&quot;lightposition.z&quot;,&quot;hidesurface&quot;,&quot;opacity&quot;].forEach(function(t){f(t)});var d=f(&quot;surfacecolor&quot;);f(&quot;colorscale&quot;);var g=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;];for(c=0;c&lt;3;++c){var m=&quot;contours.&quot;+g[c],v=f(m+&quot;.show&quot;),y=f(m+&quot;.highlight&quot;);if(v||y)for(u=0;u&lt;3;++u)f(m+&quot;.project.&quot;+g[u]);v&amp;&amp;(f(m+&quot;.color&quot;),f(m+&quot;.width&quot;),f(m+&quot;.usecolormap&quot;)),y&amp;&amp;(f(m+&quot;.highlightcolor&quot;),f(m+&quot;.highlightwidth&quot;))}d||(s(t,&quot;zmin&quot;,&quot;cmin&quot;),s(t,&quot;zmax&quot;,&quot;cmax&quot;),s(t,&quot;zauto&quot;,&quot;cauto&quot;)),a(t,e,l,f,{prefix:&quot;&quot;,cLetter:&quot;c&quot;}),e._length=null}else e.visible=!1}},{&quot;../../components/colorscale/defaults&quot;:577,&quot;../../lib&quot;:693,&quot;../../registry&quot;:825,&quot;./attributes&quot;:1119}],1123:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.colorbar={min:&quot;cmin&quot;,max:&quot;cmax&quot;},n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./convert&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;surface&quot;,n.basePlotModule=t(&quot;../../plots/gl3d&quot;),n.categories=[&quot;gl3d&quot;,&quot;2dMap&quot;,&quot;noOpacity&quot;],n.meta={},e.exports=n},{&quot;../../plots/gl3d&quot;:784,&quot;./attributes&quot;:1119,&quot;./calc&quot;:1120,&quot;./convert&quot;:1121,&quot;./defaults&quot;:1122}],1124:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../components/annotations/attributes&quot;),i=t(&quot;../../lib/extend&quot;).extendFlat,a=t(&quot;../../plot_api/edit_types&quot;).overrideAll,o=t(&quot;../../plots/font_attributes&quot;),s=t(&quot;../../plots/domain&quot;).attributes;e.exports=a({domain:s({name:&quot;table&quot;,trace:!0}),columnwidth:{valType:&quot;number&quot;,arrayOk:!0,dflt:null},columnorder:{valType:&quot;data_array&quot;},header:{values:{valType:&quot;data_array&quot;,dflt:[]},format:{valType:&quot;data_array&quot;,dflt:[]},prefix:{valType:&quot;string&quot;,arrayOk:!0,dflt:null},suffix:{valType:&quot;string&quot;,arrayOk:!0,dflt:null},height:{valType:&quot;number&quot;,dflt:28},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:&quot;number&quot;,arrayOk:!0,dflt:1},color:{valType:&quot;color&quot;,arrayOk:!0,dflt:&quot;grey&quot;}},fill:{color:{valType:&quot;color&quot;,arrayOk:!0,dflt:&quot;white&quot;}},font:i({},o({arrayOk:!0}))},cells:{values:{valType:&quot;data_array&quot;,dflt:[]},format:{valType:&quot;data_array&quot;,dflt:[]},prefix:{valType:&quot;string&quot;,arrayOk:!0,dflt:null},suffix:{valType:&quot;string&quot;,arrayOk:!0,dflt:null},height:{valType:&quot;number&quot;,dflt:20},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:&quot;number&quot;,arrayOk:!0,dflt:1},color:{valType:&quot;color&quot;,arrayOk:!0,dflt:&quot;grey&quot;}},fill:{color:{valType:&quot;color&quot;,arrayOk:!0,dflt:&quot;white&quot;}},font:i({},o({arrayOk:!0}))}},&quot;calc&quot;,&quot;from-root&quot;)},{&quot;../../components/annotations/attributes&quot;:550,&quot;../../lib/extend&quot;:682,&quot;../../plot_api/edit_types&quot;:725,&quot;../../plots/domain&quot;:767,&quot;../../plots/font_attributes&quot;:768}],1125:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../plots/get_data&quot;).getModuleCalcData,i=t(&quot;./plot&quot;);r.name=&quot;table&quot;,r.plot=function(t){var e=n(t.calcdata,&quot;table&quot;)[0];e.length&amp;&amp;i(t,e)},r.clean=function(t,e,r,n){var i=n._has&amp;&amp;n._has(&quot;table&quot;),a=e._has&amp;&amp;e._has(&quot;table&quot;);i&amp;&amp;!a&amp;&amp;n._paperdiv.selectAll(&quot;.table&quot;).remove()}},{&quot;../../plots/get_data&quot;:778,&quot;./plot&quot;:1132}],1126:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib/gup&quot;).wrap;e.exports=function(){return n({})}},{&quot;../../lib/gup&quot;:690}],1127:[function(t,e,r){&quot;use strict&quot;;e.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:&quot;&lt;br&gt;&quot;,maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:&quot;cubic-out&quot;,scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:&quot;cubic-out&quot;,uplift:5,wrapSpacer:&quot; &quot;,wrapSplitCharacter:&quot; &quot;,cn:{table:&quot;table&quot;,tableControlView:&quot;table-control-view&quot;,scrollBackground:&quot;scroll-background&quot;,yColumn:&quot;y-column&quot;,columnBlock:&quot;column-block&quot;,scrollAreaClip:&quot;scroll-area-clip&quot;,scrollAreaClipRect:&quot;scroll-area-clip-rect&quot;,columnBoundary:&quot;column-boundary&quot;,columnBoundaryClippath:&quot;column-boundary-clippath&quot;,columnBoundaryRect:&quot;column-boundary-rect&quot;,columnCells:&quot;column-cells&quot;,columnCell:&quot;column-cell&quot;,cellRect:&quot;cell-rect&quot;,cellText:&quot;cell-text&quot;,cellTextHolder:&quot;cell-text-holder&quot;,scrollbarKit:&quot;scrollbar-kit&quot;,scrollbar:&quot;scrollbar&quot;,scrollbarSlider:&quot;scrollbar-slider&quot;,scrollbarGlyph:&quot;scrollbar-glyph&quot;,scrollbarCaptureZone:&quot;scrollbar-capture-zone&quot;}}},{}],1128:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;),i=t(&quot;../../lib/extend&quot;).extendFlat,a=t(&quot;fast-isnumeric&quot;);function o(t){if(Array.isArray(t)){for(var e=0,r=0;r&lt;t.length;r++)e=Math.max(e,o(t[r]));return e}return t}function s(t,e){return t+e}function l(t){var e,r=t.slice(),n=1/0,i=0;for(e=0;e&lt;r.length;e++)Array.isArray(r[e])||(r[e]=[r[e]]),n=Math.min(n,r[e].length),i=Math.max(i,r[e].length);if(n!==i)for(e=0;e&lt;r.length;e++){var a=i-r[e].length;a&amp;&amp;(r[e]=r[e].concat(c(a)))}return r}function c(t){for(var e=new Array(t),r=0;r&lt;t;r++)e[r]=&quot;&quot;;return e}function u(t){return t.calcdata.columns.reduce(function(e,r){return r.xIndex&lt;t.xIndex?e+r.columnWidth:e},0)}function f(t,e){return Object.keys(t).map(function(r){return i({},t[r],{auxiliaryBlocks:e})})}function h(t,e){for(var r,n={},i=0,a=0,o={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,c=0;c&lt;t.length;c++)r=t[c],o.rows.push({rowIndex:c,rowHeight:r}),((a+=r)&gt;=e||c===t.length-1)&amp;&amp;(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&amp;&amp;!d[0].length&amp;&amp;(d[0]=[&quot;&quot;],d=l(d));var g=d.concat(p(r).map(function(){return c((d[0]||[&quot;&quot;]).length)})),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.y[0])),x=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],b=r.length?r[0].map(function(){return e.cells.height}):[],_=x.reduce(s,0),w=h(b,y-_+n.uplift),k=f(h(x,_),[]),M=f(w,k),A={},T=e._fullInput.columnorder.concat(p(r.map(function(t,e){return e}))),S=g.map(function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1}),E=S.reduce(s,0);S=S.map(function(t){return t/E*v});var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.index,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:C,height:y,columnOrder:T,groupHeight:y,rowBlocks:M,headerRowBlocks:k,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map(function(t){return t[0]}),gdColumnsOriginalOrder:g.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+&quot;__&quot;+A[t],label:t,specIndex:e,xIndex:T[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}})};return L.columns.forEach(function(t){t.calcdata=L,t.x=u(t)}),L}},{&quot;../../lib/extend&quot;:682,&quot;./constants&quot;:1127,&quot;fast-isnumeric&quot;:213}],1129:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib/extend&quot;).extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:&quot;header&quot;,type:&quot;header&quot;,page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:&quot;cells1&quot;,type:&quot;cells&quot;,page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:&quot;cells2&quot;,type:&quot;cells&quot;,page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map(function(r,n){return{keyWithinBlock:n+(&quot;string&quot;==typeof r&amp;&amp;r.match(/[&lt;$&amp;&gt; ]/)?&quot;_keybuster_&quot;+Math.random():&quot;&quot;),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}})}},{&quot;../../lib/extend&quot;:682}],1130:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./attributes&quot;),a=t(&quot;../../plots/domain&quot;).defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s(&quot;columnwidth&quot;),s(&quot;header.values&quot;),s(&quot;header.format&quot;),s(&quot;header.align&quot;),s(&quot;header.prefix&quot;),s(&quot;header.suffix&quot;),s(&quot;header.height&quot;),s(&quot;header.line.width&quot;),s(&quot;header.line.color&quot;),s(&quot;header.fill.color&quot;),n.coerceFont(s,&quot;header.font&quot;,n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(t,e){return t-e}),o=i.map(function(t){return a.indexOf(t)}),s=o.length;s&lt;n;s++)o.push(s);e(&quot;columnorder&quot;,o)}(e,s),s(&quot;cells.values&quot;),s(&quot;cells.format&quot;),s(&quot;cells.align&quot;),s(&quot;cells.prefix&quot;),s(&quot;cells.suffix&quot;),s(&quot;cells.height&quot;),s(&quot;cells.line.width&quot;),s(&quot;cells.line.color&quot;),s(&quot;cells.fill.color&quot;),n.coerceFont(s,&quot;cells.font&quot;,n.extendFlat({},o.font)),e._length=null}},{&quot;../../lib&quot;:693,&quot;../../plots/domain&quot;:767,&quot;./attributes&quot;:1124}],1131:[function(t,e,r){&quot;use strict&quot;;var n={};n.attributes=t(&quot;./attributes&quot;),n.supplyDefaults=t(&quot;./defaults&quot;),n.calc=t(&quot;./calc&quot;),n.plot=t(&quot;./plot&quot;),n.moduleType=&quot;trace&quot;,n.name=&quot;table&quot;,n.basePlotModule=t(&quot;./base_plot&quot;),n.categories=[&quot;noOpacity&quot;],n.meta={},e.exports=n},{&quot;./attributes&quot;:1124,&quot;./base_plot&quot;:1125,&quot;./calc&quot;:1126,&quot;./defaults&quot;:1130,&quot;./plot&quot;:1132}],1132:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./constants&quot;),i=t(&quot;d3&quot;),a=t(&quot;../../lib/gup&quot;),o=t(&quot;../../components/drawing&quot;),s=t(&quot;../../lib/svg_text_utils&quot;),l=t(&quot;../../lib&quot;).raiseToTop,c=t(&quot;../../lib&quot;).cancelTransition,u=t(&quot;./data_preparation_helper&quot;),f=t(&quot;./data_split_helpers&quot;),h=t(&quot;../../components/color&quot;);function p(t){return Math.ceil(t.calcdata.maxLineWidth/2)}function d(t,e){return&quot;clip&quot;+t._fullLayout._uid+&quot;_scrollAreaBottomClip_&quot;+e.key}function g(t,e){return&quot;clip&quot;+t._fullLayout._uid+&quot;_columnBoundaryClippath_&quot;+e.calcdata.key+&quot;_&quot;+e.specIndex}function m(t){return[].concat.apply([],t.map(function(t){return t})).map(function(t){return t.__data__})}function v(t,e,r){var o=t.selectAll(&quot;.&quot;+n.cn.scrollbarKit).data(a.repeat,a.keyFun);o.enter().append(&quot;g&quot;).classed(n.cn.scrollbarKit,!0).style(&quot;shape-rendering&quot;,&quot;geometricPrecision&quot;),o.each(function(t){var e=t.scrollbarState;e.totalHeight=function(t){var e=t.rowBlocks;return O(e,e.length-1)+(e.length?I(e[e.length-1],1/0):1)}(t),e.scrollableAreaHeight=t.groupHeight-A(t),e.currentlyVisibleHeight=Math.min(e.totalHeight,e.scrollableAreaHeight),e.ratio=e.currentlyVisibleHeight/e.totalHeight,e.barLength=Math.max(e.ratio*e.currentlyVisibleHeight,n.goldenRatio*n.scrollbarWidth),e.barWiggleRoom=e.currentlyVisibleHeight-e.barLength,e.wiggleRoom=Math.max(0,e.totalHeight-e.scrollableAreaHeight),e.topY=0===e.barWiggleRoom?0:t.scrollY/e.wiggleRoom*e.barWiggleRoom,e.bottomY=e.topY+e.barLength,e.dragMultiplier=e.wiggleRoom/e.barWiggleRoom}).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+(t.width+n.scrollbarWidth/2+n.scrollbarOffset)+&quot; &quot;+A(t)+&quot;)&quot;});var s=o.selectAll(&quot;.&quot;+n.cn.scrollbar).data(a.repeat,a.keyFun);s.enter().append(&quot;g&quot;).classed(n.cn.scrollbar,!0);var l=s.selectAll(&quot;.&quot;+n.cn.scrollbarSlider).data(a.repeat,a.keyFun);l.enter().append(&quot;g&quot;).classed(n.cn.scrollbarSlider,!0),l.attr(&quot;transform&quot;,function(t){return&quot;translate(0 &quot;+(t.scrollbarState.topY||0)+&quot;)&quot;});var c=l.selectAll(&quot;.&quot;+n.cn.scrollbarGlyph).data(a.repeat,a.keyFun);c.enter().append(&quot;line&quot;).classed(n.cn.scrollbarGlyph,!0).attr(&quot;stroke&quot;,&quot;black&quot;).attr(&quot;stroke-width&quot;,n.scrollbarWidth).attr(&quot;stroke-linecap&quot;,&quot;round&quot;).attr(&quot;y1&quot;,n.scrollbarWidth/2),c.attr(&quot;y2&quot;,function(t){return t.scrollbarState.barLength-n.scrollbarWidth/2}).attr(&quot;stroke-opacity&quot;,function(t){return t.columnDragInProgress||!t.scrollbarState.barWiggleRoom||r?0:.4}),c.transition().delay(0).duration(0),c.transition().delay(n.scrollbarHideDelay).duration(n.scrollbarHideDuration).attr(&quot;stroke-opacity&quot;,0);var u=s.selectAll(&quot;.&quot;+n.cn.scrollbarCaptureZone).data(a.repeat,a.keyFun);u.enter().append(&quot;line&quot;).classed(n.cn.scrollbarCaptureZone,!0).attr(&quot;stroke&quot;,&quot;white&quot;).attr(&quot;stroke-opacity&quot;,.01).attr(&quot;stroke-width&quot;,n.scrollbarCaptureWidth).attr(&quot;stroke-linecap&quot;,&quot;butt&quot;).attr(&quot;y1&quot;,0).on(&quot;mousedown&quot;,function(r){var n=i.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=n-a.top,l=i.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY&lt;=s&amp;&amp;s&lt;=o.bottomY||S(e,t,null,l(s-o.barLength/2))(r)}).call(i.behavior.drag().origin(function(t){return i.event.stopPropagation(),t.scrollbarState.scrollbarScrollInProgress=!0,t}).on(&quot;drag&quot;,S(e,t)).on(&quot;dragend&quot;,function(){})),u.attr(&quot;y2&quot;,function(t){return t.scrollbarState.scrollableAreaHeight})}function y(t,e,r,s){var l=function(t){var e=t.selectAll(&quot;.&quot;+n.cn.columnCell).data(f.splitToCells,function(t){return t.keyWithinBlock});return e.enter().append(&quot;g&quot;).classed(n.cn.columnCell,!0),e.exit().remove(),e}(function(t){var e=t.selectAll(&quot;.&quot;+n.cn.columnCells).data(a.repeat,a.keyFun);return e.enter().append(&quot;g&quot;).classed(n.cn.columnCells,!0),e.exit().remove(),e}(r));!function(t){t.each(function(t,e){var r=t.calcdata.cells.font,n=t.column.specIndex,i={size:_(r.size,n,e),color:_(r.color,n,e),family:_(r.family,n,e)};t.rowNumber=t.key,t.align=_(t.calcdata.cells.align,n,e),t.cellBorderWidth=_(t.calcdata.cells.line.width,n,e),t.font=i})}(l),function(t){t.attr(&quot;width&quot;,function(t){return t.column.columnWidth}).attr(&quot;stroke-width&quot;,function(t){return t.cellBorderWidth}).each(function(t){var e=i.select(this);h.stroke(e,_(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),h.fill(e,_(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}(function(t){var e=t.selectAll(&quot;.&quot;+n.cn.cellRect).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(&quot;rect&quot;).classed(n.cn.cellRect,!0),e}(l));var c=function(t){var e=t.selectAll(&quot;.&quot;+n.cn.cellText).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(&quot;text&quot;).classed(n.cn.cellText,!0).style(&quot;cursor&quot;,function(){return&quot;auto&quot;}).on(&quot;mousedown&quot;,function(){i.event.stopPropagation()}),e}(function(t){var e=t.selectAll(&quot;.&quot;+n.cn.cellTextHolder).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(&quot;g&quot;).classed(n.cn.cellTextHolder,!0).style(&quot;shape-rendering&quot;,&quot;geometricPrecision&quot;),e}(l));!function(t){t.each(function(t){o.font(i.select(this),t.font)})}(c),x(c,e,s,t),P(l)}function x(t,e,r,a){t.text(function(t){var e=t.column.specIndex,r=t.rowNumber,a=t.value,o=&quot;string&quot;==typeof a,s=o&amp;&amp;a.match(/&lt;br&gt;/i),l=!o||s;t.mayHaveMarkup=o&amp;&amp;a.match(/[&lt;&amp;&gt;]/);var c,u=&quot;string&quot;==typeof(c=a)&amp;&amp;c.match(n.latexCheck);t.latex=u;var f,h,p=u?&quot;&quot;:_(t.calcdata.cells.prefix,e,r)||&quot;&quot;,d=u?&quot;&quot;:_(t.calcdata.cells.suffix,e,r)||&quot;&quot;,g=u?null:_(t.calcdata.cells.format,e,r)||null,m=p+(g?i.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&amp;&amp;!l&amp;&amp;!u&amp;&amp;(f=b(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?b(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(&quot; &quot;===n.wrapSplitCharacter?m.replace(/&lt;a href=/gi,&quot;&lt;a_href=&quot;):m).split(n.wrapSplitCharacter),y=&quot; &quot;===n.wrapSplitCharacter?v.map(function(t){return t.replace(/&lt;a_href=/gi,&quot;&lt;a href=&quot;)}):v;t.fragments=y.map(function(t){return{text:t,width:null}}),t.fragments.push({fragment:n.wrapSpacer,width:null}),h=y.join(n.lineBreaker)+n.lineBreaker+n.wrapSpacer}else delete t.fragments,h=m;return h}).attr(&quot;dy&quot;,function(t){return t.needsConvertToTspans?0:&quot;0.75em&quot;}).each(function(t){var o=i.select(this),l=t.wrappingNeeded?C:L;t.needsConvertToTspans?s.convertToTspans(o,a,l(r,this,e,a,t)):i.select(this.parentNode).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+z(t)+&quot; &quot;+n.cellPad+&quot;)&quot;}).attr(&quot;text-anchor&quot;,function(t){return{left:&quot;start&quot;,center:&quot;middle&quot;,right:&quot;end&quot;}[t.align]})})}function b(t){return-1!==t.indexOf(n.wrapSplitCharacter)}function _(t,e,r){if(Array.isArray(t)){var n=t[Math.min(e,t.length-1)];return Array.isArray(n)?n[Math.min(r,n.length-1)]:n}return t}function w(t,e,r){t.transition().ease(n.releaseTransitionEase).duration(n.releaseTransitionDuration).attr(&quot;transform&quot;,&quot;translate(&quot;+e.x+&quot; &quot;+r+&quot;)&quot;)}function k(t){return&quot;cells&quot;===t.type}function M(t){return&quot;header&quot;===t.type}function A(t){return(t.rowBlocks.length?t.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(t,e){return t+I(e,1/0)},0)}function T(t,e,r){var n=m(e)[0];if(void 0!==n){var i=n.rowBlocks,a=n.calcdata,o=O(i,i.length),s=n.calcdata.groupHeight-A(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),c=function(t,e,r){for(var n=[],i=0,a=0;a&lt;t.length;a++){for(var o=t[a],s=o.rows,l=0,c=0;c&lt;s.length;c++)l+=s[c].rowHeight;o.allRowsHeight=l,e&lt;i+l&amp;&amp;e+r&gt;i&amp;&amp;n.push(a),i+=l}return n}(i,l,s);1===c.length&amp;&amp;(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&amp;&amp;c.reverse(),e.each(function(t,e){t.page=c[e],t.scrollY=l}),e.attr(&quot;transform&quot;,function(t){return&quot;translate(0 &quot;+(O(t.rowBlocks,t.page)-t.scrollY)+&quot;)&quot;}),t&amp;&amp;(E(t,r,e,c,n.prevPages,n,0),E(t,r,e,c,n.prevPages,n,1),v(r,t))}}function S(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter(function(t){return s.key===t.key}),c=r||s.scrollbarState.dragMultiplier;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var u=l.selectAll(&quot;.&quot;+n.cn.yColumn).selectAll(&quot;.&quot;+n.cn.columnBlock).filter(k);T(t,u,l)}}function E(t,e,r,n,i,a,o){n[o]!==i[o]&amp;&amp;(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var a=r.filter(function(t,e){return e===o&amp;&amp;n[e]!==i[e]});y(t,e,a,r),i[o]=n[o]}))}function C(t,e,r){return function(){var a=i.select(e.parentNode);a.each(function(t){var e=t.fragments;a.selectAll(&quot;tspan.line&quot;).each(function(t,r){e[r].width=this.getComputedTextLength()});var r,i,o=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value=&quot;&quot;;s.length;)c+(i=(r=s.shift()).width+o)&gt;u&amp;&amp;(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&amp;&amp;(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0}),a.selectAll(&quot;tspan.line&quot;).remove(),x(a.select(&quot;.&quot;+n.cn.cellText),r,t),i.select(e.parentNode.parentNode).call(P)}}function L(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,f=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,h=Math.max(f,u);h-l.rows[c].rowHeight&amp;&amp;(l.rows[c].rowHeight=h,t.selectAll(&quot;.&quot;+n.cn.columnCell).call(P),T(null,t.filter(k),0),v(r,a,!0)),s.attr(&quot;transform&quot;,function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select(&quot;.&quot;+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return&quot;translate(&quot;+z(o,i.select(this.parentNode).select(&quot;.&quot;+n.cn.cellTextHolder).node().getBoundingClientRect().width)+&quot; &quot;+a+&quot;)&quot;}),o.settledY=!0}}}function z(t,e){switch(t.align){case&quot;left&quot;:return n.cellPad;case&quot;right&quot;:return t.column.columnWidth-(e||0)-n.cellPad;case&quot;center&quot;:return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function P(t){t.attr(&quot;transform&quot;,function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+I(e,1/0)},0);return&quot;translate(0 &quot;+(I(R(t),t.key)+e)+&quot;)&quot;}).selectAll(&quot;.&quot;+n.cn.cellRect).attr(&quot;height&quot;,function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r})}function O(t,e){for(var r=0,n=e-1;n&gt;=0;n--)r+=D(t[n]);return r}function I(t,e){for(var r=0,n=0;n&lt;t.rows.length&amp;&amp;t.rows[n].rowIndex&lt;e;n++)r+=t.rows[n].rowHeight;return r}function D(t){var e=t.allRowsHeight;if(void 0!==e)return e;for(var r=0,n=0;n&lt;t.rows.length;n++)r+=t.rows[n].rowHeight;return t.allRowsHeight=r,r}function R(t){return t.rowBlocks[t.page]}e.exports=function(t,e){var r=t._fullLayout._paper.selectAll(&quot;.&quot;+n.cn.table).data(e.map(function(e){var r=a.unwrap(e).trace;return u(t,r)}),a.keyFun);r.exit().remove(),r.enter().append(&quot;g&quot;).classed(n.cn.table,!0).attr(&quot;overflow&quot;,&quot;visible&quot;).style(&quot;box-sizing&quot;,&quot;content-box&quot;).style(&quot;position&quot;,&quot;absolute&quot;).style(&quot;left&quot;,0).style(&quot;overflow&quot;,&quot;visible&quot;).style(&quot;shape-rendering&quot;,&quot;crispEdges&quot;).style(&quot;pointer-events&quot;,&quot;all&quot;),r.attr(&quot;width&quot;,function(t){return t.width+t.size.l+t.size.r}).attr(&quot;height&quot;,function(t){return t.height+t.size.t+t.size.b}).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.translateX+&quot;,&quot;+t.translateY+&quot;)&quot;});var s=r.selectAll(&quot;.&quot;+n.cn.tableControlView).data(a.repeat,a.keyFun);s.enter().append(&quot;g&quot;).classed(n.cn.tableControlView,!0).style(&quot;box-sizing&quot;,&quot;content-box&quot;).on(&quot;mousemove&quot;,function(e){s.filter(function(t){return e===t}).call(v,t)}).on(&quot;mousewheel&quot;,function(e){e.scrollbarState.wheeling||(e.scrollbarState.wheeling=!0,i.event.stopPropagation(),i.event.preventDefault(),S(t,s,null,e.scrollY+i.event.deltaY)(e),e.scrollbarState.wheeling=!1)}).call(v,t,!0),s.attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.size.l+&quot; &quot;+t.size.t+&quot;)&quot;});var h=s.selectAll(&quot;.&quot;+n.cn.scrollBackground).data(a.repeat,a.keyFun);h.enter().append(&quot;rect&quot;).classed(n.cn.scrollBackground,!0).attr(&quot;fill&quot;,&quot;none&quot;),h.attr(&quot;width&quot;,function(t){return t.width}).attr(&quot;height&quot;,function(t){return t.height}),s.each(function(e){o.setClipUrl(i.select(this),d(t,e))});var x=s.selectAll(&quot;.&quot;+n.cn.yColumn).data(function(t){return t.columns},a.keyFun);x.enter().append(&quot;g&quot;).classed(n.cn.yColumn,!0),x.exit().remove(),x.attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.x+&quot; 0)&quot;}).call(i.behavior.drag().origin(function(e){return w(i.select(this),e,-n.uplift),l(this),e.calcdata.columnDragInProgress=!0,v(s.filter(function(t){return e.calcdata.key===t.key}),t),e}).on(&quot;drag&quot;,function(t){var e=i.select(this),r=function(e){return(t===e?i.event.x:e.x)+e.columnWidth/2};t.x=Math.max(-n.overdrag,Math.min(t.calcdata.width+n.overdrag-t.columnWidth,i.event.x)),m(x).filter(function(e){return e.calcdata.key===t.calcdata.key}).sort(function(t,e){return r(t)-r(e)}).forEach(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e)}),x.filter(function(e){return t!==e}).transition().ease(n.transitionEase).duration(n.transitionDuration).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+t.x+&quot; 0)&quot;}),e.call(c).attr(&quot;transform&quot;,&quot;translate(&quot;+t.x+&quot; -&quot;+n.uplift+&quot; )&quot;)}).on(&quot;dragend&quot;,function(e){var r=i.select(this),n=e.calcdata;e.x=e.xScale(e),e.calcdata.columnDragInProgress=!1,w(r,e,0),function(t,e,r){var n=e.gdColumnsOriginalOrder;e.gdColumns.sort(function(t,e){return r[n.indexOf(t)]-r[n.indexOf(e)]}),e.columnorder=r,t.emit(&quot;plotly_restyle&quot;)}(t,n,n.columns.map(function(t){return t.xIndex}))})),x.each(function(e){o.setClipUrl(i.select(this),g(t,e))});var b=x.selectAll(&quot;.&quot;+n.cn.columnBlock).data(f.splitToPanels,a.keyFun);b.enter().append(&quot;g&quot;).classed(n.cn.columnBlock,!0).attr(&quot;id&quot;,function(t){return t.key}),b.style(&quot;cursor&quot;,function(t){return t.dragHandle?&quot;ew-resize&quot;:t.calcdata.scrollbarState.barWiggleRoom?&quot;ns-resize&quot;:&quot;default&quot;});var _=b.filter(M),A=b.filter(k);A.call(i.behavior.drag().origin(function(t){return i.event.stopPropagation(),t}).on(&quot;drag&quot;,S(t,s,-1)).on(&quot;dragend&quot;,function(){})),y(t,s,_,b),y(t,s,A,b);var E=s.selectAll(&quot;.&quot;+n.cn.scrollAreaClip).data(a.repeat,a.keyFun);E.enter().append(&quot;clipPath&quot;).classed(n.cn.scrollAreaClip,!0).attr(&quot;id&quot;,function(e){return d(t,e)});var C=E.selectAll(&quot;.&quot;+n.cn.scrollAreaClipRect).data(a.repeat,a.keyFun);C.enter().append(&quot;rect&quot;).classed(n.cn.scrollAreaClipRect,!0).attr(&quot;x&quot;,-n.overdrag).attr(&quot;y&quot;,-n.uplift).attr(&quot;fill&quot;,&quot;none&quot;),C.attr(&quot;width&quot;,function(t){return t.width+2*n.overdrag}).attr(&quot;height&quot;,function(t){return t.height+n.uplift}),x.selectAll(&quot;.&quot;+n.cn.columnBoundary).data(a.repeat,a.keyFun).enter().append(&quot;g&quot;).classed(n.cn.columnBoundary,!0);var L=x.selectAll(&quot;.&quot;+n.cn.columnBoundaryClippath).data(a.repeat,a.keyFun);L.enter().append(&quot;clipPath&quot;).classed(n.cn.columnBoundaryClippath,!0),L.attr(&quot;id&quot;,function(e){return g(t,e)});var z=L.selectAll(&quot;.&quot;+n.cn.columnBoundaryRect).data(a.repeat,a.keyFun);z.enter().append(&quot;rect&quot;).classed(n.cn.columnBoundaryRect,!0).attr(&quot;fill&quot;,&quot;none&quot;),z.attr(&quot;width&quot;,function(t){return t.columnWidth+2*p(t)}).attr(&quot;height&quot;,function(t){return t.calcdata.height+2*p(t)+n.uplift}).attr(&quot;x&quot;,function(t){return-p(t)}).attr(&quot;y&quot;,function(t){return-p(t)}),T(null,A,s)}},{&quot;../../components/color&quot;:567,&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../../lib/gup&quot;:690,&quot;../../lib/svg_text_utils&quot;:718,&quot;./constants&quot;:1127,&quot;./data_preparation_helper&quot;:1128,&quot;./data_split_helpers&quot;:1129,d3:147}],1133:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../box/attributes&quot;),i=t(&quot;../../lib/extend&quot;).extendFlat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,name:n.name,orientation:i({},n.orientation,{}),bandwidth:{valType:&quot;number&quot;,min:0,editType:&quot;calc&quot;},scalegroup:{valType:&quot;string&quot;,dflt:&quot;&quot;,editType:&quot;calc&quot;},scalemode:{valType:&quot;enumerated&quot;,values:[&quot;width&quot;,&quot;count&quot;],dflt:&quot;width&quot;,editType:&quot;calc&quot;},spanmode:{valType:&quot;enumerated&quot;,values:[&quot;soft&quot;,&quot;hard&quot;,&quot;manual&quot;],dflt:&quot;soft&quot;,editType:&quot;calc&quot;},span:{valType:&quot;info_array&quot;,items:[{valType:&quot;any&quot;,editType:&quot;calc&quot;},{valType:&quot;any&quot;,editType:&quot;calc&quot;}],editType:&quot;calc&quot;},line:{color:{valType:&quot;color&quot;,editType:&quot;style&quot;},width:{valType:&quot;number&quot;,min:0,dflt:2,editType:&quot;style&quot;},editType:&quot;plot&quot;},fillcolor:n.fillcolor,points:i({},n.boxpoints,{}),jitter:i({},n.jitter,{}),pointpos:i({},n.pointpos,{}),marker:n.marker,text:n.text,box:{visible:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;plot&quot;},width:{valType:&quot;number&quot;,min:0,max:1,dflt:.25,editType:&quot;plot&quot;},fillcolor:{valType:&quot;color&quot;,editType:&quot;style&quot;},line:{color:{valType:&quot;color&quot;,editType:&quot;style&quot;},width:{valType:&quot;number&quot;,min:0,editType:&quot;style&quot;},editType:&quot;style&quot;},editType:&quot;plot&quot;},meanline:{visible:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;plot&quot;},color:{valType:&quot;color&quot;,editType:&quot;style&quot;},width:{valType:&quot;number&quot;,min:0,editType:&quot;style&quot;},editType:&quot;plot&quot;},side:{valType:&quot;enumerated&quot;,values:[&quot;both&quot;,&quot;positive&quot;,&quot;negative&quot;],dflt:&quot;both&quot;,editType:&quot;plot&quot;},selected:n.selected,unselected:n.unselected,hoveron:{valType:&quot;flaglist&quot;,flags:[&quot;violins&quot;,&quot;points&quot;,&quot;kde&quot;],dflt:&quot;violins+points+kde&quot;,extras:[&quot;all&quot;],editType:&quot;style&quot;}}},{&quot;../../lib/extend&quot;:682,&quot;../box/attributes&quot;:856}],1134:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../box/calc&quot;),o=t(&quot;./helpers&quot;),s=t(&quot;../../constants/numerical&quot;).BADNUM;function l(t,e,r){var i=e.max-e.min;if(!i)return 1;if(t.bandwidth)return Math.max(t.bandwidth,i/1e4);var a=r.length,o=n.stdev(r,a-1,e.mean);return Math.max(function(t,e,r){return 1.059*Math.min(e,r/1.349)*Math.pow(t,-.2)}(a,o,e.q3-e.q1),i/100)}function c(t,e,r,n){var a,o=t.spanmode,l=t.span||[],c=[e.min,e.max],u=[e.min-2*n,e.max+2*n];function f(n){var i=l[n],a=r.d2c(i,0,t[e.valLetter+&quot;calendar&quot;]);return a===s?u[n]:a}var h={type:&quot;linear&quot;,range:a=&quot;soft&quot;===o?u:&quot;hard&quot;===o?c:[f(0),f(1)]};return i.setConvert(h),h.cleanRange(),a}e.exports=function(t,e){var r=a(t,e);if(r[0].t.empty)return r;var s=t._fullLayout,u=i.getFromId(t,e[&quot;h&quot;===e.orientation?&quot;xaxis&quot;:&quot;yaxis&quot;]),f=s._violinScaleGroupStats,h=e.scalegroup,p=f[h];p||(p=f[h]={maxWidth:0,maxCount:0});for(var d=1/0,g=-1/0,m=0;m&lt;r.length;m++){var v=r[m],y=v.pts.map(o.extractVal),x=v.bandwidth=l(e,v,y),b=v.span=c(e,v,u,x),_=b[1]-b[0],w=Math.ceil(_/(x/3)),k=_/w;if(!isFinite(k)||!isFinite(w))return n.error(&quot;Something went wrong with computing the violin span&quot;),r[0].t.empty=!0,r;var M=o.makeKDE(v,e,y);v.density=new Array(w);for(var A=0,T=b[0];T&lt;b[1]+k/2;A++,T+=k){var S=M(T);p.maxWidth=Math.max(p.maxWidth,S),v.density[A]={v:S,t:T}}p.maxCount=Math.max(p.maxCount,y.length),d=Math.min(d,b[0]),g=Math.max(g,b[1])}var E=i.findExtremes(u,[d,g],{padded:!0});return e._extremes[u._id]=E,r[0].t.labels.kde=n._(t,&quot;kde:&quot;),r}},{&quot;../../constants/numerical&quot;:670,&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../box/calc&quot;:857,&quot;./helpers&quot;:1137}],1135:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../box/cross_trace_calc&quot;).setPositionOffset,i=[&quot;v&quot;,&quot;h&quot;];e.exports=function(t,e){for(var r=t.calcdata,a=e.xaxis,o=e.yaxis,s=0;s&lt;i.length;s++){for(var l=i[s],c=&quot;h&quot;===l?o:a,u=[],f=0,h=0,p=0;p&lt;r.length;p++){var d=r[p],g=d[0].t,m=d[0].trace;!0!==m.visible||&quot;violin&quot;!==m.type||g.empty||m.orientation!==l||m.xaxis!==a._id||m.yaxis!==o._id||(u.push(p),!1!==m.points&amp;&amp;(f=Math.max(f,m.jitter-m.pointpos-1),h=Math.max(h,m.jitter+m.pointpos-1)))}n(&quot;violin&quot;,t,u,c,[f,h])}}},{&quot;../box/cross_trace_calc&quot;:858}],1136:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../box/defaults&quot;),o=t(&quot;./attributes&quot;);e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}function c(r,i){return n.coerce2(t,e,o,r,i)}if(a.handleSampleDefaults(t,e,l,s),!1!==e.visible){l(&quot;bandwidth&quot;),l(&quot;scalegroup&quot;,e.name),l(&quot;scalemode&quot;),l(&quot;side&quot;);var u,f=l(&quot;span&quot;);Array.isArray(f)&amp;&amp;(u=&quot;manual&quot;),l(&quot;spanmode&quot;,u);var h=l(&quot;line.color&quot;,(t.marker||{}).color||r),p=l(&quot;line.width&quot;),d=l(&quot;fillcolor&quot;,i.addOpacity(e.line.color,.5));a.handlePointsDefaults(t,e,l,{prefix:&quot;&quot;});var g=c(&quot;box.width&quot;),m=c(&quot;box.fillcolor&quot;,d),v=c(&quot;box.line.color&quot;,h),y=c(&quot;box.line.width&quot;,p);l(&quot;box.visible&quot;,Boolean(g||m||v||y))||(e.box={visible:!1});var x=c(&quot;meanline.color&quot;,h),b=c(&quot;meanline.width&quot;,p);l(&quot;meanline.visible&quot;,Boolean(x||b))||(e.meanline={visible:!1})}}},{&quot;../../components/color&quot;:567,&quot;../../lib&quot;:693,&quot;../box/defaults&quot;:859,&quot;./attributes&quot;:1133}],1137:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*t*t)};r.makeKDE=function(t,e,r){var n=r.length,a=i,o=t.bandwidth,s=1/(n*o);return function(t){for(var e=0,i=0;i&lt;n;i++)e+=a((t-r[i])/o);return s*e}},r.getPositionOnKdePath=function(t,e,r){var i,a;&quot;h&quot;===e.orientation?(i=&quot;y&quot;,a=&quot;x&quot;):(i=&quot;x&quot;,a=&quot;y&quot;);var o=n.findPointOnPath(t.path,r,a,{pathLength:t.pathLength}),s=t.posCenterPx,l=o[i];return[l,&quot;both&quot;===e.side?2*s-l:s]},r.getKdeValue=function(t,e,n){var i=t.pts.map(r.extractVal);return r.makeKDE(t,e,i)(n)/t.posDensityScale},r.extractVal=function(t){return t.v}},{&quot;../../lib&quot;:693}],1138:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;../../plots/cartesian/axes&quot;),a=t(&quot;../box/hover&quot;),o=t(&quot;./helpers&quot;);e.exports=function(t,e,r,s,l){var c,u,f=t.cd,h=f[0].trace,p=h.hoveron,d=-1!==p.indexOf(&quot;violins&quot;),g=-1!==p.indexOf(&quot;kde&quot;),m=[];if(d||g){var v=a.hoverOnBoxes(t,e,r,s);if(d&amp;&amp;(m=m.concat(v)),g&amp;&amp;v.length&gt;0){var y,x,b,_,w,k=t.xa,M=t.ya;&quot;h&quot;===h.orientation?(w=e,y=&quot;y&quot;,b=M,x=&quot;x&quot;,_=k):(w=r,y=&quot;x&quot;,b=k,x=&quot;y&quot;,_=M);var A=f[t.index];if(w&gt;=A.span[0]&amp;&amp;w&lt;=A.span[1]){var T=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(A,h,w),C=o.getPositionOnKdePath(A,h,S),L=b._offset,z=b._length;T[y+&quot;0&quot;]=C[0],T[y+&quot;1&quot;]=C[1],T[x+&quot;0&quot;]=T[x+&quot;1&quot;]=S,T[x+&quot;Label&quot;]=x+&quot;: &quot;+i.hoverLabelText(_,w)+&quot;, &quot;+f[0].t.labels.kde+&quot; &quot;+E.toFixed(3),T.spikeDistance=v[0].spikeDistance;var P=y+&quot;Spike&quot;;T[P]=v[0][P],v[0].spikeDistance=void 0,v[0][P]=void 0,m.push(T),(u={stroke:t.color})[y+&quot;1&quot;]=n.constrain(L+C[0],L,L+z),u[y+&quot;2&quot;]=n.constrain(L+C[1],L,L+z),u[x+&quot;1&quot;]=u[x+&quot;2&quot;]=_._offset+S}}}-1!==p.indexOf(&quot;points&quot;)&amp;&amp;(c=a.hoverOnPoints(t,e,r));var O=l.selectAll(&quot;.violinline-&quot;+h.uid).data(u?[0]:[]);return O.enter().append(&quot;line&quot;).classed(&quot;violinline-&quot;+h.uid,!0).attr(&quot;stroke-width&quot;,1.5),O.exit().remove(),O.attr(u),&quot;closest&quot;===s?c?[c]:m:c?(m.push(c),m):m}},{&quot;../../lib&quot;:693,&quot;../../plots/cartesian/axes&quot;:742,&quot;../box/hover&quot;:861,&quot;./helpers&quot;:1137}],1139:[function(t,e,r){&quot;use strict&quot;;e.exports={attributes:t(&quot;./attributes&quot;),layoutAttributes:t(&quot;./layout_attributes&quot;),supplyDefaults:t(&quot;./defaults&quot;),supplyLayoutDefaults:t(&quot;./layout_defaults&quot;),calc:t(&quot;./calc&quot;),crossTraceCalc:t(&quot;./cross_trace_calc&quot;),plot:t(&quot;./plot&quot;),style:t(&quot;./style&quot;),styleOnSelect:t(&quot;../scatter/style&quot;).styleOnSelect,hoverPoints:t(&quot;./hover&quot;),selectPoints:t(&quot;../box/select&quot;),moduleType:&quot;trace&quot;,name:&quot;violin&quot;,basePlotModule:t(&quot;../../plots/cartesian&quot;),categories:[&quot;cartesian&quot;,&quot;svg&quot;,&quot;symbols&quot;,&quot;oriented&quot;,&quot;box-violin&quot;,&quot;showLegend&quot;,&quot;violinLayout&quot;,&quot;zoomScale&quot;],meta:{}}},{&quot;../../plots/cartesian&quot;:753,&quot;../box/select&quot;:866,&quot;../scatter/style&quot;:1055,&quot;./attributes&quot;:1133,&quot;./calc&quot;:1134,&quot;./cross_trace_calc&quot;:1135,&quot;./defaults&quot;:1136,&quot;./hover&quot;:1138,&quot;./layout_attributes&quot;:1140,&quot;./layout_defaults&quot;:1141,&quot;./plot&quot;:1142,&quot;./style&quot;:1143}],1140:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../box/layout_attributes&quot;),i=t(&quot;../../lib&quot;).extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{&quot;../../lib&quot;:693,&quot;../box/layout_attributes&quot;:863}],1141:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../lib&quot;),i=t(&quot;./layout_attributes&quot;),a=t(&quot;../box/layout_defaults&quot;);e.exports=function(t,e,r){a._supply(t,e,r,function(r,a){return n.coerce(t,e,i,r,a)},&quot;violin&quot;)}},{&quot;../../lib&quot;:693,&quot;../box/layout_defaults&quot;:864,&quot;./layout_attributes&quot;:1140}],1142:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../lib&quot;),a=t(&quot;../../components/drawing&quot;),o=t(&quot;../box/plot&quot;),s=t(&quot;../scatter/line_points&quot;),l=t(&quot;./helpers&quot;);e.exports=function(t,e,r,c){var u=t._fullLayout,f=e.xaxis,h=e.yaxis;function p(t){var e=s(t,{xaxis:f,yaxis:h,connectGaps:!0,baseTolerance:.75,shape:&quot;spline&quot;,simplify:!0});return a.smoothopen(e[0],1)}i.makeTraceGroups(c,r,&quot;trace violins&quot;).each(function(t){var r=n.select(this),a=t[0],s=a.t,c=a.trace;e.isRangePlot||(a.node3=r);var d=u._numViolins,g=&quot;group&quot;===u.violinmode&amp;&amp;d&gt;1,m=1-u.violingap,v=s.bdPos=s.dPos*m*(1-u.violingroupgap)/(g?d:1),y=s.bPos=g?2*s.dPos*((s.num+.5)/d-.5)*m:0;if(s.wHover=s.dPos*(g?m/d:1),!0!==c.visible||s.empty)r.remove();else{var x=e[s.valLetter+&quot;axis&quot;],b=e[s.posLetter+&quot;axis&quot;],_=&quot;both&quot;===c.side,w=_||&quot;positive&quot;===c.side,k=_||&quot;negative&quot;===c.side,M=u._violinScaleGroupStats[c.scalegroup],A=r.selectAll(&quot;path.violin&quot;).data(i.identity);A.enter().append(&quot;path&quot;).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;).attr(&quot;class&quot;,&quot;violin&quot;),A.exit().remove(),A.each(function(t){var e,r,i,a,o,l,u,f,h=n.select(this),d=t.density,g=d.length,m=t.pos+y,A=b.c2p(m);switch(c.scalemode){case&quot;width&quot;:e=M.maxWidth/v;break;case&quot;count&quot;:e=M.maxWidth/v*(M.maxCount/t.pts.length)}if(w){for(u=new Array(g),o=0;o&lt;g;o++)(f=u[o]={})[s.posLetter]=m+d[o].v/e,f[s.valLetter]=d[o].t;r=p(u)}if(k){for(u=new Array(g),l=0,o=g-1;l&lt;g;l++,o--)(f=u[l]={})[s.posLetter]=m-d[o].v/e,f[s.valLetter]=d[o].t;i=p(u)}if(_)a=r+&quot;L&quot;+i.substr(1)+&quot;Z&quot;;else{var T=[A,x.c2p(d[0].t)],S=[A,x.c2p(d[g-1].t)];&quot;h&quot;===c.orientation&amp;&amp;(T.reverse(),S.reverse()),a=w?&quot;M&quot;+T+&quot;L&quot;+r.substr(1)+&quot;L&quot;+S:&quot;M&quot;+S+&quot;L&quot;+i.substr(1)+&quot;L&quot;+T}h.attr(&quot;d&quot;,a),t.posCenterPx=A,t.posDensityScale=e*v,t.path=h.node(),t.pathLength=t.path.getTotalLength()/(_?2:1)});var T,S,E,C=c.box,L=C.width,z=(C.line||{}).width;_?(T=v*L,S=0):w?(T=[0,v*L/2],S=-z):(T=[v*L/2,0],S=z),o.plotBoxAndWhiskers(r,{pos:b,val:x},c,{bPos:y,bdPos:T,bPosPxOffset:S}),o.plotBoxMean(r,{pos:b,val:x},c,{bPos:y,bdPos:T,bPosPxOffset:S}),!c.box.visible&amp;&amp;c.meanline.visible&amp;&amp;(E=i.identity);var P=r.selectAll(&quot;path.meanline&quot;).data(E||[]);P.enter().append(&quot;path&quot;).attr(&quot;class&quot;,&quot;meanline&quot;).style(&quot;fill&quot;,&quot;none&quot;).style(&quot;vector-effect&quot;,&quot;non-scaling-stroke&quot;),P.exit().remove(),P.each(function(t){var e=x.c2p(t.mean,!0),r=l.getPositionOnKdePath(t,c,e);n.select(this).attr(&quot;d&quot;,&quot;h&quot;===c.orientation?&quot;M&quot;+e+&quot;,&quot;+r[0]+&quot;V&quot;+r[1]:&quot;M&quot;+r[0]+&quot;,&quot;+e+&quot;H&quot;+r[1])}),o.plotPoints(r,{x:f,y:h},c,s)}})}},{&quot;../../components/drawing&quot;:592,&quot;../../lib&quot;:693,&quot;../box/plot&quot;:865,&quot;../scatter/line_points&quot;:1046,&quot;./helpers&quot;:1137,d3:147}],1143:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;d3&quot;),i=t(&quot;../../components/color&quot;),a=t(&quot;../scatter/style&quot;).stylePoints;e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(&quot;g.trace.violins&quot;);r.style(&quot;opacity&quot;,function(t){return t[0].trace.opacity}),r.each(function(e){var r=e[0].trace,o=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;o.selectAll(&quot;path.violin&quot;).style(&quot;stroke-width&quot;,r.line.width+&quot;px&quot;).call(i.stroke,r.line.color).call(i.fill,r.fillcolor),o.selectAll(&quot;path.box&quot;).style(&quot;stroke-width&quot;,l.width+&quot;px&quot;).call(i.stroke,l.color).call(i.fill,s.fillcolor);var f={&quot;stroke-width&quot;:u+&quot;px&quot;,&quot;stroke-dasharray&quot;:2*u+&quot;px,&quot;+u+&quot;px&quot;};o.selectAll(&quot;path.mean&quot;).style(f).call(i.stroke,c.color),o.selectAll(&quot;path.meanline&quot;).style(f).call(i.stroke,c.color),a(o,r,t)})}},{&quot;../../components/color&quot;:567,&quot;../scatter/style&quot;:1055,d3:147}],1144:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../plots/cartesian/axes&quot;),i=t(&quot;../lib&quot;),a=t(&quot;../plot_api/plot_schema&quot;),o=t(&quot;./helpers&quot;).pointsAccessorFunction,s=t(&quot;../constants/numerical&quot;).BADNUM;r.moduleType=&quot;transform&quot;,r.name=&quot;aggregate&quot;;var l=r.attributes={enabled:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},groups:{valType:&quot;string&quot;,strict:!0,noBlank:!0,arrayOk:!0,dflt:&quot;x&quot;,editType:&quot;calc&quot;},aggregations:{_isLinkedToArray:&quot;aggregation&quot;,target:{valType:&quot;string&quot;,editType:&quot;calc&quot;},func:{valType:&quot;enumerated&quot;,values:[&quot;count&quot;,&quot;sum&quot;,&quot;avg&quot;,&quot;median&quot;,&quot;mode&quot;,&quot;rms&quot;,&quot;stddev&quot;,&quot;min&quot;,&quot;max&quot;,&quot;first&quot;,&quot;last&quot;,&quot;change&quot;,&quot;range&quot;],dflt:&quot;first&quot;,editType:&quot;calc&quot;},funcmode:{valType:&quot;enumerated&quot;,values:[&quot;sample&quot;,&quot;population&quot;],dflt:&quot;sample&quot;,editType:&quot;calc&quot;},enabled:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},editType:&quot;calc&quot;},editType:&quot;calc&quot;},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,i=e.c2d;switch(r){case&quot;count&quot;:return f;case&quot;first&quot;:return h;case&quot;last&quot;:return p;case&quot;sum&quot;:return function(t,e){for(var r=0,a=0;a&lt;e.length;a++){var o=n(t[e[a]]);o!==s&amp;&amp;(r+=o)}return i(r)};case&quot;avg&quot;:return function(t,e){for(var r=0,a=0,o=0;o&lt;e.length;o++){var l=n(t[e[o]]);l!==s&amp;&amp;(r+=l,a++)}return a?i(r/a):s};case&quot;min&quot;:return function(t,e){for(var r=1/0,a=0;a&lt;e.length;a++){var o=n(t[e[a]]);o!==s&amp;&amp;(r=Math.min(r,o))}return r===1/0?s:i(r)};case&quot;max&quot;:return function(t,e){for(var r=-1/0,a=0;a&lt;e.length;a++){var o=n(t[e[a]]);o!==s&amp;&amp;(r=Math.max(r,o))}return r===-1/0?s:i(r)};case&quot;range&quot;:return function(t,e){for(var r=1/0,a=-1/0,o=0;o&lt;e.length;o++){var l=n(t[e[o]]);l!==s&amp;&amp;(r=Math.min(r,l),a=Math.max(a,l))}return a===-1/0||r===1/0?s:i(a-r)};case&quot;change&quot;:return function(t,e){var r=n(t[e[0]]),a=n(t[e[e.length-1]]);return r===s||a===s?s:i(a-r)};case&quot;median&quot;:return function(t,e){for(var r=[],a=0;a&lt;e.length;a++){var o=n(t[e[a]]);o!==s&amp;&amp;r.push(o)}if(!r.length)return s;r.sort();var l=(r.length-1)/2;return i((r[Math.floor(l)]+r[Math.ceil(l)])/2)};case&quot;mode&quot;:return function(t,e){for(var r={},a=0,o=s,l=0;l&lt;e.length;l++){var c=n(t[e[l]]);if(c!==s){var u=r[c]=(r[c]||0)+1;u&gt;a&amp;&amp;(a=u,o=c)}}return a?i(o):s};case&quot;rms&quot;:return function(t,e){for(var r=0,a=0,o=0;o&lt;e.length;o++){var l=n(t[e[o]]);l!==s&amp;&amp;(r+=l*l,a++)}return a?i(Math.sqrt(r/a)):s};case&quot;stddev&quot;:return function(e,r){var i,a=0,o=0,l=1,c=s;for(i=0;i&lt;r.length&amp;&amp;c===s;i++)c=n(e[r[i]]);if(c===s)return s;for(;i&lt;r.length;i++){var u=n(e[r[i]]);if(u!==s){var f=u-c;a+=f,o+=f*f,l++}}var h=&quot;sample&quot;===t.funcmode?l-1:l;return h?Math.sqrt((o-a*a/l)/h):0}}}(a,n.getDataConversions(t,e,o,c)),d=new Array(r.length),g=0;g&lt;r.length;g++)d[g]=u(c,r[g]);l.set(d),&quot;count&quot;===a.func&amp;&amp;i.pushUnique(e._arrayAttrs,o)}}function f(t,e){return e.length}function h(t,e){return t[e[0]]}function p(t,e){return t[e[e.length-1]]}r.supplyDefaults=function(t,e){var r,n={};function o(e,r){return i.coerce(t,n,l,e,r)}if(!o(&quot;enabled&quot;))return n;var s=a.findArrayAttributes(e),u={};for(r=0;r&lt;s.length;r++)u[s[r]]=1;var f=o(&quot;groups&quot;);if(!Array.isArray(f)){if(!u[f])return void(n.enabled=!1);u[f]=0}var h,p=t.aggregations||[],d=n.aggregations=new Array(p.length);function g(t,e){return i.coerce(p[r],h,c,t,e)}for(r=0;r&lt;p.length;r++){h={_index:r};var m=g(&quot;target&quot;),v=g(&quot;func&quot;);g(&quot;enabled&quot;)&amp;&amp;m&amp;&amp;(u[m]||&quot;count&quot;===v&amp;&amp;void 0===u[m])?(&quot;stddev&quot;===v&amp;&amp;g(&quot;funcmode&quot;),u[m]=0,d[r]=h):d[r]={enabled:!1,_index:r}}for(r=0;r&lt;s.length;r++)u[s[r]]&amp;&amp;d.push({target:s[r],func:c.func.dflt,enabled:!0,_index:-1});return n},r.calcTransform=function(t,e,r){if(r.enabled){var n=r.groups,a=i.getTargetArray(e,{target:n});if(a){var s,l,c,f,h={},p={},d=[],g=o(e.transforms,r),m=a.length;for(e._length&amp;&amp;(m=Math.min(m,e._length)),s=0;s&lt;m;s++)void 0===(c=h[l=a[s]])?(h[l]=d.length,f=[s],d.push(f),p[h[l]]=g(s)):(d[c].push(s),p[h[l]]=(p[h[l]]||[]).concat(g(s)));r._indexToPoints=p;var v=r.aggregations;for(s=0;s&lt;v.length;s++)u(t,e,d,v[s]);&quot;string&quot;==typeof n&amp;&amp;u(t,e,d,{target:n,func:&quot;first&quot;,enabled:!0}),e._length=d.length}}}},{&quot;../constants/numerical&quot;:670,&quot;../lib&quot;:693,&quot;../plot_api/plot_schema&quot;:731,&quot;../plots/cartesian/axes&quot;:742,&quot;./helpers&quot;:1147}],1145:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../registry&quot;),a=t(&quot;../plots/cartesian/axes&quot;),o=t(&quot;./helpers&quot;).pointsAccessorFunction,s=t(&quot;../constants/filter_ops&quot;),l=s.COMPARISON_OPS,c=s.INTERVAL_OPS,u=s.SET_OPS;r.moduleType=&quot;transform&quot;,r.name=&quot;filter&quot;,r.attributes={enabled:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},target:{valType:&quot;string&quot;,strict:!0,noBlank:!0,arrayOk:!0,dflt:&quot;x&quot;,editType:&quot;calc&quot;},operation:{valType:&quot;enumerated&quot;,values:[].concat(l).concat(c).concat(u),dflt:&quot;=&quot;,editType:&quot;calc&quot;},value:{valType:&quot;any&quot;,dflt:0,editType:&quot;calc&quot;},preservegaps:{valType:&quot;boolean&quot;,dflt:!1,editType:&quot;calc&quot;},editType:&quot;calc&quot;},r.supplyDefaults=function(t){var e={};function a(i,a){return n.coerce(t,e,r.attributes,i,a)}if(a(&quot;enabled&quot;)){a(&quot;preservegaps&quot;),a(&quot;operation&quot;),a(&quot;value&quot;),a(&quot;target&quot;);var o=i.getComponentMethod(&quot;calendars&quot;,&quot;handleDefaults&quot;);o(t,e,&quot;valuecalendar&quot;,null),o(t,e,&quot;targetcalendar&quot;,null)}return e},r.calcTransform=function(t,e,r){if(r.enabled){var i=n.getTargetArray(e,r);if(i){var s=r.target,f=i.length;e._length&amp;&amp;(f=Math.min(f,e._length));var h=r.targetcalendar,p=e._arrayAttrs,d=r.preservegaps;if(&quot;string&quot;==typeof s){var g=n.nestedProperty(e,s+&quot;calendar&quot;).get();g&amp;&amp;(h=g)}var m,v,y=function(t,e,r){var n=t.operation,i=t.value,a=Array.isArray(i);function o(t){return-1!==t.indexOf(n)}var s,f=function(r){return e(r,0,t.valuecalendar)},h=function(t){return e(t,0,r)};o(l)?s=f(a?i[0]:i):o(c)?s=a?[f(i[0]),f(i[1])]:[f(i),f(i)]:o(u)&amp;&amp;(s=a?i.map(f):[f(i)]);switch(n){case&quot;=&quot;:return function(t){return h(t)===s};case&quot;!=&quot;:return function(t){return h(t)!==s};case&quot;&lt;&quot;:return function(t){return h(t)&lt;s};case&quot;&lt;=&quot;:return function(t){return h(t)&lt;=s};case&quot;&gt;&quot;:return function(t){return h(t)&gt;s};case&quot;&gt;=&quot;:return function(t){return h(t)&gt;=s};case&quot;[]&quot;:return function(t){var e=h(t);return e&gt;=s[0]&amp;&amp;e&lt;=s[1]};case&quot;()&quot;:return function(t){var e=h(t);return e&gt;s[0]&amp;&amp;e&lt;s[1]};case&quot;[)&quot;:return function(t){var e=h(t);return e&gt;=s[0]&amp;&amp;e&lt;s[1]};case&quot;(]&quot;:return function(t){var e=h(t);return e&gt;s[0]&amp;&amp;e&lt;=s[1]};case&quot;][&quot;:return function(t){var e=h(t);return e&lt;=s[0]||e&gt;=s[1]};case&quot;)(&quot;:return function(t){var e=h(t);return e&lt;s[0]||e&gt;s[1]};case&quot;](&quot;:return function(t){var e=h(t);return e&lt;=s[0]||e&gt;s[1]};case&quot;)[&quot;:return function(t){var e=h(t);return e&lt;s[0]||e&gt;=s[1]};case&quot;{}&quot;:return function(t){return-1!==s.indexOf(h(t))};case&quot;}{&quot;:return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),M(m);for(var w=o(e.transforms,r),k=0;k&lt;f;k++){y(i[k])?(M(v,k),b[_++]=w(k)):d&amp;&amp;_++}r._indexToPoints=b,e._length=_}}function M(t,r){for(var i=0;i&lt;p.length;i++){t(n.nestedProperty(e,p[i]),r)}}}},{&quot;../constants/filter_ops&quot;:666,&quot;../lib&quot;:693,&quot;../plots/cartesian/axes&quot;:742,&quot;../registry&quot;:825,&quot;./helpers&quot;:1147}],1146:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../plot_api/plot_schema&quot;),a=t(&quot;../plots/plots&quot;),o=t(&quot;./helpers&quot;).pointsAccessorFunction;function s(t,e){var r,s,c,u,f,h,p,d,g,m,v=e.transform,y=e.transformIndex,x=t.transforms[y].groups,b=o(t.transforms,v);if(!Array.isArray(x)||0===x.length)return[t];var _=n.filterUnique(x),w=new Array(_.length),k=x.length,M=i.findArrayAttributes(t),A=v.styles||[],T={};for(r=0;r&lt;A.length;r++)T[A[r].target]=A[r].value;v.styles&amp;&amp;(m=n.keyedContainer(v,&quot;styles&quot;,&quot;target&quot;,&quot;value.name&quot;));var S={},E={};for(r=0;r&lt;_.length;r++){S[h=_[r]]=r,E[h]=0,(p=w[r]=n.extendDeepNoArrays({},t))._group=h,p.updateStyle=l(h,y),p.transforms[y]._indexToPoints={};var C=null;for(m&amp;&amp;(C=m.get(h)),p.name=C||&quot;&quot;===C?C:n.templateString(v.nameformat,{trace:t.name,group:h}),d=p.transforms,p.transforms=[],s=0;s&lt;d.length;s++)p.transforms[s]=n.extendDeepNoArrays({},d[s]);for(s=0;s&lt;M.length;s++)n.nestedProperty(p,M[s]).set([])}for(c=0;c&lt;M.length;c++){for(u=M[c],s=0,g=[];s&lt;_.length;s++)g[s]=n.nestedProperty(w[s],u).get();for(f=n.nestedProperty(t,u).get(),s=0;s&lt;k;s++)g[S[x[s]]].push(f[s])}for(s=0;s&lt;k;s++){(p=w[S[x[s]]]).transforms[y]._indexToPoints[E[x[s]]]=b(s),E[x[s]]++}for(r=0;r&lt;_.length;r++)h=_[r],p=w[r],a.clearExpandedTraceDefaultColors(p),p=n.extendDeepNoArrays(p,T[h]||{});return w}function l(t,e){return function(r,i,a){n.keyedContainer(r,&quot;transforms[&quot;+e+&quot;].styles&quot;,&quot;target&quot;,&quot;value.&quot;+i).set(String(t),a)}}r.moduleType=&quot;transform&quot;,r.name=&quot;groupby&quot;,r.attributes={enabled:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},groups:{valType:&quot;data_array&quot;,dflt:[],editType:&quot;calc&quot;},nameformat:{valType:&quot;string&quot;,editType:&quot;calc&quot;},styles:{_isLinkedToArray:&quot;style&quot;,target:{valType:&quot;string&quot;,editType:&quot;calc&quot;},value:{valType:&quot;any&quot;,dflt:{},editType:&quot;calc&quot;,_compareAsJSON:!0},editType:&quot;calc&quot;},editType:&quot;calc&quot;},r.supplyDefaults=function(t,e,i){var a,o={};function s(e,i){return n.coerce(t,o,r.attributes,e,i)}if(!s(&quot;enabled&quot;))return o;s(&quot;groups&quot;),s(&quot;nameformat&quot;,i._dataLength&gt;1?&quot;%{group} (%{trace})&quot;:&quot;%{group}&quot;);var l=t.styles,c=o.styles=[];if(l)for(a=0;a&lt;l.length;a++){var u=c[a]={};n.coerce(l[a],c[a],r.attributes.styles,&quot;target&quot;);var f=n.coerce(l[a],c[a],r.attributes.styles,&quot;value&quot;);n.isPlainObject(f)?u.value=n.extendDeep({},f):f&amp;&amp;delete u.value}return o},r.transform=function(t,e){var r,n,i,a=[];for(n=0;n&lt;t.length;n++)for(r=s(t[n],e),i=0;i&lt;r.length;i++)a.push(r[i]);return a}},{&quot;../lib&quot;:693,&quot;../plot_api/plot_schema&quot;:731,&quot;../plots/plots&quot;:805,&quot;./helpers&quot;:1147}],1147:[function(t,e,r){&quot;use strict&quot;;r.pointsAccessorFunction=function(t,e){for(var r,n,i=0;i&lt;t.length&amp;&amp;(r=t[i])!==e;i++)r._indexToPoints&amp;&amp;!1!==r.enabled&amp;&amp;(n=r._indexToPoints);return n?function(t){return n[t]}:function(t){return[t]}}},{}],1148:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../lib&quot;),i=t(&quot;../plots/cartesian/axes&quot;),a=t(&quot;./helpers&quot;).pointsAccessorFunction;r.moduleType=&quot;transform&quot;,r.name=&quot;sort&quot;,r.attributes={enabled:{valType:&quot;boolean&quot;,dflt:!0,editType:&quot;calc&quot;},target:{valType:&quot;string&quot;,strict:!0,noBlank:!0,arrayOk:!0,dflt:&quot;x&quot;,editType:&quot;calc&quot;},order:{valType:&quot;enumerated&quot;,values:[&quot;ascending&quot;,&quot;descending&quot;],dflt:&quot;ascending&quot;,editType:&quot;calc&quot;},editType:&quot;calc&quot;},r.supplyDefaults=function(t){var e={};function i(i,a){return n.coerce(t,e,r.attributes,i,a)}return i(&quot;enabled&quot;)&amp;&amp;(i(&quot;target&quot;),i(&quot;order&quot;)),e},r.calcTransform=function(t,e,r){if(r.enabled){var o=n.getTargetArray(e,r);if(o){var s=r.target,l=o.length;e._length&amp;&amp;(l=Math.min(l,e._length));var c,u,f=e._arrayAttrs,h=function(t,e,r,n){var i,a=new Array(n),o=new Array(n);for(i=0;i&lt;n;i++)a[i]={v:e[i],i:i};for(a.sort(function(t,e){switch(t.order){case&quot;ascending&quot;:return function(t,r){return e(t.v)-e(r.v)};case&quot;descending&quot;:return function(t,r){return e(r.v)-e(t.v)}}}(t,r)),i=0;i&lt;n;i++)o[i]=a[i].i;return o}(r,o,i.getDataToCoordFunc(t,e,s,o),l),p=a(e.transforms,r),d={};for(c=0;c&lt;f.length;c++){var g=n.nestedProperty(e,f[c]),m=g.get(),v=new Array(l);for(u=0;u&lt;l;u++)v[u]=m[h[u]];g.set(v)}for(u=0;u&lt;l;u++)d[u]=p(h[u]);r._indexToPoints=d,e._length=l}}}},{&quot;../lib&quot;:693,&quot;../plots/cartesian/axes&quot;:742,&quot;./helpers&quot;:1147}]},{},[22])(22)});&lt;/script&gt;&lt;div id=&quot;f0d7d25d-2491-4558-93f9-62bc9a7c759a&quot; style=&quot;height: 100%; width: 100%;&quot; class=&quot;plotly-graph-div&quot;&gt;&lt;/div&gt;&lt;script type=&quot;text/javascript&quot;&gt;window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=&quot;https://plot.ly&quot;;Plotly.newPlot(&quot;f0d7d25d-2491-4558-93f9-62bc9a7c759a&quot;, [{&quot;name&quot;: &quot;\u51e1\u4f8b 00&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [0.4200516284423055, 0.33870820519417233, 0.14492226056465718, 0.22043680894567264, 0.19196905218250426, 0.714397971432995, 0.7226825826307258, 0.2101622408243049, 0.9038447480191504, 0.02970097936490257, 0.38230507225078214, 0.2047730491616746, 0.5642585431675338, 0.9150966913518375, 0.054534436701193734, 0.4997035140526517, 0.6324254346564651, 0.5654048047412843, 0.1252754884728664, 0.6706480467019416, 0.8420012249799941, 0.38829638905813746, 0.9009453544545654, 0.7592005057821263, 0.8453344475922001, 0.04564255004180395, 0.49621097816442283, 0.7875159786881374, 0.777887732165549, 0.33021779894931913, 0.7583644825644149, 0.11321062234716028, 0.5318044005612159, 0.8300377543311327, 0.5928154894131916, 0.9790346068254504, 0.08446988935320243, 0.46635027610475177, 0.18666332387008777, 0.8805886751522894, 0.6497208912319963, 0.729481030821216, 0.019779379538263475, 0.4241197308486847, 0.03657443899321011, 0.3967223066992117, 0.18000317876545002, 0.5227185890892992, 0.08397205907653593, 0.7839614613063296, 0.15952884919985344, 0.6931859137836051, 0.273428779230264, 0.7542462537126798, 0.006720431146481021, 0.051288982026220675, 0.5110999776766102, 0.09962869133920749, 0.9249811423223656, 0.925702419545079, 0.6732871784150929, 0.28990524981709587, 0.9785297309430504, 0.8991526319678234, 0.9538745923868153, 0.6816788352585547, 0.8070249112154264, 0.120299223033562, 0.020854091533640706, 0.19710166455167355, 0.5473522000616349, 0.36239141202813496, 0.4806937559447835, 0.9204610905045157, 0.6890695444643063, 0.24711058191750102, 0.3985374066340557, 0.5315978687491103, 0.42826010427901406, 0.34859809082370796, 0.7159873242219059, 0.08930466280982519, 0.8197835499324349, 0.39750383162461067, 0.2651786010056526, 0.7263695698171707, 0.835442197588364, 0.09526479251340303, 0.36556221410085155, 0.44691074667784625, 0.04669566640254563, 0.3842462404866076, 0.670458318679557, 0.8818916863170643, 0.9930428791772336, 0.6528908546837963, 0.722616614020798, 0.7711840299426567, 0.39049074077211265, 0.9921434814392971], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;466718ee-cf69-11e8-8a95-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 01&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [1.647689507520615, 1.3123554940072113, 1.8643668476599757, 1.086174333389501, 1.275093225057329, 1.0504552088640196, 1.9928217781276305, 1.9009090039455236, 1.4374885618918807, 1.8004175712839956, 1.0464958977033707, 1.3982134551101435, 1.974301020896914, 1.4637480099589502, 1.9193018563491395, 1.3068358198999999, 1.5773214383432246, 1.2627568425016888, 1.7609268278961312, 1.6770732473223071, 1.8255326222782176, 1.6092949637192182, 1.5009532111540573, 1.3920581257362876, 1.1575415981949655, 1.1099126362913272, 1.729638924834168, 1.6069466696137826, 1.5924878135430682, 1.9473323207333935, 1.541088638931655, 1.265426535188906, 1.5451136780578116, 1.5060555331620997, 1.885776075073881, 1.7644245435920598, 1.8405791955765287, 1.4638206611324263, 1.3819697385597838, 1.8104127057434658, 1.275882975548226, 1.4602308925329022, 1.787095603538233, 1.0316604829663354, 1.0412343672732884, 1.26665090398993, 1.5642688321408027, 1.8628201385869345, 1.3125338315884605, 1.43517269208971, 1.694630379248674, 1.116252873482963, 1.1061536346289853, 1.7296096422308502, 1.2690477232764028, 1.2820225349030898, 1.581282220576558, 1.1000575129202195, 1.5586721469668081, 1.4729004725843868, 1.5409690804167844, 1.283069335212438, 1.3445631152979765, 1.0223589708888832, 1.6457803399407105, 1.528972282045408, 1.6132461679254257, 1.6103656825859876, 1.4073086303556055, 1.4858851498159193, 1.9165137605239841, 1.8288021792567515, 1.2406744032568704, 1.6771547212833973, 1.7919651825997653, 1.180043395852191, 1.2961360322782882, 1.25481850469177, 1.0022436668212897, 1.7754075695367209, 1.8336425446690905, 1.000639780768212, 1.779804957428127, 1.912943382423418, 1.6199329776945603, 1.1021691733303622, 1.4109086064010805, 1.7556944417031448, 1.227984932890553, 1.7285881109202008, 1.2080341546531568, 1.0905897846451182, 1.7192042908883944, 1.0416961346078901, 1.1927162412007277, 1.4979341969325886, 1.5909256363190383, 1.7145784806137105, 1.4379519562499752, 1.9343730875423089], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671a7e-cf69-11e8-830a-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 02&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [2.2271468982806164, 2.659939987579805, 2.508839285188425, 2.662150065512753, 2.7777507522808746, 2.4596021770830063, 2.734151309510044, 2.7661967052262066, 2.5544068984785957, 2.896544719769528, 2.981310896137897, 2.226645897299163, 2.003014057681872, 2.6508013540229136, 2.9947506943849573, 2.7216319417021024, 2.981451990263083, 2.081328517693761, 2.014002263337934, 2.3589163426918356, 2.32526532889305, 2.302552967805158, 2.4399273623295086, 2.7947892937720167, 2.4954218452984978, 2.850637414980522, 2.4303594418677648, 2.9293993959068088, 2.052914481691768, 2.638873110414849, 2.548204688025243, 2.4957347353191355, 2.0863167637901356, 2.1179171405198898, 2.0415293458349724, 2.0321132547021086, 2.6183961579907313, 2.511466031916953, 2.769688175142994, 2.776231903693017, 2.4262067402147025, 2.0859602891820948, 2.1662536413010587, 2.5355000796183367, 2.403036007125915, 2.7584281465853895, 2.155244820841432, 2.0542171744693114, 2.215223452970392, 2.664170086593198, 2.8864407535679173, 2.3208275142805386, 2.49399203230361, 2.7436357365409356, 2.3977575141322327, 2.1910026120420425, 2.0526600714364185, 2.2176967073747607, 2.6417083006228066, 2.0884471030020784, 2.3649516633445256, 2.7266421762226485, 2.7591989749862207, 2.8547990202950233, 2.6922633841594723, 2.789475109096646, 2.8256272422915445, 2.30717451495361, 2.8042079830177116, 2.9130675907441654, 2.5466554132043187, 2.90066852120866, 2.2897582005187957, 2.7437197502059716, 2.007870169024005, 2.8599771658341857, 2.7780859288415725, 2.940170511340436, 2.133349177478757, 2.050760778958831, 2.5248771321650083, 2.1150200691459995, 2.9702167501434635, 2.4721629382244905, 2.0550641611424436, 2.3804689605568323, 2.1182446202871006, 2.964959306703952, 2.1125392639513687, 2.832662212991784, 2.4292463473275103, 2.5499786296961537, 2.2431977224403896, 2.0304224817537944, 2.405038469788766, 2.5380532869596912, 2.09404502864245, 2.39576949001379, 2.954641472339389, 2.396112487238154], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671b34-cf69-11e8-bdae-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 03&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [3.612264739183888, 3.323260483664721, 3.0634070569693788, 3.566279618240232, 3.571924514825576, 3.68127343561404, 3.8644425716591453, 3.592479604237998, 3.416853374076921, 3.7856155541202496, 3.642651513821055, 3.812183372455494, 3.472287907272467, 3.0580944440104005, 3.5782057839560504, 3.686928097026092, 3.723487456662833, 3.0390634921748294, 3.730179226361792, 3.3882559823118745, 3.2827220628292384, 3.566776774470666, 3.8446859271022276, 3.7307458857760576, 3.5139834252143705, 3.232745128837592, 3.0488039779310796, 3.0548631247947524, 3.829474913008995, 3.740406876913895, 3.6095183495526353, 3.8608780350747933, 3.1680941242631544, 3.0148057671177666, 3.373296986108329, 3.01657377009234, 3.0300346297589105, 3.295708267490192, 3.030273232587387, 3.9962151803445627, 3.872177934497537, 3.997514274649373, 3.5945965288390997, 3.7493106536300562, 3.8048407069053862, 3.797580744165142, 3.4542458270312393, 3.9596127341930667, 3.27881218296145, 3.0616517835061363, 3.371907090834341, 3.6043373137857433, 3.676084984483933, 3.17233921932046, 3.4998809598918648, 3.4056519885200034, 3.5029575159356576, 3.918003946846563, 3.5178003067121995, 3.9709754041560363, 3.02034449042538, 3.743166047589753, 3.015956311100817, 3.681158255127653, 3.2376331897592117, 3.1347728750956385, 3.891809085007578, 3.3948670168169, 3.4001933961836976, 3.1245601647162506, 3.7985485233794765, 3.4744506572343337, 3.6870311315258286, 3.226505241861701, 3.260803473026428, 3.3608783416657415, 3.4887730938135846, 3.2595935962613583, 3.2631239965903047, 3.641652245581349, 3.303623131335117, 3.7369232024997716, 3.165485470725601, 3.1169996747439885, 3.8467945384197173, 3.093429116069729, 3.217876546511656, 3.88574802500252, 3.1931209027987064, 3.009417968319539, 3.4214487581485016, 3.8383889829703284, 3.290221718023057, 3.1801959304533876, 3.4065008588387986, 3.4425576406205654, 3.7405145951678795, 3.472305962135562, 3.8326635318106717, 3.8890841585094567], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671bc8-cf69-11e8-8abf-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 04&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [4.188040727739595, 4.938360612493748, 4.248859984875178, 4.619784907389702, 4.081087845960972, 4.655508653073586, 4.197398594235402, 4.323935166862661, 4.592269634195851, 4.441705447567497, 4.060875169880122, 4.5085417288213065, 4.1119620789951306, 4.198374111998559, 4.11585594729047, 4.4973788310184775, 4.018941049837073, 4.039308350362542, 4.719288606975244, 4.685382113334624, 4.636620986808928, 4.301787894963268, 4.9576604623204625, 4.524801222322364, 4.277200371774195, 4.891198969606666, 4.844042302558667, 4.2436898181492975, 4.993783386157288, 4.590287272399315, 4.826182651226393, 4.992515150760452, 4.056390700064581, 4.186121550518203, 4.440078898893103, 4.728886997245385, 4.0497341537804905, 4.2987515875504485, 4.535825428005659, 4.437218558837394, 4.302469934207952, 4.171802447963159, 4.465130377667407, 4.270087024529017, 4.2045898443216085, 4.2020276526655165, 4.855846538660488, 4.5769874219341915, 4.064379573039401, 4.439555709433316, 4.741528262470185, 4.052213857374635, 4.834480474369352, 4.475996172487771, 4.52137203719208, 4.536054008418753, 4.723377770630612, 4.427497180375417, 4.196466507698155, 4.5801315370594, 4.372184680868615, 4.339494495563285, 4.2096460667652424, 4.141247580612254, 4.990224081374759, 4.39985750296374, 4.8589982883871725, 4.255055463054599, 4.260924757303961, 4.86989064277903, 4.4549982532066466, 4.663165835991024, 4.695994190271571, 4.492836832906888, 4.430403391423999, 4.216734452102743, 4.76531962879692, 4.258097956425056, 4.856613733418531, 4.072829244806737, 4.451602828107851, 4.46153524752934, 4.725318205380958, 4.56430486516293, 4.408579114746727, 4.7048346994818715, 4.290243166046134, 4.455127292028588, 4.659003732910746, 4.263369302758582, 4.6151710790585865, 4.1493625677698915, 4.451149521004735, 4.952652206937026, 4.2654659993369854, 4.153191163461047, 4.656500007105894, 4.83079135052694, 4.1233943381354825, 4.2319505450901005], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671c5e-cf69-11e8-9b84-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 05&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [5.7884569480603485, 5.775311536011305, 5.384288140708579, 5.768674767639296, 5.495649822766417, 5.16419959540689, 5.265734933720544, 5.95940979956378, 5.29301968562504, 5.08308924665772, 5.420293797528708, 5.2296217335069075, 5.912205796229776, 5.619085604451609, 5.308185093221254, 5.0638054547866185, 5.764411171600923, 5.309410100781508, 5.669498687555714, 5.195516820585427, 5.122088781973754, 5.681356198411126, 5.4746874665859515, 5.000087829030946, 5.498042584136918, 5.4201840279248055, 5.597522909376055, 5.999724349122208, 5.998730691879887, 5.018833491658532, 5.857755672794348, 5.426839619415525, 5.521330252283907, 5.7738581119084715, 5.88108503482001, 5.56505352177375, 5.770955476110029, 5.210134634269435, 5.951854156942511, 5.63076407956647, 5.532913219454721, 5.86730472179905, 5.002568200328869, 5.011336493114124, 5.27735085222579, 5.844650018574907, 5.94978861733645, 5.369921400244446, 5.7492314434061935, 5.707879643803134, 5.436943416150382, 5.913131116967604, 5.595772087684776, 5.311891526839628, 5.085518153476379, 5.736720229242884, 5.097462397380772, 5.241930942056809, 5.5778332378983455, 5.552288276545687, 5.107052478920946, 5.620083385989969, 5.32265032294917, 5.227976669189152, 5.1101136724888025, 5.304012138669798, 5.081428103565816, 5.932943425340335, 5.874341637830619, 5.933045818828614, 5.35204161550121, 5.935274406526723, 5.31931625896835, 5.281357599536978, 5.739662897147852, 5.208751163829496, 5.464171174369945, 5.456672425760378, 5.101045931181414, 5.0514123278164575, 5.598218141986755, 5.554629543777588, 5.492983544922308, 5.220206852974158, 5.193107837059948, 5.093067515774241, 5.364198937765796, 5.521579915703989, 5.032648240822163, 5.7561357471261045, 5.69667391053902, 5.3559132908875515, 5.131767926078431, 5.619137606927491, 5.459021222664357, 5.56212458079151, 5.650756045329552, 5.461620033492841, 5.141459719599599, 5.539072899841004], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671ce8-cf69-11e8-87e1-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 06&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [6.960005590051683, 6.596570979538978, 6.65391280993308, 6.977506531360692, 6.503760246965726, 6.723507344949645, 6.397457972971895, 6.656947835226077, 6.936370077567104, 6.073975398837272, 6.541815925020499, 6.153699698828566, 6.703405914983309, 6.527768379978543, 6.9993897046433124, 6.80404335964144, 6.555599340575878, 6.154691730171961, 6.105414987812216, 6.277891299537487, 6.187545518046168, 6.392056865296577, 6.057419822404104, 6.739467046566609, 6.6230709352762585, 6.484026740852521, 6.907623150927742, 6.339302149519153, 6.344073687334194, 6.511651363086252, 6.4405633375817954, 6.542978272927382, 6.317517432327419, 6.842555073053546, 6.505169941873314, 6.923975084640441, 6.447012388122509, 6.163839511236804, 6.433723921548872, 6.610634346812658, 6.412417827834933, 6.959973531999064, 6.05080146343874, 6.720938893439809, 6.714785372778454, 6.3937793060541255, 6.641606950272192, 6.875327962246741, 6.391981816062172, 6.809711719395412, 6.70785486107483, 6.199535126122107, 6.229346391057534, 6.164024862248612, 6.110008026651108, 6.08917451963791, 6.689355538624843, 6.1475142769180025, 6.714205744143221, 6.0024406055592845, 6.989038599615452, 6.161770893583267, 6.9451726285932525, 6.1917218546688515, 6.819278966908036, 6.966610814466215, 6.802588091020274, 6.25626883850104, 6.00616219543116, 6.077644172908192, 6.658065064681969, 6.881026091667234, 6.187988036230076, 6.9051770588497074, 6.636936702648173, 6.449698453283661, 6.154821943987031, 6.294314683538983, 6.381411066694494, 6.310892692942019, 6.830140057024598, 6.903348154019101, 6.652789338160497, 6.025418895972876, 6.390151059509703, 6.718584218728725, 6.275804212961324, 6.706070081299312, 6.941364622679489, 6.0234772627104425, 6.286047024655515, 6.316906105565488, 6.139389164117005, 6.5591965117417805, 6.238204297298972, 6.3042148376847305, 6.309296501501031, 6.047137743355069, 6.984189580788872, 6.6357358979671135], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671d76-cf69-11e8-b451-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 07&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [7.30821963873389, 7.060352166443353, 7.366402946597614, 7.660831883692934, 7.966581739977305, 7.303740303246225, 7.809813274100316, 7.184108886456485, 7.532468450991981, 7.67444343453584, 7.2533222290283135, 7.598530028826581, 7.7376742749901855, 7.42969364139657, 7.357426785378716, 7.744257579340415, 7.850202939399664, 7.811180913093588, 7.959997517921418, 7.836989514910038, 7.832577051023806, 7.568403912106779, 7.138780259124104, 7.180224926180316, 7.781694292206801, 7.733843288033341, 7.2207360741391, 7.239644202555049, 7.982154572033793, 7.7678750304759845, 7.406328095878013, 7.490530695588279, 7.44126070593844, 7.83462615181156, 7.087986688596567, 7.730760228795045, 7.453480736726499, 7.2949342240852975, 7.350277606689745, 7.594246547008855, 7.058976911341926, 7.033361477391425, 7.561821423654565, 7.02142434910259, 7.6465729994626646, 7.945652719446508, 7.028114696418504, 7.745005931093501, 7.6375125602248914, 7.084055263714901, 7.848478306429115, 7.1757465633452435, 7.225756567531587, 7.882364784560329, 7.826615008200217, 7.296982494007098, 7.177397863642888, 7.756720771188924, 7.754194452958606, 7.737453331762801, 7.957103670027398, 7.52527143140439, 7.742584508342997, 7.51294738135057, 7.613372107012646, 7.40583041752618, 7.65170618144424, 7.914269787853719, 7.584795211807957, 7.393729213641907, 7.560926450421432, 7.686857051911353, 7.466103592961668, 7.970265876879232, 7.469201064901604, 7.646753266559057, 7.409603497541774, 7.07876361780992, 7.250323298967549, 7.203484055174487, 7.447877718096424, 7.995855721556641, 7.43794813436022, 7.155017766956075, 7.171630152049887, 7.854869808825339, 7.104571021260633, 7.612130587682066, 7.625045285846624, 7.642534267093279, 7.6171107250885655, 7.904682853921458, 7.7334882608500575, 7.286888598758981, 7.023082917164281, 7.760084847903214, 7.058691282873858, 7.0069807400768, 7.176560701718445, 7.635165451099235], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671e02-cf69-11e8-9232-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 08&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [8.873075346679508, 8.319521007171266, 8.590130085671865, 8.88085506742798, 8.099967957709962, 8.63254684231082, 8.664310496293135, 8.206017207062018, 8.337576840216421, 8.65520970875509, 8.945024304604047, 8.899802014675393, 8.5457465733199, 8.128739278250077, 8.56708394500417, 8.781909090393782, 8.14739702415639, 8.644658270815743, 8.879188259085584, 8.41916128273631, 8.867301134698913, 8.945651144133828, 8.105839284162826, 8.340057854991551, 8.689357356962228, 8.673497439834739, 8.676183487948723, 8.188010179245017, 8.462269622055942, 8.814930056204824, 8.136282163625605, 8.767412067236828, 8.0681842358348, 8.151463179708983, 8.359300325132555, 8.552183093661293, 8.804188900061005, 8.905579809638146, 8.739735247041292, 8.05951783027411, 8.095322500268628, 8.764200859855837, 8.443081592550506, 8.386947812711986, 8.80717998897977, 8.062113476296586, 8.066909662522617, 8.179342215809623, 8.913293903705483, 8.988001574149965, 8.932063283254877, 8.063405703826021, 8.181917459969437, 8.921648988064849, 8.52153284994982, 8.377960250273247, 8.13506887678184, 8.451785229176304, 8.432182425464728, 8.369118988265825, 8.597842835302423, 8.449573300636361, 8.571273382090729, 8.597792524948673, 8.078776556346071, 8.96997620052209, 8.893247843992278, 8.216762486272703, 8.749883143756566, 8.21841967381851, 8.487030417236504, 8.703267442022238, 8.96122867249428, 8.993347147549686, 8.895447314269946, 8.651403095039601, 8.074887754420686, 8.515653940779586, 8.826762866539871, 8.593479859191781, 8.951034632789675, 8.069882524753961, 8.228606423835682, 8.299322689869745, 8.331904440449783, 8.641533848598499, 8.153715517415085, 8.196248285574136, 8.830939988076086, 8.943802314713338, 8.317266109439247, 8.193174049152459, 8.818869996905322, 8.56370281325726, 8.032528906476879, 8.922032600710507, 8.895474078666252, 8.577855753929004, 8.417436572239822, 8.951529477292862], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671e86-cf69-11e8-999f-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 09&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [9.961042852024603, 9.645439951323706, 9.093774096169959, 9.00058357693786, 9.458039296630513, 9.454517220804124, 9.01412668643823, 9.339451444539508, 9.414229865165161, 9.593141564951939, 9.002298799520856, 9.438158241333054, 9.165584931309763, 9.36503782525404, 9.747864772640114, 9.779381247963869, 9.12948554408003, 9.074487038741172, 9.934911700160363, 9.628131482146541, 9.172766191051906, 9.024211573928214, 9.83504614732687, 9.201015630557736, 9.630048386935526, 9.39650691832124, 9.22429369018582, 9.29211824378283, 9.221292038135559, 9.828482231430394, 9.045017634272774, 9.695957869947783, 9.128195211930848, 9.473941307873734, 9.518992583140014, 9.493012360543537, 9.240421212889968, 9.124685400662779, 9.311036238115319, 9.000341094017223, 9.463362807925234, 9.45171540248113, 9.696422619604776, 9.674922441525938, 9.711300297550409, 9.978964921523055, 9.41457928138952, 9.774975397172843, 9.060589341588349, 9.79809899822236, 9.106994674558885, 9.726826896313984, 9.17043765444201, 9.499586677375024, 9.193854037782504, 9.21830813299398, 9.94604723446004, 9.330529203631954, 9.053706399280161, 9.584882130862228, 9.650518551867146, 9.515667656771894, 9.865263633729512, 9.933215759906348, 9.61701189497745, 9.402771400885397, 9.78795061217269, 9.62248567402687, 9.939785833965423, 9.686566782099671, 9.383973698872836, 9.770576860588815, 9.626348448218447, 9.211263518418468, 9.182002041250755, 9.698306304721982, 9.714683537291135, 9.201425655590054, 9.94800776022765, 9.530638328209516, 9.998564901200865, 9.35260937069239, 9.828202538288856, 9.513077348323629, 9.94494885872966, 9.1560123876335, 9.452325647730444, 9.542626289907712, 9.954740869720577, 9.198185726244603, 9.151972219928583, 9.61022018124474, 9.928660518958818, 9.156275369734143, 9.977449988958089, 9.866602217531327, 9.867424461301733, 9.420759028861035, 9.447868550636201, 9.39275528776773], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671f06-cf69-11e8-9a06-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 10&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [10.276845802353122, 10.819419005583018, 10.682935178285934, 10.921705270981178, 10.782880230371282, 10.387338906753556, 10.268011860983055, 10.24902272461528, 10.41539997802801, 10.416464110168517, 10.303825308166177, 10.486178391659262, 10.069417420892375, 10.012324823381338, 10.021073315756304, 10.348425171841647, 10.697462573097068, 10.966220584370312, 10.095180112095289, 10.86401656617907, 10.250878294011683, 10.524974451724622, 10.202210402312078, 10.770539898412133, 10.160174649558032, 10.55882850825085, 10.900347899892763, 10.286249464168636, 10.009635014322997, 10.482876757093122, 10.477722196311793, 10.25296291206082, 10.781879185433606, 10.186031446525142, 10.284182520674392, 10.388409955287736, 10.644538266954124, 10.654913277770783, 10.792769197414113, 10.984257421965165, 10.25025611934259, 10.498738417748093, 10.821975692728628, 10.535615867059471, 10.661985710995088, 10.407081639257772, 10.962750130987006, 10.334372656429913, 10.531674002965833, 10.416749021575969, 10.129822273095808, 10.866521611674198, 10.736386027556284, 10.405984554561407, 10.370791125574105, 10.099123537885399, 10.451840937883166, 10.637474509074192, 10.385259870478068, 10.40269224207902, 10.152933649544643, 10.14602103672444, 10.59675517753445, 10.112175298948111, 10.912381170389521, 10.531127210828828, 10.191056457062745, 10.448907451373104, 10.698612113004485, 10.469126585326785, 10.705152597145513, 10.006197115568527, 10.237751079656348, 10.653131897985173, 10.667996517491583, 10.850185549664925, 10.769742592178412, 10.709554476792672, 10.759580606613584, 10.708409830049078, 10.98498359702737, 10.171969321411426, 10.062361123729701, 10.713241080849688, 10.850926274702351, 10.217862752625345, 10.1366840458416, 10.968382692437604, 10.271178691000351, 10.048980778898004, 10.211404450638685, 10.95318530316753, 10.430967983694762, 10.169028797156722, 10.47751615701047, 10.98983309170297, 10.636650953564425, 10.014719254439193, 10.08964728081683, 10.54448530488318], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671f88-cf69-11e8-bf21-6c96cfe0d4e7&quot;}, {&quot;name&quot;: &quot;\u51e1\u4f8b 11&quot;, &quot;x&quot;: [0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35000000000000003, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41000000000000003, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47000000000000003, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.5700000000000001, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.6900000000000001, 0.7000000000000001, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.8200000000000001, 0.8300000000000001, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.9400000000000001, 0.9500000000000001, 0.96, 0.97, 0.98, 0.99], &quot;y&quot;: [11.355093690904198, 11.312247065335866, 11.461163797872256, 11.44421493278625, 11.41269751917161, 11.532743555650653, 11.045717455399604, 11.329293329793957, 11.99717682081036, 11.300372328515083, 11.725042188035701, 11.167407334091461, 11.071689244173093, 11.95893300631381, 11.310427325106705, 11.839989046827013, 11.879948940386612, 11.474348334564088, 11.133448045862755, 11.75878472709851, 11.842039853873803, 11.39749731784363, 11.63529223606002, 11.504353265239313, 11.292352209441953, 11.801919145376955, 11.695745284934404, 11.239458660483356, 11.422822349558881, 11.236352398637404, 11.124120163282635, 11.47195898083456, 11.964280998381618, 11.477035719237552, 11.400341910705974, 11.739139741797377, 11.066383620598286, 11.933293286830738, 11.035611207722319, 11.683283062600529, 11.998852033545221, 11.041575458946873, 11.624573864870278, 11.335501251026697, 11.836970140488605, 11.619728890762534, 11.413068788797178, 11.682764135840776, 11.988069366370222, 11.875049757855829, 11.826385566619727, 11.710246170588933, 11.90802175823979, 11.233615338850457, 11.839526871607443, 11.783714527382552, 11.899849807425383, 11.83030863628381, 11.915357318183496, 11.258746940582965, 11.489893882585383, 11.600400230477904, 11.61288912540886, 11.173342050057332, 11.663210914529708, 11.790628649500803, 11.577561221191829, 11.932175913960062, 11.568512039129711, 11.058249865135748, 11.006668758090228, 11.18045888160028, 11.212247925088981, 11.849075369807908, 11.782369624919312, 11.887483066593822, 11.867626090791726, 11.95485015155717, 11.970728549375035, 11.291118875601207, 11.146121264826565, 11.253452610027287, 11.744114258325316, 11.217535688941293, 11.393382739220664, 11.116064673698299, 11.55937517237045, 11.746344033144652, 11.222455368535966, 11.770408452889358, 11.097515475325464, 11.067520051012599, 11.943399900934796, 11.56745789220922, 11.774816843844604, 11.86727041500019, 11.158332056868309, 11.864899329496096, 11.073036543357693, 11.44339148293561], &quot;type&quot;: &quot;scatter&quot;, &quot;uid&quot;: &quot;46671ff6-cf69-11e8-bcb4-6c96cfe0d4e7&quot;}], {}, {&quot;showLink&quot;: true, &quot;linkText&quot;: &quot;Export to plot.ly&quot;})&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;window.addEventListener(&quot;resize&quot;, function(){Plotly.Plots.resize(document.getElementById(&quot;f0d7d25d-2491-4558-93f9-62bc9a7c759a&quot;));});&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;

&lt;p&gt;11種類以上の判例になると，色が衝突しているのがわかる．&lt;/p&gt;

&lt;h2 id=&quot;plotlyでseabornライクにプロット&quot;&gt;PlotlyでSeabornライクにプロット&lt;/h2&gt;

&lt;p&gt;まずは&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hls&lt;/code&gt;でプロットしてみる．&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/haltaro/a575ab32ad879afc6153b3770e8e997f.js&quot;&gt;&lt;/script&gt;

&lt;html&gt;&lt;head&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;/head&gt;&lt;body&gt;&lt;script type=&quot;text/javascript&quot;&gt;/**
* plotly.js v1.41.3
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(t){if(&quot;object&quot;==typeof exports&amp;&amp;&quot;undefined&quot;!=typeof module)module.exports=t();else if(&quot;function&quot;==typeof define&amp;&amp;define.amd)define([],t);else{(&quot;undefined&quot;!=typeof window?window:&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:this).Plotly=t()}}(function(){return function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l=&quot;function&quot;==typeof require&amp;&amp;require;if(!s&amp;&amp;l)return l(o,!0);if(a)return a(o,!0);var c=new Error(&quot;Cannot find module '&quot;+o+&quot;'&quot;);throw c.code=&quot;MODULE_NOT_FOUND&quot;,c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return i(e[o][1][t]||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a=&quot;function&quot;==typeof require&amp;&amp;require,o=0;o&lt;n.length;o++)i(n[o]);return i}}()({1:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../src/lib&quot;),i={&quot;X,X div&quot;:&quot;direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;&quot;,&quot;X input,X button&quot;:&quot;font-family:'Open Sans', verdana, arial, sans-serif;&quot;,&quot;X input:focus,X button:focus&quot;:&quot;outline:none;&quot;,&quot;X a&quot;:&quot;text-decoration:none;&quot;,&quot;X a:hover&quot;:&quot;text-decoration:none;&quot;,&quot;X .crisp&quot;:&quot;shape-rendering:crispEdges;&quot;,&quot;X .user-select-none&quot;:&quot;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;&quot;,&quot;X svg&quot;:&quot;overflow:hidden;&quot;,&quot;X svg a&quot;:&quot;fill:#447adb;&quot;,&quot;X svg a:hover&quot;:&quot;fill:#3c6dc5;&quot;,&quot;X .main-svg&quot;:&quot;position:absolute;top:0;left:0;pointer-events:none;&quot;,&quot;X .main-svg .draglayer&quot;:&quot;pointer-events:all;&quot;,&quot;X .cursor-default&quot;:&quot;cursor:default;&quot;,&quot;X .cursor-pointer&quot;:&quot;cursor:pointer;&quot;,&quot;X .cursor-crosshair&quot;:&quot;cursor:crosshair;&quot;,&quot;X .cursor-move&quot;:&quot;cursor:move;&quot;,&quot;X .cursor-col-resize&quot;:&quot;cursor:col-resize;&quot;,&quot;X .cursor-row-resize&quot;:&quot;cursor:row-resize;&quot;,&quot;X .cursor-ns-resize&quot;:&quot;cursor:ns-resize;&quot;,&quot;X .cursor-ew-resize&quot;:&quot;cursor:ew-resize;&quot;,&quot;X .cursor-sw-resize&quot;:&quot;cursor:sw-resize;&quot;,&quot;X .cursor-s-resize&quot;:&quot;cursor:s-resize;&quot;,&quot;X .cursor-se-resize&quot;:&quot;cursor:se-resize;&quot;,&quot;X .cursor-w-resize&quot;:&quot;cursor:w-resize;&quot;,&quot;X .cursor-e-resize&quot;:&quot;cursor:e-resize;&quot;,&quot;X .cursor-nw-resize&quot;:&quot;cursor:nw-resize;&quot;,&quot;X .cursor-n-resize&quot;:&quot;cursor:n-resize;&quot;,&quot;X .cursor-ne-resize&quot;:&quot;cursor:ne-resize;&quot;,&quot;X .cursor-grab&quot;:&quot;cursor:-webkit-grab;cursor:grab;&quot;,&quot;X .modebar&quot;:&quot;position:absolute;top:2px;right:2px;z-index:1001;background:rgba(255,255,255,0.7);&quot;,&quot;X .modebar--hover&quot;:&quot;opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;&quot;,&quot;X:hover .modebar--hover&quot;:&quot;opacity:1;&quot;,&quot;X .modebar-group&quot;:&quot;float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;&quot;,&quot;X .modebar-group:first-child&quot;:&quot;margin-left:0px;&quot;,&quot;X .modebar-btn&quot;:&quot;position:relative;font-size:16px;padding:3px 4px;cursor:pointer;line-height:normal;box-sizing:border-box;&quot;,&quot;X .modebar-btn svg&quot;:&quot;position:relative;top:2px;&quot;,&quot;X .modebar-btn path&quot;:&quot;fill:rgba(0,31,95,0.3);&quot;,&quot;X .modebar-btn.active path,X .modebar-btn:hover path&quot;:&quot;fill:rgba(0,22,72,0.5);&quot;,&quot;X .modebar-btn.modebar-btn--logo&quot;:&quot;padding:3px 1px;&quot;,&quot;X .modebar-btn.modebar-btn--logo path&quot;:&quot;fill:#447adb !important;&quot;,&quot;X [data-title]:before,X [data-title]:after&quot;:&quot;position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;&quot;,&quot;X [data-title]:hover:before,X [data-title]:hover:after&quot;:&quot;display:block;opacity:1;&quot;,&quot;X [data-title]:before&quot;:&quot;content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;&quot;,&quot;X [data-title]:after&quot;:&quot;content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;&quot;,&quot;X .select-outline&quot;:&quot;fill:none;stroke-width:1;shape-rendering:crispEdges;&quot;,&quot;X .select-outline-1&quot;:&quot;stroke:white;&quot;,&quot;X .select-outline-2&quot;:&quot;stroke:black;stroke-dasharray:2px 2px;&quot;,Y:&quot;font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;&quot;,&quot;Y p&quot;:&quot;margin:0;&quot;,&quot;Y .notifier-note&quot;:&quot;min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;&quot;,&quot;Y .notifier-close&quot;:&quot;color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;&quot;,&quot;Y .notifier-close:hover&quot;:&quot;color:#444;text-decoration:none;cursor:pointer;&quot;};for(var a in i){var o=a.replace(/^,/,&quot; ,&quot;).replace(/X/g,&quot;.js-plotly-plot .plotly&quot;).replace(/Y/g,&quot;.plotly-notifier&quot;);n.addStyleRule(o,i[a])}},{&quot;../src/lib&quot;:693}],2:[function(t,e,r){&quot;use strict&quot;;e.exports={undo:{width:857.1,height:1e3,path:&quot;m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},home:{width:928.6,height:1e3,path:&quot;m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},&quot;camera-retro&quot;:{width:1e3,height:1e3,path:&quot;m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},zoombox:{width:1e3,height:1e3,path:&quot;m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},pan:{width:1e3,height:1e3,path:&quot;m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},zoom_plus:{width:1e3,height:1e3,path:&quot;m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},zoom_minus:{width:1e3,height:1e3,path:&quot;m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},autoscale:{width:1e3,height:1e3,path:&quot;m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},tooltip_basic:{width:1500,height:1e3,path:&quot;m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},tooltip_compare:{width:1125,height:1e3,path:&quot;m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},plotlylogo:{width:1542,height:1e3,path:&quot;m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},&quot;z-axis&quot;:{width:1e3,height:1e3,path:&quot;m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},&quot;3d_rotate&quot;:{width:1e3,height:1e3,path:&quot;m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},camera:{width:1e3,height:1e3,path:&quot;m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},movie:{width:1e3,height:1e3,path:&quot;m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},question:{width:857.1,height:1e3,path:&quot;m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},disk:{width:857.1,height:1e3,path:&quot;m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},lasso:{width:1031,height:1e3,path:&quot;m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},selectbox:{width:1e3,height:1e3,path:&quot;m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z&quot;,transform:&quot;matrix(1 0 0 -1 0 850)&quot;},spikeline:{width:1e3,height:1e3,path:&quot;M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z&quot;,transform:&quot;matrix(1.5 0 0 -1.5 0 850)&quot;}}},{}],3:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/aggregate&quot;)},{&quot;../src/transforms/aggregate&quot;:1144}],4:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/bar&quot;)},{&quot;../src/traces/bar&quot;:840}],5:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/barpolar&quot;)},{&quot;../src/traces/barpolar&quot;:852}],6:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/box&quot;)},{&quot;../src/traces/box&quot;:862}],7:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/components/calendars&quot;)},{&quot;../src/components/calendars&quot;:565}],8:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/candlestick&quot;)},{&quot;../src/traces/candlestick&quot;:871}],9:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/carpet&quot;)},{&quot;../src/traces/carpet&quot;:890}],10:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/choropleth&quot;)},{&quot;../src/traces/choropleth&quot;:904}],11:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/cone&quot;)},{&quot;../src/traces/cone&quot;:912}],12:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/contour&quot;)},{&quot;../src/traces/contour&quot;:927}],13:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/contourcarpet&quot;)},{&quot;../src/traces/contourcarpet&quot;:938}],14:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/core&quot;)},{&quot;../src/core&quot;:672}],15:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/filter&quot;)},{&quot;../src/transforms/filter&quot;:1145}],16:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/groupby&quot;)},{&quot;../src/transforms/groupby&quot;:1146}],17:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/heatmap&quot;)},{&quot;../src/traces/heatmap&quot;:950}],18:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/heatmapgl&quot;)},{&quot;../src/traces/heatmapgl&quot;:960}],19:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/histogram&quot;)},{&quot;../src/traces/histogram&quot;:971}],20:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/histogram2d&quot;)},{&quot;../src/traces/histogram2d&quot;:977}],21:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/histogram2dcontour&quot;)},{&quot;../src/traces/histogram2dcontour&quot;:981}],22:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./core&quot;);n.register([t(&quot;./bar&quot;),t(&quot;./box&quot;),t(&quot;./heatmap&quot;),t(&quot;./histogram&quot;),t(&quot;./histogram2d&quot;),t(&quot;./histogram2dcontour&quot;),t(&quot;./pie&quot;),t(&quot;./contour&quot;),t(&quot;./scatterternary&quot;),t(&quot;./violin&quot;),t(&quot;./scatter3d&quot;),t(&quot;./surface&quot;),t(&quot;./mesh3d&quot;),t(&quot;./cone&quot;),t(&quot;./streamtube&quot;),t(&quot;./scattergeo&quot;),t(&quot;./choropleth&quot;),t(&quot;./scattergl&quot;),t(&quot;./splom&quot;),t(&quot;./pointcloud&quot;),t(&quot;./heatmapgl&quot;),t(&quot;./parcoords&quot;),t(&quot;./scattermapbox&quot;),t(&quot;./sankey&quot;),t(&quot;./table&quot;),t(&quot;./carpet&quot;),t(&quot;./scattercarpet&quot;),t(&quot;./contourcarpet&quot;),t(&quot;./ohlc&quot;),t(&quot;./candlestick&quot;),t(&quot;./scatterpolar&quot;),t(&quot;./scatterpolargl&quot;),t(&quot;./barpolar&quot;)]),n.register([t(&quot;./aggregate&quot;),t(&quot;./filter&quot;),t(&quot;./groupby&quot;),t(&quot;./sort&quot;)]),n.register([t(&quot;./calendars&quot;)]),e.exports=n},{&quot;./aggregate&quot;:3,&quot;./bar&quot;:4,&quot;./barpolar&quot;:5,&quot;./box&quot;:6,&quot;./calendars&quot;:7,&quot;./candlestick&quot;:8,&quot;./carpet&quot;:9,&quot;./choropleth&quot;:10,&quot;./cone&quot;:11,&quot;./contour&quot;:12,&quot;./contourcarpet&quot;:13,&quot;./core&quot;:14,&quot;./filter&quot;:15,&quot;./groupby&quot;:16,&quot;./heatmap&quot;:17,&quot;./heatmapgl&quot;:18,&quot;./histogram&quot;:19,&quot;./histogram2d&quot;:20,&quot;./histogram2dcontour&quot;:21,&quot;./mesh3d&quot;:23,&quot;./ohlc&quot;:24,&quot;./parcoords&quot;:25,&quot;./pie&quot;:26,&quot;./pointcloud&quot;:27,&quot;./sankey&quot;:28,&quot;./scatter3d&quot;:29,&quot;./scattercarpet&quot;:30,&quot;./scattergeo&quot;:31,&quot;./scattergl&quot;:32,&quot;./scattermapbox&quot;:33,&quot;./scatterpolar&quot;:34,&quot;./scatterpolargl&quot;:35,&quot;./scatterternary&quot;:36,&quot;./sort&quot;:37,&quot;./splom&quot;:38,&quot;./streamtube&quot;:39,&quot;./surface&quot;:40,&quot;./table&quot;:41,&quot;./violin&quot;:42}],23:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/mesh3d&quot;)},{&quot;../src/traces/mesh3d&quot;:986}],24:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/ohlc&quot;)},{&quot;../src/traces/ohlc&quot;:991}],25:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/parcoords&quot;)},{&quot;../src/traces/parcoords&quot;:1002}],26:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/pie&quot;)},{&quot;../src/traces/pie&quot;:1013}],27:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/pointcloud&quot;)},{&quot;../src/traces/pointcloud&quot;:1022}],28:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/sankey&quot;)},{&quot;../src/traces/sankey&quot;:1028}],29:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatter3d&quot;)},{&quot;../src/traces/scatter3d&quot;:1064}],30:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattercarpet&quot;)},{&quot;../src/traces/scattercarpet&quot;:1070}],31:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattergeo&quot;)},{&quot;../src/traces/scattergeo&quot;:1077}],32:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattergl&quot;)},{&quot;../src/traces/scattergl&quot;:1085}],33:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scattermapbox&quot;)},{&quot;../src/traces/scattermapbox&quot;:1091}],34:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatterpolar&quot;)},{&quot;../src/traces/scatterpolar&quot;:1098}],35:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatterpolargl&quot;)},{&quot;../src/traces/scatterpolargl&quot;:1102}],36:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/scatterternary&quot;)},{&quot;../src/traces/scatterternary&quot;:1108}],37:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/transforms/sort&quot;)},{&quot;../src/transforms/sort&quot;:1148}],38:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/splom&quot;)},{&quot;../src/traces/splom&quot;:1113}],39:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/streamtube&quot;)},{&quot;../src/traces/streamtube&quot;:1118}],40:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/surface&quot;)},{&quot;../src/traces/surface&quot;:1123}],41:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/table&quot;)},{&quot;../src/traces/table&quot;:1131}],42:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;../src/traces/violin&quot;)},{&quot;../src/traces/violin&quot;:1139}],43:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){t=t||document.body,e=e||{};var r=[.01,1/0];&quot;distanceLimits&quot;in e&amp;&amp;(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]);&quot;zoomMin&quot;in e&amp;&amp;(r[0]=e.zoomMin);&quot;zoomMax&quot;in e&amp;&amp;(r[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||&quot;orbit&quot;,distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay;c.idle(e-r),c.flush(e-(100+2*r));var i=e-2*r;c.recalcMatrix(i);for(var a=!0,o=c.computedMatrix,s=0;s&lt;16;++s)a=a&amp;&amp;u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&amp;&amp;t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(d,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){return c.setMode(t),c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(&quot;contextmenu&quot;,function(t){return t.preventDefault(),!1});var g=0,m=0,v={shift:!1,control:!1,alt:!1,meta:!1};function y(e,r,i,a){var o=1/t.clientHeight,s=o*(r-g),l=o*(i-m),u=d.flipX?1:-1,h=d.flipY?1:-1,p=Math.PI*d.rotateSpeed,y=n();if(1&amp;e)a.shift?c.rotate(y,0,0,-s*p):c.rotate(y,u*p*s,-h*p*l,0);else if(2&amp;e)c.pan(y,-d.translateSpeed*s*f,d.translateSpeed*l*f,0);else if(4&amp;e){var x=d.zoomSpeed*l/window.innerHeight*(y-c.lastT())*50;c.pan(y,0,0,f*(Math.exp(x)-1))}g=r,m=i,v=a}return a(t,y),t.addEventListener(&quot;touchstart&quot;,function(e){var r=s(e.changedTouches[0],t);y(0,r[0],r[1],v),y(1,r[0],r[1],v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),t.addEventListener(&quot;touchmove&quot;,function(e){var r=s(e.changedTouches[0],t);y(1,r[0],r[1],v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),t.addEventListener(&quot;touchend&quot;,function(e){s(e.changedTouches[0],t),y(0,g,m,v),e.preventDefault()},!!l&amp;&amp;{passive:!1}),o(t,function(t,e,r){var i=d.flipX?1:-1,a=d.flipY?1:-1,o=n();if(Math.abs(t)&gt;Math.abs(e))c.rotate(o,0,0,-t*i*Math.PI*d.rotateSpeed/window.innerWidth);else{var s=d.zoomSpeed*a*e/window.innerHeight*(o-c.lastT())/100;c.pan(o,0,0,f*(Math.exp(s)-1))}},!0),d};var n=t(&quot;right-now&quot;),i=t(&quot;3d-view&quot;),a=t(&quot;mouse-change&quot;),o=t(&quot;mouse-wheel&quot;),s=t(&quot;mouse-event-offset&quot;),l=t(&quot;has-passive-events&quot;)},{&quot;3d-view&quot;:44,&quot;has-passive-events&quot;:392,&quot;mouse-change&quot;:415,&quot;mouse-event-offset&quot;:416,&quot;mouse-wheel&quot;:418,&quot;right-now&quot;:477}],44:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||&quot;turntable&quot;,u=n(),f=i(),h=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:u,orbit:f,matrix:h},c)};var n=t(&quot;turntable-camera-controller&quot;),i=t(&quot;orbit-camera-controller&quot;),a=t(&quot;matrix-camera-controller&quot;);function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode=&quot;turntable&quot;,this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[[&quot;flush&quot;,1],[&quot;idle&quot;,1],[&quot;lookAt&quot;,4],[&quot;rotate&quot;,4],[&quot;pan&quot;,4],[&quot;translate&quot;,4],[&quot;setMatrix&quot;,2],[&quot;setDistanceLimits&quot;,2],[&quot;setDistance&quot;,2]].forEach(function(t){for(var e=t[0],r=[],n=0;n&lt;t[1];++n)r.push(&quot;a&quot;+n);var i=&quot;var cc=this._controllerList;for(var i=0;i&lt;cc.length;++i){cc[i].&quot;+t[0]+&quot;(&quot;+r.join()+&quot;)}&quot;;s[e]=Function.apply(null,r.concat(i))}),s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e&lt;0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},{&quot;matrix-camera-controller&quot;:413,&quot;orbit-camera-controller&quot;:436,&quot;turntable-camera-controller&quot;:516}],45:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n){&quot;use strict&quot;;t.sankey=function(){var t={},i=24,a=8,o=[1,1],s=[],l=[];function c(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}s.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),s.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function u(t){return t.y+t.dy/2}function f(t){return t.value}return t.nodeWidth=function(e){return arguments.length?(i=+e,t):i},t.nodePadding=function(e){return arguments.length?(a=+e,t):a},t.nodes=function(e){return arguments.length?(s=e,t):s},t.links=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(o=e,t):o},t.layout=function(n){return s.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),l.forEach(function(t,e){var r=t.source,n=t.target;&quot;number&quot;==typeof r&amp;&amp;(r=t.source=s[t.source]),&quot;number&quot;==typeof n&amp;&amp;(n=t.target=s[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),s.forEach(function(t){t.value=Math.max(e.sum(t.sourceLinks,f),e.sum(t.targetLinks,f))}),function(){for(var t,e,r=s,n=0;r.length;)t=[],r.forEach(function(e){e.x=n,e.dx=i,e.sourceLinks.forEach(function(e){t.indexOf(e.target)&lt;0&amp;&amp;t.push(e.target)})}),r=t,++n;(function(t){s.forEach(function(e){e.sourceLinks.length||(e.x=t-1)})})(n),e=(o[0]-i)/(n-1),s.forEach(function(t){t.x*=e})}(),function(t){var n,i=r.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(s).map(function(t){return t.values});n=e.min(i,function(t){return(o[1]-(t.length-1)*a)/e.sum(t,f)}),i.forEach(function(t){t.forEach(function(t,e){t.y=e,t.dy=t.value*n})}),l.forEach(function(t){t.dy=t.value*n}),d();for(var c=1;t&gt;0;--t)p(c*=.99),d(),h(c),d();function h(t){function r(t){return u(t.source)*t.value}i.forEach(function(n){n.forEach(function(n){if(n.targetLinks.length){var i=e.sum(n.targetLinks,r)/e.sum(n.targetLinks,f);n.y+=(i-u(n))*t}})})}function p(t){function r(t){return u(t.target)*t.value}i.slice().reverse().forEach(function(n){n.forEach(function(n){if(n.sourceLinks.length){var i=e.sum(n.sourceLinks,r)/e.sum(n.sourceLinks,f);n.y+=(i-u(n))*t}})})}function d(){i.forEach(function(t){var e,r,n,i=0,s=t.length;for(t.sort(g),n=0;n&lt;s;++n)e=t[n],(r=i-e.y)&gt;0&amp;&amp;(e.y+=r),i=e.y+e.dy+a;if((r=i-a-o[1])&gt;0)for(i=e.y-=r,n=s-2;n&gt;=0;--n)e=t[n],(r=e.y+e.dy+a-i)&gt;0&amp;&amp;(e.y-=r),i=e.y})}function g(t,e){return t.y-e.y}}(n),c(),t},t.relayout=function(){return c(),t},t.link=function(){var t=.5;function e(e){var r=e.source.x+e.source.dx,i=e.target.x,a=n.interpolateNumber(r,i),o=a(t),s=a(1-t),l=e.source.y+e.sy,c=l+e.dy,u=e.target.y+e.ty,f=u+e.dy;return&quot;M&quot;+r+&quot;,&quot;+l+&quot;C&quot;+o+&quot;,&quot;+l+&quot; &quot;+s+&quot;,&quot;+u+&quot; &quot;+i+&quot;,&quot;+u+&quot;L&quot;+i+&quot;,&quot;+f+&quot;C&quot;+s+&quot;,&quot;+f+&quot; &quot;+o+&quot;,&quot;+c+&quot; &quot;+r+&quot;,&quot;+c+&quot;Z&quot;}return e.curvature=function(r){return arguments.length?(t=+r,e):t},e},t},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?i(r,t(&quot;d3-array&quot;),t(&quot;d3-collection&quot;),t(&quot;d3-interpolate&quot;)):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{&quot;d3-array&quot;:139,&quot;d3-collection&quot;:140,&quot;d3-interpolate&quot;:144}],46:[function(t,e,r){&quot;use strict&quot;;var n=&quot;undefined&quot;==typeof WeakMap?t(&quot;weak-map&quot;):WeakMap,i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=new n;e.exports=function(t){var e=o.get(t),r=e&amp;&amp;(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308,&quot;weak-map&quot;:526}],47:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map(function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case&quot;a&quot;:t[6]+=n,t[7]+=i;break;case&quot;v&quot;:t[1]+=i;break;case&quot;h&quot;:t[1]+=n;break;default:for(var s=1;s&lt;t.length;)t[s++]+=n,t[s++]+=i}switch(o){case&quot;Z&quot;:n=e,i=r;break;case&quot;H&quot;:n=t[1];break;case&quot;V&quot;:i=t[1];break;case&quot;M&quot;:n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t})}},{}],48:[function(t,e,r){var n=t(&quot;pad-left&quot;);e.exports=function(t,e,r){e=&quot;number&quot;==typeof e?e:1,r=r||&quot;: &quot;;var i=t.split(/\r?\n/),a=String(i.length+e-1).length;return i.map(function(t,i){var o=i+e,s=String(o).length,l=n(o,a-s);return l+r+t}).join(&quot;\n&quot;)}},{&quot;pad-left&quot;:437}],49:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,n=[t[0]],a=[0],o=1;o&lt;e;++o)if(n.push(t[o]),i(n,r)){if(a.push(o),a.length===r+1)return a}else n.pop();return a};var n=t(&quot;robust-orientation&quot;);function i(t,e){for(var r=new Array(e+1),i=0;i&lt;t.length;++i)r[i]=t[i];for(i=0;i&lt;=t.length;++i){for(var a=t.length;a&lt;=e;++a){for(var o=new Array(e),s=0;s&lt;e;++s)o[s]=Math.pow(a+1-i,s);r[a]=o}if(n.apply(void 0,r))return!0}return!1}},{&quot;robust-orientation&quot;:483}],50:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return n(e).filter(function(r){for(var n=new Array(r.length),a=0;a&lt;r.length;++a)n[a]=e[r[a]];return i(n)*t&lt;1})};var n=t(&quot;delaunay-triangulate&quot;),i=t(&quot;circumradius&quot;)},{circumradius:101,&quot;delaunay-triangulate&quot;:149}],51:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t(&quot;alpha-complex&quot;),i=t(&quot;simplicial-complex-boundary&quot;)},{&quot;alpha-complex&quot;:50,&quot;simplicial-complex-boundary&quot;:490}],52:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){if(!t||null==t.length)throw Error(&quot;Argument should be an array&quot;);e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n&lt;e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o&lt;s;o+=e)t[o]&gt;i&amp;&amp;(i=t[o]),t[o]&lt;a&amp;&amp;(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],53:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;array-bounds&quot;);e.exports=function(t,e,r){if(!t||null==t.length)throw Error(&quot;Argument should be an array&quot;);null==e&amp;&amp;(e=1);null==r&amp;&amp;(r=n(t,e));for(var i=0;i&lt;e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&amp;&amp;o===-1/0)for(s=i;s&lt;l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s&lt;l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s&lt;l;s+=e)t[s]=t[s]===o?0:1;else{var c=a-o;for(s=i;s&lt;l;s+=e)t[s]=0===c?.5:(t[s]-o)/c}}return t}},{&quot;array-bounds&quot;:52}],54:[function(t,e,r){e.exports=function(t,e){var r=&quot;number&quot;==typeof t,n=&quot;number&quot;==typeof e;r&amp;&amp;!n?(e=t,t=0):r||n||(t=0,e=0);var i=(e|=0)-(t|=0);if(i&lt;0)throw new Error(&quot;array length must be positive&quot;);for(var a=new Array(i),o=0,s=t;o&lt;i;o++,s++)a[o]=s;return a}},{}],55:[function(t,e,r){(function(r){&quot;use strict&quot;;function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i&lt;a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r&lt;n?-1:n&lt;r?1:0}function i(t){return r.Buffer&amp;&amp;&quot;function&quot;==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=t(&quot;util/&quot;),o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,l=&quot;foo&quot;===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function u(t){return!i(t)&amp;&amp;(&quot;function&quot;==typeof r.ArrayBuffer&amp;&amp;(&quot;function&quot;==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&amp;&amp;(t instanceof DataView||!!(t.buffer&amp;&amp;t.buffer instanceof ArrayBuffer))))}var f=e.exports=v,h=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(a.isFunction(t)){if(l)return t.name;var e=t.toString().match(h);return e&amp;&amp;e[1]}}function d(t,e){return&quot;string&quot;==typeof t?t.length&lt;e?t:t.slice(0,e):t}function g(t){if(l||!a.isFunction(t))return a.inspect(t);var e=p(t);return&quot;[Function&quot;+(e?&quot;: &quot;+e:&quot;&quot;)+&quot;]&quot;}function m(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function v(t,e){t||m(t,!0,e,&quot;==&quot;,f.ok)}function y(t,e,r,o){if(t===e)return!0;if(i(t)&amp;&amp;i(e))return 0===n(t,e);if(a.isDate(t)&amp;&amp;a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&amp;&amp;a.isRegExp(e))return t.source===e.source&amp;&amp;t.global===e.global&amp;&amp;t.multiline===e.multiline&amp;&amp;t.lastIndex===e.lastIndex&amp;&amp;t.ignoreCase===e.ignoreCase;if(null!==t&amp;&amp;&quot;object&quot;==typeof t||null!==e&amp;&amp;&quot;object&quot;==typeof e){if(u(t)&amp;&amp;u(e)&amp;&amp;c(t)===c(e)&amp;&amp;!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var l=(o=o||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&amp;&amp;l===o.expected.indexOf(e)||(o.actual.push(t),o.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(r&amp;&amp;Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=x(t),o=x(e);if(i&amp;&amp;!o||!i&amp;&amp;o)return!1;if(i)return t=s.call(t),e=s.call(e),y(t,e,r);var l,c,u=w(t),f=w(e);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),c=u.length-1;c&gt;=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c&gt;=0;c--)if(l=u[c],!y(t[l],e[l],r,n))return!1;return!0}(t,e,r,o))}return r?t===e:t==e}function x(t){return&quot;[object Arguments]&quot;==Object.prototype.toString.call(t)}function b(t,e){if(!t||!e)return!1;if(&quot;[object RegExp]&quot;==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&amp;&amp;!0===e.call({},t)}function _(t,e,r,n){var i;if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;block&quot; argument must be a function');&quot;string&quot;==typeof r&amp;&amp;(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&amp;&amp;r.name?&quot; (&quot;+r.name+&quot;).&quot;:&quot;.&quot;)+(n?&quot; &quot;+n:&quot;.&quot;),t&amp;&amp;!i&amp;&amp;m(i,r,&quot;Missing expected exception&quot;+n);var o=&quot;string&quot;==typeof n,s=!t&amp;&amp;i&amp;&amp;!r;if((!t&amp;&amp;a.isError(i)&amp;&amp;o&amp;&amp;b(i,r)||s)&amp;&amp;m(i,r,&quot;Got unwanted exception&quot;+n),t&amp;&amp;i&amp;&amp;r&amp;&amp;!b(i,r)||!t&amp;&amp;i)throw i}f.AssertionError=function(t){var e;this.name=&quot;AssertionError&quot;,this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g((e=this).actual),128)+&quot; &quot;+e.operator+&quot; &quot;+d(g(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,a=p(r),o=i.indexOf(&quot;\n&quot;+a);if(o&gt;=0){var s=i.indexOf(&quot;\n&quot;,o+1);i=i.substring(s+1)}this.stack=i}}},a.inherits(f.AssertionError,Error),f.fail=m,f.ok=v,f.equal=function(t,e,r){t!=e&amp;&amp;m(t,e,r,&quot;==&quot;,f.equal)},f.notEqual=function(t,e,r){t==e&amp;&amp;m(t,e,r,&quot;!=&quot;,f.notEqual)},f.deepEqual=function(t,e,r){y(t,e,!1)||m(t,e,r,&quot;deepEqual&quot;,f.deepEqual)},f.deepStrictEqual=function(t,e,r){y(t,e,!0)||m(t,e,r,&quot;deepStrictEqual&quot;,f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){y(t,e,!1)&amp;&amp;m(t,e,r,&quot;notDeepEqual&quot;,f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&amp;&amp;m(e,r,n,&quot;notDeepStrictEqual&quot;,t)},f.strictEqual=function(t,e,r){t!==e&amp;&amp;m(t,e,r,&quot;===&quot;,f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&amp;&amp;m(t,e,r,&quot;!==&quot;,f.notStrictEqual)},f.throws=function(t,e,r){_(!0,t,e,r)},f.doesNotThrow=function(t,e,r){_(!1,t,e,r)},f.ifError=function(t){if(t)throw t};var w=Object.keys||function(t){var e=[];for(var r in t)o.call(t,r)&amp;&amp;e.push(r);return e}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;util/&quot;:58}],56:[function(t,e,r){&quot;function&quot;==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],57:[function(t,e,r){e.exports=function(t){return t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;&quot;function&quot;==typeof t.copy&amp;&amp;&quot;function&quot;==typeof t.fill&amp;&amp;&quot;function&quot;==typeof t.readUInt8}},{}],58:[function(t,e,r){(function(e,n){var i=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r&lt;arguments.length;r++)e.push(s(arguments[r]));return e.join(&quot; &quot;)}r=1;for(var n=arguments,a=n.length,o=String(t).replace(i,function(t){if(&quot;%%&quot;===t)return&quot;%&quot;;if(r&gt;=a)return t;switch(t){case&quot;%s&quot;:return String(n[r++]);case&quot;%d&quot;:return Number(n[r++]);case&quot;%j&quot;:try{return JSON.stringify(n[r++])}catch(t){return&quot;[Circular]&quot;}default:return t}}),l=n[r];r&lt;a;l=n[++r])g(l)||!b(l)?o+=&quot; &quot;+l:o+=&quot; &quot;+s(l);return o},r.deprecate=function(t,i){if(y(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var a,o={};function s(t,e){var n={seen:[],stylize:c};return arguments.length&gt;=3&amp;&amp;(n.depth=arguments[2]),arguments.length&gt;=4&amp;&amp;(n.colors=arguments[3]),d(e)?n.showHidden=e:e&amp;&amp;r._extend(n,e),y(n.showHidden)&amp;&amp;(n.showHidden=!1),y(n.depth)&amp;&amp;(n.depth=2),y(n.colors)&amp;&amp;(n.colors=!1),y(n.customInspect)&amp;&amp;(n.customInspect=!0),n.colors&amp;&amp;(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?&quot;\x1b[&quot;+s.colors[r][0]+&quot;m&quot;+t+&quot;\x1b[&quot;+s.colors[r][1]+&quot;m&quot;:t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&amp;&amp;e&amp;&amp;k(e.inspect)&amp;&amp;e.inspect!==r.inspect&amp;&amp;(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize(&quot;undefined&quot;,&quot;undefined&quot;);if(v(e)){var r=&quot;'&quot;+JSON.stringify(e).replace(/^&quot;|&quot;$/g,&quot;&quot;).replace(/'/g,&quot;\\'&quot;).replace(/\\&quot;/g,'&quot;')+&quot;'&quot;;return t.stylize(r,&quot;string&quot;)}if(m(e))return t.stylize(&quot;&quot;+e,&quot;number&quot;);if(d(e))return t.stylize(&quot;&quot;+e,&quot;boolean&quot;);if(g(e))return t.stylize(&quot;null&quot;,&quot;null&quot;)}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&amp;&amp;(o=Object.getOwnPropertyNames(e)),w(e)&amp;&amp;(o.indexOf(&quot;message&quot;)&gt;=0||o.indexOf(&quot;description&quot;)&gt;=0))return f(e);if(0===o.length){if(k(e)){var l=e.name?&quot;: &quot;+e.name:&quot;&quot;;return t.stylize(&quot;[Function&quot;+l+&quot;]&quot;,&quot;special&quot;)}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),&quot;regexp&quot;);if(_(e))return t.stylize(Date.prototype.toString.call(e),&quot;date&quot;);if(w(e))return f(e)}var c,b=&quot;&quot;,M=!1,A=[&quot;{&quot;,&quot;}&quot;];(p(e)&amp;&amp;(M=!0,A=[&quot;[&quot;,&quot;]&quot;]),k(e))&amp;&amp;(b=&quot; [Function&quot;+(e.name?&quot;: &quot;+e.name:&quot;&quot;)+&quot;]&quot;);return x(e)&amp;&amp;(b=&quot; &quot;+RegExp.prototype.toString.call(e)),_(e)&amp;&amp;(b=&quot; &quot;+Date.prototype.toUTCString.call(e)),w(e)&amp;&amp;(b=&quot; &quot;+f(e)),0!==o.length||M&amp;&amp;0!=e.length?n&lt;0?x(e)?t.stylize(RegExp.prototype.toString.call(e),&quot;regexp&quot;):t.stylize(&quot;[Object]&quot;,&quot;special&quot;):(t.seen.push(e),c=M?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o&lt;s;++o)S(e,String(o))?a.push(h(t,e,r,n,String(o),!0)):a.push(&quot;&quot;);return i.forEach(function(i){i.match(/^\d+$/)||a.push(h(t,e,r,n,i,!0))}),a}(t,e,n,s,o):o.map(function(r){return h(t,e,n,s,r,M)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf(&quot;\n&quot;)&gt;=0&amp;&amp;0,t+e.replace(/\u001b\[\d\d?m/g,&quot;&quot;).length+1},0)&gt;60)return r[0]+(&quot;&quot;===e?&quot;&quot;:e+&quot;\n &quot;)+&quot; &quot;+t.join(&quot;,\n  &quot;)+&quot; &quot;+r[1];return r[0]+e+&quot; &quot;+t.join(&quot;, &quot;)+&quot; &quot;+r[1]}(c,b,A)):A[0]+b+A[1]}function f(t){return&quot;[&quot;+Error.prototype.toString.call(t)+&quot;]&quot;}function h(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize(&quot;[Getter/Setter]&quot;,&quot;special&quot;):t.stylize(&quot;[Getter]&quot;,&quot;special&quot;):l.set&amp;&amp;(s=t.stylize(&quot;[Setter]&quot;,&quot;special&quot;)),S(n,i)||(o=&quot;[&quot;+i+&quot;]&quot;),s||(t.seen.indexOf(l.value)&lt;0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf(&quot;\n&quot;)&gt;-1&amp;&amp;(s=a?s.split(&quot;\n&quot;).map(function(t){return&quot;  &quot;+t}).join(&quot;\n&quot;).substr(2):&quot;\n&quot;+s.split(&quot;\n&quot;).map(function(t){return&quot;   &quot;+t}).join(&quot;\n&quot;)):s=t.stylize(&quot;[Circular]&quot;,&quot;special&quot;)),y(o)){if(a&amp;&amp;i.match(/^\d+$/))return s;(o=JSON.stringify(&quot;&quot;+i)).match(/^&quot;([a-zA-Z_][a-zA-Z_0-9]*)&quot;$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,&quot;name&quot;)):(o=o.replace(/'/g,&quot;\\'&quot;).replace(/\\&quot;/g,'&quot;').replace(/(^&quot;|&quot;$)/g,&quot;'&quot;),o=t.stylize(o,&quot;string&quot;))}return o+&quot;: &quot;+s}function p(t){return Array.isArray(t)}function d(t){return&quot;boolean&quot;==typeof t}function g(t){return null===t}function m(t){return&quot;number&quot;==typeof t}function v(t){return&quot;string&quot;==typeof t}function y(t){return void 0===t}function x(t){return b(t)&amp;&amp;&quot;[object RegExp]&quot;===M(t)}function b(t){return&quot;object&quot;==typeof t&amp;&amp;null!==t}function _(t){return b(t)&amp;&amp;&quot;[object Date]&quot;===M(t)}function w(t){return b(t)&amp;&amp;(&quot;[object Error]&quot;===M(t)||t instanceof Error)}function k(t){return&quot;function&quot;==typeof t}function M(t){return Object.prototype.toString.call(t)}function A(t){return t&lt;10?&quot;0&quot;+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&amp;&amp;(a=e.env.NODE_DEBUG||&quot;&quot;),t=t.toUpperCase(),!o[t])if(new RegExp(&quot;\\b&quot;+t+&quot;\\b&quot;,&quot;i&quot;).test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error(&quot;%s %d: %s&quot;,t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:&quot;cyan&quot;,number:&quot;yellow&quot;,boolean:&quot;yellow&quot;,undefined:&quot;grey&quot;,null:&quot;bold&quot;,string:&quot;green&quot;,date:&quot;magenta&quot;,regexp:&quot;red&quot;},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=m,r.isString=v,r.isSymbol=function(t){return&quot;symbol&quot;==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||&quot;boolean&quot;==typeof t||&quot;number&quot;==typeof t||&quot;string&quot;==typeof t||&quot;symbol&quot;==typeof t||&quot;undefined&quot;==typeof t},r.isBuffer=t(&quot;./support/isBuffer&quot;);var T=[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log(&quot;%s - %s&quot;,(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(&quot;:&quot;),[t.getDate(),T[t.getMonth()],e].join(&quot; &quot;)),r.format.apply(r,arguments))},r.inherits=t(&quot;inherits&quot;),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t(&quot;_process&quot;),&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;./support/isBuffer&quot;:57,_process:462,inherits:56}],59:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],60:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o&lt;r;++o){for(var s=new Array(r+1),l=0;l&lt;=r;++l)s[l]=t[l][o];a[o]=s}a[r]=new Array(r+1);for(var o=0;o&lt;=r;++o)a[r][o]=1;for(var c=new Array(r+1),o=0;o&lt;r;++o)c[o]=e[o];c[r]=1;var u=n(a,c),f=i(u[r+1]);0===f&amp;&amp;(f=1);for(var h=new Array(r+1),o=0;o&lt;=r;++o)h[o]=i(u[o])/f;return h};var n=t(&quot;robust-linear-solve&quot;);function i(t){for(var e=0,r=0;r&lt;t.length;++r)e+=t[r];return e}},{&quot;robust-linear-solve&quot;:482}],61:[function(t,e,r){&quot;use strict&quot;;r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=c(t),n=r[0],o=r[1],s=new a(function(t,e,r){return 3*(e+r)/4-r}(0,n,o)),l=0,u=o&gt;0?n-4:n,f=0;f&lt;u;f+=4)e=i[t.charCodeAt(f)]&lt;&lt;18|i[t.charCodeAt(f+1)]&lt;&lt;12|i[t.charCodeAt(f+2)]&lt;&lt;6|i[t.charCodeAt(f+3)],s[l++]=e&gt;&gt;16&amp;255,s[l++]=e&gt;&gt;8&amp;255,s[l++]=255&amp;e;2===o&amp;&amp;(e=i[t.charCodeAt(f)]&lt;&lt;2|i[t.charCodeAt(f+1)]&gt;&gt;4,s[l++]=255&amp;e);1===o&amp;&amp;(e=i[t.charCodeAt(f)]&lt;&lt;10|i[t.charCodeAt(f+1)]&lt;&lt;4|i[t.charCodeAt(f+2)]&gt;&gt;2,s[l++]=e&gt;&gt;8&amp;255,s[l++]=255&amp;e);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;o&lt;s;o+=16383)a.push(u(t,o,o+16383&gt;s?s:o+16383));1===i?(e=t[r-1],a.push(n[e&gt;&gt;2]+n[e&lt;&lt;4&amp;63]+&quot;==&quot;)):2===i&amp;&amp;(e=(t[r-2]&lt;&lt;8)+t[r-1],a.push(n[e&gt;&gt;10]+n[e&gt;&gt;4&amp;63]+n[e&lt;&lt;2&amp;63]+&quot;=&quot;));return a.join(&quot;&quot;)};for(var n=[],i=[],a=&quot;undefined&quot;!=typeof Uint8Array?Uint8Array:Array,o=&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&quot;,s=0,l=o.length;s&lt;l;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4&gt;0)throw new Error(&quot;Invalid string. Length must be a multiple of 4&quot;);var r=t.indexOf(&quot;=&quot;);return-1===r&amp;&amp;(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var i,a,o=[],s=e;s&lt;r;s+=3)i=(t[s]&lt;&lt;16&amp;16711680)+(t[s+1]&lt;&lt;8&amp;65280)+(255&amp;t[s+2]),o.push(n[(a=i)&gt;&gt;18&amp;63]+n[a&gt;&gt;12&amp;63]+n[a&gt;&gt;6&amp;63]+n[63&amp;a]);return o.join(&quot;&quot;)}i[&quot;-&quot;.charCodeAt(0)]=62,i[&quot;_&quot;.charCodeAt(0)]=63},{}],62:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{&quot;./lib/rationalize&quot;:72}],63:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],64:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{&quot;./lib/rationalize&quot;:72}],65:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-rat&quot;),i=t(&quot;./lib/is-bn&quot;),a=t(&quot;./lib/num-to-bn&quot;),o=t(&quot;./lib/str-to-bn&quot;),s=t(&quot;./lib/rationalize&quot;),l=t(&quot;./div&quot;);e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,f;if(i(e))u=e.clone();else if(&quot;string&quot;==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=a(e)}}if(n(r))u.mul(r[1]),f=r[0].clone();else if(i(r))f=r.clone();else if(&quot;string&quot;==typeof r)f=o(r);else if(r)if(r===Math.floor(r))f=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;f=a(r)}else f=a(1);c&gt;0?u=u.ushln(c):c&lt;0&amp;&amp;(f=f.ushln(-c));return s(u,f)}},{&quot;./div&quot;:64,&quot;./is-rat&quot;:66,&quot;./lib/is-bn&quot;:70,&quot;./lib/num-to-bn&quot;:71,&quot;./lib/rationalize&quot;:72,&quot;./lib/str-to-bn&quot;:73}],66:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/is-bn&quot;);e.exports=function(t){return Array.isArray(t)&amp;&amp;2===t.length&amp;&amp;n(t[0])&amp;&amp;n(t[1])}},{&quot;./lib/is-bn&quot;:70}],67:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bn.js&quot;);e.exports=function(t){return t.cmp(new n(0))}},{&quot;bn.js&quot;:81}],68:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./bn-sign&quot;);e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a&lt;e;a++){var o=r[a];i+=o*Math.pow(67108864,a)}return n(t)*i}},{&quot;./bn-sign&quot;:67}],69:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;double-bits&quot;),i=t(&quot;bit-twiddle&quot;).countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e&lt;32)return e;var r=i(n.hi(t));if(r&gt;20)return 52;return r+32}},{&quot;bit-twiddle&quot;:79,&quot;double-bits&quot;:151}],70:[function(t,e,r){&quot;use strict&quot;;t(&quot;bn.js&quot;);e.exports=function(t){return t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;Boolean(t.words)}},{&quot;bn.js&quot;:81}],71:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bn.js&quot;),i=t(&quot;double-bits&quot;);e.exports=function(t){var e=i.exponent(t);return e&lt;52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{&quot;bn.js&quot;:81,&quot;double-bits&quot;:151}],72:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./num-to-bn&quot;),i=t(&quot;./bn-sign&quot;);e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a&lt;0&amp;&amp;(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{&quot;./bn-sign&quot;:67,&quot;./num-to-bn&quot;:71}],73:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bn.js&quot;);e.exports=function(t){return new n(t)}},{&quot;bn.js&quot;:81}],74:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{&quot;./lib/rationalize&quot;:72}],75:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/bn-sign&quot;);e.exports=function(t){return n(t[0])*n(t[1])}},{&quot;./lib/bn-sign&quot;:67}],76:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/rationalize&quot;);e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{&quot;./lib/rationalize&quot;:72}],77:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/bn-to-num&quot;),i=t(&quot;./lib/ctz&quot;);e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,f=n(l.ushln(u).divRound(r));return c*(s+f*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53,f=n(l.ushln(h).divRound(r));return h&lt;1023?c*f*Math.pow(2,-h):(f*=Math.pow(2,-1023),c*f*Math.pow(2,1023-h))}},{&quot;./lib/bn-to-num&quot;:68,&quot;./lib/ctz&quot;:69}],78:[function(t,e,r){&quot;use strict&quot;;function n(t,e,r,n,i,a){var o=[&quot;function &quot;,t,&quot;(a,l,h,&quot;,n.join(&quot;,&quot;),&quot;){&quot;,a?&quot;&quot;:&quot;var i=&quot;,r?&quot;l-1&quot;:&quot;h+1&quot;,&quot;;while(l&lt;=h){var m=(l+h)&gt;&gt;&gt;1,x=a&quot;,i?&quot;.get(m)&quot;:&quot;[m]&quot;];return a?e.indexOf(&quot;c&quot;)&lt;0?o.push(&quot;;if(x===y){return m}else if(x&lt;=y){&quot;):o.push(&quot;;var p=c(x,y);if(p===0){return m}else if(p&lt;=0){&quot;):o.push(&quot;;if(&quot;,e,&quot;){i=m;&quot;),r?o.push(&quot;l=m+1}else{h=m-1}&quot;):o.push(&quot;h=m-1}else{l=m+1}&quot;),o.push(&quot;}&quot;),a?o.push(&quot;return -1};&quot;):o.push(&quot;return i};&quot;),o.join(&quot;&quot;)}function i(t,e,r,i){return new Function([n(&quot;A&quot;,&quot;x&quot;+t+&quot;y&quot;,e,[&quot;y&quot;],!1,i),n(&quot;B&quot;,&quot;x&quot;+t+&quot;y&quot;,e,[&quot;y&quot;],!0,i),n(&quot;P&quot;,&quot;c(x,y)&quot;+t+&quot;0&quot;,e,[&quot;y&quot;,&quot;c&quot;],!1,i),n(&quot;Q&quot;,&quot;c(x,y)&quot;+t+&quot;0&quot;,e,[&quot;y&quot;,&quot;c&quot;],!0,i),&quot;function dispatchBsearch&quot;,r,&quot;(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch&quot;,r].join(&quot;&quot;))()}e.exports={ge:i(&quot;&gt;=&quot;,!1,&quot;GE&quot;),gt:i(&quot;&gt;&quot;,!1,&quot;GT&quot;),lt:i(&quot;&lt;&quot;,!0,&quot;LT&quot;),le:i(&quot;&lt;=&quot;,!0,&quot;LE&quot;),eq:i(&quot;-&quot;,!0,&quot;EQ&quot;,!0)}},{}],79:[function(t,e,r){&quot;use strict&quot;;function n(t){var e=32;return(t&amp;=-t)&amp;&amp;e--,65535&amp;t&amp;&amp;(e-=16),16711935&amp;t&amp;&amp;(e-=8),252645135&amp;t&amp;&amp;(e-=4),858993459&amp;t&amp;&amp;(e-=2),1431655765&amp;t&amp;&amp;(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1&lt;&lt;31,r.sign=function(t){return(t&gt;0)-(t&lt;0)},r.abs=function(t){var e=t&gt;&gt;31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&amp;-(t&lt;e)},r.max=function(t,e){return t^(t^e)&amp;-(t&lt;e)},r.isPow2=function(t){return!(t&amp;t-1||!t)},r.log2=function(t){var e,r;return e=(t&gt;65535)&lt;&lt;4,e|=r=((t&gt;&gt;&gt;=e)&gt;255)&lt;&lt;3,e|=r=((t&gt;&gt;&gt;=r)&gt;15)&lt;&lt;2,(e|=r=((t&gt;&gt;&gt;=r)&gt;3)&lt;&lt;1)|(t&gt;&gt;&gt;=r)&gt;&gt;1},r.log10=function(t){return t&gt;=1e9?9:t&gt;=1e8?8:t&gt;=1e7?7:t&gt;=1e6?6:t&gt;=1e5?5:t&gt;=1e4?4:t&gt;=1e3?3:t&gt;=100?2:t&gt;=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&amp;(t-=t&gt;&gt;&gt;1&amp;1431655765))+(t&gt;&gt;&gt;2&amp;858993459))+(t&gt;&gt;&gt;4)&amp;252645135)&gt;&gt;&gt;24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t&gt;&gt;&gt;1,t|=t&gt;&gt;&gt;2,t|=t&gt;&gt;&gt;4,t|=t&gt;&gt;&gt;8,(t|=t&gt;&gt;&gt;16)+1},r.prevPow2=function(t){return t|=t&gt;&gt;&gt;1,t|=t&gt;&gt;&gt;2,t|=t&gt;&gt;&gt;4,t|=t&gt;&gt;&gt;8,(t|=t&gt;&gt;&gt;16)-(t&gt;&gt;&gt;1)},r.parity=function(t){return t^=t&gt;&gt;&gt;16,t^=t&gt;&gt;&gt;8,t^=t&gt;&gt;&gt;4,27030&gt;&gt;&gt;(t&amp;=15)&amp;1};var i=new Array(256);!function(t){for(var e=0;e&lt;256;++e){var r=e,n=e,i=7;for(r&gt;&gt;&gt;=1;r;r&gt;&gt;&gt;=1)n&lt;&lt;=1,n|=1&amp;r,--i;t[e]=n&lt;&lt;i&amp;255}}(i),r.reverse=function(t){return i[255&amp;t]&lt;&lt;24|i[t&gt;&gt;&gt;8&amp;255]&lt;&lt;16|i[t&gt;&gt;&gt;16&amp;255]&lt;&lt;8|i[t&gt;&gt;&gt;24&amp;255]},r.interleave2=function(t,e){return(t=1431655765&amp;((t=858993459&amp;((t=252645135&amp;((t=16711935&amp;((t&amp;=65535)|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2))|t&lt;&lt;1))|(e=1431655765&amp;((e=858993459&amp;((e=252645135&amp;((e=16711935&amp;((e&amp;=65535)|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))|e&lt;&lt;1))&lt;&lt;1},r.deinterleave2=function(t,e){return(t=65535&amp;((t=16711935&amp;((t=252645135&amp;((t=858993459&amp;((t=t&gt;&gt;&gt;e&amp;1431655765)|t&gt;&gt;&gt;1))|t&gt;&gt;&gt;2))|t&gt;&gt;&gt;4))|t&gt;&gt;&gt;16))&lt;&lt;16&gt;&gt;16},r.interleave3=function(t,e,r){return t=1227133513&amp;((t=3272356035&amp;((t=251719695&amp;((t=4278190335&amp;((t&amp;=1023)|t&lt;&lt;16))|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2),(t|=(e=1227133513&amp;((e=3272356035&amp;((e=251719695&amp;((e=4278190335&amp;((e&amp;=1023)|e&lt;&lt;16))|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))&lt;&lt;1)|(r=1227133513&amp;((r=3272356035&amp;((r=251719695&amp;((r=4278190335&amp;((r&amp;=1023)|r&lt;&lt;16))|r&lt;&lt;8))|r&lt;&lt;4))|r&lt;&lt;2))&lt;&lt;2},r.deinterleave3=function(t,e){return(t=1023&amp;((t=4278190335&amp;((t=251719695&amp;((t=3272356035&amp;((t=t&gt;&gt;&gt;e&amp;1227133513)|t&gt;&gt;&gt;2))|t&gt;&gt;&gt;4))|t&gt;&gt;&gt;8))|t&gt;&gt;&gt;16))&lt;&lt;22&gt;&gt;22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&amp;-~e)-1&gt;&gt;&gt;n(t)+1}},{}],80:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;clamp&quot;);e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,f,h,p,d,g,m=null==e.cutoff?.25:e.cutoff,v=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error(&quot;For raw data width and height should be provided by options&quot;);r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&amp;&amp;t instanceof window.HTMLCanvasElement?(f=(h=t).getContext(&quot;2d&quot;),r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&amp;&amp;t instanceof window.CanvasRenderingContext2D?(h=t.canvas,f=t,r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&amp;&amp;t instanceof window.ImageData&amp;&amp;(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&amp;&amp;l instanceof window.Uint8ClampedArray||window.Uint8Array&amp;&amp;l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d&lt;g;d++)l[d]=c[d*u+y]/255;else if(1!==u)throw Error(&quot;Raw data can have only 1 value per pixel&quot;);var x=Array(r*o),b=Array(r*o),_=Array(s),w=Array(s),k=Array(s+1),M=Array(s);for(d=0,g=r*o;d&lt;g;d++){var A=l[d];x[d]=1===A?0:0===A?i:Math.pow(Math.max(0,.5-A),2),b[d]=1===A?i:0===A?0:Math.pow(Math.max(0,A-.5),2)}a(x,r,o,_,w,M,k),a(b,r,o,_,w,M,k);var T=window.Float32Array?new Float32Array(r*o):new Array(r*o);for(d=0,g=r*o;d&lt;g;d++)T[d]=n(1-((x[d]-b[d])/v+m),0,1);return T};var i=1e20;function a(t,e,r,n,i,a,s){for(var l=0;l&lt;e;l++){for(var c=0;c&lt;r;c++)n[c]=t[c*e+l];for(o(n,i,a,s,r),c=0;c&lt;r;c++)t[c*e+l]=i[c]}for(c=0;c&lt;r;c++){for(l=0;l&lt;e;l++)n[l]=t[c*e+l];for(o(n,i,a,s,e),l=0;l&lt;e;l++)t[c*e+l]=Math.sqrt(i[l])}}function o(t,e,r,n,a){r[0]=0,n[0]=-i,n[1]=+i;for(var o=1,s=0;o&lt;a;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l&lt;=n[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,n[s]=l,n[s+1]=+i}for(o=0,s=0;o&lt;a;o++){for(;n[s+1]&lt;o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}},{clamp:102}],81:[function(t,e,r){!function(e,r){&quot;use strict&quot;;function n(t,e){if(!t)throw new Error(e||&quot;Assertion failed&quot;)}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&amp;&amp;(&quot;le&quot;!==e&amp;&amp;&quot;be&quot;!==e||(r=e,e=10),this._init(t||0,e||10,r||&quot;be&quot;))}var o;&quot;object&quot;==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o=t(&quot;buffer&quot;).Buffer}catch(t){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a&lt;i;a++){var o=t.charCodeAt(a)-48;n&lt;&lt;=4,n|=o&gt;=49&amp;&amp;o&lt;=54?o-49+10:o&gt;=17&amp;&amp;o&lt;=22?o-17+10:15&amp;o}return n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o&lt;a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s&gt;=49?s-49+10:s&gt;=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;t.constructor.wordSize===a.wordSize&amp;&amp;Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)&gt;0?t:e},a.min=function(t,e){return t.cmp(e)&lt;0?t:e},a.prototype._init=function(t,e,r){if(&quot;number&quot;==typeof t)return this._initNumber(t,e,r);if(&quot;object&quot;==typeof t)return this._initArray(t,e,r);&quot;hex&quot;===e&amp;&amp;(e=16),n(e===(0|e)&amp;&amp;e&gt;=2&amp;&amp;e&lt;=36);var i=0;&quot;-&quot;===(t=t.toString().replace(/\s+/g,&quot;&quot;))[0]&amp;&amp;i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),&quot;-&quot;===t[0]&amp;&amp;(this.negative=1),this.strip(),&quot;le&quot;===r&amp;&amp;this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t&lt;0&amp;&amp;(this.negative=1,t=-t),t&lt;67108864?(this.words=[67108863&amp;t],this.length=1):t&lt;4503599627370496?(this.words=[67108863&amp;t,t/67108864&amp;67108863],this.length=2):(n(t&lt;9007199254740992),this.words=[67108863&amp;t,t/67108864&amp;67108863,1],this.length=3),&quot;le&quot;===r&amp;&amp;this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n(&quot;number&quot;==typeof t.length),t.length&lt;=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i&lt;this.length;i++)this.words[i]=0;var a,o,s=0;if(&quot;be&quot;===r)for(i=t.length-1,a=0;i&gt;=0;i-=3)o=t[i]|t[i-1]&lt;&lt;8|t[i-2]&lt;&lt;16,this.words[a]|=o&lt;&lt;s&amp;67108863,this.words[a+1]=o&gt;&gt;&gt;26-s&amp;67108863,(s+=24)&gt;=26&amp;&amp;(s-=26,a++);else if(&quot;le&quot;===r)for(i=0,a=0;i&lt;t.length;i+=3)o=t[i]|t[i+1]&lt;&lt;8|t[i+2]&lt;&lt;16,this.words[a]|=o&lt;&lt;s&amp;67108863,this.words[a+1]=o&gt;&gt;&gt;26-s&amp;67108863,(s+=24)&gt;=26&amp;&amp;(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r&lt;this.length;r++)this.words[r]=0;var n,i,a=0;for(r=t.length-6,n=0;r&gt;=e;r-=6)i=s(t,r,r+6),this.words[n]|=i&lt;&lt;a&amp;67108863,this.words[n+1]|=i&gt;&gt;&gt;26-a&amp;4194303,(a+=24)&gt;=26&amp;&amp;(a-=26,n++);r+6!==e&amp;&amp;(i=s(t,e,r+6),this.words[n]|=i&lt;&lt;a&amp;67108863,this.words[n+1]|=i&gt;&gt;&gt;26-a&amp;4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i&lt;=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u&lt;s;u+=n)c=l(t,u,u+n,e),this.imuln(i),this.words[0]+c&lt;67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var f=1;for(c=l(t,u,t.length,e),u=0;u&lt;o;u++)f*=e;this.imuln(f),this.words[0]+c&lt;67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e&lt;this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length&lt;t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length&gt;1&amp;&amp;0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&amp;&amp;0===this.words[0]&amp;&amp;(this.negative=0),this},a.prototype.inspect=function(){return(this.red?&quot;&lt;BN-R: &quot;:&quot;&lt;BN: &quot;)+this.toString(16)+&quot;&gt;&quot;};var c=[&quot;&quot;,&quot;0&quot;,&quot;00&quot;,&quot;000&quot;,&quot;0000&quot;,&quot;00000&quot;,&quot;000000&quot;,&quot;0000000&quot;,&quot;00000000&quot;,&quot;000000000&quot;,&quot;0000000000&quot;,&quot;00000000000&quot;,&quot;000000000000&quot;,&quot;0000000000000&quot;,&quot;00000000000000&quot;,&quot;000000000000000&quot;,&quot;0000000000000000&quot;,&quot;00000000000000000&quot;,&quot;000000000000000000&quot;,&quot;0000000000000000000&quot;,&quot;00000000000000000000&quot;,&quot;000000000000000000000&quot;,&quot;0000000000000000000000&quot;,&quot;00000000000000000000000&quot;,&quot;000000000000000000000000&quot;,&quot;0000000000000000000000000&quot;],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&amp;o,l=o/67108864|0;r.words[0]=s;for(var c=1;c&lt;n;c++){for(var u=l&gt;&gt;&gt;26,f=67108863&amp;l,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p&lt;=h;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&amp;o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||&quot;hex&quot;===t){r=&quot;&quot;;for(var i=0,a=0,o=0;o&lt;this.length;o++){var s=this.words[o],l=(16777215&amp;(s&lt;&lt;i|a)).toString(16);r=0!==(a=s&gt;&gt;&gt;24-i&amp;16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)&gt;=26&amp;&amp;(i-=26,o--)}for(0!==a&amp;&amp;(r=a.toString(16)+r);r.length%e!=0;)r=&quot;0&quot;+r;return 0!==this.negative&amp;&amp;(r=&quot;-&quot;+r),r}if(t===(0|t)&amp;&amp;t&gt;=2&amp;&amp;t&lt;=36){var h=u[t],p=f[t];r=&quot;&quot;;var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&amp;&amp;(r=&quot;0&quot;+r);r.length%e!=0;)r=&quot;0&quot;+r;return 0!==this.negative&amp;&amp;(r=&quot;-&quot;+r),r}n(!1,&quot;Base should be between 2 and 36&quot;)},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&amp;&amp;1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length&gt;2&amp;&amp;n(!1,&quot;Number can only safely store up to 53 bits&quot;),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(&quot;undefined&quot;!=typeof o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i&lt;=a,&quot;byte array longer than desired length&quot;),n(a&gt;0,&quot;Requested array length &lt;= 0&quot;),this.strip();var o,s,l=&quot;le&quot;===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s&lt;a;s++)c[s]=0}else{for(s=0;s&lt;a-i;s++)c[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e&gt;=4096&amp;&amp;(r+=13,e&gt;&gt;&gt;=13),e&gt;=64&amp;&amp;(r+=7,e&gt;&gt;&gt;=7),e&gt;=8&amp;&amp;(r+=4,e&gt;&gt;&gt;=4),e&gt;=2&amp;&amp;(r+=2,e&gt;&gt;&gt;=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&amp;e)&amp;&amp;(r+=13,e&gt;&gt;&gt;=13),0==(127&amp;e)&amp;&amp;(r+=7,e&gt;&gt;&gt;=7),0==(15&amp;e)&amp;&amp;(r+=4,e&gt;&gt;&gt;=4),0==(3&amp;e)&amp;&amp;(r+=2,e&gt;&gt;&gt;=2),0==(1&amp;e)&amp;&amp;r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e&lt;this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length&lt;t.length;)this.words[this.length++]=0;for(var e=0;e&lt;t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length&gt;t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length&gt;t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length&gt;t.length?t:this;for(var r=0;r&lt;e.length;r++)this.words[r]=this.words[r]&amp;t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length&gt;t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length&gt;t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length&gt;t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n&lt;r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n&lt;e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length&gt;t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length&gt;t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r&gt;0&amp;&amp;e--;for(var i=0;i&lt;e;i++)this.words[i]=67108863&amp;~this.words[i];return r&gt;0&amp;&amp;(this.words[i]=~this.words[i]&amp;67108863&gt;&gt;26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1&lt;&lt;i:this.words[r]&amp;~(1&lt;&lt;i),this.strip()},a.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&amp;&amp;0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&amp;&amp;0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length&gt;t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a&lt;n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&amp;e,i=e&gt;&gt;&gt;26;for(;0!==i&amp;&amp;a&lt;r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&amp;e,i=e&gt;&gt;&gt;26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a&lt;r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&amp;&amp;0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&amp;&amp;0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length&gt;t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i&gt;0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o&lt;n.length;o++)a=(e=(0|r.words[o])-(0|n.words[o])+a)&gt;&gt;26,this.words[o]=67108863&amp;e;for(;0!==a&amp;&amp;o&lt;r.length;o++)a=(e=(0|r.words[o])+a)&gt;&gt;26,this.words[o]=67108863&amp;e;if(0===a&amp;&amp;o&lt;r.length&amp;&amp;r!==this)for(;o&lt;r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&amp;&amp;(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,c=0,u=0|o[0],f=8191&amp;u,h=u&gt;&gt;&gt;13,p=0|o[1],d=8191&amp;p,g=p&gt;&gt;&gt;13,m=0|o[2],v=8191&amp;m,y=m&gt;&gt;&gt;13,x=0|o[3],b=8191&amp;x,_=x&gt;&gt;&gt;13,w=0|o[4],k=8191&amp;w,M=w&gt;&gt;&gt;13,A=0|o[5],T=8191&amp;A,S=A&gt;&gt;&gt;13,E=0|o[6],C=8191&amp;E,L=E&gt;&gt;&gt;13,z=0|o[7],P=8191&amp;z,O=z&gt;&gt;&gt;13,I=0|o[8],D=8191&amp;I,R=I&gt;&gt;&gt;13,B=0|o[9],F=8191&amp;B,N=B&gt;&gt;&gt;13,j=0|s[0],V=8191&amp;j,U=j&gt;&gt;&gt;13,q=0|s[1],H=8191&amp;q,G=q&gt;&gt;&gt;13,W=0|s[2],Y=8191&amp;W,X=W&gt;&gt;&gt;13,Z=0|s[3],$=8191&amp;Z,J=Z&gt;&gt;&gt;13,K=0|s[4],Q=8191&amp;K,tt=K&gt;&gt;&gt;13,et=0|s[5],rt=8191&amp;et,nt=et&gt;&gt;&gt;13,it=0|s[6],at=8191&amp;it,ot=it&gt;&gt;&gt;13,st=0|s[7],lt=8191&amp;st,ct=st&gt;&gt;&gt;13,ut=0|s[8],ft=8191&amp;ut,ht=ut&gt;&gt;&gt;13,pt=0|s[9],dt=8191&amp;pt,gt=pt&gt;&gt;&gt;13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,V))|0)+((8191&amp;(i=(i=Math.imul(f,U))+Math.imul(h,V)|0))&lt;&lt;13)|0;c=((a=Math.imul(h,U))+(i&gt;&gt;&gt;13)|0)+(mt&gt;&gt;&gt;26)|0,mt&amp;=67108863,n=Math.imul(d,V),i=(i=Math.imul(d,U))+Math.imul(g,V)|0,a=Math.imul(g,U);var vt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,G)|0)+(i&gt;&gt;&gt;13)|0)+(vt&gt;&gt;&gt;26)|0,vt&amp;=67108863,n=Math.imul(v,V),i=(i=Math.imul(v,U))+Math.imul(y,V)|0,a=Math.imul(y,U),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,X)|0)+(i&gt;&gt;&gt;13)|0)+(yt&gt;&gt;&gt;26)|0,yt&amp;=67108863,n=Math.imul(b,V),i=(i=Math.imul(b,U))+Math.imul(_,V)|0,a=Math.imul(_,U),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,$)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,J)|0)+(i&gt;&gt;&gt;13)|0)+(xt&gt;&gt;&gt;26)|0,xt&amp;=67108863,n=Math.imul(k,V),i=(i=Math.imul(k,U))+Math.imul(M,V)|0,a=Math.imul(M,U),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,J)|0;var bt=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,tt)|0)+(i&gt;&gt;&gt;13)|0)+(bt&gt;&gt;&gt;26)|0,bt&amp;=67108863,n=Math.imul(T,V),i=(i=Math.imul(T,U))+Math.imul(S,V)|0,a=Math.imul(S,U),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,nt)|0)+(i&gt;&gt;&gt;13)|0)+(_t&gt;&gt;&gt;26)|0,_t&amp;=67108863,n=Math.imul(C,V),i=(i=Math.imul(C,U))+Math.imul(L,V)|0,a=Math.imul(L,U),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,ot)|0)+(i&gt;&gt;&gt;13)|0)+(wt&gt;&gt;&gt;26)|0,wt&amp;=67108863,n=Math.imul(P,V),i=(i=Math.imul(P,U))+Math.imul(O,V)|0,a=Math.imul(O,U),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,ct)|0)+(i&gt;&gt;&gt;13)|0)+(kt&gt;&gt;&gt;26)|0,kt&amp;=67108863,n=Math.imul(D,V),i=(i=Math.imul(D,U))+Math.imul(R,V)|0,a=Math.imul(R,U),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,G)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var Mt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,ht)|0)+(i&gt;&gt;&gt;13)|0)+(Mt&gt;&gt;&gt;26)|0,Mt&amp;=67108863,n=Math.imul(F,V),i=(i=Math.imul(F,U))+Math.imul(N,V)|0,a=Math.imul(N,U),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,X)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ft)|0,a=a+Math.imul(g,ht)|0;var At=(c+(n=n+Math.imul(f,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(h,gt)|0)+(i&gt;&gt;&gt;13)|0)+(At&gt;&gt;&gt;26)|0,At&amp;=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(O,$)|0,a=a+Math.imul(O,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(g,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Tt&gt;&gt;&gt;26)|0,Tt&amp;=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(N,Y)|0,a=Math.imul(N,X),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(v,gt)|0)+Math.imul(y,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(y,gt)|0)+(i&gt;&gt;&gt;13)|0)+(St&gt;&gt;&gt;26)|0,St&amp;=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,J))+Math.imul(N,$)|0,a=Math.imul(N,J),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(O,rt)|0,a=a+Math.imul(O,nt)|0,n=n+Math.imul(C,at)|0,i=(i=i+Math.imul(C,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(M,ft)|0,a=a+Math.imul(M,ht)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(_,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Et&gt;&gt;&gt;26)|0,Et&amp;=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(P,at)|0,i=(i=i+Math.imul(P,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Ct=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(k,gt)|0)+Math.imul(M,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(M,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Ct&gt;&gt;&gt;26)|0,Ct&amp;=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Lt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(T,gt)|0)+Math.imul(S,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(S,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Lt&gt;&gt;&gt;26)|0,Lt&amp;=67108863,n=Math.imul(F,at),i=(i=Math.imul(F,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(O,ft)|0,a=a+Math.imul(O,ht)|0;var zt=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(L,gt)|0)+(i&gt;&gt;&gt;13)|0)+(zt&gt;&gt;&gt;26)|0,zt&amp;=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var Pt=(c+(n=n+Math.imul(P,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(P,gt)|0)+Math.imul(O,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(O,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Pt&gt;&gt;&gt;26)|0,Pt&amp;=67108863,n=Math.imul(F,ft),i=(i=Math.imul(F,ht))+Math.imul(N,ft)|0,a=Math.imul(N,ht);var Ot=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&amp;(i=(i=i+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))&lt;&lt;13)|0;c=((a=a+Math.imul(R,gt)|0)+(i&gt;&gt;&gt;13)|0)+(Ot&gt;&gt;&gt;26)|0,Ot&amp;=67108863;var It=(c+(n=Math.imul(F,dt))|0)+((8191&amp;(i=(i=Math.imul(F,gt))+Math.imul(N,dt)|0))&lt;&lt;13)|0;return c=((a=Math.imul(N,gt))+(i&gt;&gt;&gt;13)|0)+(It&gt;&gt;&gt;26)|0,It&amp;=67108863,l[0]=mt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Mt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=zt,l[16]=Pt,l[17]=Ot,l[18]=It,0!==c&amp;&amp;(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&amp;&amp;10===t.length?p(this,t,e):r&lt;63?h(this,t,e):r&lt;1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a&lt;r.length-1;a++){var o=i;i=0;for(var s=67108863&amp;n,l=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c&lt;=l;c++){var u=a-c,f=(0|t.words[u])*(0|e.words[c]),h=67108863&amp;f;s=67108863&amp;(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h&gt;&gt;&gt;26)|0)&gt;&gt;&gt;26,o&amp;=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n&lt;t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i&lt;e;i++)n|=(1&amp;t)&lt;&lt;e-i-1,t&gt;&gt;=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o&lt;a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},g.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o&lt;i;o&lt;&lt;=1)for(var s=o&lt;&lt;1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u&lt;i;u+=s)for(var f=l,h=c,p=0;p&lt;o;p++){var d=r[u+p],g=n[u+p],m=r[u+p+o],v=n[u+p+o],y=f*m-h*v;v=f*v+h*m,m=y,r[u+p]=d+m,n[u+p]=g+v,r[u+p+o]=d-m,n[u+p+o]=g-v,p!==s&amp;&amp;(y=l*f-c*h,h=l*h+c*f,f=y)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&amp;r,i=0;for(r=r/2|0;r;r&gt;&gt;&gt;=1)i++;return 1&lt;&lt;i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r&lt;=1))for(var n=0;n&lt;r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n&lt;e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&amp;i,r=i&lt;67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o&lt;e;o++)a+=0|t[o],r[2*o]=8191&amp;a,a&gt;&gt;&gt;=13,r[2*o+1]=8191&amp;a,a&gt;&gt;&gt;=13;for(o=2*e;o&lt;i;++o)r[o]=0;n(0===a),n(0==(-8192&amp;a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r&lt;t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,c,n),this.transform(o,a,s,l,n,i),this.transform(c,a,u,f,n,i);for(var p=0;p&lt;n;p++){var d=s[p]*u[p]-l[p]*f[p];l[p]=s[p]*f[p]+l[p]*u[p],s[p]=d}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),d(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n(&quot;number&quot;==typeof t),n(t&lt;67108864);for(var e=0,r=0;r&lt;this.length;r++){var i=(0|this.words[r])*t,a=(67108863&amp;i)+(67108863&amp;e);e&gt;&gt;=26,e+=i/67108864|0,e+=a&gt;&gt;&gt;26,this.words[r]=67108863&amp;a}return 0!==e&amp;&amp;(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r&lt;e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&amp;1&lt;&lt;i)&gt;&gt;&gt;i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n&lt;e.length&amp;&amp;0===e[n];n++,r=r.sqr());if(++n&lt;e.length)for(var i=r.sqr();n&lt;e.length;n++,i=i.sqr())0!==e[n]&amp;&amp;(r=r.mul(i));return r},a.prototype.iushln=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e,r=t%26,i=(t-r)/26,a=67108863&gt;&gt;&gt;26-r&lt;&lt;26-r;if(0!==r){var o=0;for(e=0;e&lt;this.length;e++){var s=this.words[e]&amp;a,l=(0|this.words[e])-s&lt;&lt;r;this.words[e]=l|o,o=s&gt;&gt;&gt;26-r}o&amp;&amp;(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e&gt;=0;e--)this.words[e+i]=this.words[e];for(e=0;e&lt;i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var i;n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863&gt;&gt;&gt;a&lt;&lt;a,l=r;if(i-=o,i=Math.max(0,i),l){for(var c=0;c&lt;o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length&gt;o)for(this.length-=o,c=0;c&lt;this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c&gt;=0&amp;&amp;(0!==u||c&gt;=i);c--){var f=0|this.words[c];this.words[c]=u&lt;&lt;26-a|f&gt;&gt;&gt;a,u=f&amp;s}return l&amp;&amp;0!==u&amp;&amp;(l.words[l.length++]=u),0===this.length&amp;&amp;(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e=t%26,r=(t-e)/26,i=1&lt;&lt;e;return!(this.length&lt;=r)&amp;&amp;!!(this.words[r]&amp;i)},a.prototype.imaskn=function(t){n(&quot;number&quot;==typeof t&amp;&amp;t&gt;=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,&quot;imaskn works only with positive numbers&quot;),this.length&lt;=r)return this;if(0!==e&amp;&amp;r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863&gt;&gt;&gt;e&lt;&lt;e;this.words[this.length-1]&amp;=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n(&quot;number&quot;==typeof t),n(t&lt;67108864),t&lt;0?this.isubn(-t):0!==this.negative?1===this.length&amp;&amp;(0|this.words[0])&lt;t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e&lt;this.length&amp;&amp;this.words[e]&gt;=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n(&quot;number&quot;==typeof t),n(t&lt;67108864),t&lt;0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&amp;&amp;this.words[0]&lt;0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e&lt;this.length&amp;&amp;this.words[e]&lt;0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a,o=t.length+r;this._expand(o);var s=0;for(i=0;i&lt;t.length;i++){a=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((a-=67108863&amp;l)&gt;&gt;26)-(l/67108864|0),this.words[i+r]=67108863&amp;a}for(;i&lt;this.length-r;i++)s=(a=(0|this.words[i+r])+s)&gt;&gt;26,this.words[i+r]=67108863&amp;a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i&lt;this.length;i++)s=(a=-(0|this.words[i])+s)&gt;&gt;26,this.words[i]=67108863&amp;a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&amp;&amp;(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if(&quot;mod&quot;!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c&lt;s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&amp;&amp;(n=u,s&amp;&amp;(s.words[l]=1));for(var f=l-1;f&gt;=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&amp;&amp;(s.words[f]=h)}return s&amp;&amp;s.strip(),n.strip(),&quot;div&quot;!==e&amp;&amp;0!==r&amp;&amp;n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&amp;&amp;0===t.negative?(s=this.neg().divmod(t,e),&quot;mod&quot;!==e&amp;&amp;(i=s.div.neg()),&quot;div&quot;!==e&amp;&amp;(o=s.mod.neg(),r&amp;&amp;0!==o.negative&amp;&amp;o.iadd(t)),{div:i,mod:o}):0===this.negative&amp;&amp;0!==t.negative?(s=this.divmod(t.neg(),e),&quot;mod&quot;!==e&amp;&amp;(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&amp;t.negative)?(s=this.neg().divmod(t.neg(),e),&quot;div&quot;!==e&amp;&amp;(o=s.mod.neg(),r&amp;&amp;0!==o.negative&amp;&amp;o.isub(t)),{div:s.div,mod:o}):t.length&gt;this.length||this.cmp(t)&lt;0?{div:new a(0),mod:this}:1===t.length?&quot;div&quot;===e?{div:this.divn(t.words[0]),mod:null}:&quot;mod&quot;===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,&quot;div&quot;,!1).div},a.prototype.mod=function(t){return this.divmod(t,&quot;mod&quot;,!1).mod},a.prototype.umod=function(t){return this.divmod(t,&quot;mod&quot;,!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a&lt;0||1===i&amp;&amp;0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t&lt;=67108863);for(var e=(1&lt;&lt;26)%t,r=0,i=this.length-1;i&gt;=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t&lt;=67108863);for(var e=0,r=this.length-1;r&gt;=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&amp;&amp;r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&amp;p)&amp;&amp;h&lt;26;++h,p&lt;&lt;=1);if(h&gt;0)for(e.iushrn(h);h-- &gt;0;)(i.isOdd()||o.isOdd())&amp;&amp;(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&amp;g)&amp;&amp;d&lt;26;++d,g&lt;&lt;=1);if(d&gt;0)for(r.iushrn(d);d-- &gt;0;)(s.isOdd()||l.isOdd())&amp;&amp;(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)&gt;=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)&gt;0&amp;&amp;r.cmpn(1)&gt;0;){for(var c=0,u=1;0==(e.words[0]&amp;u)&amp;&amp;c&lt;26;++c,u&lt;&lt;=1);if(c&gt;0)for(e.iushrn(c);c-- &gt;0;)o.isOdd()&amp;&amp;o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&amp;h)&amp;&amp;f&lt;26;++f,h&lt;&lt;=1);if(f&gt;0)for(r.iushrn(f);f-- &gt;0;)s.isOdd()&amp;&amp;s.iadd(l),s.iushrn(1);e.cmp(r)&gt;=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)&lt;0&amp;&amp;i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&amp;&amp;r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i&lt;0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&amp;this.words[0])},a.prototype.isOdd=function(){return 1==(1&amp;this.words[0])},a.prototype.andln=function(t){return this.words[0]&amp;t},a.prototype.bincn=function(t){n(&quot;number&quot;==typeof t);var e=t%26,r=(t-e)/26,i=1&lt;&lt;e;if(this.length&lt;=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&amp;&amp;o&lt;this.length;o++){var s=0|this.words[o];a=(s+=a)&gt;&gt;&gt;26,s&amp;=67108863,this.words[o]=s}return 0!==a&amp;&amp;(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&amp;&amp;0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t&lt;0;if(0!==this.negative&amp;&amp;!r)return-1;if(0===this.negative&amp;&amp;r)return 1;if(this.strip(),this.length&gt;1)e=1;else{r&amp;&amp;(t=-t),n(t&lt;=67108863,&quot;Number is too big&quot;);var i=0|this.words[0];e=i===t?0:i&lt;t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&amp;&amp;0===t.negative)return-1;if(0===this.negative&amp;&amp;0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length&gt;t.length)return 1;if(this.length&lt;t.length)return-1;for(var e=0,r=this.length-1;r&gt;=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n&lt;i?e=-1:n&gt;i&amp;&amp;(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)&gt;=0},a.prototype.gte=function(t){return this.cmp(t)&gt;=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)&lt;=0},a.prototype.lte=function(t){return this.cmp(t)&lt;=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return n(!this.red,&quot;Already a number in reduction context&quot;),n(0===this.negative,&quot;red works only with positives&quot;),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,&quot;fromRed works only with numbers in reduction context&quot;),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,&quot;Already a number in reduction context&quot;),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,&quot;redAdd works only with red numbers&quot;),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,&quot;redIAdd works only with red numbers&quot;),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,&quot;redSub works only with red numbers&quot;),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,&quot;redISub works only with red numbers&quot;),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,&quot;redShl works only with red numbers&quot;),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,&quot;redMul works only with red numbers&quot;),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,&quot;redMul works only with red numbers&quot;),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,&quot;redSqr works only with red numbers&quot;),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,&quot;redISqr works only with red numbers&quot;),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,&quot;redSqrt works only with red numbers&quot;),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,&quot;redInvm works only with red numbers&quot;),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,&quot;redNeg works only with red numbers&quot;),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&amp;&amp;!t.red,&quot;redPow(normalNum)&quot;),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,&quot;k256&quot;,&quot;ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f&quot;)}function x(){v.call(this,&quot;p224&quot;,&quot;ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001&quot;)}function b(){v.call(this,&quot;p192&quot;,&quot;ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff&quot;)}function _(){v.call(this,&quot;25519&quot;,&quot;7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed&quot;)}function w(t){if(&quot;string&quot;==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),&quot;modulus must be greater than 1&quot;),this.m=t,this.prime=null}function k(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&amp;&amp;(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e&gt;this.n);var n=e&lt;this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n&gt;0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n&lt;r;n++)e.words[n]=t.words[n];if(e.length=r,t.length&lt;=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&amp;i,n=10;n&lt;t.length;n++){var a=0|t.words[n];t.words[n-10]=(4194303&amp;a)&lt;&lt;4|i&gt;&gt;&gt;22,i=a}i&gt;&gt;&gt;=22,t.words[n-10]=i,0===i&amp;&amp;t.length&gt;10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r&lt;t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&amp;e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&amp;&amp;(t.length--,0===t.words[t.length-1]&amp;&amp;t.length--),t},i(x,v),i(b,v),i(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r&lt;t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&amp;n;n&gt;&gt;&gt;=26,t.words[r]=i,e=n}return 0!==e&amp;&amp;(t.words[t.length++]=e),t},a._prime=function(t){if(m[t])return m[t];var e;if(&quot;k256&quot;===t)e=new y;else if(&quot;p224&quot;===t)e=new x;else if(&quot;p192&quot;===t)e=new b;else{if(&quot;p25519&quot;!==t)throw new Error(&quot;Unknown prime &quot;+t);e=new _}return m[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,&quot;red works only with positives&quot;),n(t.red,&quot;red works only with red numbers&quot;)},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),&quot;red works only with positives&quot;),n(t.red&amp;&amp;t.red===e.red,&quot;red works only with red numbers&quot;)},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)&gt;=0&amp;&amp;r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)&gt;=0&amp;&amp;r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)&lt;0&amp;&amp;r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)&lt;0&amp;&amp;r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&amp;&amp;0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m&lt;d);var v=this.pow(f,new a(1).iushln(d-m-1));h=h.redMul(v),f=v.redSqr(),p=p.redMul(f),d=m}return h},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n&lt;r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&amp;&amp;(l=26),n=e.length-1;n&gt;=0;n--){for(var c=e.words[n],u=l-1;u&gt;=0;u--){var f=c&gt;&gt;u&amp;1;i!==r[0]&amp;&amp;(i=this.sqr(i)),0!==f||0!==o?(o&lt;&lt;=1,o|=f,(4===++s||0===n&amp;&amp;0===u)&amp;&amp;(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)&gt;=0?a=i.isub(this.m):i.cmpn(0)&lt;0&amp;&amp;(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)&gt;=0?o=i.isub(this.m):i.cmpn(0)&lt;0&amp;&amp;(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(&quot;undefined&quot;==typeof e||e,this)},{buffer:90}],82:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e&lt;i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e&lt;i;++e){var l=t[e],c=l.length;for(r=0;r&lt;c;++r){var u=o[s++]=new Array(c-1),f=0;for(n=0;n&lt;c;++n)n!==r&amp;&amp;(u[f++]=l[n]);if(1&amp;r){var h=u[1];u[1]=u[0],u[0]=h}}}return o}},{}],83:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){switch(arguments.length){case 1:return n=[],c(i=t,i,u,!0),n;case 2:return&quot;function&quot;==typeof e?c(t,t,e,!0):function(t,e){return n=[],c(t,e,u,!1),n}(t,e);case 3:return c(t,e,r,!1);default:throw new Error(&quot;box-intersect: Invalid arguments&quot;)}var i};var n,i=t(&quot;typedarray-pool&quot;),a=t(&quot;./lib/sweep&quot;),o=t(&quot;./lib/intersect&quot;);function s(t,e){for(var r=0;r&lt;t;++r)if(!(e[r]&lt;=e[r+t]))return!0;return!1}function l(t,e,r,n){for(var i=0,a=0,o=0,l=t.length;o&lt;l;++o){var c=t[o];if(!s(e,c)){for(var u=0;u&lt;2*e;++u)r[i++]=c[u];n[a++]=o}}return a}function c(t,e,r,n){var s=t.length,c=e.length;if(!(s&lt;=0||c&lt;=0)){var u=t[0].length&gt;&gt;&gt;1;if(!(u&lt;=0)){var f,h=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,h,p))&gt;0){if(1===u&amp;&amp;n)a.init(s),f=a.sweepComplete(u,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(e,u,d,g))&gt;0&amp;&amp;(a.init(s+c),f=1===u?a.sweepBipartite(u,r,0,s,h,p,0,c,d,g):o(u,r,n,s,h,p,c,d,g),i.free(d),i.free(g))}i.free(h),i.free(p)}return f}}}function u(t,e){n.push([t,e])}},{&quot;./lib/intersect&quot;:85,&quot;./lib/sweep&quot;:89,&quot;typedarray-pool&quot;:519}],84:[function(t,e,r){&quot;use strict&quot;;var n=&quot;d&quot;,i=&quot;ax&quot;,a=&quot;vv&quot;,o=&quot;fp&quot;,s=&quot;es&quot;,l=&quot;rs&quot;,c=&quot;re&quot;,u=&quot;rb&quot;,f=&quot;ri&quot;,h=&quot;rp&quot;,p=&quot;bs&quot;,d=&quot;be&quot;,g=&quot;bb&quot;,m=&quot;bi&quot;,v=&quot;bp&quot;,y=&quot;rv&quot;,x=&quot;Q&quot;,b=[n,i,a,l,c,u,f,p,d,g,m];function _(t){var e=&quot;bruteForce&quot;+(t?&quot;Full&quot;:&quot;Partial&quot;),r=[],_=b.slice();t||_.splice(3,0,o);var w=[&quot;function &quot;+e+&quot;(&quot;+_.join()+&quot;){&quot;];function k(e,o){var _=function(t,e,r){var o=&quot;bruteForce&quot;+(t?&quot;Red&quot;:&quot;Blue&quot;)+(e?&quot;Flip&quot;:&quot;&quot;)+(r?&quot;Full&quot;:&quot;&quot;),_=[&quot;function &quot;,o,&quot;(&quot;,b.join(),&quot;){&quot;,&quot;var &quot;,s,&quot;=2*&quot;,n,&quot;;&quot;],w=&quot;for(var i=&quot;+l+&quot;,&quot;+h+&quot;=&quot;+s+&quot;*&quot;+l+&quot;;i&lt;&quot;+c+&quot;;++i,&quot;+h+&quot;+=&quot;+s+&quot;){var x0=&quot;+u+&quot;[&quot;+i+&quot;+&quot;+h+&quot;],x1=&quot;+u+&quot;[&quot;+i+&quot;+&quot;+h+&quot;+&quot;+n+&quot;],xi=&quot;+f+&quot;[i];&quot;,k=&quot;for(var j=&quot;+p+&quot;,&quot;+v+&quot;=&quot;+s+&quot;*&quot;+p+&quot;;j&lt;&quot;+d+&quot;;++j,&quot;+v+&quot;+=&quot;+s+&quot;){var y0=&quot;+g+&quot;[&quot;+i+&quot;+&quot;+v+&quot;],&quot;+(r?&quot;y1=&quot;+g+&quot;[&quot;+i+&quot;+&quot;+v+&quot;+&quot;+n+&quot;],&quot;:&quot;&quot;)+&quot;yi=&quot;+m+&quot;[j];&quot;;return t?_.push(w,x,&quot;:&quot;,k):_.push(k,x,&quot;:&quot;,w),r?_.push(&quot;if(y1&lt;x0||x1&lt;y0)continue;&quot;):e?_.push(&quot;if(y0&lt;=x0||x1&lt;y0)continue;&quot;):_.push(&quot;if(y0&lt;x0||x1&lt;y0)continue;&quot;),_.push(&quot;for(var k=&quot;+i+&quot;+1;k&lt;&quot;+n+&quot;;++k){var r0=&quot;+u+&quot;[k+&quot;+h+&quot;],r1=&quot;+u+&quot;[k+&quot;+n+&quot;+&quot;+h+&quot;],b0=&quot;+g+&quot;[k+&quot;+v+&quot;],b1=&quot;+g+&quot;[k+&quot;+n+&quot;+&quot;+v+&quot;];if(r1&lt;b0||b1&lt;r0)continue &quot;+x+&quot;;}var &quot;+y+&quot;=&quot;+a+&quot;(&quot;),e?_.push(&quot;yi,xi&quot;):_.push(&quot;xi,yi&quot;),_.push(&quot;);if(&quot;+y+&quot;!==void 0)return &quot;+y+&quot;;}}}&quot;),{name:o,code:_.join(&quot;&quot;)}}(e,o,t);r.push(_.code),w.push(&quot;return &quot;+_.name+&quot;(&quot;+b.join()+&quot;);&quot;)}w.push(&quot;if(&quot;+c+&quot;-&quot;+l+&quot;&gt;&quot;+d+&quot;-&quot;+p+&quot;){&quot;),t?(k(!0,!1),w.push(&quot;}else{&quot;),k(!1,!1)):(w.push(&quot;if(&quot;+o+&quot;){&quot;),k(!0,!0),w.push(&quot;}else{&quot;),k(!0,!1),w.push(&quot;}}else{if(&quot;+o+&quot;){&quot;),k(!1,!0),w.push(&quot;}else{&quot;),k(!1,!1),w.push(&quot;}&quot;)),w.push(&quot;}}return &quot;+e);var M=r.join(&quot;&quot;)+w.join(&quot;&quot;);return new Function(M)()}r.partial=_(!1),r.full=_(!0)},{}],85:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,a,u,S,E,C,L){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(b*r);w.length&lt;a&amp;&amp;(n.free(w),w=n.mallocInt32(a));var o=i.nextPow2(_*r);k&lt;o&amp;&amp;(n.free(k),k=n.mallocDouble(o))}(t,a+E);var z,P=0,O=2*t;M(P++,0,0,a,0,E,r?16:0,-1/0,1/0),r||M(P++,0,0,E,0,a,1,-1/0,1/0);for(;P&gt;0;){var I=(P-=1)*b,D=w[I],R=w[I+1],B=w[I+2],F=w[I+3],N=w[I+4],j=w[I+5],V=P*_,U=k[V],q=k[V+1],H=1&amp;j,G=!!(16&amp;j),W=u,Y=S,X=C,Z=L;if(H&amp;&amp;(W=C,Y=L,X=u,Z=S),!(2&amp;j&amp;&amp;(B=m(t,D,R,B,W,Y,q),R&gt;=B)||4&amp;j&amp;&amp;(R=v(t,D,R,B,W,Y,U))&gt;=B)){var $=B-R,J=N-F;if(G){if(t*$*($+J)&lt;p){if(void 0!==(z=l.scanComplete(t,D,e,R,B,W,Y,F,N,X,Z)))return z;continue}}else{if(t*Math.min($,J)&lt;f){if(void 0!==(z=o(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}if(t*$*J&lt;h){if(void 0!==(z=l.scanBipartite(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}}var K=d(t,D,R,B,W,Y,U,q);if(R&lt;K)if(t*(K-R)&lt;f){if(void 0!==(z=s(t,D+1,e,R,K,W,Y,F,N,X,Z)))return z}else if(D===t-2){if(void 0!==(z=H?l.sweepBipartite(t,e,F,N,X,Z,R,K,W,Y):l.sweepBipartite(t,e,R,K,W,Y,F,N,X,Z)))return z}else M(P++,D+1,R,K,F,N,H,-1/0,1/0),M(P++,D+1,F,N,R,K,1^H,-1/0,1/0);if(K&lt;B){var Q=c(t,D,F,N,X,Z),tt=X[O*Q+D],et=g(t,D,Q,N,X,Z,tt);if(et&lt;N&amp;&amp;M(P++,D,K,B,et,N,(4|H)+(G?16:0),tt,q),F&lt;Q&amp;&amp;M(P++,D,K,B,F,Q,(2|H)+(G?16:0),U,tt),Q+1===et){if(void 0!==(z=G?T(t,D,e,K,B,W,Y,Q,X,Z[Q]):A(t,D,e,H,K,B,W,Y,Q,X,Z[Q])))return z}else if(Q&lt;et){var rt;if(G){if(rt=y(t,D,K,B,W,Y,tt),K&lt;rt){var nt=g(t,D,K,rt,W,Y,tt);if(D===t-2){if(K&lt;nt&amp;&amp;void 0!==(z=l.sweepComplete(t,e,K,nt,W,Y,Q,et,X,Z)))return z;if(nt&lt;rt&amp;&amp;void 0!==(z=l.sweepBipartite(t,e,nt,rt,W,Y,Q,et,X,Z)))return z}else K&lt;nt&amp;&amp;M(P++,D+1,K,nt,Q,et,16,-1/0,1/0),nt&lt;rt&amp;&amp;(M(P++,D+1,nt,rt,Q,et,0,-1/0,1/0),M(P++,D+1,Q,et,nt,rt,1,-1/0,1/0))}}else rt=H?x(t,D,K,B,W,Y,tt):y(t,D,K,B,W,Y,tt),K&lt;rt&amp;&amp;(D===t-2?z=H?l.sweepBipartite(t,e,Q,et,X,Z,K,rt,W,Y):l.sweepBipartite(t,e,K,rt,W,Y,Q,et,X,Z):(M(P++,D+1,K,rt,Q,et,H,-1/0,1/0),M(P++,D+1,Q,et,K,rt,1^H,-1/0,1/0)))}}}}};var n=t(&quot;typedarray-pool&quot;),i=t(&quot;bit-twiddle&quot;),a=t(&quot;./brute&quot;),o=a.partial,s=a.full,l=t(&quot;./sweep&quot;),c=t(&quot;./median&quot;),u=t(&quot;./partition&quot;),f=128,h=1&lt;&lt;22,p=1&lt;&lt;22,d=u(&quot;!(lo&gt;=p0)&amp;&amp;!(p1&gt;=hi)&quot;,[&quot;p0&quot;,&quot;p1&quot;]),g=u(&quot;lo===p0&quot;,[&quot;p0&quot;]),m=u(&quot;lo&lt;p0&quot;,[&quot;p0&quot;]),v=u(&quot;hi&lt;=p0&quot;,[&quot;p0&quot;]),y=u(&quot;lo&lt;=p0&amp;&amp;p0&lt;=hi&quot;,[&quot;p0&quot;]),x=u(&quot;lo&lt;p0&amp;&amp;p0&lt;=hi&quot;,[&quot;p0&quot;]),b=6,_=2,w=n.mallocInt32(1024),k=n.mallocDouble(1024);function M(t,e,r,n,i,a,o,s,l){var c=b*t;w[c]=e,w[c+1]=r,w[c+2]=n,w[c+3]=i,w[c+4]=a,w[c+5]=o;var u=_*t;k[u]=s,k[u+1]=l}function A(t,e,r,n,i,a,o,s,l,c,u){var f=2*t,h=l*f,p=c[h+e];t:for(var d=i,g=i*f;d&lt;a;++d,g+=f){var m=o[g+e],v=o[g+e+t];if(!(p&lt;m||v&lt;p)&amp;&amp;(!n||p!==m)){for(var y,x=s[d],b=e+1;b&lt;t;++b){m=o[g+b],v=o[g+b+t];var _=c[h+b],w=c[h+b+t];if(v&lt;_||w&lt;m)continue t}if(void 0!==(y=n?r(u,x):r(x,u)))return y}}}function T(t,e,r,n,i,a,o,s,l,c){var u=2*t,f=s*u,h=l[f+e];t:for(var p=n,d=n*u;p&lt;i;++p,d+=u){var g=o[p];if(g!==c){var m=a[d+e],v=a[d+e+t];if(!(h&lt;m||v&lt;h)){for(var y=e+1;y&lt;t;++y){m=a[d+y],v=a[d+y+t];var x=l[f+y],b=l[f+y+t];if(v&lt;x||b&lt;m)continue t}var _=r(g,c);if(void 0!==_)return _}}}}},{&quot;./brute&quot;:84,&quot;./median&quot;:86,&quot;./partition&quot;:87,&quot;./sweep&quot;:89,&quot;bit-twiddle&quot;:79,&quot;typedarray-pool&quot;:519}],86:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,o,s,l){if(o&lt;=r+1)return r;var c=r,u=o,f=o+r&gt;&gt;&gt;1,h=2*t,p=f,d=s[h*f+e];for(;c&lt;u;){if(u-c&lt;i){a(t,e,c,u,s,l),d=s[h*f+e];break}var g=u-c,m=Math.random()*g+c|0,v=s[h*m+e],y=Math.random()*g+c|0,x=s[h*y+e],b=Math.random()*g+c|0,_=s[h*b+e];v&lt;=x?_&gt;=x?(p=y,d=x):v&gt;=_?(p=m,d=v):(p=b,d=_):x&gt;=_?(p=y,d=x):_&gt;=v?(p=m,d=v):(p=b,d=_);for(var w=h*(u-1),k=h*p,M=0;M&lt;h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];l[u-1]=l[p],l[p]=T,p=n(t,e,c,u-1,s,l,d);for(var w=h*(u-1),k=h*p,M=0;M&lt;h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];if(l[u-1]=l[p],l[p]=T,f&lt;p){for(u=p-1;c&lt;u&amp;&amp;s[h*(u-1)+e]===d;)u-=1;u+=1}else{if(!(p&lt;f))break;for(c=p+1;c&lt;u&amp;&amp;s[h*c+e]===d;)c+=1}}return n(t,e,r,f,s,l,s[h*f+e])};var n=t(&quot;./partition&quot;)(&quot;lo&lt;p0&quot;,[&quot;p0&quot;]),i=8;function a(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l&lt;n;++l,s+=o)for(var c=i[s],u=l,f=o*(l-1);u&gt;r&amp;&amp;i[f+e]&gt;c;--u,f-=o){for(var h=f,p=f+o,d=0;d&lt;o;++d,++h,++p){var g=i[h];i[h]=i[p],i[p]=g}var m=a[u];a[u]=a[u-1],a[u-1]=m}}},{&quot;./partition&quot;:87}],87:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=&quot;abcdef&quot;.split(&quot;&quot;).concat(e),i=[];t.indexOf(&quot;lo&quot;)&gt;=0&amp;&amp;i.push(&quot;lo=e[k+n]&quot;);t.indexOf(&quot;hi&quot;)&gt;=0&amp;&amp;i.push(&quot;hi=e[k+o]&quot;);return r.push(n.replace(&quot;_&quot;,i.join()).replace(&quot;$&quot;,t)),Function.apply(void 0,r)};var n=&quot;for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d&gt;p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j&gt;s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m&quot;},{}],88:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){e&lt;=4*n?i(0,e-1,t):function t(e,r,f){var h=(r-e+1)/6|0,p=e+h,d=r-h,g=e+r&gt;&gt;1,m=g-h,v=g+h,y=p,x=m,b=g,_=v,w=d,k=e+1,M=r-1,A=0;c(y,x,f)&amp;&amp;(A=y,y=x,x=A);c(_,w,f)&amp;&amp;(A=_,_=w,w=A);c(y,b,f)&amp;&amp;(A=y,y=b,b=A);c(x,b,f)&amp;&amp;(A=x,x=b,b=A);c(y,_,f)&amp;&amp;(A=y,y=_,_=A);c(b,_,f)&amp;&amp;(A=b,b=_,_=A);c(x,w,f)&amp;&amp;(A=x,x=w,w=A);c(x,b,f)&amp;&amp;(A=x,x=b,b=A);c(_,w,f)&amp;&amp;(A=_,_=w,w=A);var T=f[2*x];var S=f[2*x+1];var E=f[2*_];var C=f[2*_+1];var L=2*y;var z=2*b;var P=2*w;var O=2*p;var I=2*g;var D=2*d;for(var R=0;R&lt;2;++R){var B=f[L+R],F=f[z+R],N=f[P+R];f[O+R]=B,f[I+R]=F,f[D+R]=N}o(m,e,f);o(v,r,f);for(var j=k;j&lt;=M;++j)if(u(j,T,S,f))j!==k&amp;&amp;a(j,k,f),++k;else if(!u(j,E,C,f))for(;;){if(u(M,E,C,f)){u(M,T,S,f)?(s(j,k,M,f),++k,--M):(a(j,M,f),--M);break}if(--M&lt;j)break}l(e,k-1,T,S,f);l(r,M+1,E,C,f);k-2-e&lt;=n?i(e,k-2,f):t(e,k-2,f);r-(M+2)&lt;=n?i(M+2,r,f):t(M+2,r,f);M-k&lt;=n?i(k,M,f):t(k,M,f)}(0,e-1,t)};var n=32;function i(t,e,r){for(var n=2*(t+1),i=t+1;i&lt;=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- &gt;t;){var c=r[l-2],u=r[l-1];if(c&lt;a)break;if(c===a&amp;&amp;u&lt;o)break;r[l]=c,r[l+1]=u,l-=2}r[l]=a,r[l+1]=o}}function a(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function o(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function s(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function l(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function c(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n&lt;i)&amp;&amp;(n!==i||r[t+1]&gt;r[e+1])}function u(t,e,r,n){var i=n[t*=2];return i&lt;e||i===e&amp;&amp;n[t+1]&lt;r}},{}],89:[function(t,e,r){&quot;use strict&quot;;e.exports={init:function(t){var e=i.nextPow2(t);s.length&lt;e&amp;&amp;(n.free(s),s=n.mallocInt32(e));l.length&lt;e&amp;&amp;(n.free(l),l=n.mallocInt32(e));c.length&lt;e&amp;&amp;(n.free(c),c=n.mallocInt32(e));u.length&lt;e&amp;&amp;(n.free(u),u=n.mallocInt32(e));f.length&lt;e&amp;&amp;(n.free(f),f=n.mallocInt32(e));h.length&lt;e&amp;&amp;(n.free(h),h=n.mallocInt32(e));var r=8*e;p.length&lt;r&amp;&amp;(n.free(p),p=n.mallocDouble(r))},sweepBipartite:function(t,e,r,n,i,f,h,m,v,y){for(var x=0,b=2*t,_=t-1,w=b-1,k=r;k&lt;n;++k){var M=f[k],A=b*k;p[x++]=i[A+_],p[x++]=-(M+1),p[x++]=i[A+w],p[x++]=M}for(var k=h;k&lt;m;++k){var M=y[k]+o,T=b*k;p[x++]=v[T+_],p[x++]=-M,p[x++]=v[T+w],p[x++]=M}var S=x&gt;&gt;&gt;1;a(p,S);for(var E=0,C=0,k=0;k&lt;S;++k){var L=0|p[2*k+1];if(L&gt;=o)d(c,u,C--,L=L-o|0);else if(L&gt;=0)d(s,l,E--,L);else if(L&lt;=-o){L=-L-o|0;for(var z=0;z&lt;E;++z){var P=e(s[z],L);if(void 0!==P)return P}g(c,u,C++,L)}else{L=-L-1|0;for(var z=0;z&lt;C;++z){var P=e(L,c[z]);if(void 0!==P)return P}g(s,l,E++,L)}}},sweepComplete:function(t,e,r,n,i,o,m,v,y,x){for(var b=0,_=2*t,w=t-1,k=_-1,M=r;M&lt;n;++M){var A=o[M]+1&lt;&lt;1,T=_*M;p[b++]=i[T+w],p[b++]=-A,p[b++]=i[T+k],p[b++]=A}for(var M=m;M&lt;v;++M){var A=x[M]+1&lt;&lt;1,S=_*M;p[b++]=y[S+w],p[b++]=1|-A,p[b++]=y[S+k],p[b++]=1|A}var E=b&gt;&gt;&gt;1;a(p,E);for(var C=0,L=0,z=0,M=0;M&lt;E;++M){var P=0|p[2*M+1],O=1&amp;P;if(M&lt;E-1&amp;&amp;P&gt;&gt;1==p[2*M+3]&gt;&gt;1&amp;&amp;(O=2,M+=1),P&lt;0){for(var I=-(P&gt;&gt;1)-1,D=0;D&lt;z;++D){var R=e(f[D],I);if(void 0!==R)return R}if(0!==O)for(var D=0;D&lt;C;++D){var R=e(s[D],I);if(void 0!==R)return R}if(1!==O)for(var D=0;D&lt;L;++D){var R=e(c[D],I);if(void 0!==R)return R}0===O?g(s,l,C++,I):1===O?g(c,u,L++,I):2===O&amp;&amp;g(f,h,z++,I)}else{var I=(P&gt;&gt;1)-1;0===O?d(s,l,C--,I):1===O?d(c,u,L--,I):2===O&amp;&amp;d(f,h,z--,I)}}},scanBipartite:function(t,e,r,n,i,c,u,f,h,m,v,y){var x=0,b=2*t,_=e,w=e+t,k=1,M=1;n?M=o:k=o;for(var A=i;A&lt;c;++A){var T=A+k,S=b*A;p[x++]=u[S+_],p[x++]=-T,p[x++]=u[S+w],p[x++]=T}for(var A=h;A&lt;m;++A){var T=A+M,E=b*A;p[x++]=v[E+_],p[x++]=-T}var C=x&gt;&gt;&gt;1;a(p,C);for(var L=0,A=0;A&lt;C;++A){var z=0|p[2*A+1];if(z&lt;0){var T=-z,P=!1;if(T&gt;=o?(P=!n,T-=o):(P=!!n,T-=1),P)g(s,l,L++,T);else{var O=y[T],I=b*T,D=v[I+e+1],R=v[I+e+1+t];t:for(var B=0;B&lt;L;++B){var F=s[B],N=b*F;if(!(R&lt;u[N+e+1]||u[N+e+1+t]&lt;D)){for(var j=e+2;j&lt;t;++j)if(v[I+j+t]&lt;u[N+j]||u[N+j+t]&lt;v[I+j])continue t;var V,U=f[F];if(void 0!==(V=n?r(O,U):r(U,O)))return V}}}}else d(s,l,L--,z-k)}},scanComplete:function(t,e,r,n,i,l,c,u,f,h,d){for(var g=0,m=2*t,v=e,y=e+t,x=n;x&lt;i;++x){var b=x+o,_=m*x;p[g++]=l[_+v],p[g++]=-b,p[g++]=l[_+y],p[g++]=b}for(var x=u;x&lt;f;++x){var b=x+1,w=m*x;p[g++]=h[w+v],p[g++]=-b}var k=g&gt;&gt;&gt;1;a(p,k);for(var M=0,x=0;x&lt;k;++x){var A=0|p[2*x+1];if(A&lt;0){var b=-A;if(b&gt;=o)s[M++]=b-o;else{var T=d[b-=1],S=m*b,E=h[S+e+1],C=h[S+e+1+t];t:for(var L=0;L&lt;M;++L){var z=s[L],P=c[z];if(P===T)break;var O=m*z;if(!(C&lt;l[O+e+1]||l[O+e+1+t]&lt;E)){for(var I=e+2;I&lt;t;++I)if(h[S+I+t]&lt;l[O+I]||l[O+I+t]&lt;h[S+I])continue t;var D=r(P,T);if(void 0!==D)return D}}}}else{for(var b=A-o,L=M-1;L&gt;=0;--L)if(s[L]===b){for(var I=L+1;I&lt;M;++I)s[I-1]=s[I];break}--M}}}};var n=t(&quot;typedarray-pool&quot;),i=t(&quot;bit-twiddle&quot;),a=t(&quot;./sort&quot;),o=1&lt;&lt;28,s=n.mallocInt32(1024),l=n.mallocInt32(1024),c=n.mallocInt32(1024),u=n.mallocInt32(1024),f=n.mallocInt32(1024),h=n.mallocInt32(1024),p=n.mallocDouble(8192);function d(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function g(t,e,r,n){t[r]=n,e[n]=r}},{&quot;./sort&quot;:88,&quot;bit-twiddle&quot;:79,&quot;typedarray-pool&quot;:519}],90:[function(t,e,r){},{}],91:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&amp;&amp;e.push(r);return r},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&amp;&amp;Object.prototype.hasOwnProperty.call(this,&quot;_events&quot;)||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,l=10;try{var c={};Object.defineProperty&amp;&amp;Object.defineProperty(c,&quot;x&quot;,{value:0}),s=0===c.x}catch(t){s=!1}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var a,o,s;if(&quot;function&quot;!=typeof r)throw new TypeError('&quot;listener&quot; argument must be a function');if((o=t._events)?(o.newListener&amp;&amp;(t.emit(&quot;newListener&quot;,e,r.listener?r.listener:r),o=t._events),s=o[e]):(o=t._events=n(null),t._eventsCount=0),s){if(&quot;function&quot;==typeof s?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&amp;&amp;(a=u(t))&amp;&amp;a&gt;0&amp;&amp;s.length&gt;a){s.warned=!0;var l=new Error(&quot;Possible EventEmitter memory leak detected. &quot;+s.length+' &quot;'+String(e)+'&quot; listeners added. Use emitter.setMaxListeners() to increase limit.');l.name=&quot;MaxListenersExceededWarning&quot;,l.emitter=t,l.type=e,l.count=s.length,&quot;object&quot;==typeof console&amp;&amp;console.warn&amp;&amp;console.warn(&quot;%s: %s&quot;,l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e&lt;t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=a.call(h,n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?&quot;function&quot;==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r&lt;e.length;++r)e[r]=t[r].listener||t[r];return e}(i):m(i,i.length):[]}function g(t){var e=this._events;if(e){var r=e[t];if(&quot;function&quot;==typeof r)return 1;if(r)return r.length}return 0}function m(t,e){for(var r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n];return r}s?Object.defineProperty(o,&quot;defaultMaxListeners&quot;,{enumerable:!0,get:function(){return l},set:function(t){if(&quot;number&quot;!=typeof t||t&lt;0||t!=t)throw new TypeError('&quot;defaultMaxListeners&quot; must be a positive number');l=t}}):o.defaultMaxListeners=l,o.prototype.setMaxListeners=function(t){if(&quot;number&quot;!=typeof t||t&lt;0||isNaN(t))throw new TypeError('&quot;n&quot; argument must be a positive number');return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){var e,r,n,i,a,o,s=&quot;error&quot;===t;if(o=this._events)s=s&amp;&amp;null==o.error;else if(!s)return!1;if(s){if(arguments.length&gt;1&amp;&amp;(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled &quot;error&quot; event. ('+e+&quot;)&quot;);throw l.context=e,l}if(!(r=o[t]))return!1;var c=&quot;function&quot;==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=m(t,n),a=0;a&lt;n;++a)i[a].call(r)}(r,c,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,a=m(t,i),o=0;o&lt;i;++o)a[o].call(r,n)}(r,c,this,arguments[1]);break;case 3:!function(t,e,r,n,i){if(e)t.call(r,n,i);else for(var a=t.length,o=m(t,a),s=0;s&lt;a;++s)o[s].call(r,n,i)}(r,c,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,i,a){if(e)t.call(r,n,i,a);else for(var o=t.length,s=m(t,o),l=0;l&lt;o;++l)s[l].call(r,n,i,a)}(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),a=1;a&lt;n;a++)i[a-1]=arguments[a];!function(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,a=m(t,i),o=0;o&lt;i;++o)a[o].apply(r,n)}(r,c,this,i)}return!0},o.prototype.addListener=function(t,e){return f(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return f(this,t,e,!0)},o.prototype.once=function(t,e){if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;listener&quot; argument must be a function');return this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;listener&quot; argument must be a function');return this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,i,a,o,s;if(&quot;function&quot;!=typeof e)throw new TypeError('&quot;listener&quot; argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&amp;&amp;this.emit(&quot;removeListener&quot;,t,r.listener||e));else if(&quot;function&quot;!=typeof r){for(a=-1,o=r.length-1;o&gt;=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,a=o;break}if(a&lt;0)return this;0===a?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n&lt;i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,a),1===r.length&amp;&amp;(i[t]=r[0]),i.removeListener&amp;&amp;this.emit(&quot;removeListener&quot;,t,s||e)}return this},o.prototype.removeAllListeners=function(t){var e,r,a;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&amp;&amp;(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var o,s=i(r);for(a=0;a&lt;s.length;++a)&quot;removeListener&quot;!==(o=s[a])&amp;&amp;this.removeAllListeners(o);return this.removeAllListeners(&quot;removeListener&quot;),this._events=n(null),this._eventsCount=0,this}if(&quot;function&quot;==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(a=e.length-1;a&gt;=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return&quot;function&quot;==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount&gt;0?Reflect.ownKeys(this._events):[]}},{}],92:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;base64-js&quot;),i=t(&quot;ieee754&quot;);r.Buffer=s,r.SlowBuffer=function(t){+t!=t&amp;&amp;(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t&gt;a)throw new RangeError('The value &quot;'+t+'&quot; is invalid for option &quot;size&quot;');var e=new Uint8Array(t);return e.__proto__=s.prototype,e}function s(t,e,r){if(&quot;number&quot;==typeof t){if(&quot;string&quot;==typeof e)throw new TypeError('The &quot;string&quot; argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,e,r){if(&quot;string&quot;==typeof t)return function(t,e){&quot;string&quot;==typeof e&amp;&amp;&quot;&quot;!==e||(e=&quot;utf8&quot;);if(!s.isEncoding(e))throw new TypeError(&quot;Unknown encoding: &quot;+e);var r=0|p(t,e),n=o(r),i=n.write(t,e);i!==r&amp;&amp;(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw TypeError(&quot;The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type &quot;+typeof t);if(j(t,ArrayBuffer)||t&amp;&amp;j(t.buffer,ArrayBuffer))return function(t,e,r){if(e&lt;0||t.byteLength&lt;e)throw new RangeError('&quot;offset&quot; is outside of buffer bounds');if(t.byteLength&lt;e+(r||0))throw new RangeError('&quot;length&quot; is outside of buffer bounds');var n;n=void 0===e&amp;&amp;void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=s.prototype,n}(t,e,r);if(&quot;number&quot;==typeof t)throw new TypeError('The &quot;value&quot; argument must not be of type number. Received type number');var n=t.valueOf&amp;&amp;t.valueOf();if(null!=n&amp;&amp;n!==t)return s.from(n,e,r);var i=function(t){if(s.isBuffer(t)){var e=0|h(t.length),r=o(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return&quot;number&quot;!=typeof t.length||V(t.length)?o(0):f(t);if(&quot;Buffer&quot;===t.type&amp;&amp;Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if(&quot;undefined&quot;!=typeof Symbol&amp;&amp;null!=Symbol.toPrimitive&amp;&amp;&quot;function&quot;==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive](&quot;string&quot;),e,r);throw new TypeError(&quot;The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type &quot;+typeof t)}function c(t){if(&quot;number&quot;!=typeof t)throw new TypeError('&quot;size&quot; argument must be of type number');if(t&lt;0)throw new RangeError('The value &quot;'+t+'&quot; is invalid for option &quot;size&quot;')}function u(t){return c(t),o(t&lt;0?0:0|h(t))}function f(t){for(var e=t.length&lt;0?0:0|h(t.length),r=o(e),n=0;n&lt;e;n+=1)r[n]=255&amp;t[n];return r}function h(t){if(t&gt;=a)throw new RangeError(&quot;Attempt to allocate Buffer larger than maximum size: 0x&quot;+a.toString(16)+&quot; bytes&quot;);return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if(&quot;string&quot;!=typeof t)throw new TypeError('The &quot;string&quot; argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length&gt;2&amp;&amp;!0===arguments[2];if(!n&amp;&amp;0===r)return 0;for(var i=!1;;)switch(e){case&quot;ascii&quot;:case&quot;latin1&quot;:case&quot;binary&quot;:return r;case&quot;utf8&quot;:case&quot;utf-8&quot;:return B(t).length;case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return 2*r;case&quot;hex&quot;:return r&gt;&gt;&gt;1;case&quot;base64&quot;:return F(t).length;default:if(i)return n?-1:B(t).length;e=(&quot;&quot;+e).toLowerCase(),i=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if(&quot;string&quot;==typeof r?(n=r,r=0):r&gt;2147483647?r=2147483647:r&lt;-2147483648&amp;&amp;(r=-2147483648),V(r=+r)&amp;&amp;(r=i?0:t.length-1),r&lt;0&amp;&amp;(r=t.length+r),r&gt;=t.length){if(i)return-1;r=t.length-1}else if(r&lt;0){if(!i)return-1;r=0}if(&quot;string&quot;==typeof e&amp;&amp;(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if(&quot;number&quot;==typeof e)return e&amp;=255,&quot;function&quot;==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError(&quot;val must be string, number or Buffer&quot;)}function m(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&amp;&amp;(&quot;ucs2&quot;===(n=String(n).toLowerCase())||&quot;ucs-2&quot;===n||&quot;utf16le&quot;===n||&quot;utf-16le&quot;===n)){if(t.length&lt;2||e.length&lt;2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;a&lt;s;a++)if(c(t,a)===c(e,-1===u?0:a-u)){if(-1===u&amp;&amp;(u=a),a-u+1===l)return u*o}else-1!==u&amp;&amp;(a-=a-u),u=-1}else for(r+l&gt;s&amp;&amp;(r=s-l),a=r;a&gt;=0;a--){for(var f=!0,h=0;h&lt;l;h++)if(c(t,a+h)!==c(e,h)){f=!1;break}if(f)return a}return-1}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))&gt;i&amp;&amp;(n=i):n=i;var a=e.length;n&gt;a/2&amp;&amp;(n=a/2);for(var o=0;o&lt;n;++o){var s=parseInt(e.substr(2*o,2),16);if(V(s))return o;t[r+o]=s}return o}function y(t,e,r,n){return N(B(e,t.length-r),t,r,n)}function x(t,e,r,n){return N(function(t){for(var e=[],r=0;r&lt;t.length;++r)e.push(255&amp;t.charCodeAt(r));return e}(e),t,r,n)}function b(t,e,r,n){return x(t,e,r,n)}function _(t,e,r,n){return N(F(e),t,r,n)}function w(t,e,r,n){return N(function(t,e){for(var r,n,i,a=[],o=0;o&lt;t.length&amp;&amp;!((e-=2)&lt;0);++o)r=t.charCodeAt(o),n=r&gt;&gt;8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&amp;&amp;r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i&lt;r;){var a,o,s,l,c=t[i],u=null,f=c&gt;239?4:c&gt;223?3:c&gt;191?2:1;if(i+f&lt;=r)switch(f){case 1:c&lt;128&amp;&amp;(u=c);break;case 2:128==(192&amp;(a=t[i+1]))&amp;&amp;(l=(31&amp;c)&lt;&lt;6|63&amp;a)&gt;127&amp;&amp;(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;(l=(15&amp;c)&lt;&lt;12|(63&amp;a)&lt;&lt;6|63&amp;o)&gt;2047&amp;&amp;(l&lt;55296||l&gt;57343)&amp;&amp;(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;128==(192&amp;s)&amp;&amp;(l=(15&amp;c)&lt;&lt;18|(63&amp;a)&lt;&lt;12|(63&amp;o)&lt;&lt;6|63&amp;s)&gt;65535&amp;&amp;l&lt;1114112&amp;&amp;(u=l)}null===u?(u=65533,f=1):u&gt;65535&amp;&amp;(u-=65536,n.push(u&gt;&gt;&gt;10&amp;1023|55296),u=56320|1023&amp;u),n.push(u),i+=f}return function(t){var e=t.length;if(e&lt;=A)return String.fromCharCode.apply(String,t);var r=&quot;&quot;,n=0;for(;n&lt;e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=A));return r}(n)}r.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||&quot;undefined&quot;==typeof console||&quot;function&quot;!=typeof console.error||console.error(&quot;This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.&quot;),Object.defineProperty(s.prototype,&quot;parent&quot;,{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,&quot;offset&quot;,{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),&quot;undefined&quot;!=typeof Symbol&amp;&amp;null!=Symbol.species&amp;&amp;s[Symbol.species]===s&amp;&amp;Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(t,e,r){return l(t,e,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(t,e,r){return function(t,e,r){return c(t),t&lt;=0?o(t):void 0!==e?&quot;string&quot;==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},s.allocUnsafe=function(t){return u(t)},s.allocUnsafeSlow=function(t){return u(t)},s.isBuffer=function(t){return null!=t&amp;&amp;!0===t._isBuffer&amp;&amp;t!==s.prototype},s.compare=function(t,e){if(j(t,Uint8Array)&amp;&amp;(t=s.from(t,t.offset,t.byteLength)),j(e,Uint8Array)&amp;&amp;(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The &quot;buf1&quot;, &quot;buf2&quot; arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i&lt;a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r&lt;n?-1:n&lt;r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case&quot;hex&quot;:case&quot;utf8&quot;:case&quot;utf-8&quot;:case&quot;ascii&quot;:case&quot;latin1&quot;:case&quot;binary&quot;:case&quot;base64&quot;:case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('&quot;list&quot; argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r&lt;t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r&lt;t.length;++r){var a=t[r];if(j(a,Uint8Array)&amp;&amp;(a=s.from(a)),!s.isBuffer(a))throw new TypeError('&quot;list&quot; argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(&quot;Buffer size must be a multiple of 16-bits&quot;);for(var e=0;e&lt;t;e+=2)d(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(&quot;Buffer size must be a multiple of 32-bits&quot;);for(var e=0;e&lt;t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(&quot;Buffer size must be a multiple of 64-bits&quot;);for(var e=0;e&lt;t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?&quot;&quot;:0===arguments.length?M(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e&lt;0)&amp;&amp;(e=0),e&gt;this.length)return&quot;&quot;;if((void 0===r||r&gt;this.length)&amp;&amp;(r=this.length),r&lt;=0)return&quot;&quot;;if((r&gt;&gt;&gt;=0)&lt;=(e&gt;&gt;&gt;=0))return&quot;&quot;;for(t||(t=&quot;utf8&quot;);;)switch(t){case&quot;hex&quot;:return E(this,e,r);case&quot;utf8&quot;:case&quot;utf-8&quot;:return M(this,e,r);case&quot;ascii&quot;:return T(this,e,r);case&quot;latin1&quot;:case&quot;binary&quot;:return S(this,e,r);case&quot;base64&quot;:return k(this,e,r);case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return C(this,e,r);default:if(n)throw new TypeError(&quot;Unknown encoding: &quot;+t);t=(t+&quot;&quot;).toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError(&quot;Argument must be a Buffer&quot;);return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t=&quot;&quot;,e=r.INSPECT_MAX_BYTES;return t=this.toString(&quot;hex&quot;,0,e).replace(/(.{2})/g,&quot;$1 &quot;).trim(),this.length&gt;e&amp;&amp;(t+=&quot; ... &quot;),&quot;&lt;Buffer &quot;+t+&quot;&gt;&quot;},s.prototype.compare=function(t,e,r,n,i){if(j(t,Uint8Array)&amp;&amp;(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The &quot;target&quot; argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&amp;&amp;(e=0),void 0===r&amp;&amp;(r=t?t.length:0),void 0===n&amp;&amp;(n=0),void 0===i&amp;&amp;(i=this.length),e&lt;0||r&gt;t.length||n&lt;0||i&gt;this.length)throw new RangeError(&quot;out of range index&quot;);if(n&gt;=i&amp;&amp;e&gt;=r)return 0;if(n&gt;=i)return-1;if(e&gt;=r)return 1;if(this===t)return 0;for(var a=(i&gt;&gt;&gt;=0)-(n&gt;&gt;&gt;=0),o=(r&gt;&gt;&gt;=0)-(e&gt;&gt;&gt;=0),l=Math.min(a,o),c=this.slice(n,i),u=t.slice(e,r),f=0;f&lt;l;++f)if(c[f]!==u[f]){a=c[f],o=u[f];break}return a&lt;o?-1:o&lt;a?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n=&quot;utf8&quot;,r=this.length,e=0;else if(void 0===r&amp;&amp;&quot;string&quot;==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(&quot;Buffer.write(string, encoding, offset[, length]) is no longer supported&quot;);e&gt;&gt;&gt;=0,isFinite(r)?(r&gt;&gt;&gt;=0,void 0===n&amp;&amp;(n=&quot;utf8&quot;)):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r&gt;i)&amp;&amp;(r=i),t.length&gt;0&amp;&amp;(r&lt;0||e&lt;0)||e&gt;this.length)throw new RangeError(&quot;Attempt to write outside buffer bounds&quot;);n||(n=&quot;utf8&quot;);for(var a=!1;;)switch(n){case&quot;hex&quot;:return v(this,t,e,r);case&quot;utf8&quot;:case&quot;utf-8&quot;:return y(this,t,e,r);case&quot;ascii&quot;:return x(this,t,e,r);case&quot;latin1&quot;:case&quot;binary&quot;:return b(this,t,e,r);case&quot;base64&quot;:return _(this,t,e,r);case&quot;ucs2&quot;:case&quot;ucs-2&quot;:case&quot;utf16le&quot;:case&quot;utf-16le&quot;:return w(this,t,e,r);default:if(a)throw new TypeError(&quot;Unknown encoding: &quot;+n);n=(&quot;&quot;+n).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:&quot;Buffer&quot;,data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(t,e,r){var n=&quot;&quot;;r=Math.min(t.length,r);for(var i=e;i&lt;r;++i)n+=String.fromCharCode(127&amp;t[i]);return n}function S(t,e,r){var n=&quot;&quot;;r=Math.min(t.length,r);for(var i=e;i&lt;r;++i)n+=String.fromCharCode(t[i]);return n}function E(t,e,r){var n=t.length;(!e||e&lt;0)&amp;&amp;(e=0),(!r||r&lt;0||r&gt;n)&amp;&amp;(r=n);for(var i=&quot;&quot;,a=e;a&lt;r;++a)i+=R(t[a]);return i}function C(t,e,r){for(var n=t.slice(e,r),i=&quot;&quot;,a=0;a&lt;n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function L(t,e,r){if(t%1!=0||t&lt;0)throw new RangeError(&quot;offset is not uint&quot;);if(t+e&gt;r)throw new RangeError(&quot;Trying to access beyond buffer length&quot;)}function z(t,e,r,n,i,a){if(!s.isBuffer(t))throw new TypeError('&quot;buffer&quot; argument must be a Buffer instance');if(e&gt;i||e&lt;a)throw new RangeError('&quot;value&quot; argument is out of bounds');if(r+n&gt;t.length)throw new RangeError(&quot;Index out of range&quot;)}function P(t,e,r,n,i,a){if(r+n&gt;t.length)throw new RangeError(&quot;Index out of range&quot;);if(r&lt;0)throw new RangeError(&quot;Index out of range&quot;)}function O(t,e,r,n,a){return e=+e,r&gt;&gt;&gt;=0,a||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,a){return e=+e,r&gt;&gt;&gt;=0,a||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r=this.length;(t=~~t)&lt;0?(t+=r)&lt;0&amp;&amp;(t=0):t&gt;r&amp;&amp;(t=r),(e=void 0===e?r:~~e)&lt;0?(e+=r)&lt;0&amp;&amp;(e=0):e&gt;r&amp;&amp;(e=r),e&lt;t&amp;&amp;(e=t);var n=this.subarray(t,e);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a&lt;e&amp;&amp;(i*=256);)n+=this[t+a]*i;return n},s.prototype.readUIntBE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e&gt;0&amp;&amp;(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,2,this.length),this[t]|this[t+1]&lt;&lt;8},s.prototype.readUInt16BE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,2,this.length),this[t]&lt;&lt;8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),(this[t]|this[t+1]&lt;&lt;8|this[t+2]&lt;&lt;16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]&lt;&lt;16|this[t+2]&lt;&lt;8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a&lt;e&amp;&amp;(i*=256);)n+=this[t+a]*i;return n&gt;=(i*=128)&amp;&amp;(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t&gt;&gt;&gt;=0,e&gt;&gt;&gt;=0,r||L(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n&gt;0&amp;&amp;(i*=256);)a+=this[t+--n]*i;return a&gt;=(i*=128)&amp;&amp;(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,1,this.length),128&amp;this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t&gt;&gt;&gt;=0,e||L(t,2,this.length);var r=this[t]|this[t+1]&lt;&lt;8;return 32768&amp;r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t&gt;&gt;&gt;=0,e||L(t,2,this.length);var r=this[t+1]|this[t]&lt;&lt;8;return 32768&amp;r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),this[t]|this[t+1]&lt;&lt;8|this[t+2]&lt;&lt;16|this[t+3]&lt;&lt;24},s.prototype.readInt32BE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),this[t]&lt;&lt;24|this[t+1]&lt;&lt;16|this[t+2]&lt;&lt;8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t&gt;&gt;&gt;=0,e||L(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e&gt;&gt;&gt;=0,r&gt;&gt;&gt;=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&amp;t;++a&lt;r&amp;&amp;(i*=256);)this[e+a]=t/i&amp;255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e&gt;&gt;&gt;=0,r&gt;&gt;&gt;=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&amp;t;--i&gt;=0&amp;&amp;(a*=256);)this[e+i]=t/a&amp;255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,1,255,0),this[e]=255&amp;t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,65535,0),this[e]=255&amp;t,this[e+1]=t&gt;&gt;&gt;8,e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,65535,0),this[e]=t&gt;&gt;&gt;8,this[e+1]=255&amp;t,e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,4294967295,0),this[e+3]=t&gt;&gt;&gt;24,this[e+2]=t&gt;&gt;&gt;16,this[e+1]=t&gt;&gt;&gt;8,this[e]=255&amp;t,e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,4294967295,0),this[e]=t&gt;&gt;&gt;24,this[e+1]=t&gt;&gt;&gt;16,this[e+2]=t&gt;&gt;&gt;8,this[e+3]=255&amp;t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e&gt;&gt;&gt;=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&amp;t;++a&lt;r&amp;&amp;(o*=256);)t&lt;0&amp;&amp;0===s&amp;&amp;0!==this[e+a-1]&amp;&amp;(s=1),this[e+a]=(t/o&gt;&gt;0)-s&amp;255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e&gt;&gt;&gt;=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&amp;t;--a&gt;=0&amp;&amp;(o*=256);)t&lt;0&amp;&amp;0===s&amp;&amp;0!==this[e+a+1]&amp;&amp;(s=1),this[e+a]=(t/o&gt;&gt;0)-s&amp;255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,1,127,-128),t&lt;0&amp;&amp;(t=255+t+1),this[e]=255&amp;t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,32767,-32768),this[e]=255&amp;t,this[e+1]=t&gt;&gt;&gt;8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,2,32767,-32768),this[e]=t&gt;&gt;&gt;8,this[e+1]=255&amp;t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,2147483647,-2147483648),this[e]=255&amp;t,this[e+1]=t&gt;&gt;&gt;8,this[e+2]=t&gt;&gt;&gt;16,this[e+3]=t&gt;&gt;&gt;24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e&gt;&gt;&gt;=0,r||z(this,t,e,4,2147483647,-2147483648),t&lt;0&amp;&amp;(t=4294967295+t+1),this[e]=t&gt;&gt;&gt;24,this[e+1]=t&gt;&gt;&gt;16,this[e+2]=t&gt;&gt;&gt;8,this[e+3]=255&amp;t,e+4},s.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError(&quot;argument should be a Buffer&quot;);if(r||(r=0),n||0===n||(n=this.length),e&gt;=t.length&amp;&amp;(e=t.length),e||(e=0),n&gt;0&amp;&amp;n&lt;r&amp;&amp;(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e&lt;0)throw new RangeError(&quot;targetStart out of bounds&quot;);if(r&lt;0||r&gt;=this.length)throw new RangeError(&quot;Index out of range&quot;);if(n&lt;0)throw new RangeError(&quot;sourceEnd out of bounds&quot;);n&gt;this.length&amp;&amp;(n=this.length),t.length-e&lt;n-r&amp;&amp;(n=t.length-e+r);var i=n-r;if(this===t&amp;&amp;&quot;function&quot;==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&amp;&amp;r&lt;e&amp;&amp;e&lt;n)for(var a=i-1;a&gt;=0;--a)t[a+e]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},s.prototype.fill=function(t,e,r,n){if(&quot;string&quot;==typeof t){if(&quot;string&quot;==typeof e?(n=e,e=0,r=this.length):&quot;string&quot;==typeof r&amp;&amp;(n=r,r=this.length),void 0!==n&amp;&amp;&quot;string&quot;!=typeof n)throw new TypeError(&quot;encoding must be a string&quot;);if(&quot;string&quot;==typeof n&amp;&amp;!s.isEncoding(n))throw new TypeError(&quot;Unknown encoding: &quot;+n);if(1===t.length){var i=t.charCodeAt(0);(&quot;utf8&quot;===n&amp;&amp;i&lt;128||&quot;latin1&quot;===n)&amp;&amp;(t=i)}}else&quot;number&quot;==typeof t&amp;&amp;(t&amp;=255);if(e&lt;0||this.length&lt;e||this.length&lt;r)throw new RangeError(&quot;Out of range index&quot;);if(r&lt;=e)return this;var a;if(e&gt;&gt;&gt;=0,r=void 0===r?this.length:r&gt;&gt;&gt;0,t||(t=0),&quot;number&quot;==typeof t)for(a=e;a&lt;r;++a)this[a]=t;else{var o=s.isBuffer(t)?t:s.from(t,n),l=o.length;if(0===l)throw new TypeError('The value &quot;'+t+'&quot; is invalid for argument &quot;value&quot;');for(a=0;a&lt;r-e;++a)this[a+e]=o[a%l]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function R(t){return t&lt;16?&quot;0&quot;+t.toString(16):t.toString(16)}function B(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o&lt;n;++o){if((r=t.charCodeAt(o))&gt;55295&amp;&amp;r&lt;57344){if(!i){if(r&gt;56319){(e-=3)&gt;-1&amp;&amp;a.push(239,191,189);continue}if(o+1===n){(e-=3)&gt;-1&amp;&amp;a.push(239,191,189);continue}i=r;continue}if(r&lt;56320){(e-=3)&gt;-1&amp;&amp;a.push(239,191,189),i=r;continue}r=65536+(i-55296&lt;&lt;10|r-56320)}else i&amp;&amp;(e-=3)&gt;-1&amp;&amp;a.push(239,191,189);if(i=null,r&lt;128){if((e-=1)&lt;0)break;a.push(r)}else if(r&lt;2048){if((e-=2)&lt;0)break;a.push(r&gt;&gt;6|192,63&amp;r|128)}else if(r&lt;65536){if((e-=3)&lt;0)break;a.push(r&gt;&gt;12|224,r&gt;&gt;6&amp;63|128,63&amp;r|128)}else{if(!(r&lt;1114112))throw new Error(&quot;Invalid code point&quot;);if((e-=4)&lt;0)break;a.push(r&gt;&gt;18|240,r&gt;&gt;12&amp;63|128,r&gt;&gt;6&amp;63|128,63&amp;r|128)}}return a}function F(t){return n.toByteArray(function(t){if((t=(t=t.split(&quot;=&quot;)[0]).trim().replace(D,&quot;&quot;)).length&lt;2)return&quot;&quot;;for(;t.length%4!=0;)t+=&quot;=&quot;;return t}(t))}function N(t,e,r,n){for(var i=0;i&lt;n&amp;&amp;!(i+r&gt;=e.length||i&gt;=t.length);++i)e[i+r]=t[i];return i}function j(t,e){return t instanceof e||null!=t&amp;&amp;null!=t.constructor&amp;&amp;null!=t.constructor.name&amp;&amp;t.constructor.name===e.name}function V(t){return t!=t}},{&quot;base64-js&quot;:61,ieee754:393}],93:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/monotone&quot;),i=t(&quot;./lib/triangulation&quot;),a=t(&quot;./lib/delaunay&quot;),o=t(&quot;./lib/filter&quot;);function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,&quot;delaunay&quot;,!0),f=!!c(r,&quot;interior&quot;,!0),h=!!c(r,&quot;exterior&quot;,!0),p=!!c(r,&quot;infinity&quot;,!1);if(!f&amp;&amp;!h||0===t.length)return[];var d=n(t,e);if(u||f!==h||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),m=0;m&lt;d.length;++m){var v=d[m];g.addTriangle(v[0],v[1],v[2])}return u&amp;&amp;a(t,g),h?f?p?o(g,0,p):g.cells():o(g,1,p):o(g,-1)}return d}},{&quot;./lib/delaunay&quot;:94,&quot;./lib/filter&quot;:95,&quot;./lib/monotone&quot;:96,&quot;./lib/triangulation&quot;:97}],94:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-in-sphere&quot;)[4];t(&quot;binary-search-bounds&quot;);function i(t,e,r,i,a,o){var s=e.opposite(i,a);if(!(s&lt;0)){if(a&lt;i){var l=i;i=a,a=l,l=o,o=s,s=l}e.isConstraint(i,a)||n(t[i],t[a],t[o],t[s])&lt;0&amp;&amp;r.push(i,a)}}e.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s&lt;a;++s)for(var l=o[s],c=1;c&lt;l.length;c+=2){var u=l[c];if(!(u&lt;s)&amp;&amp;!e.isConstraint(s,u)){for(var f=l[c-1],h=-1,p=1;p&lt;l.length;p+=2)if(l[p-1]===u){h=l[p];break}h&lt;0||n(t[s],t[u],t[f],t[h])&lt;0&amp;&amp;r.push(s,u)}}for(;r.length&gt;0;){for(var u=r.pop(),s=r.pop(),f=-1,h=-1,l=o[s],d=1;d&lt;l.length;d+=2){var g=l[d-1],m=l[d];g===u?h=m:m===u&amp;&amp;(f=g)}f&lt;0||h&lt;0||(n(t[s],t[u],t[f],t[h])&gt;=0||(e.flip(s,u),i(t,e,r,f,s,h),i(t,e,r,s,h,f),i(t,e,r,h,u,f),i(t,e,r,u,f,h)))}}},{&quot;binary-search-bounds&quot;:98,&quot;robust-in-sphere&quot;:481}],95:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;binary-search-bounds&quot;);function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i&lt;n;++i){var s=r[i],l=s[0],c=s[1],u=s[2];c&lt;u?c&lt;l&amp;&amp;(s[0]=c,s[1]=u,s[2]=l):u&lt;l&amp;&amp;(s[0]=u,s[1]=l,s[2]=c)}r.sort(o);for(var f=new Array(n),i=0;i&lt;f.length;++i)f[i]=0;var h=[],p=[],d=new Array(3*n),g=new Array(3*n),m=null;e&amp;&amp;(m=[]);for(var v=new a(r,d,g,f,h,p,m),i=0;i&lt;n;++i)for(var s=r[i],y=0;y&lt;3;++y){var l=s[y],c=s[(y+1)%3],x=d[3*i+y]=v.locate(c,l,t.opposite(c,l)),b=g[3*i+y]=t.isConstraint(l,c);x&lt;0&amp;&amp;(b?p.push(i):(h.push(i),f[i]=1),e&amp;&amp;m.push([c,l,-1]))}return v}(t,r);if(0===e)return r?n.cells.concat(n.boundary):n.cells;var i=1,s=n.active,l=n.next,c=n.flags,u=n.cells,f=n.constraint,h=n.neighbor;for(;s.length&gt;0||l.length&gt;0;){for(;s.length&gt;0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d&lt;3;++d){var g=h[3*p+d];g&gt;=0&amp;&amp;0===c[g]&amp;&amp;(f[3*p+d]?l.push(g):(s.push(g),c[g]=i))}}}var m=l;l=s,s=m,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i&lt;t.length;++i)e[i]===r&amp;&amp;(t[n++]=t[i]);return t.length=n,t}(u,c,e);if(r)return v.concat(n.boundary);return v},a.prototype.locate=(n=[0,0,0],function(t,e,r){var a=t,s=e,l=r;return e&lt;r?e&lt;t&amp;&amp;(a=e,s=r,l=t):r&lt;t&amp;&amp;(a=r,s=t,l=e),a&lt;0?-1:(n[0]=a,n[1]=s,n[2]=l,i.eq(this.cells,n,o))})},{&quot;binary-search-bounds&quot;:98}],96:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;robust-orientation&quot;)[3],a=0,o=1,s=2;function l(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function c(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function u(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(t.type!==a&amp;&amp;(r=i(t.a,t.b,e.b))?r:t.idx-e.idx)}function f(t,e){return i(t.a,t.b,e)}function h(t,e,r,a,o){for(var s=n.lt(e,a,f),l=n.gt(e,a,f),c=s;c&lt;l;++c){for(var u=e[c],h=u.lowerIds,p=h.length;p&gt;1&amp;&amp;i(r[h[p-2]],r[h[p-1]],a)&gt;0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=u.upperIds;for(p=d.length;p&gt;1&amp;&amp;i(r[d[p-2]],r[d[p-1]],a)&lt;0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]&lt;e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?r:(r=e.b[0]&lt;t.b[0]?i(t.a,t.b,e.b):i(e.b,e.a,t.b))||t.idx-e.idx}function d(t,e,r){var i=n.le(t,r,p),a=t[i],o=a.upperIds,s=o[o.length-1];a.upperIds=[s],t.splice(i+1,0,new l(r.a,r.b,r.idx,[s],o))}function g(t,e,r){var i=r.a;r.a=r.b,r.b=i;var a=n.eq(t,r,p),o=t[a];t[a-1].upperIds=o.upperIds,t.splice(a,1)}e.exports=function(t,e){for(var r=t.length,n=e.length,i=[],f=0;f&lt;r;++f)i.push(new c(t[f],null,a,f));for(var f=0;f&lt;n;++f){var p=e[f],m=t[p[0]],v=t[p[1]];m[0]&lt;v[0]?i.push(new c(m,v,s,f),new c(v,m,o,f)):m[0]&gt;v[0]&amp;&amp;i.push(new c(v,m,s,f),new c(m,v,o,f))}i.sort(u);for(var y=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],f=0,_=i.length;f&lt;_;++f){var w=i[f],k=w.type;k===a?h(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{&quot;binary-search-bounds&quot;:98,&quot;robust-orientation&quot;:483}],97:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;);function i(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n&lt;t;++n)r[n]=[];return new i(r,e)};var a=i.prototype;function o(t,e,r){for(var n=1,i=t.length;n&lt;i;n+=2)if(t[n-1]===e&amp;&amp;t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}a.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(r,i){return t[0]=Math.min(r,i),t[1]=Math.max(r,i),n.eq(this.edges,t,e)&gt;=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n&lt;i;n+=2)if(r[n]===t)return r[n-1];return-1},a.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},a.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0,o=i.length;a&lt;o;a+=2)e.push([i[a],i[a+1]]);return e},a.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0,o=i.length;a&lt;o;a+=2){var s=i[a],l=i[a+1];r&lt;Math.min(s,l)&amp;&amp;e.push([r,s,l])}return e}},{&quot;binary-search-bounds&quot;:98}],98:[function(t,e,r){&quot;use strict&quot;;function n(t,e,r,n,i){var a=[&quot;function &quot;,t,&quot;(a,l,h,&quot;,n.join(&quot;,&quot;),&quot;){&quot;,i?&quot;&quot;:&quot;var i=&quot;,r?&quot;l-1&quot;:&quot;h+1&quot;,&quot;;while(l&lt;=h){var m=(l+h)&gt;&gt;&gt;1,x=a[m]&quot;];return i?e.indexOf(&quot;c&quot;)&lt;0?a.push(&quot;;if(x===y){return m}else if(x&lt;=y){&quot;):a.push(&quot;;var p=c(x,y);if(p===0){return m}else if(p&lt;=0){&quot;):a.push(&quot;;if(&quot;,e,&quot;){i=m;&quot;),r?a.push(&quot;l=m+1}else{h=m-1}&quot;):a.push(&quot;h=m-1}else{l=m+1}&quot;),a.push(&quot;}&quot;),i?a.push(&quot;return -1};&quot;):a.push(&quot;return i};&quot;),a.join(&quot;&quot;)}function i(t,e,r,i){return new Function([n(&quot;A&quot;,&quot;x&quot;+t+&quot;y&quot;,e,[&quot;y&quot;],i),n(&quot;P&quot;,&quot;c(x,y)&quot;+t+&quot;0&quot;,e,[&quot;y&quot;,&quot;c&quot;],i),&quot;function dispatchBsearch&quot;,r,&quot;(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch&quot;,r].join(&quot;&quot;))()}e.exports={ge:i(&quot;&gt;=&quot;,!1,&quot;GE&quot;),gt:i(&quot;&gt;&quot;,!1,&quot;GT&quot;),lt:i(&quot;&lt;&quot;,!0,&quot;LT&quot;),le:i(&quot;&lt;=&quot;,!0,&quot;LE&quot;),eq:i(&quot;-&quot;,!0,&quot;EQ&quot;,!0)}},{}],99:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=1,r=1;r&lt;t.length;++r)for(var n=0;n&lt;r;++n)if(t[r]&lt;t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],100:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;dup&quot;),i=t(&quot;robust-linear-solve&quot;);function a(t,e){for(var r=0,n=t.length,i=0;i&lt;n;++i)r+=t[i]*e[i];return r}function o(t){var e=t.length;if(0===e)return[];t[0].length;var r=n([t.length+1,t.length+1],1),o=n([t.length+1],1);r[e][e]=0;for(var s=0;s&lt;e;++s){for(var l=0;l&lt;=s;++l)r[l][s]=r[s][l]=2*a(t[s],t[l]);o[s]=a(t[s],t[s])}var c=i(r,o),u=0,f=c[e+1];for(s=0;s&lt;f.length;++s)u+=f[s];var h=new Array(e);for(s=0;s&lt;e;++s){f=c[s];var p=0;for(l=0;l&lt;f.length;++l)p+=f[l];h[s]=p/u}return h}function s(t){if(0===t.length)return[];for(var e=t[0].length,r=n([e]),i=o(t),a=0;a&lt;t.length;++a)for(var s=0;s&lt;e;++s)r[s]+=t[a][s]*i[a];return r}s.barycenetric=o,e.exports=s},{dup:154,&quot;robust-linear-solve&quot;:482}],101:[function(t,e,r){e.exports=function(t){for(var e=n(t),r=0,i=0;i&lt;t.length;++i)for(var a=t[i],o=0;o&lt;e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=t(&quot;circumcenter&quot;)},{circumcenter:100}],102:[function(t,e,r){e.exports=function(t,e,r){return e&lt;r?t&lt;e?e:t&gt;r?r:t:t&lt;r?r:t&gt;e?e:t}},{}],103:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a&lt;e.length;++a){var o=e[a];i[a]=[o[0],o[1],r[a]]}e=i}var s=function(t,e,r){var n=d(t,[],p(t));return v(e,n,r),!!n}(t,e,!!r);for(;y(t,e,!!r);)s=!0;if(r&amp;&amp;s){n.length=0,r.length=0;for(var a=0;a&lt;e.length;++a){var o=e[a];n.push([o[0],o[1]]),r.push(o[2])}}return s};var n=t(&quot;union-find&quot;),i=t(&quot;box-intersect&quot;),a=t(&quot;robust-segment-intersect&quot;),o=t(&quot;big-rat&quot;),s=t(&quot;big-rat/cmp&quot;),l=t(&quot;big-rat/to-float&quot;),c=t(&quot;rat-vec&quot;),u=t(&quot;nextafter&quot;),f=t(&quot;./lib/rat-seg-intersect&quot;);function h(t){var e=l(t);return[u(e,-1/0),u(e,1/0)]}function p(t){for(var e=new Array(t.length),r=0;r&lt;t.length;++r){var n=t[r];e[r]=[u(n[0],-1/0),u(n[1],-1/0),u(n[0],1/0),u(n[1],1/0)]}return e}function d(t,e,r){for(var a=e.length,o=new n(a),s=[],l=0;l&lt;e.length;++l){var c=e[l],f=h(c[0]),p=h(c[1]);s.push([u(f[0],-1/0),u(p[0],-1/0),u(f[1],1/0),u(p[1],1/0)])}i(s,function(t,e){o.link(t,e)});var d=!0,g=new Array(a);for(l=0;l&lt;a;++l){(v=o.find(l))!==l&amp;&amp;(d=!1,t[v]=[Math.min(t[l][0],t[v][0]),Math.min(t[l][1],t[v][1])])}if(d)return null;var m=0;for(l=0;l&lt;a;++l){var v;(v=o.find(l))===l?(g[l]=m,t[m++]=t[l]):g[l]=-1}t.length=m;for(l=0;l&lt;a;++l)g[l]&lt;0&amp;&amp;(g[l]=g[o.find(l)]);return g}function g(t,e){return t[0]-e[0]||t[1]-e[1]}function m(t,e){var r=t[0]-e[0]||t[1]-e[1];return r||(t[2]&lt;e[2]?-1:t[2]&gt;e[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n&lt;t.length;++n){var i=e[(o=t[n])[0]],a=e[o[1]];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}else for(n=0;n&lt;t.length;++n){var o;i=(o=t[n])[0],a=o[1];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}r?t.sort(m):t.sort(g);var s=1;for(n=1;n&lt;t.length;++n){var l=t[n-1],c=t[n];(c[0]!==l[0]||c[1]!==l[1]||r&amp;&amp;c[2]!==l[2])&amp;&amp;(t[s++]=c)}t.length=s}}function y(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n&lt;e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[u(Math.min(a[0],o[0]),-1/0),u(Math.min(a[1],o[1]),-1/0),u(Math.max(a[0],o[0]),1/0),u(Math.max(a[1],o[1]),1/0)]}return r}(t,e),h=function(t,e,r){var n=[];return i(r,function(r,i){var o=e[r],s=e[i];if(o[0]!==s[0]&amp;&amp;o[0]!==s[1]&amp;&amp;o[1]!==s[0]&amp;&amp;o[1]!==s[1]){var l=t[o[0]],c=t[o[1]],u=t[s[0]],f=t[s[1]];a(l,c,u,f)&amp;&amp;n.push([r,i])}}),n}(t,e,n),g=p(t),m=function(t,e,r,n){var o=[];return i(r,n,function(r,n){var i=e[r];if(i[0]!==n&amp;&amp;i[1]!==n){var s=t[n],l=t[i[0]],c=t[i[1]];a(l,c,s,s)&amp;&amp;o.push([r,n])}}),o}(t,e,n,g),y=d(t,function(t,e,r,n,i){var a,u,h=t.map(function(t){return[o(t[0]),o(t[1])]});for(a=0;a&lt;r.length;++a){var p=r[a];u=p[0];var d=p[1],g=e[u],m=e[d],v=f(c(t[g[0]]),c(t[g[1]]),c(t[m[0]]),c(t[m[1]]));if(v){var y=t.length;t.push([l(v[0]),l(v[1])]),h.push(v),n.push([u,y],[d,y])}}for(n.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=h[t[1]],n=h[e[1]];return s(r[0],n[0])||s(r[1],n[1])}),a=n.length-1;a&gt;=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])&lt;0){var M=b;b=_,_=M}x[0]=b;var A,T=x[1]=S[1];for(i&amp;&amp;(A=x[2]);a&gt;0&amp;&amp;n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?e.push([T,E,A]):e.push([T,E]),T=E}i?e.push([T,_,A]):e.push([T,_])}return h}(t,e,h,m,r));return v(e,y,r),!!y||(h.length&gt;0||m.length&gt;0)}},{&quot;./lib/rat-seg-intersect&quot;:104,&quot;big-rat&quot;:65,&quot;big-rat/cmp&quot;:63,&quot;big-rat/to-float&quot;:77,&quot;box-intersect&quot;:83,nextafter:431,&quot;rat-vec&quot;:466,&quot;robust-segment-intersect&quot;:486,&quot;union-find&quot;:520}],104:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=u(a,f);if(0===o(h))return null;var p=s(t,r),d=u(f,p),g=i(d,h),m=c(a,g);return l(t,m)};var n=t(&quot;big-rat/mul&quot;),i=t(&quot;big-rat/div&quot;),a=t(&quot;big-rat/sub&quot;),o=t(&quot;big-rat/sign&quot;),s=t(&quot;rat-vec/sub&quot;),l=t(&quot;rat-vec/add&quot;),c=t(&quot;rat-vec/muls&quot;);function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{&quot;big-rat/div&quot;:64,&quot;big-rat/mul&quot;:74,&quot;big-rat/sign&quot;:75,&quot;big-rat/sub&quot;:76,&quot;rat-vec/add&quot;:465,&quot;rat-vec/muls&quot;:467,&quot;rat-vec/sub&quot;:468}],105:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;clamp&quot;);function i(t,e){null==e&amp;&amp;(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&amp;&amp;(o=e?1:255),e&amp;&amp;(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&amp;n(r,0,255))+((i=255&amp;n(i,0,255))&lt;&lt;16)+((a=255&amp;n(a,0,255))&lt;&lt;8)+(o=255&amp;n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(t,e){var r=(t=+t)&gt;&gt;&gt;24,n=(16711680&amp;t)&gt;&gt;&gt;16,i=(65280&amp;t)&gt;&gt;&gt;8,a=255&amp;t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:102}],106:[function(t,e,r){&quot;use strict&quot;;e.exports={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],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],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],rebeccapurple:[102,51,153],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]}},{}],107:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-rgba&quot;),i=t(&quot;clamp&quot;),a=t(&quot;dtype&quot;);e.exports=function(t,e){&quot;float&quot;!==e&amp;&amp;e||(e=&quot;array&quot;),&quot;uint&quot;===e&amp;&amp;(e=&quot;uint8&quot;),&quot;uint_clamped&quot;===e&amp;&amp;(e=&quot;uint8_clamped&quot;);var r=new(a(e))(4),o=&quot;uint8&quot;!==e&amp;&amp;&quot;uint8_clamped&quot;!==e;return t.length&amp;&amp;&quot;string&quot;!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&amp;&amp;(t[0]&gt;1||0===t[0])&amp;&amp;(t[1]&gt;1||0===t[1])&amp;&amp;(t[2]&gt;1||0===t[2])&amp;&amp;(!t[3]||t[3]&gt;1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&amp;&amp;(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},{clamp:102,&quot;color-rgba&quot;:109,dtype:153}],108:[function(t,e,r){(function(r){&quot;use strict&quot;;var n=t(&quot;color-name&quot;),i=t(&quot;is-plain-obj&quot;),a=t(&quot;defined&quot;);e.exports=function(t){var e,s,l=[],c=1;if(&quot;string&quot;==typeof t)if(n[t])l=n[t].slice(),s=&quot;rgb&quot;;else if(&quot;transparent&quot;===t)c=0,s=&quot;rgb&quot;,l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),f=u.length,h=f&lt;=4;c=1,h?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===f&amp;&amp;(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===f&amp;&amp;(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s=&quot;rgb&quot;}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var p=e[1],u=p.replace(/a$/,&quot;&quot;);s=u;var f=&quot;cmyk&quot;===u?4:&quot;gray&quot;===u?1:3;l=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===f?parseFloat(t)/100:&quot;rgb&quot;===u?255*parseFloat(t)/100:parseFloat(t);if(&quot;h&quot;===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&amp;&amp;l.push(1),c=void 0===l[f]?1:l[f],l=l.slice(0,f)}else t.length&gt;10&amp;&amp;/[0-9](?:\s|\/)/.test(t)&amp;&amp;(l=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),s=t.match(/([a-z])/gi).join(&quot;&quot;).toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s=&quot;rgb&quot;,l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s=&quot;hsl&quot;,l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&amp;&amp;(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&amp;&amp;ArrayBuffer.isView&amp;&amp;ArrayBuffer.isView(t))&amp;&amp;(l=[t[0],t[1],t[2]],s=&quot;rgb&quot;,c=4===t.length?t[3]:1);else s=&quot;rgb&quot;,l=[t&gt;&gt;&gt;16,(65280&amp;t)&gt;&gt;&gt;8,255&amp;t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;color-name&quot;:106,defined:148,&quot;is-plain-obj&quot;:403}],109:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-parse&quot;),i=t(&quot;color-space/hsl&quot;),a=t(&quot;clamp&quot;);e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),&quot;h&quot;===r.space[0]&amp;&amp;(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:102,&quot;color-parse&quot;:108,&quot;color-space/hsl&quot;:110}],110:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./rgb&quot;);e.exports={name:&quot;hsl&quot;,min:[0,0,0],max:[360,100,100],channel:[&quot;hue&quot;,&quot;saturation&quot;,&quot;lightness&quot;],alias:[&quot;HSL&quot;],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l&lt;.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c&lt;3;c++)(n=o+1/3*-(c-1))&lt;0?n++:n&gt;1&amp;&amp;n--,a=6*n&lt;1?e+6*(r-e)*n:2*n&lt;1?r:3*n&lt;2?e+(r-e)*(2/3-n)*6:e,i[c]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&amp;&amp;(e=4+(n-i)/l),(e=Math.min(60*e,360))&lt;0&amp;&amp;(e+=360),r=(o+s)/2,[e,100*(s===o?0:r&lt;=.5?l/(s+o):l/(2-s-o)),100*r]}},{&quot;./rgb&quot;:111}],111:[function(t,e,r){&quot;use strict&quot;;e.exports={name:&quot;rgb&quot;,min:[0,0,0],max:[255,255,255],channel:[&quot;red&quot;,&quot;green&quot;,&quot;blue&quot;],alias:[&quot;RGB&quot;]}},{}],112:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],&quot;rainbow-soft&quot;:[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],&quot;freesurface-blue&quot;:[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],&quot;freesurface-red&quot;:[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],&quot;velocity-blue&quot;:[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],&quot;velocity-green&quot;:[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],113:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./colorScale&quot;),i=t(&quot;lerp&quot;);function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r=&quot;#&quot;,n=0;n&lt;3;++n)r+=(&quot;00&quot;+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return&quot;rgba(&quot;+t.join(&quot;,&quot;)+&quot;)&quot;}e.exports=function(t){var e,r,l,c,u,f,h,p,d,g;t||(t={});p=(t.nshades||72)-1,h=t.format||&quot;hex&quot;,(f=t.colormap)||(f=&quot;jet&quot;);if(&quot;string&quot;==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+&quot; not a supported colorscale&quot;);u=n[f]}else{if(!Array.isArray(f))throw Error(&quot;unsupported colormap option&quot;,f);u=f.slice()}if(u.length&gt;p)throw new Error(f+&quot; map requires nshades to be at least size &quot;+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():&quot;number&quot;==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var m=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&amp;&amp;n[3]&gt;=0&amp;&amp;n[3]&lt;=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),v=[];for(g=0;g&lt;e.length-1;++g){c=e[g+1]-e[g],r=m[g],l=m[g+1];for(var y=0;y&lt;c;y++){var x=y/c;v.push([Math.round(i(r[0],l[0],x)),Math.round(i(r[1],l[1],x)),Math.round(i(r[2],l[2],x)),i(r[3],l[3],x)])}}v.push(u[u.length-1].rgb.concat(d[1])),&quot;hex&quot;===h?v=v.map(o):&quot;rgbaString&quot;===h?v=v.map(s):&quot;float&quot;===h&amp;&amp;(v=v.map(a));return v}},{&quot;./colorScale&quot;:112,lerp:405}],114:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,a){var o=n(e,r,a);if(0===o){var s=i(n(t,e,r)),c=i(n(t,e,a));if(s===c){if(0===s){var u=l(t,e,r),f=l(t,e,a);return u===f?0:u?1:-1}return 0}return 0===c?s&gt;0?-1:l(t,e,a)?-1:1:0===s?c&gt;0?1:l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);if(h&gt;0)return o&gt;0&amp;&amp;n(t,e,a)&gt;0?1:-1;if(h&lt;0)return o&gt;0||n(t,e,a)&gt;0?1:-1;var p=n(t,e,a);return p&gt;0?1:l(t,e,r)?1:-1};var n=t(&quot;robust-orientation&quot;),i=t(&quot;signum&quot;),a=t(&quot;two-sum&quot;),o=t(&quot;robust-product&quot;),s=t(&quot;robust-sum&quot;);function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]&gt;=0}},{&quot;robust-orientation&quot;:483,&quot;robust-product&quot;:484,&quot;robust-sum&quot;:488,signum:489,&quot;two-sum&quot;:518}],115:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],p=t[3],d=e[0],g=e[1],m=e[2],v=e[3];return u+f+h+p-(d+g+m+v)||n(u,f,h,p)-n(d,g,m,v,d)||n(u+f,u+h,u+p,f+h,f+p,h+p)-n(d+g,d+m,d+v,g+m,g+v,m+v)||n(u+f+h,u+f+p,u+h+p,f+h+p)-n(d+g+m,d+g+v,d+m+v,g+m+v);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;b&lt;r;++b)if(a=y[b]-x[b])return a;return 0}};var n=Math.min;function i(t,e){return t-e}},{}],116:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;compare-cell&quot;),i=t(&quot;cell-orientation&quot;);e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{&quot;cell-orientation&quot;:99,&quot;compare-cell&quot;:115}],117:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/ch1d&quot;),i=t(&quot;./lib/ch2d&quot;),a=t(&quot;./lib/chnd&quot;);e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;if(0===r)return[];if(1===r)return n(t);if(2===r)return i(t);return a(t,r)}},{&quot;./lib/ch1d&quot;:118,&quot;./lib/ch2d&quot;:119,&quot;./lib/chnd&quot;:120}],118:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=0,r=0,n=1;n&lt;t.length;++n)t[n][0]&lt;t[e][0]&amp;&amp;(e=n),t[n][0]&gt;t[r][0]&amp;&amp;(r=n);return e&lt;r?[[e],[r]]:e&gt;r?[[r],[e]]:[[e]]}},{}],119:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=n(t),r=e.length;if(r&lt;=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o&lt;r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=t(&quot;monotone-convex-hull-2d&quot;)},{&quot;monotone-convex-hull-2d&quot;:414}],120:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){try{return n(t,!0)}catch(s){var r=i(t);if(r.length&lt;=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i&lt;e.length;++i)n[i]=t[e[i]];for(var a=e.length,i=0;i&lt;r;++i)e.indexOf(i)&lt;0&amp;&amp;(n[a++]=t[i]);return n}(t,r),o=n(a,!0);return function(t,e){for(var r=t.length,n=e.length,i=0;i&lt;r;++i)for(var a=t[i],o=0;o&lt;a.length;++o){var s=a[o];if(s&lt;n)a[o]=e[s];else{s-=n;for(var l=0;l&lt;n;++l)s&gt;=e[l]&amp;&amp;(s+=1);a[o]=s}}return t}(o,r)}};var n=t(&quot;incremental-convex-hull&quot;),i=t(&quot;affine-hull&quot;)},{&quot;affine-hull&quot;:49,&quot;incremental-convex-hull&quot;:394}],121:[function(t,e,r){e.exports={AFG:&quot;afghan&quot;,ALA:&quot;\\b\\wland&quot;,ALB:&quot;albania&quot;,DZA:&quot;algeria&quot;,ASM:&quot;^(?=.*americ).*samoa&quot;,AND:&quot;andorra&quot;,AGO:&quot;angola&quot;,AIA:&quot;anguill?a&quot;,ATA:&quot;antarctica&quot;,ATG:&quot;antigua&quot;,ARG:&quot;argentin&quot;,ARM:&quot;armenia&quot;,ABW:&quot;^(?!.*bonaire).*\\baruba&quot;,AUS:&quot;australia&quot;,AUT:&quot;^(?!.*hungary).*austria|\\baustri.*\\bemp&quot;,AZE:&quot;azerbaijan&quot;,BHS:&quot;bahamas&quot;,BHR:&quot;bahrain&quot;,BGD:&quot;bangladesh|^(?=.*east).*paki?stan&quot;,BRB:&quot;barbados&quot;,BLR:&quot;belarus|byelo&quot;,BEL:&quot;^(?!.*luxem).*belgium&quot;,BLZ:&quot;belize|^(?=.*british).*honduras&quot;,BEN:&quot;benin|dahome&quot;,BMU:&quot;bermuda&quot;,BTN:&quot;bhutan&quot;,BOL:&quot;bolivia&quot;,BES:&quot;^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands&quot;,BIH:&quot;herzegovina|bosnia&quot;,BWA:&quot;botswana|bechuana&quot;,BVT:&quot;bouvet&quot;,BRA:&quot;brazil&quot;,IOT:&quot;british.?indian.?ocean&quot;,BRN:&quot;brunei&quot;,BGR:&quot;bulgaria&quot;,BFA:&quot;burkina|\\bfaso|upper.?volta&quot;,BDI:&quot;burundi&quot;,CPV:&quot;verde&quot;,KHM:&quot;cambodia|kampuchea|khmer&quot;,CMR:&quot;cameroon&quot;,CAN:&quot;canada&quot;,CYM:&quot;cayman&quot;,CAF:&quot;\\bcentral.african.republic&quot;,TCD:&quot;\\bchad&quot;,CHL:&quot;\\bchile&quot;,CHN:&quot;^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china&quot;,CXR:&quot;christmas&quot;,CCK:&quot;\\bcocos|keeling&quot;,COL:&quot;colombia&quot;,COM:&quot;comoro&quot;,COG:&quot;^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo&quot;,COK:&quot;\\bcook&quot;,CRI:&quot;costa.?rica&quot;,CIV:&quot;ivoire|ivory&quot;,HRV:&quot;croatia&quot;,CUB:&quot;\\bcuba&quot;,CUW:&quot;^(?!.*bonaire).*\\bcura(c|\xe7)ao&quot;,CYP:&quot;cyprus&quot;,CSK:&quot;czechoslovakia&quot;,CZE:&quot;^(?=.*rep).*czech|czechia|bohemia&quot;,COD:&quot;\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc&quot;,DNK:&quot;denmark&quot;,DJI:&quot;djibouti&quot;,DMA:&quot;dominica(?!n)&quot;,DOM:&quot;dominican.rep&quot;,ECU:&quot;ecuador&quot;,EGY:&quot;egypt&quot;,SLV:&quot;el.?salvador&quot;,GNQ:&quot;guine.*eq|eq.*guine|^(?=.*span).*guinea&quot;,ERI:&quot;eritrea&quot;,EST:&quot;estonia&quot;,ETH:&quot;ethiopia|abyssinia&quot;,FLK:&quot;falkland|malvinas&quot;,FRO:&quot;faroe|faeroe&quot;,FJI:&quot;fiji&quot;,FIN:&quot;finland&quot;,FRA:&quot;^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul&quot;,GUF:&quot;^(?=.*french).*guiana&quot;,PYF:&quot;french.?polynesia|tahiti&quot;,ATF:&quot;french.?southern&quot;,GAB:&quot;gabon&quot;,GMB:&quot;gambia&quot;,GEO:&quot;^(?!.*south).*georgia&quot;,DDR:&quot;german.?democratic.?republic|democratic.?republic.*germany|east.germany&quot;,DEU:&quot;^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german&quot;,GHA:&quot;ghana|gold.?coast&quot;,GIB:&quot;gibraltar&quot;,GRC:&quot;greece|hellenic|hellas&quot;,GRL:&quot;greenland&quot;,GRD:&quot;grenada&quot;,GLP:&quot;guadeloupe&quot;,GUM:&quot;\\bguam&quot;,GTM:&quot;guatemala&quot;,GGY:&quot;guernsey&quot;,GIN:&quot;^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea&quot;,GNB:&quot;bissau|^(?=.*portu).*guinea&quot;,GUY:&quot;guyana|british.?guiana&quot;,HTI:&quot;haiti&quot;,HMD:&quot;heard.*mcdonald&quot;,VAT:&quot;holy.?see|vatican|papal.?st&quot;,HND:&quot;^(?!.*brit).*honduras&quot;,HKG:&quot;hong.?kong&quot;,HUN:&quot;^(?!.*austr).*hungary&quot;,ISL:&quot;iceland&quot;,IND:&quot;india(?!.*ocea)&quot;,IDN:&quot;indonesia&quot;,IRN:&quot;\\biran|persia&quot;,IRQ:&quot;\\biraq|mesopotamia&quot;,IRL:&quot;(^ireland)|(^republic.*ireland)&quot;,IMN:&quot;^(?=.*isle).*\\bman&quot;,ISR:&quot;israel&quot;,ITA:&quot;italy&quot;,JAM:&quot;jamaica&quot;,JPN:&quot;japan&quot;,JEY:&quot;jersey&quot;,JOR:&quot;jordan&quot;,KAZ:&quot;kazak&quot;,KEN:&quot;kenya|british.?east.?africa|east.?africa.?prot&quot;,KIR:&quot;kiribati&quot;,PRK:&quot;^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)&quot;,KWT:&quot;kuwait&quot;,KGZ:&quot;kyrgyz|kirghiz&quot;,LAO:&quot;\\blaos?\\b&quot;,LVA:&quot;latvia&quot;,LBN:&quot;lebanon&quot;,LSO:&quot;lesotho|basuto&quot;,LBR:&quot;liberia&quot;,LBY:&quot;libya&quot;,LIE:&quot;liechtenstein&quot;,LTU:&quot;lithuania&quot;,LUX:&quot;^(?!.*belg).*luxem&quot;,MAC:&quot;maca(o|u)&quot;,MDG:&quot;madagascar|malagasy&quot;,MWI:&quot;malawi|nyasa&quot;,MYS:&quot;malaysia&quot;,MDV:&quot;maldive&quot;,MLI:&quot;\\bmali\\b&quot;,MLT:&quot;\\bmalta&quot;,MHL:&quot;marshall&quot;,MTQ:&quot;martinique&quot;,MRT:&quot;mauritania&quot;,MUS:&quot;mauritius&quot;,MYT:&quot;\\bmayotte&quot;,MEX:&quot;\\bmexic&quot;,FSM:&quot;fed.*micronesia|micronesia.*fed&quot;,MCO:&quot;monaco&quot;,MNG:&quot;mongolia&quot;,MNE:&quot;^(?!.*serbia).*montenegro&quot;,MSR:&quot;montserrat&quot;,MAR:&quot;morocco|\\bmaroc&quot;,MOZ:&quot;mozambique&quot;,MMR:&quot;myanmar|burma&quot;,NAM:&quot;namibia&quot;,NRU:&quot;nauru&quot;,NPL:&quot;nepal&quot;,NLD:&quot;^(?!.*\\bant)(?!.*\\bcarib).*netherlands&quot;,ANT:&quot;^(?=.*\\bant).*(nether|dutch)&quot;,NCL:&quot;new.?caledonia&quot;,NZL:&quot;new.?zealand&quot;,NIC:&quot;nicaragua&quot;,NER:&quot;\\bniger(?!ia)&quot;,NGA:&quot;nigeria&quot;,NIU:&quot;niue&quot;,NFK:&quot;norfolk&quot;,MNP:&quot;mariana&quot;,NOR:&quot;norway&quot;,OMN:&quot;\\boman|trucial&quot;,PAK:&quot;^(?!.*east).*paki?stan&quot;,PLW:&quot;palau&quot;,PSE:&quot;palestin|\\bgaza|west.?bank&quot;,PAN:&quot;panama&quot;,PNG:&quot;papua|new.?guinea&quot;,PRY:&quot;paraguay&quot;,PER:&quot;peru&quot;,PHL:&quot;philippines&quot;,PCN:&quot;pitcairn&quot;,POL:&quot;poland&quot;,PRT:&quot;portugal&quot;,PRI:&quot;puerto.?rico&quot;,QAT:&quot;qatar&quot;,KOR:&quot;^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)&quot;,MDA:&quot;moldov|b(a|e)ssarabia&quot;,REU:&quot;r(e|\xe9)union&quot;,ROU:&quot;r(o|u|ou)mania&quot;,RUS:&quot;\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics&quot;,RWA:&quot;rwanda&quot;,BLM:&quot;barth(e|\xe9)lemy&quot;,SHN:&quot;helena&quot;,KNA:&quot;kitts|\\bnevis&quot;,LCA:&quot;\\blucia&quot;,MAF:&quot;^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)&quot;,SPM:&quot;miquelon&quot;,VCT:&quot;vincent&quot;,WSM:&quot;^(?!.*amer).*samoa&quot;,SMR:&quot;san.?marino&quot;,STP:&quot;\\bs(a|\xe3)o.?tom(e|\xe9)&quot;,SAU:&quot;\\bsa\\w*.?arabia&quot;,SEN:&quot;senegal&quot;,SRB:&quot;^(?!.*monte).*serbia&quot;,SYC:&quot;seychell&quot;,SLE:&quot;sierra&quot;,SGP:&quot;singapore&quot;,SXM:&quot;^(?!.*martin)(?!.*saba).*maarten&quot;,SVK:&quot;^(?!.*cze).*slovak&quot;,SVN:&quot;slovenia&quot;,SLB:&quot;solomon&quot;,SOM:&quot;somali&quot;,ZAF:&quot;south.africa|s\\\\..?africa&quot;,SGS:&quot;south.?georgia|sandwich&quot;,SSD:&quot;\\bs\\w*.?sudan&quot;,ESP:&quot;spain&quot;,LKA:&quot;sri.?lanka|ceylon&quot;,SDN:&quot;^(?!.*\\bs(?!u)).*sudan&quot;,SUR:&quot;surinam|dutch.?guiana&quot;,SJM:&quot;svalbard&quot;,SWZ:&quot;swaziland&quot;,SWE:&quot;sweden&quot;,CHE:&quot;switz|swiss&quot;,SYR:&quot;syria&quot;,TWN:&quot;taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china&quot;,TJK:&quot;tajik&quot;,THA:&quot;thailand|\\bsiam&quot;,MKD:&quot;macedonia|fyrom&quot;,TLS:&quot;^(?=.*leste).*timor|^(?=.*east).*timor&quot;,TGO:&quot;togo&quot;,TKL:&quot;tokelau&quot;,TON:&quot;tonga&quot;,TTO:&quot;trinidad|tobago&quot;,TUN:&quot;tunisia&quot;,TUR:&quot;turkey&quot;,TKM:&quot;turkmen&quot;,TCA:&quot;turks&quot;,TUV:&quot;tuvalu&quot;,UGA:&quot;uganda&quot;,UKR:&quot;ukrain&quot;,ARE:&quot;emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em&quot;,GBR:&quot;united.?kingdom|britain|^u\\.?k\\.?$&quot;,TZA:&quot;tanzania&quot;,USA:&quot;united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)&quot;,UMI:&quot;minor.?outlying.?is&quot;,URY:&quot;uruguay&quot;,UZB:&quot;uzbek&quot;,VUT:&quot;vanuatu|new.?hebrides&quot;,VEN:&quot;venezuela&quot;,VNM:&quot;^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam&quot;,VGB:&quot;^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin&quot;,VIR:&quot;^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin&quot;,WLF:&quot;futuna|wallis&quot;,ESH:&quot;western.sahara&quot;,YEM:&quot;^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen&quot;,YMD:&quot;^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen&quot;,YUG:&quot;yugoslavia&quot;,ZMB:&quot;zambia|northern.?rhodesia&quot;,EAZ:&quot;zanzibar&quot;,ZWE:&quot;zimbabwe|^(?!.*northern).*rhodesia&quot;}},{}],122:[function(t,e,r){e.exports=[&quot;xx-small&quot;,&quot;x-small&quot;,&quot;small&quot;,&quot;medium&quot;,&quot;large&quot;,&quot;x-large&quot;,&quot;xx-large&quot;,&quot;larger&quot;,&quot;smaller&quot;]},{}],123:[function(t,e,r){e.exports=[&quot;normal&quot;,&quot;condensed&quot;,&quot;semi-condensed&quot;,&quot;extra-condensed&quot;,&quot;ultra-condensed&quot;,&quot;expanded&quot;,&quot;semi-expanded&quot;,&quot;extra-expanded&quot;,&quot;ultra-expanded&quot;]},{}],124:[function(t,e,r){e.exports=[&quot;normal&quot;,&quot;italic&quot;,&quot;oblique&quot;]},{}],125:[function(t,e,r){e.exports=[&quot;normal&quot;,&quot;bold&quot;,&quot;bolder&quot;,&quot;lighter&quot;,&quot;100&quot;,&quot;200&quot;,&quot;300&quot;,&quot;400&quot;,&quot;500&quot;,&quot;600&quot;,&quot;700&quot;,&quot;800&quot;,&quot;900&quot;]},{}],126:[function(t,e,r){&quot;use strict&quot;;e.exports={parse:t(&quot;./parse&quot;),stringify:t(&quot;./stringify&quot;)}},{&quot;./parse&quot;:128,&quot;./stringify&quot;:129}],127:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;css-font-size-keywords&quot;);e.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf(&quot;/&quot;)||-1!==n.indexOf(t)}}},{&quot;css-font-size-keywords&quot;:122}],128:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;unquote&quot;),i=t(&quot;css-global-keywords&quot;),a=t(&quot;css-system-font-keywords&quot;),o=t(&quot;css-font-weight-keywords&quot;),s=t(&quot;css-font-style-keywords&quot;),l=t(&quot;css-font-stretch-keywords&quot;),c=t(&quot;string-split-by&quot;),u=t(&quot;./lib/util&quot;).isSize;e.exports=h;var f=h.cache={};function h(t){if(&quot;string&quot;!=typeof t)throw new Error(&quot;Font argument must be a string.&quot;);if(f[t])return f[t];if(&quot;&quot;===t)throw new Error(&quot;Cannot parse an empty string.&quot;);if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:&quot;normal&quot;,variant:&quot;normal&quot;,weight:&quot;normal&quot;,stretch:&quot;normal&quot;,lineHeight:&quot;normal&quot;,size:&quot;1rem&quot;,family:[&quot;serif&quot;]},h=c(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return[&quot;style&quot;,&quot;variant&quot;,&quot;weight&quot;,&quot;stretch&quot;].forEach(function(t){r[t]=e}),f[t]=r;if(-1===s.indexOf(e))if(&quot;normal&quot;!==e&amp;&amp;&quot;small-caps&quot;!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(u(e)){var d=c(e,&quot;/&quot;);if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):&quot;/&quot;===h[0]&amp;&amp;(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error(&quot;Missing required font-family.&quot;);return r.family=c(h.join(&quot; &quot;),/\s*,\s*/).map(n),f[t]=r}throw new Error(&quot;Unknown or unsupported font token: &quot;+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error(&quot;Missing required font-size.&quot;)}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},{&quot;./lib/util&quot;:127,&quot;css-font-stretch-keywords&quot;:123,&quot;css-font-style-keywords&quot;:124,&quot;css-font-weight-keywords&quot;:125,&quot;css-global-keywords&quot;:130,&quot;css-system-font-keywords&quot;:131,&quot;string-split-by&quot;:502,unquote:522}],129:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;pick-by-alias&quot;),i=t(&quot;./lib/util&quot;).isSize,a=g(t(&quot;css-global-keywords&quot;)),o=g(t(&quot;css-system-font-keywords&quot;)),s=g(t(&quot;css-font-weight-keywords&quot;)),l=g(t(&quot;css-font-style-keywords&quot;)),c=g(t(&quot;css-font-stretch-keywords&quot;)),u={normal:1,&quot;small-caps&quot;:1},f={serif:1,&quot;sans-serif&quot;:1,monospace:1,cursive:1,fantasy:1,&quot;system-ui&quot;:1},h=&quot;1rem&quot;,p=&quot;serif&quot;;function d(t,e){if(t&amp;&amp;!e[t]&amp;&amp;!a[t])throw Error(&quot;Unknown keyword `&quot;+t+&quot;`&quot;);return t}function g(t){for(var e={},r=0;r&lt;t.length;r++)e[t[r]]=1;return e}e.exports=function(t){if((t=n(t,{style:&quot;style fontstyle fontStyle font-style slope distinction&quot;,variant:&quot;variant font-variant fontVariant fontvariant var capitalization&quot;,weight:&quot;weight w font-weight fontWeight fontweight&quot;,stretch:&quot;stretch font-stretch fontStretch fontstretch width&quot;,size:&quot;size s font-size fontSize fontsize height em emSize&quot;,lineHeight:&quot;lh line-height lineHeight lineheight leading&quot;,family:&quot;font family fontFamily font-family fontfamily type typeface face&quot;,system:&quot;system reserved default global&quot;})).system)return t.system&amp;&amp;d(t.system,o),t.system;if(d(t.style,l),d(t.variant,u),d(t.weight,s),d(t.stretch,c),null==t.size&amp;&amp;(t.size=h),&quot;number&quot;==typeof t.size&amp;&amp;(t.size+=&quot;px&quot;),!i)throw Error(&quot;Bad size value `&quot;+t.size+&quot;`&quot;);t.family||(t.family=p),Array.isArray(t.family)&amp;&amp;(t.family.length||(t.family=[p]),t.family=t.family.map(function(t){return f[t]?t:'&quot;'+t+'&quot;'}).join(&quot;, &quot;));var e=[];return e.push(t.style),t.variant!==t.style&amp;&amp;e.push(t.variant),t.weight!==t.variant&amp;&amp;t.weight!==t.style&amp;&amp;e.push(t.weight),t.stretch!==t.weight&amp;&amp;t.stretch!==t.variant&amp;&amp;t.stretch!==t.style&amp;&amp;e.push(t.stretch),e.push(t.size+(null==t.lineHeight||&quot;normal&quot;===t.lineHeight||t.lineHeight+&quot;&quot;==&quot;1&quot;?&quot;&quot;:&quot;/&quot;+t.lineHeight)),e.push(t.family),e.filter(Boolean).join(&quot; &quot;)}},{&quot;./lib/util&quot;:127,&quot;css-font-stretch-keywords&quot;:123,&quot;css-font-style-keywords&quot;:124,&quot;css-font-weight-keywords&quot;:125,&quot;css-global-keywords&quot;:130,&quot;css-system-font-keywords&quot;:131,&quot;pick-by-alias&quot;:445}],130:[function(t,e,r){e.exports=[&quot;inherit&quot;,&quot;initial&quot;,&quot;unset&quot;]},{}],131:[function(t,e,r){e.exports=[&quot;caption&quot;,&quot;icon&quot;,&quot;menu&quot;,&quot;message-box&quot;,&quot;small-caption&quot;,&quot;status-bar&quot;]},{}],132:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;p&gt;=0;--p)a[p]=c*t[p]+u*e[p]+f*r[p]+h*n[p];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u&gt;=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],133:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/thunk.js&quot;);function i(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName=&quot;&quot;,this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var a=0;a&lt;r.length;++a){var o=r[a];if(&quot;array&quot;===o||&quot;object&quot;==typeof o&amp;&amp;o.blockIndices){if(e.argTypes[a]=&quot;array&quot;,e.arrayArgs.push(a),e.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),e.shimArgs.push(&quot;array&quot;+a),a&lt;e.pre.args.length&amp;&amp;e.pre.args[a].count&gt;0)throw new Error(&quot;cwise: pre() block may not reference array args&quot;);if(a&lt;e.post.args.length&amp;&amp;e.post.args[a].count&gt;0)throw new Error(&quot;cwise: post() block may not reference array args&quot;)}else if(&quot;scalar&quot;===o)e.scalarArgs.push(a),e.shimArgs.push(&quot;scalar&quot;+a);else if(&quot;index&quot;===o){if(e.indexArgs.push(a),a&lt;e.pre.args.length&amp;&amp;e.pre.args[a].count&gt;0)throw new Error(&quot;cwise: pre() block may not reference array index&quot;);if(a&lt;e.body.args.length&amp;&amp;e.body.args[a].lvalue)throw new Error(&quot;cwise: body() block may not write to array index&quot;);if(a&lt;e.post.args.length&amp;&amp;e.post.args[a].count&gt;0)throw new Error(&quot;cwise: post() block may not reference array index&quot;)}else if(&quot;shape&quot;===o){if(e.shapeArgs.push(a),a&lt;e.pre.args.length&amp;&amp;e.pre.args[a].lvalue)throw new Error(&quot;cwise: pre() block may not write to array shape&quot;);if(a&lt;e.body.args.length&amp;&amp;e.body.args[a].lvalue)throw new Error(&quot;cwise: body() block may not write to array shape&quot;);if(a&lt;e.post.args.length&amp;&amp;e.post.args[a].lvalue)throw new Error(&quot;cwise: post() block may not write to array shape&quot;)}else{if(&quot;object&quot;!=typeof o||!o.offset)throw new Error(&quot;cwise: Unknown argument type &quot;+r[a]);e.argTypes[a]=&quot;offset&quot;,e.offsetArgs.push({array:o.array,offset:o.offset}),e.offsetArgIndex.push(a)}}if(e.arrayArgs.length&lt;=0)throw new Error(&quot;cwise: No array arguments specified&quot;);if(e.pre.args.length&gt;r.length)throw new Error(&quot;cwise: Too many arguments in pre() block&quot;);if(e.body.args.length&gt;r.length)throw new Error(&quot;cwise: Too many arguments in body() block&quot;);if(e.post.args.length&gt;r.length)throw new Error(&quot;cwise: Too many arguments in post() block&quot;);return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||&quot;cwise&quot;,e.blockSize=t.blockSize||64,n(e)}},{&quot;./lib/thunk.js&quot;:135}],134:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;uniq&quot;);function i(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length&gt;0,l=[],c=[],u=0,f=0;for(n=0;n&lt;a;++n)c.push([&quot;i&quot;,n,&quot;=0&quot;].join(&quot;&quot;));for(i=0;i&lt;o;++i)for(n=0;n&lt;a;++n)f=u,u=t[n],0===n?c.push([&quot;d&quot;,i,&quot;s&quot;,n,&quot;=t&quot;,i,&quot;p&quot;,u].join(&quot;&quot;)):c.push([&quot;d&quot;,i,&quot;s&quot;,n,&quot;=(t&quot;,i,&quot;p&quot;,u,&quot;-s&quot;,f,&quot;*t&quot;,i,&quot;p&quot;,f,&quot;)&quot;].join(&quot;&quot;));for(c.length&gt;0&amp;&amp;l.push(&quot;var &quot;+c.join(&quot;,&quot;)),n=a-1;n&gt;=0;--n)u=t[n],l.push([&quot;for(i&quot;,n,&quot;=0;i&quot;,n,&quot;&lt;s&quot;,u,&quot;;++i&quot;,n,&quot;){&quot;].join(&quot;&quot;));for(l.push(r),n=0;n&lt;a;++n){for(f=u,u=t[n],i=0;i&lt;o;++i)l.push([&quot;p&quot;,i,&quot;+=d&quot;,i,&quot;s&quot;,n].join(&quot;&quot;));s&amp;&amp;(n&gt;0&amp;&amp;l.push([&quot;index[&quot;,f,&quot;]-=s&quot;,f].join(&quot;&quot;)),l.push([&quot;++index[&quot;,u,&quot;]&quot;].join(&quot;&quot;))),l.push(&quot;}&quot;)}return l.join(&quot;\n&quot;)}function a(t,e,r){for(var n=t.body,i=[],a=[],o=0;o&lt;t.args.length;++o){var s=t.args[o];if(!(s.count&lt;=0)){var l=new RegExp(s.name,&quot;g&quot;),c=&quot;&quot;,u=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case&quot;offset&quot;:var f=e.offsetArgIndex.indexOf(o);u=e.offsetArgs[f].array,c=&quot;+q&quot;+f;case&quot;array&quot;:c=&quot;p&quot;+u+c;var h=&quot;l&quot;+o,p=&quot;a&quot;+u;if(0===e.arrayBlockIndices[u])1===s.count?&quot;generic&quot;===r[u]?s.lvalue?(i.push([&quot;var &quot;,h,&quot;=&quot;,p,&quot;.get(&quot;,c,&quot;)&quot;].join(&quot;&quot;)),n=n.replace(l,h),a.push([p,&quot;.set(&quot;,c,&quot;,&quot;,h,&quot;)&quot;].join(&quot;&quot;))):n=n.replace(l,[p,&quot;.get(&quot;,c,&quot;)&quot;].join(&quot;&quot;)):n=n.replace(l,[p,&quot;[&quot;,c,&quot;]&quot;].join(&quot;&quot;)):&quot;generic&quot;===r[u]?(i.push([&quot;var &quot;,h,&quot;=&quot;,p,&quot;.get(&quot;,c,&quot;)&quot;].join(&quot;&quot;)),n=n.replace(l,h),s.lvalue&amp;&amp;a.push([p,&quot;.set(&quot;,c,&quot;,&quot;,h,&quot;)&quot;].join(&quot;&quot;))):(i.push([&quot;var &quot;,h,&quot;=&quot;,p,&quot;[&quot;,c,&quot;]&quot;].join(&quot;&quot;)),n=n.replace(l,h),s.lvalue&amp;&amp;a.push([p,&quot;[&quot;,c,&quot;]=&quot;,h].join(&quot;&quot;)));else{for(var d=[s.name],g=[c],m=0;m&lt;Math.abs(e.arrayBlockIndices[u]);m++)d.push(&quot;\\s*\\[([^\\]]+)\\]&quot;),g.push(&quot;$&quot;+(m+1)+&quot;*t&quot;+u+&quot;b&quot;+m);if(l=new RegExp(d.join(&quot;&quot;),&quot;g&quot;),c=g.join(&quot;+&quot;),&quot;generic&quot;===r[u])throw new Error(&quot;cwise: Generic arrays not supported in combination with blocks!&quot;);n=n.replace(l,[p,&quot;[&quot;,c,&quot;]&quot;].join(&quot;&quot;))}break;case&quot;scalar&quot;:n=n.replace(l,&quot;Y&quot;+e.scalarArgs.indexOf(o));break;case&quot;index&quot;:n=n.replace(l,&quot;index&quot;);break;case&quot;shape&quot;:n=n.replace(l,&quot;shape&quot;)}}}return[i.join(&quot;\n&quot;),n,a.join(&quot;\n&quot;)].join(&quot;\n&quot;).trim()}e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,o=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),l=0;l&lt;t.arrayArgs.length;++l)s[l]=e[2*l],o[l]=e[2*l+1];var c=[],u=[],f=[],h=[],p=[];for(l=0;l&lt;t.arrayArgs.length;++l){t.arrayBlockIndices[l]&lt;0?(f.push(0),h.push(r),c.push(r),u.push(r+t.arrayBlockIndices[l])):(f.push(t.arrayBlockIndices[l]),h.push(t.arrayBlockIndices[l]+r),c.push(0),u.push(t.arrayBlockIndices[l]));for(var d=[],g=0;g&lt;o[l].length;g++)f[l]&lt;=o[l][g]&amp;&amp;o[l][g]&lt;h[l]&amp;&amp;d.push(o[l][g]-f[l]);p.push(d)}var m=[&quot;SS&quot;],v=[&quot;'use strict'&quot;],y=[];for(g=0;g&lt;r;++g)y.push([&quot;s&quot;,g,&quot;=SS[&quot;,g,&quot;]&quot;].join(&quot;&quot;));for(l=0;l&lt;t.arrayArgs.length;++l){for(m.push(&quot;a&quot;+l),m.push(&quot;t&quot;+l),m.push(&quot;p&quot;+l),g=0;g&lt;r;++g)y.push([&quot;t&quot;,l,&quot;p&quot;,g,&quot;=t&quot;,l,&quot;[&quot;,f[l]+g,&quot;]&quot;].join(&quot;&quot;));for(g=0;g&lt;Math.abs(t.arrayBlockIndices[l]);++g)y.push([&quot;t&quot;,l,&quot;b&quot;,g,&quot;=t&quot;,l,&quot;[&quot;,c[l]+g,&quot;]&quot;].join(&quot;&quot;))}for(l=0;l&lt;t.scalarArgs.length;++l)m.push(&quot;Y&quot;+l);if(t.shapeArgs.length&gt;0&amp;&amp;y.push(&quot;shape=SS.slice(0)&quot;),t.indexArgs.length&gt;0){var x=new Array(r);for(l=0;l&lt;r;++l)x[l]=&quot;0&quot;;y.push([&quot;index=[&quot;,x.join(&quot;,&quot;),&quot;]&quot;].join(&quot;&quot;))}for(l=0;l&lt;t.offsetArgs.length;++l){var b=t.offsetArgs[l],_=[];for(g=0;g&lt;b.offset.length;++g)0!==b.offset[g]&amp;&amp;(1===b.offset[g]?_.push([&quot;t&quot;,b.array,&quot;p&quot;,g].join(&quot;&quot;)):_.push([b.offset[g],&quot;*t&quot;,b.array,&quot;p&quot;,g].join(&quot;&quot;)));0===_.length?y.push(&quot;q&quot;+l+&quot;=0&quot;):y.push([&quot;q&quot;,l,&quot;=&quot;,_.join(&quot;+&quot;)].join(&quot;&quot;))}var w=n([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for((y=y.concat(w)).length&gt;0&amp;&amp;v.push(&quot;var &quot;+y.join(&quot;,&quot;)),l=0;l&lt;t.arrayArgs.length;++l)v.push(&quot;p&quot;+l+&quot;|=0&quot;);t.pre.body.length&gt;3&amp;&amp;v.push(a(t.pre,t,s));var k=a(t.body,t,s),M=function(t){for(var e=0,r=t[0].length;e&lt;r;){for(var n=1;n&lt;t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}(p);M&lt;r?v.push(function(t,e,r,n){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length&gt;0,c=[],u=0;u&lt;o;++u)c.push([&quot;var offset&quot;,u,&quot;=p&quot;,u].join(&quot;&quot;));for(u=t;u&lt;a;++u)c.push([&quot;for(var j&quot;+u+&quot;=SS[&quot;,e[u],&quot;]|0;j&quot;,u,&quot;&gt;0;){&quot;].join(&quot;&quot;)),c.push([&quot;if(j&quot;,u,&quot;&lt;&quot;,s,&quot;){&quot;].join(&quot;&quot;)),c.push([&quot;s&quot;,e[u],&quot;=j&quot;,u].join(&quot;&quot;)),c.push([&quot;j&quot;,u,&quot;=0&quot;].join(&quot;&quot;)),c.push([&quot;}else{s&quot;,e[u],&quot;=&quot;,s].join(&quot;&quot;)),c.push([&quot;j&quot;,u,&quot;-=&quot;,s,&quot;}&quot;].join(&quot;&quot;)),l&amp;&amp;c.push([&quot;index[&quot;,e[u],&quot;]=j&quot;,u].join(&quot;&quot;));for(u=0;u&lt;o;++u){for(var f=[&quot;offset&quot;+u],h=t;h&lt;a;++h)f.push([&quot;j&quot;,h,&quot;*t&quot;,u,&quot;p&quot;,e[h]].join(&quot;&quot;));c.push([&quot;p&quot;,u,&quot;=(&quot;,f.join(&quot;+&quot;),&quot;)&quot;].join(&quot;&quot;))}for(c.push(i(e,r,n)),u=t;u&lt;a;++u)c.push(&quot;}&quot;);return c.join(&quot;\n&quot;)}(M,p[0],t,k)):v.push(i(p[0],t,k)),t.post.body.length&gt;3&amp;&amp;v.push(a(t.post,t,s)),t.debug&amp;&amp;console.log(&quot;-----Generated cwise routine for &quot;,e,&quot;:\n&quot;+v.join(&quot;\n&quot;)+&quot;\n----------&quot;);var A=[t.funcName||&quot;unnamed&quot;,&quot;_cwise_loop_&quot;,o[0].join(&quot;s&quot;),&quot;m&quot;,M,function(t){for(var e=new Array(t.length),r=!0,n=0;n&lt;t.length;++n){var i=t[n],a=i.match(/\d+/);a=a?a[0]:&quot;&quot;,0===i.charAt(0)?e[n]=&quot;u&quot;+i.charAt(1)+a:e[n]=i.charAt(0)+a,n&gt;0&amp;&amp;(r=r&amp;&amp;e[n]===e[n-1])}return r?e[0]:e.join(&quot;&quot;)}(s)].join(&quot;&quot;);return new Function([&quot;function &quot;,A,&quot;(&quot;,m.join(&quot;,&quot;),&quot;){&quot;,v.join(&quot;\n&quot;),&quot;} return &quot;,A].join(&quot;&quot;))()}},{uniq:521}],135:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./compile.js&quot;);e.exports=function(t){var e=[&quot;'use strict'&quot;,&quot;var CACHED={}&quot;],r=[],i=t.funcName+&quot;_cwise_thunk&quot;;e.push([&quot;return function &quot;,i,&quot;(&quot;,t.shimArgs.join(&quot;,&quot;),&quot;){&quot;].join(&quot;&quot;));for(var a=[],o=[],s=[[&quot;array&quot;,t.arrayArgs[0],&quot;.shape.slice(&quot;,Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]&lt;0?&quot;,&quot;+t.arrayBlockIndices[0]+&quot;)&quot;:&quot;)&quot;].join(&quot;&quot;)],l=[],c=[],u=0;u&lt;t.arrayArgs.length;++u){var f=t.arrayArgs[u];r.push([&quot;t&quot;,f,&quot;=array&quot;,f,&quot;.dtype,&quot;,&quot;r&quot;,f,&quot;=array&quot;,f,&quot;.order&quot;].join(&quot;&quot;)),a.push(&quot;t&quot;+f),a.push(&quot;r&quot;+f),o.push(&quot;t&quot;+f),o.push(&quot;r&quot;+f+&quot;.join()&quot;),s.push(&quot;array&quot;+f+&quot;.data&quot;),s.push(&quot;array&quot;+f+&quot;.stride&quot;),s.push(&quot;array&quot;+f+&quot;.offset|0&quot;),u&gt;0&amp;&amp;(l.push(&quot;array&quot;+t.arrayArgs[0]+&quot;.shape.length===array&quot;+f+&quot;.shape.length+&quot;+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push(&quot;array&quot;+t.arrayArgs[0]+&quot;.shape[shapeIndex+&quot;+Math.max(0,t.arrayBlockIndices[0])+&quot;]===array&quot;+f+&quot;.shape[shapeIndex+&quot;+Math.max(0,t.arrayBlockIndices[u])+&quot;]&quot;))}for(t.arrayArgs.length&gt;1&amp;&amp;(e.push(&quot;if (!(&quot;+l.join(&quot; &amp;&amp; &quot;)+&quot;)) throw new Error('cwise: Arrays do not all have the same dimensionality!')&quot;),e.push(&quot;for(var shapeIndex=array&quot;+t.arrayArgs[0]+&quot;.shape.length-&quot;+Math.abs(t.arrayBlockIndices[0])+&quot;; shapeIndex--\x3e0;) {&quot;),e.push(&quot;if (!(&quot;+c.join(&quot; &amp;&amp; &quot;)+&quot;)) throw new Error('cwise: Arrays do not all have the same shape!')&quot;),e.push(&quot;}&quot;)),u=0;u&lt;t.scalarArgs.length;++u)s.push(&quot;scalar&quot;+t.scalarArgs[u]);return r.push([&quot;type=[&quot;,o.join(&quot;,&quot;),&quot;].join()&quot;].join(&quot;&quot;)),r.push(&quot;proc=CACHED[type]&quot;),e.push(&quot;var &quot;+r.join(&quot;,&quot;)),e.push([&quot;if(!proc){&quot;,&quot;CACHED[type]=proc=compile([&quot;,a.join(&quot;,&quot;),&quot;])}&quot;,&quot;return proc(&quot;,s.join(&quot;,&quot;),&quot;)}&quot;].join(&quot;&quot;)),t.debug&amp;&amp;console.log(&quot;-----Generated thunk:\n&quot;+e.join(&quot;\n&quot;)+&quot;\n----------&quot;),new Function(&quot;compile&quot;,e.join(&quot;\n&quot;))(n.bind(void 0,t))}},{&quot;./compile.js&quot;:134}],136:[function(t,e,r){e.exports=t(&quot;cwise-compiler&quot;)},{&quot;cwise-compiler&quot;:133}],137:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/copy&quot;),a=t(&quot;es5-ext/object/normalize-options&quot;),o=t(&quot;es5-ext/object/valid-callable&quot;),s=t(&quot;es5-ext/object/map&quot;),l=t(&quot;es5-ext/object/valid-callable&quot;),c=t(&quot;es5-ext/object/valid-value&quot;),u=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,a=c(e)&amp;&amp;l(e.value);return delete(n=i(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&amp;&amp;h.call(this,t)?a:(e.value=u.call(a,r.resolveContext?r.resolveContext(this):this),f(this,t,e),this[t])},n},e.exports=function(t){var e=a(arguments[1]);return null!=e.resolveContext&amp;&amp;o(e.resolveContext),s(t,function(t,r){return n(r,t,e)})}},{&quot;es5-ext/object/copy&quot;:173,&quot;es5-ext/object/map&quot;:182,&quot;es5-ext/object/normalize-options&quot;:183,&quot;es5-ext/object/valid-callable&quot;:187,&quot;es5-ext/object/valid-value&quot;:189}],138:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/object/assign&quot;),i=t(&quot;es5-ext/object/normalize-options&quot;),a=t(&quot;es5-ext/object/is-callable&quot;),o=t(&quot;es5-ext/string/#/contains&quot;);(e.exports=function(t,e){var r,a,s,l,c;return arguments.length&lt;2||&quot;string&quot;!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,a=!1):(r=o.call(t,&quot;c&quot;),a=o.call(t,&quot;e&quot;),s=o.call(t,&quot;w&quot;)),c={value:e,configurable:r,enumerable:a,writable:s},l?n(i(l),c):c}).gs=function(t,e,r){var s,l,c,u;return&quot;string&quot;!=typeof t?(c=r,r=e,e=t,t=null):c=arguments[3],null==e?e=void 0:a(e)?null==r?r=void 0:a(r)||(c=r,r=void 0):(c=e,e=r=void 0),null==t?(s=!0,l=!1):(s=o.call(t,&quot;c&quot;),l=o.call(t,&quot;e&quot;)),u={get:e,set:r,configurable:s,enumerable:l},c?n(i(c),u):u}},{&quot;es5-ext/object/assign&quot;:170,&quot;es5-ext/object/is-callable&quot;:176,&quot;es5-ext/object/normalize-options&quot;:183,&quot;es5-ext/string/#/contains&quot;:190}],139:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e=function(t,e){return t&lt;e?-1:t&gt;e?1:t&gt;=e?0:NaN},r=function(t){var r;return 1===t.length&amp;&amp;(r=t,t=function(t,n){return e(r(t),n)}),{left:function(e,r,n,i){for(null==n&amp;&amp;(n=0),null==i&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&lt;0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&amp;&amp;(n=0),null==i&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&gt;0?i=a:n=a+1}return n}}};var n=r(e),i=n.right,a=n.left;function o(t,e){return[t,e]}var s=function(t){return null===t?NaN:+t},l=function(t,e){var r,n,i=t.length,a=0,o=-1,l=0,c=0;if(null==e)for(;++o&lt;i;)isNaN(r=s(t[o]))||(c+=(n=r-l)*(r-(l+=n/++a)));else for(;++o&lt;i;)isNaN(r=s(e(t[o],o,t)))||(c+=(n=r-l)*(r-(l+=n/++a)));if(a&gt;1)return c/(a-1)},c=function(t,e){var r=l(t,e);return r?Math.sqrt(r):r},u=function(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o&lt;a;)if(null!=(r=t[o])&amp;&amp;r&gt;=r)for(n=i=r;++o&lt;a;)null!=(r=t[o])&amp;&amp;(n&gt;r&amp;&amp;(n=r),i&lt;r&amp;&amp;(i=r))}else for(;++o&lt;a;)if(null!=(r=e(t[o],o,t))&amp;&amp;r&gt;=r)for(n=i=r;++o&lt;a;)null!=(r=e(t[o],o,t))&amp;&amp;(n&gt;r&amp;&amp;(n=r),i&lt;r&amp;&amp;(i=r));return[n,i]},f=Array.prototype,h=f.slice,p=f.map,d=function(t){return function(){return t}},g=function(t){return t},m=function(t,e,r){t=+t,e=+e,r=(i=arguments.length)&lt;2?(e=t,t=0,1):i&lt;3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n&lt;i;)a[n]=t+n*r;return a},v=Math.sqrt(50),y=Math.sqrt(10),x=Math.sqrt(2);function b(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i&gt;=0?(a&gt;=v?10:a&gt;=y?5:a&gt;=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a&gt;=v?10:a&gt;=y?5:a&gt;=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a&gt;=v?i*=10:a&gt;=y?i*=5:a&gt;=x&amp;&amp;(i*=2),e&lt;t?-i:i}var w=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},k=function(t,e,r){if(null==r&amp;&amp;(r=s),n=t.length){if((e=+e)&lt;=0||n&lt;2)return+r(t[0],0,t);if(e&gt;=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}},M=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a&lt;i;)if(null!=(r=t[a])&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=t[a])&amp;&amp;n&gt;r&amp;&amp;(n=r)}else for(;++a&lt;i;)if(null!=(r=e(t[a],a,t))&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=e(t[a],a,t))&amp;&amp;n&gt;r&amp;&amp;(n=r);return n},A=function(t){if(!(i=t.length))return[];for(var e=-1,r=M(t,T),n=new Array(r);++e&lt;r;)for(var i,a=-1,o=n[e]=new Array(i);++a&lt;i;)o[a]=t[a][e];return n};function T(t){return t.length}t.bisect=i,t.bisectRight=i,t.bisectLeft=a,t.ascending=e,t.bisector=r,t.cross=function(t,e,r){var n,i,a,s,l=t.length,c=e.length,u=new Array(l*c);for(null==r&amp;&amp;(r=o),n=a=0;n&lt;l;++n)for(s=t[n],i=0;i&lt;c;++i,++a)u[a]=r(s,e[i]);return u},t.descending=function(t,e){return e&lt;t?-1:e&gt;t?1:e&gt;=t?0:NaN},t.deviation=c,t.extent=u,t.histogram=function(){var t=g,e=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;a&lt;s;++a)l[a]=t(n[a],a,n);var c=e(l),u=c[0],f=c[1],h=r(l,u,f);Array.isArray(h)||(h=_(u,f,h),h=m(Math.ceil(u/h)*h,Math.floor(f/h)*h,h));for(var p=h.length;h[0]&lt;=u;)h.shift(),--p;for(;h[p-1]&gt;f;)h.pop(),--p;var d,g=new Array(p+1);for(a=0;a&lt;=p;++a)(d=g[a]=[]).x0=a&gt;0?h[a-1]:u,d.x1=a&lt;p?h[a]:f;for(a=0;a&lt;s;++a)u&lt;=(o=l[a])&amp;&amp;o&lt;=f&amp;&amp;g[i(h,o,0,p)].push(n[a]);return g}return n.value=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:d(e),n):t},n.domain=function(t){return arguments.length?(e=&quot;function&quot;==typeof t?t:d([t[0],t[1]]),n):e},n.thresholds=function(t){return arguments.length?(r=&quot;function&quot;==typeof t?t:Array.isArray(t)?d(h.call(t)):d(t),n):r},n},t.thresholdFreedmanDiaconis=function(t,r,n){return t=p.call(t,s).sort(e),Math.ceil((n-r)/(2*(k(t,.75)-k(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*c(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=w,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a&lt;i;)if(null!=(r=t[a])&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=t[a])&amp;&amp;r&gt;n&amp;&amp;(n=r)}else for(;++a&lt;i;)if(null!=(r=e(t[a],a,t))&amp;&amp;r&gt;=r)for(n=r;++a&lt;i;)null!=(r=e(t[a],a,t))&amp;&amp;r&gt;n&amp;&amp;(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a&lt;n;)isNaN(r=s(t[a]))?--i:o+=r;else for(;++a&lt;n;)isNaN(r=s(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,r){var n,i=t.length,a=-1,o=[];if(null==r)for(;++a&lt;i;)isNaN(n=s(t[a]))||o.push(n);else for(;++a&lt;i;)isNaN(n=s(r(t[a],a,t)))||o.push(n);return k(o.sort(e),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a&lt;i;)o+=t[a].length;for(r=new Array(o);--i&gt;=0;)for(e=(n=t[i]).length;--e&gt;=0;)r[--o]=n[e];return r},t.min=M,t.pairs=function(t,e){null==e&amp;&amp;(e=o);for(var r=0,n=t.length-1,i=t[0],a=new Array(n&lt;0?0:n);r&lt;n;)a[r]=e(i,i=t[++r]);return a},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=k,t.range=m,t.scan=function(t,r){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==r&amp;&amp;(r=e);++a&lt;n;)(r(i=t[a],s)&lt;0||0!==r(s,s))&amp;&amp;(s=i,o=a);return 0===r(s,s)?o:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i&lt;n;)(r=+t[i])&amp;&amp;(a+=r);else for(;++i&lt;n;)(r=+e(t[i],i,t))&amp;&amp;(a+=r);return a},t.ticks=function(t,e,r){var n,i,a,o,s=-1;if(r=+r,(t=+t)==(e=+e)&amp;&amp;r&gt;0)return[t];if((n=e&lt;t)&amp;&amp;(i=t,t=e,e=i),0===(o=b(t,e,r))||!isFinite(o))return[];if(o&gt;0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s&lt;i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s&lt;i;)a[s]=(t-s)/o;return n&amp;&amp;a.reverse(),a},t.tickIncrement=b,t.tickStep=_,t.transpose=A,t.variance=l,t.zip=function(){return A(arguments)},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],140:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;function e(){}function r(t,r){var n=new e;if(t instanceof e)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==r)for(;++a&lt;o;)n.set(a,t[a]);else for(;++a&lt;o;)n.set(r(i=t[a],a,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}e.prototype=r.prototype={constructor:e,has:function(t){return&quot;$&quot;+t in this},get:function(t){return this[&quot;$&quot;+t]},set:function(t,e){return this[&quot;$&quot;+t]=e,this},remove:function(t){var e=&quot;$&quot;+t;return e in this&amp;&amp;delete this[e]},clear:function(){for(var t in this)&quot;$&quot;===t[0]&amp;&amp;delete this[t]},keys:function(){var t=[];for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)&quot;$&quot;===e[0]&amp;&amp;++t;return t},empty:function(){for(var t in this)if(&quot;$&quot;===t[0])return!1;return!0},each:function(t){for(var e in this)&quot;$&quot;===e[0]&amp;&amp;t(this[e],e.slice(1),this)}};function n(){return{}}function i(t,e,r){t[e]=r}function a(){return r()}function o(t,e,r){t.set(e,r)}function s(){}var l=r.prototype;function c(t,e){var r=new s;if(t instanceof s)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n&lt;i;)r.add(t[n]);else for(;++n&lt;i;)r.add(e(t[n],n,t))}return r}s.prototype=c.prototype={constructor:s,has:l.has,add:function(t){return this[&quot;$&quot;+(t+=&quot;&quot;)]=t,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};t.nest=function(){var t,e,s,l=[],c=[];function u(n,i,a,o){if(i&gt;=l.length)return null!=t&amp;&amp;n.sort(t),null!=e?e(n):n;for(var s,c,f,h=-1,p=n.length,d=l[i++],g=r(),m=a();++h&lt;p;)(f=g.get(s=d(c=n[h])+&quot;&quot;))?f.push(c):g.set(s,[c]);return g.each(function(t,e){o(m,e,u(t,i,a,o))}),m}return s={object:function(t){return u(t,0,n,i)},map:function(t){return u(t,0,a,o)},entries:function(t){return function t(r,n){if(++n&gt;l.length)return r;var i,a=c[n-1];return null!=e&amp;&amp;n&gt;=l.length?i=r.entries():(i=[],r.each(function(e,r){i.push({key:r,values:t(e,n)})})),null!=a?i.sort(function(t,e){return a(t.key,e.key)}):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],141:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t};function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i=&quot;\\s*([+-]?\\d+)\\s*&quot;,a=&quot;\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*&quot;,o=&quot;\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*&quot;,s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp(&quot;^rgb\\(&quot;+[i,i,i]+&quot;\\)$&quot;),u=new RegExp(&quot;^rgb\\(&quot;+[o,o,o]+&quot;\\)$&quot;),f=new RegExp(&quot;^rgba\\(&quot;+[i,i,i,a]+&quot;\\)$&quot;),h=new RegExp(&quot;^rgba\\(&quot;+[o,o,o,a]+&quot;\\)$&quot;),p=new RegExp(&quot;^hsl\\(&quot;+[a,o,o]+&quot;\\)$&quot;),d=new RegExp(&quot;^hsla\\(&quot;+[a,o,o,a]+&quot;\\)$&quot;),g={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};function m(t){var e;return t=(t+&quot;&quot;).trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))&gt;&gt;8&amp;15|e&gt;&gt;4&amp;240,e&gt;&gt;4&amp;15|240&amp;e,(15&amp;e)&lt;&lt;4|15&amp;e,1):(e=l.exec(t))?v(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?y(e[1],e[2],e[3],e[4]):(e=h.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?v(g[t]):&quot;transparent&quot;===t?new _(NaN,NaN,NaN,0):null}function v(t){return new _(t&gt;&gt;16&amp;255,t&gt;&gt;8&amp;255,255&amp;t,1)}function y(t,e,r,n){return n&lt;=0&amp;&amp;(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=m(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))&lt;16?&quot;0&quot;:&quot;&quot;)+t.toString(16)}function k(t,e,r,n){return n&lt;=0?t=e=r=NaN:r&lt;=0||r&gt;=1?t=e=NaN:e&lt;=0&amp;&amp;(t=NaN),new A(t,e,r,n)}function M(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=m(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r&lt;i):r===o?(i-e)/l+2:(e-r)/l+4,l/=c&lt;.5?o+a:2-o-a,s*=60):l=c&gt;0&amp;&amp;c&lt;1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==i?1:i)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function T(t,e,r){return 255*(t&lt;60?e+(r-e)*t/60:t&lt;180?r:t&lt;240?e+(r-e)*(240-t)/60:e)}e(n,m,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+&quot;&quot;}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0&lt;=this.r&amp;&amp;this.r&lt;=255&amp;&amp;0&lt;=this.g&amp;&amp;this.g&lt;=255&amp;&amp;0&lt;=this.b&amp;&amp;this.b&lt;=255&amp;&amp;0&lt;=this.opacity&amp;&amp;this.opacity&lt;=1},hex:function(){return&quot;#&quot;+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?&quot;rgb(&quot;:&quot;rgba(&quot;)+Math.max(0,Math.min(255,Math.round(this.r)||0))+&quot;, &quot;+Math.max(0,Math.min(255,Math.round(this.g)||0))+&quot;, &quot;+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?&quot;)&quot;:&quot;, &quot;+t+&quot;)&quot;)}})),e(A,M,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h&lt;0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r&lt;.5?r:1-r)*e,i=2*r-n;return new _(T(t&gt;=240?t-240:t+120,i,n),T(t,i,n),T(t&lt;120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0&lt;=this.s&amp;&amp;this.s&lt;=1||isNaN(this.s))&amp;&amp;0&lt;=this.l&amp;&amp;this.l&lt;=1&amp;&amp;0&lt;=this.opacity&amp;&amp;this.opacity&lt;=1}}));var S=Math.PI/180,E=180/Math.PI,C=.96422,L=1,z=.82521,P=4/29,O=6/29,I=3*O*O,D=O*O*O;function R(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new F(t.l,0,0,t.opacity);var e=t.h*S;return new F(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,i=U(t.r),a=U(t.g),o=U(t.b),s=N((.2225045*i+.7168786*a+.0606169*o)/L);return i===a&amp;&amp;a===o?r=n=s:(r=N((.4360747*i+.3850649*a+.1430804*o)/C),n=N((.0139322*i+.0971045*a+.7141733*o)/z)),new F(116*s-16,500*(r-s),200*(s-n),t.opacity)}function B(t,e,r,n){return 1===arguments.length?R(t):new F(t,e,r,null==n?1:n)}function F(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t&gt;D?Math.pow(t,1/3):t/I+P}function j(t){return t&gt;O?t*t*t:I*(t-P)}function V(t){return 255*(t&lt;=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)&lt;=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=R(t)),0===t.a&amp;&amp;0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E;return new G(e&lt;0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(F,B,r(n,{brighter:function(t){return new F(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new F(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(V(3.1338561*(e=C*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=z*j(r))),V(-.9787684*e+1.9161415*t+.033454*r),V(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var W=-.14861,Y=1.78277,X=-.29227,Z=-.90649,$=1.97294,J=$*Z,K=$*Y,Q=Y*X-Z*W;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(Q*n+J*e-K*r)/(Q+J-K),a=n-i,o=($*(r-i)-X*a)/Z,s=Math.sqrt(o*o+a*a)/($*i*(1-i)),l=s?Math.atan2(o,a)*E-120:NaN;return new et(l&lt;0?l+360:l,s,i,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new _(255*(e+r*(W*n+Y*i)),255*(e+r*(X*n+Z*i)),255*(e+r*($*n)),this.opacity)}})),t.color=m,t.rgb=b,t.hsl=M,t.lab=B,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new F(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],142:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,i={};e&lt;r;++e){if(!(t=arguments[e]+&quot;&quot;)||t in i)throw new Error(&quot;illegal type: &quot;+t);i[t]=[]}return new n(i)}function n(t){this._=t}function i(t,e){for(var r,n=0,i=t.length;n&lt;i;++n)if((r=t[n]).name===e)return r.value}function a(t,r,n){for(var i=0,a=t.length;i&lt;a;++i)if(t[i].name===r){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&amp;&amp;t.push({name:r,value:n}),t}n.prototype=r.prototype={constructor:n,on:function(t,e){var r,n,o=this._,s=(n=o,(t+&quot;&quot;).trim().split(/^|\s+/).map(function(t){var e=&quot;&quot;,r=t.indexOf(&quot;.&quot;);if(r&gt;=0&amp;&amp;(e=t.slice(r+1),t=t.slice(0,r)),t&amp;&amp;!n.hasOwnProperty(t))throw new Error(&quot;unknown type: &quot;+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length&lt;2)){if(null!=e&amp;&amp;&quot;function&quot;!=typeof e)throw new Error(&quot;invalid callback: &quot;+e);for(;++l&lt;c;)if(r=(t=s[l]).type)o[r]=a(o[r],t.name,e);else if(null==e)for(r in o)o[r]=a(o[r],t.name,null);return this}for(;++l&lt;c;)if((r=(t=s[l]).type)&amp;&amp;(r=i(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new n(t)},call:function(t,e){if((r=arguments.length-2)&gt;0)for(var r,n,i=new Array(r),a=0;a&lt;r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(&quot;unknown type: &quot;+t);for(a=0,r=(n=this._[t]).length;a&lt;r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error(&quot;unknown type: &quot;+t);for(var n=this._[t],i=0,a=n.length;i&lt;a;++i)n[i].value.apply(e,r)}},t.dispatch=r,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],143:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n,i){&quot;use strict&quot;;var a=function(t){return function(){return t}},o=function(){return 1e-6*(Math.random()-.5)};function s(t){return t.x+t.vx}function l(t){return t.y+t.vy}function c(t){return t.index}function u(t,e){var r=t.get(e);if(!r)throw new Error(&quot;missing: &quot;+e);return r}function f(t){return t.x}function h(t){return t.y}var p=10,d=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;n&lt;a;++n)o+=(i=r[n]).x,s+=i.y;for(o=o/a-t,s=s/a-e,n=0;n&lt;a;++n)(i=r[n]).x-=o,i.y-=s}return null==t&amp;&amp;(t=0),null==e&amp;&amp;(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n},t.forceCollide=function(t){var r,n,i=1,c=1;function u(){for(var t,a,u,h,p,d,g,m=r.length,v=0;v&lt;c;++v)for(a=e.quadtree(r,s,l).visitAfter(f),t=0;t&lt;m;++t)u=r[t],d=n[u.index],g=d*d,h=u.x+u.vx,p=u.y+u.vy,a.visit(y);function y(t,e,r,n,a){var s=t.data,l=t.r,c=d+l;if(!s)return e&gt;h+c||n&lt;h-c||r&gt;p+c||a&lt;p-c;if(s.index&gt;u.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;v&lt;c*c&amp;&amp;(0===f&amp;&amp;(v+=(f=o())*f),0===m&amp;&amp;(v+=(m=o())*m),v=(c-(v=Math.sqrt(v)))/v*i,u.vx+=(f*=v)*(c=(l*=l)/(g+l)),u.vy+=(m*=v)*c,s.vx-=f*(c=1-c),s.vy-=m*c)}}}function f(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e&lt;4;++e)t[e]&amp;&amp;t[e].r&gt;t.r&amp;&amp;(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e&lt;a;++e)i=r[e],n[i.index]=+t(i,e,r)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(null==t?1:+t)),u.initialize=function(t){r=t,h()},u.iterations=function(t){return arguments.length?(c=+t,u):c},u.strength=function(t){return arguments.length?(i=+t,u):i},u.radius=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),h(),u):t},u},t.forceLink=function(t){var e,n,i,s,l,f=c,h=function(t){return 1/Math.min(s[t.source.index],s[t.target.index])},p=a(30),d=1;function g(r){for(var i=0,a=t.length;i&lt;d;++i)for(var s,c,u,f,h,p,g,m=0;m&lt;a;++m)c=(s=t[m]).source,f=(u=s.target).x+u.vx-c.x-c.vx||o(),h=u.y+u.vy-c.y-c.vy||o(),f*=p=((p=Math.sqrt(f*f+h*h))-n[m])/p*r*e[m],h*=p,u.vx-=f*(g=l[m]),u.vy-=h*g,c.vx+=f*(g=1-g),c.vy+=h*g}function m(){if(i){var a,o,c=i.length,h=t.length,p=r.map(i,f);for(a=0,s=new Array(c);a&lt;h;++a)(o=t[a]).index=a,&quot;object&quot;!=typeof o.source&amp;&amp;(o.source=u(p,o.source)),&quot;object&quot;!=typeof o.target&amp;&amp;(o.target=u(p,o.target)),s[o.source.index]=(s[o.source.index]||0)+1,s[o.target.index]=(s[o.target.index]||0)+1;for(a=0,l=new Array(h);a&lt;h;++a)o=t[a],l[a]=s[o.source.index]/(s[o.source.index]+s[o.target.index]);e=new Array(h),v(),n=new Array(h),y()}}function v(){if(i)for(var r=0,n=t.length;r&lt;n;++r)e[r]=+h(t[r],r,t)}function y(){if(i)for(var e=0,r=t.length;e&lt;r;++e)n[e]=+p(t[e],e,t)}return null==t&amp;&amp;(t=[]),g.initialize=function(t){i=t,m()},g.links=function(e){return arguments.length?(t=e,m(),g):t},g.id=function(t){return arguments.length?(f=t,g):f},g.iterations=function(t){return arguments.length?(d=+t,g):d},g.strength=function(t){return arguments.length?(h=&quot;function&quot;==typeof t?t:a(+t),v(),g):h},g.distance=function(t){return arguments.length?(p=&quot;function&quot;==typeof t?t:a(+t),y(),g):p},g},t.forceManyBody=function(){var t,r,n,i,s=a(-30),l=1,c=1/0,u=.81;function p(i){var a,o=t.length,s=e.quadtree(t,f,h).visitAfter(g);for(n=i,a=0;a&lt;o;++a)r=t[a],s.visit(m)}function d(){if(t){var e,r,n=t.length;for(i=new Array(n),e=0;e&lt;n;++e)r=t[e],i[r.index]=+s(r,e,t)}}function g(t){var e,r,n,a,o,s=0,l=0;if(t.length){for(n=a=o=0;o&lt;4;++o)(e=t[o])&amp;&amp;(r=Math.abs(e.value))&amp;&amp;(s+=e.value,l+=r,n+=r*e.x,a+=r*e.y);t.x=n/l,t.y=a/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function m(t,e,a,s){if(!t.value)return!0;var f=t.x-r.x,h=t.y-r.y,p=s-e,d=f*f+h*h;if(p*p/u&lt;d)return d&lt;c&amp;&amp;(0===f&amp;&amp;(d+=(f=o())*f),0===h&amp;&amp;(d+=(h=o())*h),d&lt;l&amp;&amp;(d=Math.sqrt(l*d)),r.vx+=f*t.value*n/d,r.vy+=h*t.value*n/d),!0;if(!(t.length||d&gt;=c)){(t.data!==r||t.next)&amp;&amp;(0===f&amp;&amp;(d+=(f=o())*f),0===h&amp;&amp;(d+=(h=o())*h),d&lt;l&amp;&amp;(d=Math.sqrt(l*d)));do{t.data!==r&amp;&amp;(p=i[t.data.index]*n/d,r.vx+=f*p,r.vy+=h*p)}while(t=t.next)}}return p.initialize=function(e){t=e,d()},p.strength=function(t){return arguments.length?(s=&quot;function&quot;==typeof t?t:a(+t),d(),p):s},p.distanceMin=function(t){return arguments.length?(l=t*t,p):Math.sqrt(l)},p.distanceMax=function(t){return arguments.length?(c=t*t,p):Math.sqrt(c)},p.theta=function(t){return arguments.length?(u=t*t,p):Math.sqrt(u)},p},t.forceRadial=function(t,e,r){var n,i,o,s=a(.1);function l(t){for(var a=0,s=n.length;a&lt;s;++a){var l=n[a],c=l.x-e||1e-6,u=l.y-r||1e-6,f=Math.sqrt(c*c+u*u),h=(o[a]-f)*i[a]*t/f;l.vx+=c*h,l.vy+=u*h}}function c(){if(n){var e,r=n.length;for(i=new Array(r),o=new Array(r),e=0;e&lt;r;++e)o[e]=+t(n[e],e,n),i[e]=isNaN(o[e])?0:+s(n[e],e,n)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(+t)),null==e&amp;&amp;(e=0),null==r&amp;&amp;(r=0),l.initialize=function(t){n=t,c()},l.strength=function(t){return arguments.length?(s=&quot;function&quot;==typeof t?t:a(+t),c(),l):s},l.radius=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),c(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(r=+t,l):r},l},t.forceSimulation=function(t){var e,a=1,o=.001,s=1-Math.pow(o,1/300),l=0,c=.6,u=r.map(),f=i.timer(g),h=n.dispatch(&quot;tick&quot;,&quot;end&quot;);function g(){m(),h.call(&quot;tick&quot;,e),a&lt;o&amp;&amp;(f.stop(),h.call(&quot;end&quot;,e))}function m(){var e,r,n=t.length;for(a+=(l-a)*s,u.each(function(t){t(a)}),e=0;e&lt;n;++e)null==(r=t[e]).fx?r.x+=r.vx*=c:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=c:(r.y=r.fy,r.vy=0)}function v(){for(var e,r=0,n=t.length;r&lt;n;++r){if((e=t[r]).index=r,isNaN(e.x)||isNaN(e.y)){var i=p*Math.sqrt(r),a=r*d;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&amp;&amp;(e.vx=e.vy=0)}}function y(e){return e.initialize&amp;&amp;e.initialize(t),e}return null==t&amp;&amp;(t=[]),v(),e={tick:m,restart:function(){return f.restart(g),e},stop:function(){return f.stop(),e},nodes:function(r){return arguments.length?(t=r,v(),u.each(y),e):t},alpha:function(t){return arguments.length?(a=+t,e):a},alphaMin:function(t){return arguments.length?(o=+t,e):o},alphaDecay:function(t){return arguments.length?(s=+t,e):+s},alphaTarget:function(t){return arguments.length?(l=+t,e):l},velocityDecay:function(t){return arguments.length?(c=1-t,e):1-c},force:function(t,r){return arguments.length&gt;1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c&lt;u;++c)(o=(i=e-(s=t[c]).x)*i+(a=r-s.y)*a)&lt;n&amp;&amp;(l=s,n=o);return l},on:function(t,r){return arguments.length&gt;1?(h.on(t,r),e):h.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a&lt;o;++a)(i=e[a]).vx+=(n[a]-i.x)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a&lt;o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=&quot;function&quot;==typeof t?t:a(+t),s(),o):i},o.x=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),s(),o):t},o},t.forceY=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a&lt;o;++a)(i=e[a]).vy+=(n[a]-i.y)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a&lt;o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return&quot;function&quot;!=typeof t&amp;&amp;(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=&quot;function&quot;==typeof t?t:a(+t),s(),o):i},o.y=function(e){return arguments.length?(t=&quot;function&quot;==typeof e?e:a(+e),s(),o):t},o},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?i(r,t(&quot;d3-quadtree&quot;),t(&quot;d3-collection&quot;),t(&quot;d3-dispatch&quot;),t(&quot;d3-timer&quot;)):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)},{&quot;d3-collection&quot;:140,&quot;d3-dispatch&quot;:142,&quot;d3-quadtree&quot;:145,&quot;d3-timer&quot;:146}],144:[function(t,e,r){var n,i;n=this,i=function(t,e){&quot;use strict&quot;;function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}var n=function(t){var e=t.length-1;return function(n){var i=n&lt;=0?n=0:n&gt;=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i&gt;0?t[i-1]:2*a-o,l=i&lt;e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,l)}},i=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)&lt;0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],l=t[(i+2)%e];return r((n-i/e)*e,a,o,s,l)}},a=function(t){return function(){return t}};function o(t,e){return function(r){return t+r*e}}function s(t,e){var r=e-t;return r?o(t,r&gt;180||r&lt;-180?r-360*Math.round(r/360):r):a(isNaN(t)?e:t)}function l(t){return 1==(t=+t)?c:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):a(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):a(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function i(t,r){var i=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+&quot;&quot;}}return i.gamma=t,i}(1);function f(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n&lt;a;++n)i=e.rgb(r[n]),o[n]=i.r||0,s[n]=i.g||0,l[n]=i.b||0;return o=t(o),s=t(s),l=t(l),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=l(t),i+&quot;&quot;}}}var h=f(n),p=f(i),d=function(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(i),o=new Array(n);for(r=0;r&lt;i;++r)a[r]=A(t[r],e[r]);for(;r&lt;n;++r)o[r]=e[r];return function(t){for(r=0;r&lt;i;++r)o[r]=a[r](t);return o}},g=function(t,e){var r=new Date;return e-=t=+t,function(n){return r.setTime(t+e*n),r}},m=function(t,e){return e-=t=+t,function(r){return t+e*r}},v=function(t,e){var r,n={},i={};for(r in null!==t&amp;&amp;&quot;object&quot;==typeof t||(t={}),null!==e&amp;&amp;&quot;object&quot;==typeof e||(e={}),e)r in t?n[r]=A(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}},y=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,x=new RegExp(y.source,&quot;g&quot;);var b,_,w,k,M=function(t,e){var r,n,i,a=y.lastIndex=x.lastIndex=0,o=-1,s=[],l=[];for(t+=&quot;&quot;,e+=&quot;&quot;;(r=y.exec(t))&amp;&amp;(n=x.exec(e));)(i=n.index)&gt;a&amp;&amp;(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:m(r,n)})),a=x.lastIndex;return a&lt;e.length&amp;&amp;(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length&lt;2?l[0]?function(t){return function(e){return t(e)+&quot;&quot;}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n&lt;e;++n)s[(r=l[n]).i]=r.x(t);return s.join(&quot;&quot;)})},A=function(t,r){var n,i=typeof r;return null==r||&quot;boolean&quot;===i?a(r):(&quot;number&quot;===i?m:&quot;string&quot;===i?(n=e.color(r))?(r=n,u):M:r instanceof e.color?u:r instanceof Date?g:Array.isArray(r)?d:&quot;function&quot;!=typeof r.valueOf&amp;&amp;&quot;function&quot;!=typeof r.toString||isNaN(r)?v:m)(t,r)},T=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},E=function(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&amp;&amp;(t/=o,e/=o),(l=t*r+e*n)&amp;&amp;(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&amp;&amp;(r/=s,n/=s,l/=s),t*n&lt;e*r&amp;&amp;(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*T,skewX:Math.atan(l)*T,scaleX:o,scaleY:s}};function C(t,e,r,n){function i(t){return t.length?t.pop()+&quot; &quot;:&quot;&quot;}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push(&quot;translate(&quot;,null,e,null,r);s.push({i:l-4,x:m(t,i)},{i:l-2,x:m(n,a)})}else(i||a)&amp;&amp;o.push(&quot;translate(&quot;+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e&gt;180?e+=360:e-t&gt;180&amp;&amp;(t+=360),a.push({i:r.push(i(r)+&quot;rotate(&quot;,null,n)-2,x:m(t,e)})):e&amp;&amp;r.push(i(r)+&quot;rotate(&quot;+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+&quot;skewX(&quot;,null,n)-2,x:m(t,e)}):e&amp;&amp;r.push(i(r)+&quot;skewX(&quot;+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+&quot;scale(&quot;,null,&quot;,&quot;,null,&quot;)&quot;);o.push({i:s-4,x:m(t,r)},{i:s-2,x:m(e,n)})}else 1===r&amp;&amp;1===n||a.push(i(a)+&quot;scale(&quot;+r+&quot;,&quot;+n+&quot;)&quot;)}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r&lt;n;)s[(e=l[r]).i]=e.x(t);return s.join(&quot;&quot;)}}}var L=C(function(t){return&quot;none&quot;===t?S:(b||(b=document.createElement(&quot;DIV&quot;),_=document.documentElement,w=document.defaultView),b.style.transform=t,t=w.getComputedStyle(_.appendChild(b),null).getPropertyValue(&quot;transform&quot;),_.removeChild(b),t=t.slice(7,-1).split(&quot;,&quot;),E(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},&quot;px, &quot;,&quot;px)&quot;,&quot;deg)&quot;),z=C(function(t){return null==t?S:(k||(k=document.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;)),k.setAttribute(&quot;transform&quot;,t),(t=k.transform.baseVal.consolidate())?(t=t.matrix,E(t.a,t.b,t.c,t.d,t.e,t.f)):S)},&quot;, &quot;,&quot;)&quot;,&quot;)&quot;),P=Math.SQRT2;function O(t){return((t=Math.exp(t))+1/t)/2}function I(t){return function(r,n){var i=t((r=e.hsl(r)).h,(n=e.hsl(n)).h),a=c(r.s,n.s),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.s=a(t),r.l=o(t),r.opacity=s(t),r+&quot;&quot;}}}var D=I(s),R=I(c);function B(t){return function(r,n){var i=t((r=e.hcl(r)).h,(n=e.hcl(n)).h),a=c(r.c,n.c),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.c=a(t),r.l=o(t),r.opacity=s(t),r+&quot;&quot;}}}var F=B(s),N=B(c);function j(t){return function r(n){function i(r,i){var a=t((r=e.cubehelix(r)).h,(i=e.cubehelix(i)).h),o=c(r.s,i.s),s=c(r.l,i.l),l=c(r.opacity,i.opacity);return function(t){return r.h=a(t),r.s=o(t),r.l=s(Math.pow(t,n)),r.opacity=l(t),r+&quot;&quot;}}return n=+n,i.gamma=r,i}(1)}var V=j(s),U=j(c);t.interpolate=A,t.interpolateArray=d,t.interpolateBasis=n,t.interpolateBasisClosed=i,t.interpolateDate=g,t.interpolateNumber=m,t.interpolateObject=v,t.interpolateRound=function(t,e){return e-=t=+t,function(r){return Math.round(t+e*r)}},t.interpolateString=M,t.interpolateTransformCss=L,t.interpolateTransformSvg=z,t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h&lt;1e-12)n=Math.log(c/o)/P,r=function(t){return[i+t*u,a+t*f,o*Math.exp(P*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+4*h)/(2*o*2*p),g=(c*c-o*o-4*h)/(2*c*2*p),m=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(g*g+1)-g);n=(v-m)/P,r=function(t){var e,r=t*n,s=O(m),l=o/(2*p)*(s*(e=P*r+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[i+l*u,a+l*f,o*s/O(P*r+m)]}}return r.duration=1e3*n,r},t.interpolateRgb=u,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=p,t.interpolateHsl=D,t.interpolateHslLong=R,t.interpolateLab=function(t,r){var n=c((t=e.lab(t)).l,(r=e.lab(r)).l),i=c(t.a,r.a),a=c(t.b,r.b),o=c(t.opacity,r.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=a(e),t.opacity=o(e),t+&quot;&quot;}},t.interpolateHcl=F,t.interpolateHclLong=N,t.interpolateCubehelix=V,t.interpolateCubehelixLong=U,t.piecewise=function(t,e){for(var r=0,n=e.length-1,i=e[0],a=new Array(n&lt;0?0:n);r&lt;n;)a[r]=t(i,i=e[++r]);return function(t){var e=Math.max(0,Math.min(n-1,Math.floor(t*=n)));return a[e](t-e)}},t.quantize=function(t,e){for(var r=new Array(e),n=0;n&lt;e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?i(r,t(&quot;d3-color&quot;)):i(n.d3=n.d3||{},n.d3)},{&quot;d3-color&quot;:141}],145:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,p=t._root,d={data:n},g=t._x0,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e&gt;=(a=(g+v)/2))?g=a:v=a,(u=r&gt;=(o=(m+y)/2))?m=o:y=o,i=p,!(p=p[f=u&lt;&lt;1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&amp;&amp;r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e&gt;=(a=(g+v)/2))?g=a:v=a,(u=r&gt;=(o=(m+y)/2))?m=o:y=o}while((f=u&lt;&lt;1|c)==(h=(l&gt;=o)&lt;&lt;1|s&gt;=a));return i[h]=p,i[f]=d,t}var r=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i};function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i&lt;4;++i)(e=n.source[i])&amp;&amp;(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;n&lt;o;++n)isNaN(i=+this._x.call(null,r=t[n]))||isNaN(a=+this._y.call(null,r))||(s[n]=i,l[n]=a,i&lt;c&amp;&amp;(c=i),i&gt;f&amp;&amp;(f=i),a&lt;u&amp;&amp;(u=a),a&gt;h&amp;&amp;(h=a));for(f&lt;c&amp;&amp;(c=this._x0,f=this._x1),h&lt;u&amp;&amp;(u=this._y0,h=this._y1),this.cover(c,u).cover(f,h),n=0;n&lt;o;++n)e(this,s[n],l[n],t[n]);return this},l.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{if(!(r&gt;t||t&gt;i||n&gt;e||e&gt;a))return this;var o,s,l=i-r,c=this._root;switch(s=(e&lt;(n+a)/2)&lt;&lt;1|t&lt;(r+i)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),t&gt;(i=r+l)||e&gt;a);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),(r=i-l)&gt;t||e&gt;a);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),t&gt;(i=r+l)||n&gt;e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),(r=i-l)&gt;t||n&gt;e)}this._root&amp;&amp;this._root.length&amp;&amp;(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var i,a,o,s,l,c,u,f=this._x0,h=this._y0,p=this._x1,d=this._y1,g=[],m=this._root;for(m&amp;&amp;g.push(new r(m,f,h,p,d)),null==n?n=1/0:(f=t-n,h=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(m=c.node)||(a=c.x0)&gt;p||(o=c.y0)&gt;d||(s=c.x1)&lt;f||(l=c.y1)&lt;h))if(m.length){var v=(a+s)/2,y=(o+l)/2;g.push(new r(m[3],v,y,s,l),new r(m[2],a,y,v,l),new r(m[1],v,o,s,y),new r(m[0],a,o,v,y)),(u=(e&gt;=y)&lt;&lt;1|t&gt;=v)&amp;&amp;(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_&lt;n){var w=Math.sqrt(n=_);f=t-w,h=e-w,p=t+w,d=e+w,i=m.data}}return i},l.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,c,u,f,h,p=this._root,d=this._x0,g=this._y0,m=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=a&gt;=(s=(d+m)/2))?d=s:m=s,(u=o&gt;=(l=(g+v)/2))?g=l:v=l,e=p,!(p=p[f=u&lt;&lt;1|c]))return this;if(!p.length)break;(e[f+1&amp;3]||e[f+2&amp;3]||e[f+3&amp;3])&amp;&amp;(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&amp;&amp;delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&amp;&amp;p===(e[3]||e[2]||e[1]||e[0])&amp;&amp;!p.length&amp;&amp;(r?r[h]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e&lt;r;++e)this.remove(t[e]);return this},l.root=function(){return this._root},l.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},l.visit=function(t){var e,n,i,a,o,s,l=[],c=this._root;for(c&amp;&amp;l.push(new r(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,i=e.x0,a=e.y0,o=e.x1,s=e.y1)&amp;&amp;c.length){var u=(i+o)/2,f=(a+s)/2;(n=c[3])&amp;&amp;l.push(new r(n,u,f,o,s)),(n=c[2])&amp;&amp;l.push(new r(n,i,f,u,s)),(n=c[1])&amp;&amp;l.push(new r(n,u,a,o,f)),(n=c[0])&amp;&amp;l.push(new r(n,i,a,u,f))}return this},l.visitAfter=function(t){var e,n=[],i=[];for(this._root&amp;&amp;n.push(new r(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var a=e.node;if(a.length){var o,s=e.x0,l=e.y0,c=e.x1,u=e.y1,f=(s+c)/2,h=(l+u)/2;(o=a[0])&amp;&amp;n.push(new r(o,s,l,f,h)),(o=a[1])&amp;&amp;n.push(new r(o,f,l,c,h)),(o=a[2])&amp;&amp;n.push(new r(o,s,h,f,u)),(o=a[3])&amp;&amp;n.push(new r(o,f,h,c,u))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},l.x=function(t){return arguments.length?(this._x=t,this):this._x},l.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=a,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],146:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e,r,n=0,i=0,a=0,o=1e3,s=0,l=0,c=0,u=&quot;object&quot;==typeof performance&amp;&amp;performance.now?performance:Date,f=&quot;object&quot;==typeof window&amp;&amp;window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function h(){return l||(f(p),l=u.now()+c)}function p(){l=0}function d(){this._call=this._time=this._next=null}function g(t,e,r){var n=new d;return n.restart(t,e,r),n}function m(){h(),++n;for(var t,r=e;r;)(t=l-r._time)&gt;=0&amp;&amp;r._call.call(null,t),r=r._next;--n}function v(){l=(s=u.now())+c,n=i=0;try{m()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a&gt;i._time&amp;&amp;(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,x(a)}(),l=0}}function y(){var t=u.now(),e=t-s;e&gt;o&amp;&amp;(c-=e,s=t)}function x(t){n||(i&amp;&amp;(i=clearTimeout(i)),t-l&gt;24?(t&lt;1/0&amp;&amp;(i=setTimeout(v,t-u.now()-c)),a&amp;&amp;(a=clearInterval(a))):(a||(s=u.now(),a=setInterval(y,o)),n=1,f(v)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,i){if(&quot;function&quot;!=typeof t)throw new TypeError(&quot;callback is not a function&quot;);i=(null==i?h():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,x()},stop:function(){this._call&amp;&amp;(this._call=null,this._time=1/0,x())}};t.now=h,t.timer=g,t.timerFlush=m,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?h():+r,n.restart(function a(o){o+=i,n.restart(a,i+=e,r),t(o)},e,r),n)},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.d3=n.d3||{})},{}],147:[function(t,e,r){!function(){var t={version:&quot;3.5.17&quot;},r=[].slice,n=function(t){return r.call(t)},i=this.document;function a(t){return t&amp;&amp;(t.ownerDocument||t.document||t).documentElement}function o(t){return t&amp;&amp;(t.ownerDocument&amp;&amp;t.ownerDocument.defaultView||t.document&amp;&amp;t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement(&quot;DIV&quot;).style.setProperty(&quot;opacity&quot;,0,&quot;&quot;)}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+&quot;&quot;)},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+&quot;&quot;)},u.setProperty=function(t,e,r){f.call(this,t,e+&quot;&quot;,r)}}function h(t,e){return t&lt;e?-1:t&gt;e?1:t&gt;=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length&lt;3&amp;&amp;(n=0),arguments.length&lt;4&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&lt;0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length&lt;3&amp;&amp;(n=0),arguments.length&lt;4&amp;&amp;(i=e.length);n&lt;i;){var a=n+i&gt;&gt;&gt;1;t(e[a],r)&gt;0?i=a:n=a+1}return n}}}t.ascending=h,t.descending=function(t,e){return e&lt;t?-1:e&gt;t?1:e&gt;=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i&lt;a;)if(null!=(n=t[i])&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=t[i])&amp;&amp;r&gt;n&amp;&amp;(r=n)}else{for(;++i&lt;a;)if(null!=(n=e.call(t,t[i],i))&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=e.call(t,t[i],i))&amp;&amp;r&gt;n&amp;&amp;(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i&lt;a;)if(null!=(n=t[i])&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=t[i])&amp;&amp;n&gt;r&amp;&amp;(r=n)}else{for(;++i&lt;a;)if(null!=(n=e.call(t,t[i],i))&amp;&amp;n&gt;=n){r=n;break}for(;++i&lt;a;)null!=(n=e.call(t,t[i],i))&amp;&amp;n&gt;r&amp;&amp;(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a&lt;o;)if(null!=(n=t[a])&amp;&amp;n&gt;=n){r=i=n;break}for(;++a&lt;o;)null!=(n=t[a])&amp;&amp;(r&gt;n&amp;&amp;(r=n),i&lt;n&amp;&amp;(i=n))}else{for(;++a&lt;o;)if(null!=(n=e.call(t,t[a],a))&amp;&amp;n&gt;=n){r=i=n;break}for(;++a&lt;o;)null!=(n=e.call(t,t[a],a))&amp;&amp;(r&gt;n&amp;&amp;(r=n),i&lt;n&amp;&amp;(i=n))}return[r,i]},t.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a&lt;i;)d(r=+t[a])&amp;&amp;(n+=r);else for(;++a&lt;i;)d(r=+e.call(t,t[a],a))&amp;&amp;(n+=r);return n},t.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a&lt;i;)d(r=p(t[a]))?n+=r:--o;else for(;++a&lt;i;)d(r=p(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},t.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},t.median=function(e,r){var n,i=[],a=e.length,o=-1;if(1===arguments.length)for(;++o&lt;a;)d(n=p(e[o]))&amp;&amp;i.push(n);else for(;++o&lt;a;)d(n=p(r.call(e,e[o],o)))&amp;&amp;i.push(n);if(i.length)return t.quantile(i.sort(h),.5)},t.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s&lt;i;)d(r=p(t[s]))&amp;&amp;(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s&lt;i;)d(r=p(e.call(t,t[s],s)))&amp;&amp;(o+=(n=r-a)*(r-(a+=n/++l)));if(l&gt;1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var m=g(h);function v(t){return t.length}t.bisectLeft=m.left,t.bisect=t.bisectRight=m.right,t.bisector=function(t){return g(1===t.length?function(e,r){return h(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)&lt;3&amp;&amp;(r=t.length,a&lt;2&amp;&amp;(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r&lt;0?0:r);e&lt;r;)i[e]=[n,n=t[++e]];return i},t.transpose=function(e){if(!(a=e.length))return[];for(var r=-1,n=t.min(e,v),i=new Array(n);++r&lt;n;)for(var a,o=-1,s=i[r]=new Array(a);++o&lt;a;)s[o]=e[o][r];return i},t.zip=function(){return t.transpose(arguments)},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a&lt;i;)o+=t[a].length;for(r=new Array(o);--i&gt;=0;)for(e=(n=t[i]).length;--e&gt;=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length&lt;3&amp;&amp;(r=1,arguments.length&lt;2&amp;&amp;(e=t,t=0)),(e-t)/r==1/0)throw new Error(&quot;infinite range&quot;);var n,i=[],a=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=a,e*=a,(r*=a)&lt;0)for(;(n=t+r*++o)&gt;e;)i.push(n/a);else for(;(n=t+r*++o)&lt;e;)i.push(n/a);return i},t.map=function(t,e){var r=new b;if(t instanceof b)t.forEach(function(t,e){r.set(t,e)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i&lt;a;)r.set(i,t[i]);else for(;++i&lt;a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var _=&quot;__proto__&quot;,w=&quot;\0&quot;;function k(t){return(t+=&quot;&quot;)===_||t[0]===w?w+t:t}function M(t){return(t+=&quot;&quot;)[0]===w?t.slice(1):t}function A(t){return k(t)in this._}function T(t){return(t=k(t))in this._&amp;&amp;delete this._[t]}function S(){var t=[];for(var e in this._)t.push(M(e));return t}function E(){var t=0;for(var e in this._)++t;return t}function C(){for(var t in this._)return!1;return!0}function L(){this._=Object.create(null)}function z(t){return t}function P(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function O(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=I.length;r&lt;n;++r){var i=I[r]+e;if(i in t)return i}}x(b,{has:A,get:function(t){return this._[k(t)]},set:function(t,e){return this._[k(t)]=e},remove:T,keys:S,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:M(e),value:this._[e]});return t},size:E,empty:C,forEach:function(t){for(var e in this._)t.call(this,M(e),this._[e])}}),t.nest=function(){var e,r,n={},i=[],a=[];function o(t,a,s){if(s&gt;=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,f,h=-1,p=a.length,d=i[s++],g=new b;++h&lt;p;)(f=g.get(l=d(c=a[h])))?f.push(c):g.set(l,[c]);return t?(c=t(),u=function(e,r){c.set(e,o(t,r,s))}):(c={},u=function(e,r){c[e]=o(t,r,s)}),g.forEach(u),c}return n.map=function(t,e){return o(e,t,0)},n.entries=function(e){return function t(e,r){if(r&gt;=i.length)return e;var n=[],o=a[r++];return e.forEach(function(e,i){n.push({key:e,values:t(i,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r&lt;n;++r)e.add(t[r]);return e},x(L,{has:A,add:function(t){return this._[k(t+=&quot;&quot;)]=!0,t},remove:T,values:S,size:E,empty:C,forEach:function(t){for(var e in this._)t.call(this,M(e))}}),t.behavior={},t.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n&lt;i;)t[r=arguments[n]]=P(t,e,e[r]);return t};var I=[&quot;webkit&quot;,&quot;ms&quot;,&quot;moz&quot;,&quot;Moz&quot;,&quot;o&quot;,&quot;O&quot;];function D(){}function R(){}function B(t){var e=[],r=new b;function n(){for(var r,n=e,i=-1,a=n.length;++i&lt;a;)(r=n[i].on)&amp;&amp;r.apply(this,arguments);return t}return n.on=function(n,i){var a,o=r.get(n);return arguments.length&lt;2?o&amp;&amp;o.on:(o&amp;&amp;(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&amp;&amp;e.push(r.set(n,{on:i})),t)},n}function F(){t.event.preventDefault()}function N(){for(var e,r=t.event;e=r.sourceEvent;)r=e;return r}function j(e){for(var r=new R,n=0,i=arguments.length;++n&lt;i;)r[arguments[n]]=B(r);return r.of=function(n,i){return function(a){try{var o=a.sourceEvent=t.event;a.target=e,t.event=a,r[a.type].apply(n,i)}finally{t.event=o}}},r}t.dispatch=function(){for(var t=new R,e=-1,r=arguments.length;++e&lt;r;)t[arguments[e]]=B(t);return t},R.prototype.on=function(t,e){var r=t.indexOf(&quot;.&quot;),n=&quot;&quot;;if(r&gt;=0&amp;&amp;(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length&lt;2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&amp;&amp;this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(V,&quot;\\$&amp;&quot;)};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return U(t,Y),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},W=function(t,e){var r=t.matches||t[O(t,&quot;matchesSelector&quot;)];return(W=function(t,e){return r.call(t,e)})(t,e)};&quot;function&quot;==typeof Sizzle&amp;&amp;(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,W=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var Y=t.selection.prototype=[];function X(t){return&quot;function&quot;==typeof t?t:function(){return H(t,this)}}function Z(t){return&quot;function&quot;==typeof t?t:function(){return G(t,this)}}Y.select=function(t){var e,r,n,i,a=[];t=X(t);for(var o=-1,s=this.length;++o&lt;s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,c=n.length;++l&lt;c;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&amp;&amp;&quot;__data__&quot;in i&amp;&amp;(r.__data__=i.__data__)):e.push(null)}return q(a)},Y.selectAll=function(t){var e,r,i=[];t=Z(t);for(var a=-1,o=this.length;++a&lt;o;)for(var s=this[a],l=-1,c=s.length;++l&lt;c;)(r=s[l])&amp;&amp;(i.push(e=n(t.call(r,r.__data__,l,a))),e.parentNode=r);return q(i)};var $=&quot;http://www.w3.org/1999/xhtml&quot;,J={svg:&quot;http://www.w3.org/2000/svg&quot;,xhtml:$,xlink:&quot;http://www.w3.org/1999/xlink&quot;,xml:&quot;http://www.w3.org/XML/1998/namespace&quot;,xmlns:&quot;http://www.w3.org/2000/xmlns/&quot;};function K(e,r){return e=t.ns.qualify(e),null==r?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:&quot;function&quot;==typeof r?e.local?function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}:function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}:e.local?function(){this.setAttributeNS(e.space,e.local,r)}:function(){this.setAttribute(e,r)}}function Q(t){return t.trim().replace(/\s+/g,&quot; &quot;)}function tt(e){return new RegExp(&quot;(?:^|\\s+)&quot;+t.requote(e)+&quot;(?:\\s+|$)&quot;,&quot;g&quot;)}function et(t){return(t+&quot;&quot;).trim().split(/^|\s+/)}function rt(t,e){var r=(t=et(t).map(nt)).length;return&quot;function&quot;==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n&lt;r;)t[n](this,i)}:function(){for(var n=-1;++n&lt;r;)t[n](this,e)}}function nt(t){var e=tt(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute(&quot;class&quot;)||&quot;&quot;;n?(e.lastIndex=0,e.test(i)||r.setAttribute(&quot;class&quot;,Q(i+&quot; &quot;+t))):r.setAttribute(&quot;class&quot;,Q(i.replace(e,&quot; &quot;)))}}function it(t,e,r){return null==e?function(){this.style.removeProperty(t)}:&quot;function&quot;==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function at(t,e){return null==e?function(){delete this[t]}:&quot;function&quot;==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function ot(e){return&quot;function&quot;==typeof e?e:(e=t.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$&amp;&amp;t.documentElement.namespaceURI===$?t.createElement(e):t.createElementNS(r,e)}}function st(){var t=this.parentNode;t&amp;&amp;t.removeChild(this)}function lt(t){return{__data__:t}}function ct(t){return function(){return W(this,t)}}function ut(t,e){for(var r=0,n=t.length;r&lt;n;r++)for(var i,a=t[r],o=0,s=a.length;o&lt;s;o++)(i=a[o])&amp;&amp;e(i,o,r);return t}function ft(t){return U(t,ht),t}t.ns={prefix:J,qualify:function(t){var e=t.indexOf(&quot;:&quot;),r=t;return e&gt;=0&amp;&amp;&quot;xmlns&quot;!==(r=t.slice(0,e))&amp;&amp;(t=t.slice(e+1)),J.hasOwnProperty(r)?{space:J[r],local:t}:t}},Y.attr=function(e,r){if(arguments.length&lt;2){if(&quot;string&quot;==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(K(r,e[r]));return this}return this.each(K(e,r))},Y.classed=function(t,e){if(arguments.length&lt;2){if(&quot;string&quot;==typeof t){var r=this.node(),n=(t=et(t)).length,i=-1;if(e=r.classList){for(;++i&lt;n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute(&quot;class&quot;);++i&lt;n;)if(!tt(t[i]).test(e))return!1;return!0}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},Y.style=function(t,e,r){var n=arguments.length;if(n&lt;3){if(&quot;string&quot;!=typeof t){for(r in n&lt;2&amp;&amp;(e=&quot;&quot;),t)this.each(it(r,t[r],e));return this}if(n&lt;2){var i=this.node();return o(i).getComputedStyle(i,null).getPropertyValue(t)}r=&quot;&quot;}return this.each(it(t,e,r))},Y.property=function(t,e){if(arguments.length&lt;2){if(&quot;string&quot;==typeof t)return this.node()[t];for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},Y.text=function(t){return arguments.length?this.each(&quot;function&quot;==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?&quot;&quot;:e}:null==t?function(){this.textContent=&quot;&quot;}:function(){this.textContent=t}):this.node().textContent},Y.html=function(t){return arguments.length?this.each(&quot;function&quot;==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?&quot;&quot;:e}:null==t?function(){this.innerHTML=&quot;&quot;}:function(){this.innerHTML=t}):this.node().innerHTML},Y.append=function(t){return t=ot(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Y.insert=function(t,e){return t=ot(t),e=X(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Y.remove=function(){return this.each(st)},Y.data=function(t,e){var r,n,i=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++i&lt;a;)(n=r[i])&amp;&amp;(t[i]=n.__data__);return t}function o(t,r){var n,i,a,o=t.length,u=r.length,f=Math.min(o,u),h=new Array(u),p=new Array(u),d=new Array(o);if(e){var g,m=new b,v=new Array(o);for(n=-1;++n&lt;o;)(i=t[n])&amp;&amp;(m.has(g=e.call(i,i.__data__,n))?d[n]=i:m.set(g,i),v[n]=g);for(n=-1;++n&lt;u;)(i=m.get(g=e.call(r,a=r[n],n)))?!0!==i&amp;&amp;(h[n]=i,i.__data__=a):p[n]=lt(a),m.set(g,!0);for(n=-1;++n&lt;o;)n in v&amp;&amp;!0!==m.get(v[n])&amp;&amp;(d[n]=t[n])}else{for(n=-1;++n&lt;f;)i=t[n],a=r[n],i?(i.__data__=a,h[n]=i):p[n]=lt(a);for(;n&lt;u;++n)p[n]=lt(r[n]);for(;n&lt;o;++n)d[n]=t[n]}p.update=h,p.parentNode=h.parentNode=d.parentNode=t.parentNode,s.push(p),l.push(h),c.push(d)}var s=ft([]),l=q([]),c=q([]);if(&quot;function&quot;==typeof t)for(;++i&lt;a;)o(r=this[i],t.call(r,r.parentNode.__data__,i));else for(;++i&lt;a;)o(r=this[i],t);return l.enter=function(){return s},l.exit=function(){return c},l},Y.datum=function(t){return arguments.length?this.property(&quot;__data__&quot;,t):this.property(&quot;__data__&quot;)},Y.filter=function(t){var e,r,n,i=[];&quot;function&quot;!=typeof t&amp;&amp;(t=ct(t));for(var a=0,o=this.length;a&lt;o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s&lt;l;s++)(n=r[s])&amp;&amp;t.call(n,n.__data__,s,a)&amp;&amp;e.push(n)}return q(i)},Y.order=function(){for(var t=-1,e=this.length;++t&lt;e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i&gt;=0;)(r=n[i])&amp;&amp;(a&amp;&amp;a!==r.nextSibling&amp;&amp;a.parentNode.insertBefore(r,a),a=r);return this},Y.sort=function(t){t=function(t){arguments.length||(t=h);return function(e,r){return e&amp;&amp;r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e&lt;r;)this[e].sort(t);return this.order()},Y.each=function(t){return ut(this,function(e,r,n){t.call(e,e.__data__,r,n)})},Y.call=function(t){var e=n(arguments);return t.apply(e[0]=this,e),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var t=0,e=this.length;t&lt;e;t++)for(var r=this[t],n=0,i=r.length;n&lt;i;n++){var a=r[n];if(a)return a}return null},Y.size=function(){var t=0;return ut(this,function(){++t}),t};var ht=[];function pt(e,r,i){var a=&quot;__on&quot;+e,o=e.indexOf(&quot;.&quot;),s=gt;o&gt;0&amp;&amp;(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[a];t&amp;&amp;(this.removeEventListener(e,t,t.$),delete this[a])}return l&amp;&amp;(e=l,s=mt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?D:function(){var r,n=new RegExp(&quot;^__on([^.]+)&quot;+t.requote(e)+&quot;$&quot;);for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ft,t.selection.enter.prototype=ht,ht.append=Y.append,ht.empty=Y.empty,ht.node=Y.node,ht.call=Y.call,ht.size=Y.size,ht.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s&lt;l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,u=i.length;++c&lt;u;)(a=i[c])?(e.push(n[c]=r=t.call(i.parentNode,a.__data__,c,s)),r.__data__=a.__data__):e.push(null)}return q(o)},ht.insert=function(t,e){var r,n,i;return arguments.length&lt;2&amp;&amp;(r=this,e=function(t,e,a){var o,s=r[a].update,l=s.length;for(a!=i&amp;&amp;(i=a,n=0),e&gt;=n&amp;&amp;(n=e+1);!(o=s[n])&amp;&amp;++n&lt;l;);return o}),Y.insert.call(this,t,e)},t.select=function(t){var e;return&quot;string&quot;==typeof t?(e=[H(t,i)]).parentNode=i.documentElement:(e=[t]).parentNode=a(t),q([e])},t.selectAll=function(t){var e;return&quot;string&quot;==typeof t?(e=n(G(t,i))).parentNode=i.documentElement:(e=n(t)).parentNode=null,q([e])},Y.on=function(t,e,r){var n=arguments.length;if(n&lt;3){if(&quot;string&quot;!=typeof t){for(r in n&lt;2&amp;&amp;(e=!1),t)this.each(pt(r,t[r],e));return this}if(n&lt;2)return(n=this.node()[&quot;__on&quot;+t])&amp;&amp;n._;r=!1}return this.each(pt(t,e,r))};var dt=t.map({mouseenter:&quot;mouseover&quot;,mouseleave:&quot;mouseout&quot;});function gt(e,r){return function(n){var i=t.event;t.event=n,r[0]=this.__data__;try{e.apply(this,r)}finally{t.event=i}}}function mt(t,e){var r=gt(t,e);return function(t){var e=t.relatedTarget;e&amp;&amp;(e===this||8&amp;e.compareDocumentPosition(this))||r.call(this,t)}}i&amp;&amp;dt.forEach(function(t){&quot;on&quot;+t in i&amp;&amp;dt.remove(t)});var vt,yt=0;function xt(e){var r=&quot;.dragsuppress-&quot;+ ++yt,n=&quot;click&quot;+r,i=t.select(o(e)).on(&quot;touchmove&quot;+r,F).on(&quot;dragstart&quot;+r,F).on(&quot;selectstart&quot;+r,F);if(null==vt&amp;&amp;(vt=!(&quot;onselectstart&quot;in e)&amp;&amp;O(e.style,&quot;userSelect&quot;)),vt){var s=a(e).style,l=s[vt];s[vt]=&quot;none&quot;}return function(t){if(i.on(r,null),vt&amp;&amp;(s[vt]=l),t){var e=function(){i.on(n,null)};i.on(n,function(){F(),e()},!0),setTimeout(e,0)}}}t.mouse=function(t){return _t(t,N())};var bt=this.navigator&amp;&amp;/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(e,r){r.changedTouches&amp;&amp;(r=r.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();if(bt&lt;0){var a=o(e);if(a.scrollX||a.scrollY){var s=(n=t.select(&quot;body&quot;).append(&quot;svg&quot;).style({position:&quot;absolute&quot;,top:0,left:0,margin:0,padding:0,border:&quot;none&quot;},&quot;important&quot;))[0][0].getScreenCTM();bt=!(s.f||s.e),n.remove()}}return bt?(i.x=r.pageX,i.y=r.pageY):(i.x=r.clientX,i.y=r.clientY),[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}var l=e.getBoundingClientRect();return[r.clientX-l.left-e.clientLeft,r.clientY-l.top-e.clientTop]}function wt(){return t.event.changedTouches[0].identifier}t.touch=function(t,e,r){if(arguments.length&lt;3&amp;&amp;(r=e,e=N().changedTouches),e)for(var n,i=0,a=e.length;i&lt;a;++i)if((n=e[i]).identifier===r)return _t(t,n)},t.behavior.drag=function(){var e=j(a,&quot;drag&quot;,&quot;dragstart&quot;,&quot;dragend&quot;),r=null,n=s(D,t.mouse,o,&quot;mousemove&quot;,&quot;mouseup&quot;),i=s(wt,t.touch,z,&quot;touchmove&quot;,&quot;touchend&quot;);function a(){this.on(&quot;mousedown.drag&quot;,n).on(&quot;touchstart.drag&quot;,i)}function s(n,i,a,o,s){return function(){var l,c=t.event.target.correspondingElement||t.event.target,u=this.parentNode,f=e.of(this,arguments),h=0,p=n(),d=&quot;.drag&quot;+(null==p?&quot;&quot;:&quot;-&quot;+p),g=t.select(a(c)).on(o+d,function(){var t,e,r=i(u,p);if(!r)return;t=r[0]-v[0],e=r[1]-v[1],h|=t|e,v=r,f({type:&quot;drag&quot;,x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e})}).on(s+d,function(){if(!i(u,p))return;g.on(o+d,null).on(s+d,null),m(h),f({type:&quot;dragend&quot;})}),m=xt(c),v=i(u,p);l=r?[(l=r.apply(this,arguments)).x-v[0],l.y-v[1]]:[0,0],f({type:&quot;dragstart&quot;})}}return a.origin=function(t){return arguments.length?(r=t,a):r},t.rebind(a,e,&quot;on&quot;)},t.touches=function(t,e){return arguments.length&lt;2&amp;&amp;(e=N().touches),e?n(e).map(function(e){var r=_t(t,e);return r.identifier=e.identifier,r}):[]};var kt=1e-6,Mt=kt*kt,At=Math.PI,Tt=2*At,St=Tt-kt,Et=At/2,Ct=At/180,Lt=180/At;function zt(t){return t&gt;0?1:t&lt;0?-1:0}function Pt(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function Ot(t){return t&gt;1?0:t&lt;-1?At:Math.acos(t)}function It(t){return t&gt;1?Et:t&lt;-1?-Et:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Bt=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h&lt;Mt)n=Math.log(c/o)/Bt,r=function(t){return[i+t*u,a+t*f,o*Math.exp(Bt*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+4*h)/(2*o*2*p),g=(c*c-o*o-4*h)/(2*c*2*p),m=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(g*g+1)-g);n=(v-m)/Bt,r=function(t){var e,r=t*n,s=Dt(m),l=o/(2*p)*(s*(e=Bt*r+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[i+l*u,a+l*f,o*s/Dt(Bt*r+m)]}}return r.duration=1e3*n,r},t.behavior.zoom=function(){var e,r,n,a,s,l,c,u,f,h={x:0,y:0,k:1},p=[960,500],d=jt,g=250,m=0,v=&quot;mousedown.zoom&quot;,y=&quot;mousemove.zoom&quot;,x=&quot;mouseup.zoom&quot;,b=&quot;touchstart.zoom&quot;,_=j(w,&quot;zoomstart&quot;,&quot;zoom&quot;,&quot;zoomend&quot;);function w(t){t.on(v,z).on(Nt+&quot;.zoom&quot;,O).on(&quot;dblclick.zoom&quot;,I).on(b,P)}function k(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function M(t){h.k=Math.max(d[0],Math.min(d[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function T(e,n,i,a){e.__chart__={x:h.x,y:h.y,k:h.k},M(Math.pow(2,a)),A(r=n,i),e=t.select(e),g&gt;0&amp;&amp;(e=e.transition().duration(g)),e.call(w.event)}function S(){c&amp;&amp;c.domain(l.range().map(function(t){return(t-h.x)/h.k}).map(l.invert)),f&amp;&amp;f.domain(u.range().map(function(t){return(t-h.y)/h.k}).map(u.invert))}function E(t){m++||t({type:&quot;zoomstart&quot;})}function C(t){S(),t({type:&quot;zoom&quot;,scale:h.k,translate:[h.x,h.y]})}function L(t){--m||(t({type:&quot;zoomend&quot;}),r=null)}function z(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),a),C(r)}).on(x,function(){i.on(y,null).on(x,null),s(n),L(r)}),a=k(t.mouse(e)),s=xt(e);fs.call(e),E(r)}function P(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=&quot;.zoom-&quot;+t.event.changedTouches[0].identifier,l=&quot;touchmove&quot;+o,c=&quot;touchend&quot;+o,u=[],f=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=h.k,n.forEach(function(t){t.identifier in i&amp;&amp;(i[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,m).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,f=n.length;o&lt;f;++o)i[n[o].identifier]=null;var p=d(),g=Date.now();if(1===p.length){if(g-s&lt;500){var v=p[0];T(r,v,i[v.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),F()}s=g}else if(p.length&gt;1){v=p[0];var x=p[1],b=v[0]-x[0],_=v[1]-x[1];a=b*b+_*_}}function m(){var o,l,c,u,f=t.touches(r);fs.call(r);for(var h=0,p=f.length;h&lt;p;++h,u=null)if(c=f[h],u=i[c.identifier]){if(l)break;o=c,l=u}if(u){var d=(d=c[0]-o[0])*d+(d=c[1]-o[1])*d,g=a&amp;&amp;Math.sqrt(d/a);o=[(o[0]+c[0])/2,(o[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],M(g*e)}s=null,A(o,l),C(n)}function y(){if(t.event.touches.length){for(var e=t.event.changedTouches,r=0,a=e.length;r&lt;a;++r)delete i[e[r].identifier];for(var s in i)return void d()}t.selectAll(u).on(o,null),f.on(v,z).on(b,P),p(),L(n)}g(),E(n),f.on(v,null).on(b,g)}function O(){var i=_.of(this,arguments);a?clearTimeout(a):(fs.call(this),e=k(r=n||t.mouse(this)),E(i)),a=setTimeout(function(){a=null,L(i)},50),F(),M(Math.pow(2,.002*Ft())*h.k),A(r,e),C(i)}function I(){var e=t.mouse(this),r=Math.log(h.k)/Math.LN2;T(this,e,k(e),t.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}return Nt||(Nt=&quot;onwheel&quot;in i?(Ft=function(){return-t.event.deltaY*(t.event.deltaMode?120:1)},&quot;wheel&quot;):&quot;onmousewheel&quot;in i?(Ft=function(){return t.event.wheelDelta},&quot;mousewheel&quot;):(Ft=function(){return-t.event.detail},&quot;MozMousePixelScroll&quot;)),w.event=function(e){e.each(function(){var e=_.of(this,arguments),n=h;ds?t.select(this).transition().each(&quot;start.zoom&quot;,function(){h=this.__chart__||{x:0,y:0,k:1},E(e)}).tween(&quot;zoom:zoom&quot;,function(){var i=p[0],a=p[1],o=r?r[0]:i/2,s=r?r[1]:a/2,l=t.interpolateZoom([(o-h.x)/h.k,(s-h.y)/h.k,i/h.k],[(o-n.x)/n.k,(s-n.y)/n.k,i/n.k]);return function(t){var r=l(t),n=i/r[2];this.__chart__=h={x:o-r[0]*n,y:s-r[1]*n,k:n},C(e)}}).each(&quot;interrupt.zoom&quot;,function(){L(e)}).each(&quot;end.zoom&quot;,function(){L(e)}):(this.__chart__=h,E(e),C(e),L(e))})},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},S(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},M(+t),S(),w):h.k},w.scaleExtent=function(t){return arguments.length?(d=null==t?jt:[+t[0],+t[1]],w):d},w.center=function(t){return arguments.length?(n=t&amp;&amp;[+t[0],+t[1]],w):n},w.size=function(t){return arguments.length?(p=t&amp;&amp;[+t[0],+t[1]],w):p},w.duration=function(t){return arguments.length?(g=+t,w):g},w.x=function(t){return arguments.length?(c=t,l=t.copy(),h={x:0,y:0,k:1},w):c},w.y=function(t){return arguments.length?(f=t,u=t.copy(),h={x:0,y:0,k:1},w):f},t.rebind(w,_,&quot;on&quot;)};var Ft,Nt,jt=[0,1/0];function Vt(){}function Ut(t,e,r){return this instanceof Ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length&lt;2?t instanceof Ut?new Ut(t.h,t.s,t.l):ue(&quot;&quot;+t,fe,Ut):new Ut(t,e,r)}t.color=Vt,Vt.prototype.toString=function(){return this.rgb()+&quot;&quot;},t.hsl=Ut;var qt=Ut.prototype=new Vt;function Ht(t,e,r){var n,i;function a(t){return Math.round(255*function(t){return t&gt;360?t-=360:t&lt;0&amp;&amp;(t+=360),t&lt;60?n+(i-n)*t/60:t&lt;180?i:t&lt;240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)&lt;0?t+360:t,e=isNaN(e)?0:e&lt;0?0:e&gt;1?1:e,n=2*(r=r&lt;0?0:r&gt;1?1:r)-(i=r&lt;=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length&lt;2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=he((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Wt=Gt.prototype=new Vt;function Yt(t,e,r){return isNaN(t)&amp;&amp;(t=0),isNaN(e)&amp;&amp;(e=0),new Xt(r,Math.cos(t*=Ct)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length&lt;2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Yt(t.h,t.c,t.l):he((t=ae(t)).r,t.g,t.b):new Xt(t,e,r)}Wt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Wt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Wt.rgb=function(){return Yt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,$t=.95047,Jt=1,Kt=1.08883,Qt=Xt.prototype=new Vt;function te(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*$t)-1.5371385*(n=re(n)*Jt)-.4985314*(a=re(a)*Kt)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function ee(t,e,r){return t&gt;0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t&gt;.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t&gt;.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t&lt;=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length&lt;2?t instanceof ae?new ae(t.r,t.g,t.b):ue(&quot;&quot;+t,ae,Ht):new ae(t,e,r)}function oe(t){return new ae(t&gt;&gt;16,t&gt;&gt;8&amp;255,255&amp;t)}function se(t){return oe(t)+&quot;&quot;}Qt.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Qt.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Qt.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ae;var le=ae.prototype=new Vt;function ce(t){return t&lt;16?&quot;0&quot;+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(&quot;,&quot;),n[1]){case&quot;hsl&quot;:return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case&quot;rgb&quot;:return e(de(i[0]),de(i[1]),de(i[2]))}return(a=ge.get(t))?e(a.r,a.g,a.b):(null==t||&quot;#&quot;!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&amp;a)&gt;&gt;4,o|=o&gt;&gt;4,s=240&amp;a,s|=s&gt;&gt;4,l=15&amp;a,l|=l&lt;&lt;4):7===t.length&amp;&amp;(o=(16711680&amp;a)&gt;&gt;16,s=(65280&amp;a)&gt;&gt;8,l=255&amp;a)),e(o,s,l))}function fe(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l&lt;.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e&lt;r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l&gt;0&amp;&amp;l&lt;1?0:n),new Ut(n,i,l)}function he(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/$t),i=ne((.2126729*t+.7151522*e+.072175*r)/Jt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/Kt)))}function pe(t){return(t/=255)&lt;=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return&quot;%&quot;===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&amp;&amp;e&lt;i&amp;&amp;(e=i),r&amp;&amp;r&lt;i&amp;&amp;(r=i),n&amp;&amp;n&lt;i&amp;&amp;(n=i),new ae(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ae(i,i,i)},le.darker=function(t){return new ae((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},le.hsl=function(){return fe(this.r,this.g,this.b)},le.toString=function(){return&quot;#&quot;+ce(this.r)+ce(this.g)+ce(this.b)};var ge=t.map({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});function me(t){return&quot;function&quot;==typeof t?t:function(){return t}}function ve(t){return function(e,r,n){return 2===arguments.length&amp;&amp;&quot;function&quot;==typeof r&amp;&amp;(n=r,r=null),ye(e,r,t,n)}}function ye(e,r,i,a){var o={},s=t.dispatch(&quot;beforesend&quot;,&quot;progress&quot;,&quot;load&quot;,&quot;error&quot;),l={},c=new XMLHttpRequest,u=null;function f(){var t,e=c.status;if(!e&amp;&amp;function(t){var e=t.responseType;return e&amp;&amp;&quot;text&quot;!==e?t.response:t.responseText}(c)||e&gt;=200&amp;&amp;e&lt;300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||&quot;withCredentials&quot;in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),&quot;onload&quot;in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState&gt;3&amp;&amp;f()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+&quot;&quot;).toLowerCase(),arguments.length&lt;2?l[t]:(null==e?delete l[t]:l[t]=e+&quot;&quot;,o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+&quot;&quot;,o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},[&quot;get&quot;,&quot;post&quot;].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,i){if(2===arguments.length&amp;&amp;&quot;function&quot;==typeof n&amp;&amp;(i=n,n=null),c.open(t,e,!0),null==r||&quot;accept&quot;in l||(l.accept=r+&quot;,*/*&quot;),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&amp;&amp;c.overrideMimeType&amp;&amp;c.overrideMimeType(r),null!=u&amp;&amp;(c.responseType=u),null!=i&amp;&amp;o.on(&quot;error&quot;,i).on(&quot;load&quot;,function(t){i(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,&quot;on&quot;),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=me,t.xhr=ve(z),t.dsv=function(t,e){var r=new RegExp('[&quot;'+t+&quot;\n]&quot;),n=t.charCodeAt(0);function i(t,r,n){arguments.length&lt;3&amp;&amp;(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'&quot;'+t.replace(/\&quot;/g,'&quot;&quot;')+'&quot;':t}return i.parse=function(t,e){var r;return i.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function(&quot;d&quot;,&quot;return {&quot;+t.map(function(t,e){return JSON.stringify(t)+&quot;: d[&quot;+e+&quot;]&quot;}).join(&quot;,&quot;)+&quot;}&quot;);r=e?function(t,r){return e(i(t),r)}:i})},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,c=0,u=0;function f(){if(c&gt;=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++&lt;l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return c=r+2,13===(s=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&amp;&amp;++c):10===s&amp;&amp;(i=!0),t.slice(e+1,r).replace(/&quot;&quot;/g,'&quot;')}for(;c&lt;l;){var s,u=1;if(10===(s=t.charCodeAt(c++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(c)&amp;&amp;(++c,++u);else if(s!==n)continue;return t.slice(e,c-u)}return t.slice(e)}for(;(r=f())!==o;){for(var h=[];r!==a&amp;&amp;r!==o;)h.push(r),r=f();e&amp;&amp;null==(h=e(h,u++))||s.push(h)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var r=new L,n=[];return e.forEach(function(t){for(var e in t)r.has(e)||n.push(r.add(e))}),[n.map(l).join(t)].concat(e.map(function(e){return n.map(function(t){return l(e[t])}).join(t)})).join(&quot;\n&quot;)},i.formatRows=function(t){return t.map(s).join(&quot;\n&quot;)},i},t.csv=t.dsv(&quot;,&quot;,&quot;text/csv&quot;),t.tsv=t.dsv(&quot;\t&quot;,&quot;text/tab-separated-values&quot;);var xe,be,_e,we,ke=this[O(this,&quot;requestAnimationFrame&quot;)]||function(t){setTimeout(t,17)};function Me(t,e,r){var n=arguments.length;n&lt;2&amp;&amp;(e=0),n&lt;3&amp;&amp;(r=Date.now());var i={c:t,t:r+e,n:null};return be?be.n=i:xe=i,be=i,_e||(we=clearTimeout(we),_e=1,ke(Ae)),i}function Ae(){var t=Te(),e=Se()-t;e&gt;24?(isFinite(e)&amp;&amp;(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Te(){for(var t=Date.now(),e=xe;e;)t&gt;=e.t&amp;&amp;e.c(t-e.t)&amp;&amp;(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t&lt;r&amp;&amp;(r=e.t),e=(t=e).n):e=t?t.n=e.n:xe=e.n;return be=t,r}function Ee(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}t.timer=function(){Me.apply(this,arguments)},t.timer.flush=function(){Te(),Se()},t.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Ce=[&quot;y&quot;,&quot;z&quot;,&quot;a&quot;,&quot;f&quot;,&quot;p&quot;,&quot;n&quot;,&quot;\xb5&quot;,&quot;m&quot;,&quot;&quot;,&quot;k&quot;,&quot;M&quot;,&quot;G&quot;,&quot;T&quot;,&quot;P&quot;,&quot;E&quot;,&quot;Z&quot;,&quot;Y&quot;].map(function(t,e){var r=Math.pow(10,3*y(8-e));return{scale:e&gt;8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&amp;&amp;(e&lt;0&amp;&amp;(e*=-1),r&amp;&amp;(e=t.round(e,Ee(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ce[8+n/3]};var Le=/(?:([^{])?([&lt;&gt;=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ze=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ee(e,r))).toFixed(Math.max(0,Math.min(20,Ee(e*(1+1e-15),r))))}});function Pe(t){return t+&quot;&quot;}var Oe=t.time={},Ie=Date;function De(){this._=new Date(arguments.length&gt;1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Be(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r&lt;n-e?r:n}function i(r){return e(r=t(new Ie(r-1)),1),r}function a(t,r){return e(t=new Ie(+t),r),t}function o(t,n,a){var o=i(t),s=[];if(a&gt;1)for(;o&lt;n;)r(o)%a||s.push(new Date(+o)),e(o,1);else for(;o&lt;n;)s.push(new Date(+o)),e(o,1);return s}t.floor=t,t.round=n,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Fe(t);return s.floor=s,s.round=Fe(n),s.ceil=Fe(i),s.offset=Fe(a),s.range=function(t,e,r){try{Ie=De;var n=new De;return n._=t,o(n,e,r)}finally{Ie=Date}},t}function Fe(t){return function(e,r){try{Ie=De;var n=new De;return n._=e,t(n,r)._}finally{Ie=Date}}}Oe.year=Be(function(t){return(t=Oe.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Oe.years=Oe.year.range,Oe.years.utc=Oe.year.utc.range,Oe.day=Be(function(t){var e=new Ie(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Oe.days=Oe.day.range,Oe.days.utc=Oe.day.utc.range,Oe.dayOfYear=function(t){var e=Oe.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},[&quot;sunday&quot;,&quot;monday&quot;,&quot;tuesday&quot;,&quot;wednesday&quot;,&quot;thursday&quot;,&quot;friday&quot;,&quot;saturday&quot;].forEach(function(t,e){e=7-e;var r=Oe[t]=Be(function(t){return(t=Oe.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=Oe.year(t).getDay();return Math.floor((Oe.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});Oe[t+&quot;s&quot;]=r.range,Oe[t+&quot;s&quot;].utc=r.utc.range,Oe[t+&quot;OfYear&quot;]=function(t){var r=Oe.year(t).getDay();return Math.floor((Oe.dayOfYear(t)+(r+e)%7)/7)}}),Oe.week=Oe.sunday,Oe.weeks=Oe.sunday.range,Oe.weeks.utc=Oe.sunday.utc.range,Oe.weekOfYear=Oe.sundayOfYear;var Ne={&quot;-&quot;:&quot;&quot;,_:&quot; &quot;,0:&quot;0&quot;},je=/^\s*\d+/,Ve=/^%/;function Ue(t,e,r){var n=t&lt;0?&quot;-&quot;:&quot;&quot;,i=(n?-t:t)+&quot;&quot;,a=i.length;return n+(a&lt;r?new Array(r-a+1).join(e)+i:i)}function qe(e){return new RegExp(&quot;^(?:&quot;+e.map(t.requote).join(&quot;|&quot;)+&quot;)&quot;,&quot;i&quot;)}function He(t){for(var e=new b,r=-1,n=t.length;++r&lt;n;)e.set(t[r].toLowerCase(),r);return e}function Ge(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function We(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.U=+n[0],r+n[0].length):-1}function Ye(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.W=+n[0],r+n[0].length):-1}function Xe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Ze(t,e,r){je.lastIndex=0;var n,i=je.exec(e.slice(r,r+2));return i?(t.y=(n=+i[0])+(n&gt;68?1900:2e3),r+i[0].length):-1}function $e(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Je(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ir(t){var e=t.getTimezoneOffset(),r=e&gt;0?&quot;-&quot;:&quot;+&quot;,n=y(e)/60|0,i=y(e)%60;return r+Ue(n,&quot;0&quot;,2)+Ue(i,&quot;0&quot;,2)}function ar(t,e,r){Ve.lastIndex=0;var n=Ve.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r&lt;e;)t[r][0]=this(t[r][0]);return function(e){for(var r=0,n=t[r];!n[1](e);)n=t[++r];return n[0](e)}}t.locale=function(e){return{numberFormat:function(e){var r=e.decimal,n=e.thousands,i=e.grouping,a=e.currency,o=i&amp;&amp;n?function(t,e){for(var r=t.length,a=[],o=0,s=i[0],l=0;r&gt;0&amp;&amp;s&gt;0&amp;&amp;(l+s+1&gt;e&amp;&amp;(s=Math.max(1,e-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)&gt;e));)s=i[o=(o+1)%i.length];return a.reverse().join(n)}:z;return function(e){var n=Le.exec(e),i=n[1]||&quot; &quot;,s=n[2]||&quot;&gt;&quot;,l=n[3]||&quot;-&quot;,c=n[4]||&quot;&quot;,u=n[5],f=+n[6],h=n[7],p=n[8],d=n[9],g=1,m=&quot;&quot;,v=&quot;&quot;,y=!1,x=!0;switch(p&amp;&amp;(p=+p.substring(1)),(u||&quot;0&quot;===i&amp;&amp;&quot;=&quot;===s)&amp;&amp;(u=i=&quot;0&quot;,s=&quot;=&quot;),d){case&quot;n&quot;:h=!0,d=&quot;g&quot;;break;case&quot;%&quot;:g=100,v=&quot;%&quot;,d=&quot;f&quot;;break;case&quot;p&quot;:g=100,v=&quot;%&quot;,d=&quot;r&quot;;break;case&quot;b&quot;:case&quot;o&quot;:case&quot;x&quot;:case&quot;X&quot;:&quot;#&quot;===c&amp;&amp;(m=&quot;0&quot;+d.toLowerCase());case&quot;c&quot;:x=!1;case&quot;d&quot;:y=!0,p=0;break;case&quot;s&quot;:g=-1,d=&quot;r&quot;}&quot;$&quot;===c&amp;&amp;(m=a[0],v=a[1]),&quot;r&quot;!=d||p||(d=&quot;g&quot;),null!=p&amp;&amp;(&quot;g&quot;==d?p=Math.max(1,Math.min(21,p)):&quot;e&quot;!=d&amp;&amp;&quot;f&quot;!=d||(p=Math.max(0,Math.min(20,p)))),d=ze.get(d)||Pe;var b=u&amp;&amp;h;return function(e){var n=v;if(y&amp;&amp;e%1)return&quot;&quot;;var a=e&lt;0||0===e&amp;&amp;1/e&lt;0?(e=-e,&quot;-&quot;):&quot;-&quot;===l?&quot;&quot;:l;if(g&lt;0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+v}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(&quot;.&quot;);if(k&lt;0){var M=x?e.lastIndexOf(&quot;e&quot;):-1;M&lt;0?(_=e,w=&quot;&quot;):(_=e.substring(0,M),w=e.substring(M))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&amp;&amp;h&amp;&amp;(_=o(_,1/0));var A=m.length+_.length+w.length+(b?0:a.length),T=A&lt;f?new Array(A=f-A+1).join(i):&quot;&quot;;return b&amp;&amp;(_=o(T+_,T.length?f-w.length:1/0)),a+=m,e=_+w,(&quot;&lt;&quot;===s?a+e+T:&quot;&gt;&quot;===s?T+a+e:&quot;^&quot;===s?T.substring(0,A&gt;&gt;=1)+a+e+T.substring(A):a+(b?e:T+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,i=e.time,a=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,i,a,o=[],s=-1,l=0;++s&lt;e;)37===t.charCodeAt(s)&amp;&amp;(o.push(t.slice(l,s)),null!=(i=Ne[n=t.charAt(++s)])&amp;&amp;(n=t.charAt(++s)),(a=_[n])&amp;&amp;(n=a(r,null==i?&quot;e&quot;===n?&quot; &quot;:&quot;0&quot;:i)),o.push(n),l=s+1);return o.push(t.slice(l,s)),o.join(&quot;&quot;)}return r.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(r,t,e,0)!=e.length)return null;&quot;p&quot;in r&amp;&amp;(r.H=r.H%12+12*r.p);var n=null!=r.Z&amp;&amp;Ie!==De,i=new(n?De:Ie);return&quot;j&quot;in r?i.setFullYear(r.y,0,r.j):&quot;W&quot;in r||&quot;U&quot;in r?(&quot;w&quot;in r||(r.w=&quot;W&quot;in r?1:0),i.setFullYear(r.y,0,1),i.setFullYear(r.y,0,&quot;W&quot;in r?(r.w+6)%7+7*r.W-(i.getDay()+5)%7:r.w+7*r.U-(i.getDay()+6)%7)):i.setFullYear(r.y,r.m,r.d),i.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),n?i._:i},r.toString=function(){return t},r}function f(t,e,r,n){for(var i,a,o,s=0,l=e.length,c=r.length;s&lt;l;){if(n&gt;=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=w[o in Ne?e.charAt(s++):o])||(n=a(t,r,n))&lt;0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(Ie=De);return r._=t,e(r)}finally{Ie=Date}}return r.parse=function(t){try{Ie=De;var r=e.parse(t);return r&amp;&amp;r._}finally{Ie=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var h=t.map(),p=qe(o),d=He(o),g=qe(s),m=He(s),v=qe(l),y=He(l),x=qe(c),b=He(c);a.forEach(function(t,e){h.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ue(t.getDate(),e,2)},e:function(t,e){return Ue(t.getDate(),e,2)},H:function(t,e){return Ue(t.getHours(),e,2)},I:function(t,e){return Ue(t.getHours()%12||12,e,2)},j:function(t,e){return Ue(1+Oe.dayOfYear(t),e,3)},L:function(t,e){return Ue(t.getMilliseconds(),e,3)},m:function(t,e){return Ue(t.getMonth()+1,e,2)},M:function(t,e){return Ue(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()&gt;=12)]},S:function(t,e){return Ue(t.getSeconds(),e,2)},U:function(t,e){return Ue(Oe.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ue(Oe.mondayOfYear(t),e,2)},x:u(n),X:u(i),y:function(t,e){return Ue(t.getFullYear()%100,e,2)},Y:function(t,e){return Ue(t.getFullYear()%1e4,e,4)},Z:ir,&quot;%&quot;:function(){return&quot;%&quot;}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){v.lastIndex=0;var n=v.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return f(t,_.c.toString(),e,r)},d:Ke,e:Ke,H:tr,I:tr,j:Qe,L:nr,m:Je,M:er,p:function(t,e,r){var n=h.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:We,w:Ge,W:Ye,x:function(t,e,r){return f(t,_.x.toString(),e,r)},X:function(t,e,r){return f(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:$e,&quot;%&quot;:ar};return u}(e)}};var sr=t.locale({decimal:&quot;.&quot;,thousands:&quot;,&quot;,grouping:[3],currency:[&quot;$&quot;,&quot;&quot;],dateTime:&quot;%a %b %e %X %Y&quot;,date:&quot;%m/%d/%Y&quot;,time:&quot;%H:%M:%S&quot;,periods:[&quot;AM&quot;,&quot;PM&quot;],days:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],shortDays:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],months:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],shortMonths:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function fr(t,e){t&amp;&amp;pr.hasOwnProperty(t.type)&amp;&amp;pr[t.type](t,e)}t.geo.stream=function(t,e){t&amp;&amp;hr.hasOwnProperty(t.type)?hr[t.type](t,e):fr(t,e)};var hr={Feature:function(t,e){fr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n&lt;i;)fr(r[n].geometry,e)}},pr={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n&lt;i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){dr(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n&lt;i;)dr(r[n],e,0)},Polygon:function(t,e){gr(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n&lt;i;)gr(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n&lt;i;)fr(r[n],e)}};function dr(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i&lt;a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function gr(t,e){var r=-1,n=t.length;for(e.polygonStart();++r&lt;n;)dr(t[r],e,1);e.polygonEnd()}t.geo.area=function(e){return mr=0,t.geo.stream(e,Cr),mr};var mr,vr,yr,xr,br,_r,wr,kr,Mr,Ar,Tr,Sr,Er=new lr,Cr={sphere:function(){mr+=4*At},point:D,lineStart:D,lineEnd:D,polygonStart:function(){Er.reset(),Cr.lineStart=Lr},polygonEnd:function(){var t=2*Er;mr+=t&lt;0?4*At+t:t,Cr.lineStart=Cr.lineEnd=Cr.point=D}};function Lr(){var t,e,r,n,i;function a(t,e){e=e*Ct/2+At/4;var a=(t*=Ct)-r,o=a&gt;=0?1:-1,s=o*a,l=Math.cos(e),c=Math.sin(e),u=i*c,f=n*l+u*Math.cos(s),h=u*o*Math.sin(s);Er.add(Math.atan2(h,f)),r=t,n=l,i=c}Cr.point=function(o,s){Cr.point=a,r=(t=o)*Ct,n=Math.cos(s=(e=s)*Ct/2+At/4),i=Math.sin(s)},Cr.lineEnd=function(){a(t,e)}}function zr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Pr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Or(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ir(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Br(t){return[Math.atan2(t[1],t[0]),It(t[2])]}function Fr(t,e){return y(t[0]-e[0])&lt;kt&amp;&amp;y(t[1]-e[1])&lt;kt}t.geo.bounds=function(){var e,r,n,i,a,o,s,l,c,u,f,h={point:p,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=x,h.lineEnd=b,c=0,Cr.polygonStart()},polygonEnd:function(){Cr.polygonEnd(),h.point=p,h.lineStart=g,h.lineEnd=m,Er&lt;0?(e=-(n=180),r=-(i=90)):c&gt;kt?i=90:c&lt;-kt&amp;&amp;(r=-90),f[0]=e,f[1]=n}};function p(t,a){u.push(f=[e=t,n=t]),a&lt;r&amp;&amp;(r=a),a&gt;i&amp;&amp;(i=a)}function d(t,o){var s=zr([t*Ct,o*Ct]);if(l){var c=Or(l,s),u=Or([c[1],-c[0],0],c);Rr(u),u=Br(u);var f=t-a,h=f&gt;0?1:-1,d=u[0]*Lt*h,g=y(f)&gt;180;if(g^(h*a&lt;d&amp;&amp;d&lt;h*t))(m=u[1]*Lt)&gt;i&amp;&amp;(i=m);else if(g^(h*a&lt;(d=(d+360)%360-180)&amp;&amp;d&lt;h*t)){var m;(m=-u[1]*Lt)&lt;r&amp;&amp;(r=m)}else o&lt;r&amp;&amp;(r=o),o&gt;i&amp;&amp;(i=o);g?t&lt;a?_(e,t)&gt;_(e,n)&amp;&amp;(n=t):_(t,n)&gt;_(e,n)&amp;&amp;(e=t):n&gt;=e?(t&lt;e&amp;&amp;(e=t),t&gt;n&amp;&amp;(n=t)):t&gt;a?_(e,t)&gt;_(e,n)&amp;&amp;(n=t):_(t,n)&gt;_(e,n)&amp;&amp;(e=t)}else p(t,o);l=s,a=t}function g(){h.point=d}function m(){f[0]=e,f[1]=n,h.point=p,l=null}function v(t,e){if(l){var r=t-a;c+=y(r)&gt;180?r+(r&gt;0?360:-360):r}else o=t,s=e;Cr.point(t,e),d(t,e)}function x(){Cr.lineStart()}function b(){v(o,s),Cr.lineEnd(),y(c)&gt;kt&amp;&amp;(e=-(n=180)),f[0]=e,f[1]=n,l=null}function _(t,e){return(e-=t)&lt;0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]&lt;=e[1]?e[0]&lt;=t&amp;&amp;t&lt;=e[1]:t&lt;e[0]||e[1]&lt;t}return function(a){if(i=n=-(e=r=1/0),u=[],t.geo.stream(a,h),c=u.length){u.sort(w);for(var o=1,s=[g=u[0]];o&lt;c;++o)k((p=u[o])[0],g)||k(p[1],g)?(_(g[0],p[1])&gt;_(g[0],g[1])&amp;&amp;(g[1]=p[1]),_(p[0],g[1])&gt;_(g[0],g[1])&amp;&amp;(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o&lt;=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))&gt;d&amp;&amp;(d=l,e=p[0],n=g[1])}return u=f=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,i]]}}(),t.geo.centroid=function(e){vr=yr=xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Tr,i=Sr,a=r*r+n*n+i*i;return a&lt;Mt&amp;&amp;(r=wr,n=kr,i=Mr,yr&lt;kt&amp;&amp;(r=xr,n=br,i=_r),(a=r*r+n*n+i*i)&lt;Mt)?[NaN,NaN]:[Math.atan2(n,r)*Lt,It(i/Math.sqrt(a))*Lt]};var Nr={sphere:D,point:jr,lineStart:Ur,lineEnd:qr,polygonStart:function(){Nr.lineStart=Hr},polygonEnd:function(){Nr.lineStart=Ur}};function jr(t,e){t*=Ct;var r=Math.cos(e*=Ct);Vr(r*Math.cos(t),r*Math.sin(t),Math.sin(e))}function Vr(t,e,r){xr+=(t-xr)/++vr,br+=(e-br)/vr,_r+=(r-_r)/vr}function Ur(){var t,e,r;function n(n,i){n*=Ct;var a=Math.cos(i*=Ct),o=a*Math.cos(n),s=a*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*s)*c+(c=r*o-t*l)*c+(c=t*s-e*o)*c),t*o+e*s+r*l);yr+=c,wr+=c*(t+(t=o)),kr+=c*(e+(e=s)),Mr+=c*(r+(r=l)),Vr(t,e,r)}Nr.point=function(i,a){i*=Ct;var o=Math.cos(a*=Ct);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(a),Nr.point=n,Vr(t,e,r)}}function qr(){Nr.point=jr}function Hr(){var t,e,r,n,i;function a(t,e){t*=Ct;var a=Math.cos(e*=Ct),o=a*Math.cos(t),s=a*Math.sin(t),l=Math.sin(e),c=n*l-i*s,u=i*o-r*l,f=r*s-n*o,h=Math.sqrt(c*c+u*u+f*f),p=r*o+n*s+i*l,d=h&amp;&amp;-Ot(p)/h,g=Math.atan2(h,p);Ar+=d*c,Tr+=d*u,Sr+=d*f,yr+=g,wr+=g*(r+(r=o)),kr+=g*(n+(n=s)),Mr+=g*(i+(i=l)),Vr(r,n,i)}Nr.point=function(o,s){t=o,e=s,Nr.point=a,o*=Ct;var l=Math.cos(s*=Ct);r=l*Math.cos(o),n=l*Math.sin(o),i=Math.sin(s),Vr(r,n,i)},Nr.lineEnd=function(){a(t,e),Nr.lineEnd=qr,Nr.point=jr}}function Gr(t,e){function r(r,n){return r=t(r,n),e(r[0],r[1])}return t.invert&amp;&amp;e.invert&amp;&amp;(r.invert=function(r,n){return(r=e.invert(r,n))&amp;&amp;t.invert(r[0],r[1])}),r}function Wr(){return!0}function Yr(t,e,r,n,i){var a=[],o=[];if(t.forEach(function(t){if(!((e=t.length-1)&lt;=0)){var e,r=t[0],n=t[e];if(Fr(r,n)){i.lineStart();for(var s=0;s&lt;e;++s)i.point((r=t[s])[0],r[1]);i.lineEnd()}else{var l=new Zr(r,t,null,!0),c=new Zr(r,null,l,!1);l.o=c,a.push(l),o.push(c),l=new Zr(n,t,null,!1),c=new Zr(n,null,l,!0),l.o=c,a.push(l),o.push(c)}}}),o.sort(e),Xr(a),Xr(o),a.length){for(var s=0,l=r,c=o.length;s&lt;c;++s)o[s].e=l=!l;for(var u,f,h=a[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(s=0,c=u.length;s&lt;c;++s)i.point((f=u[s])[0],f[1]);else n(p.x,p.n.x,1,i);p=p.n}else{if(d)for(s=(u=p.p.z).length-1;s&gt;=0;--s)i.point((f=u[s])[0],f[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n&lt;e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function Zr(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function $r(e,r,n,i){return function(a,o){var s,l=r(o),c=a.invert(i[0],i[1]),u={point:f,lineStart:p,lineEnd:d,polygonStart:function(){u.point=b,u.lineStart=_,u.lineEnd=w,s=[],g=[]},polygonEnd:function(){u.point=f,u.lineStart=p,u.lineEnd=d,s=t.merge(s);var e=function(t,e){var r=t[0],n=t[1],i=[Math.sin(r),-Math.cos(r),0],a=0,o=0;Er.reset();for(var s=0,l=e.length;s&lt;l;++s){var c=e[s],u=c.length;if(u)for(var f=c[0],h=f[0],p=f[1]/2+At/4,d=Math.sin(p),g=Math.cos(p),m=1;;){m===u&amp;&amp;(m=0);var v=(t=c[m])[0],y=t[1]/2+At/4,x=Math.sin(y),b=Math.cos(y),_=v-h,w=_&gt;=0?1:-1,k=w*_,M=k&gt;At,A=d*x;if(Er.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),a+=M?_+w*Tt:_,M^h&gt;=r^v&gt;=r){var T=Or(zr(f),zr(t));Rr(T);var S=Or(i,T);Rr(S);var E=(M^_&gt;=0?-1:1)*It(S[2]);(n&gt;E||n===E&amp;&amp;(T[0]||T[1]))&amp;&amp;(o+=M^_&gt;=0?1:-1)}if(!m++)break;h=v,d=x,g=b,f=t}}return(a&lt;-kt||a&lt;kt&amp;&amp;Er&lt;-kt)^1&amp;o}(c,g);s.length?(x||(o.polygonStart(),x=!0),Yr(s,Qr,e,n,o)):e&amp;&amp;(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&amp;&amp;(o.polygonEnd(),x=!1),s=g=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function f(t,r){var n=a(t,r);e(t=n[0],r=n[1])&amp;&amp;o.point(t,r)}function h(t,e){var r=a(t,e);l.point(r[0],r[1])}function p(){u.point=h,l.lineStart()}function d(){u.point=f,l.lineEnd()}var g,m,v=Kr(),y=r(v),x=!1;function b(t,e){m.push([t,e]);var r=a(t,e);y.point(r[0],r[1])}function _(){y.lineStart(),m=[]}function w(){b(m[0][0],m[0][1]),y.lineEnd();var t,e=y.clean(),r=v.buffer(),n=r.length;if(m.pop(),g.push(m),m=null,n)if(1&amp;e){var i,a=-1;if((n=(t=r[0]).length-1)&gt;0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a&lt;n;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else n&gt;1&amp;&amp;2&amp;e&amp;&amp;r.push(r.pop().concat(r.shift())),s.push(r.filter(Jr))}return u}}function Jr(t){return t.length&gt;1}function Kr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length&gt;1&amp;&amp;e.push(e.pop().concat(e.shift()))}}}function Qr(t,e){return((t=t.x)[0]&lt;0?t[1]-Et-kt:Et-t[1])-((e=e.x)[0]&lt;0?e[1]-Et-kt:Et-e[1])}var tn=$r(Wr,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a&gt;0?At:-At,l=y(a-r);y(l-At)&lt;kt?(t.point(r,n=(n+o)/2&gt;0?Et:-Et),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&amp;&amp;l&gt;=At&amp;&amp;(y(r-i)&lt;kt&amp;&amp;(r-=i*kt),y(a-s)&lt;kt&amp;&amp;(a-=s*kt),n=function(t,e,r,n){var i,a,o=Math.sin(t-r);return y(o)&gt;kt?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Et,n.point(-At,i),n.point(0,i),n.point(At,i),n.point(At,0),n.point(At,-i),n.point(0,-i),n.point(-At,-i),n.point(-At,0),n.point(-At,i);else if(y(t[0]-e[0])&gt;kt){var a=t[0]&lt;e[0]?At:-At;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])},[-At,-At/2]);function en(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,p=s.y-c;if(a=t-l,h||!(a&gt;0)){if(a/=h,h&lt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}else if(h&gt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}if(a=r-l,h||!(a&lt;0)){if(a/=h,h&lt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}else if(h&gt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}if(a=e-c,p||!(a&gt;0)){if(a/=p,p&lt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}else if(p&gt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}if(a=n-c,p||!(a&lt;0)){if(a/=p,p&lt;0){if(a&gt;f)return;a&gt;u&amp;&amp;(u=a)}else if(p&gt;0){if(a&lt;u)return;a&lt;f&amp;&amp;(f=a)}return u&gt;0&amp;&amp;(i.a={x:l+u*h,y:c+u*p}),f&lt;1&amp;&amp;(i.b={x:l+f*h,y:c+f*p}),i}}}}}}var rn=1e9;function nn(e,r,n,i){return function(l){var c,u,f,h,p,d,g,m,v,y,x,b=l,_=Kr(),w=en(e,r,n,i),k={point:T,lineStart:function(){k.point=S,u&amp;&amp;u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){c&amp;&amp;(S(h,p),d&amp;&amp;v&amp;&amp;_.rejoin(),c.push(_.buffer()));k.point=T,v&amp;&amp;l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],i=0;i&lt;r;++i)for(var a,o=1,s=u[i],l=s.length,c=s[0];o&lt;l;++o)a=s[o],c[1]&lt;=n?a[1]&gt;n&amp;&amp;Pt(c,a,t)&gt;0&amp;&amp;++e:a[1]&lt;=n&amp;&amp;Pt(c,a,t)&lt;0&amp;&amp;--e,c=a;return 0!==e}([e,i]),n=x&amp;&amp;r,a=c.length;(n||a)&amp;&amp;(l.polygonStart(),n&amp;&amp;(l.lineStart(),M(null,null,1,l),l.lineEnd()),a&amp;&amp;Yr(c,o,r,M,l),l.polygonEnd()),c=u=f=null}};function M(t,o,l,c){var u=0,f=0;if(null==t||(u=a(t,l))!==(f=a(o,l))||s(t,o)&lt;0^l&gt;0)do{c.point(0===u||3===u?e:n,u&gt;1?i:r)}while((u=(u+l+4)%4)!==f);else c.point(o[0],o[1])}function A(t,a){return e&lt;=t&amp;&amp;t&lt;=n&amp;&amp;r&lt;=a&amp;&amp;a&lt;=i}function T(t,e){A(t,e)&amp;&amp;l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&amp;&amp;f.push([t,e]),y)h=t,p=e,d=r,y=!1,r&amp;&amp;(l.lineStart(),l.point(t,e));else if(r&amp;&amp;v)l.point(t,e);else{var n={a:{x:g,y:m},b:{x:t,y:e}};w(n)?(v||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&amp;&amp;(l.lineStart(),l.point(t,e),x=!1)}g=t,m=e,v=r}return k};function a(t,i){return y(t[0]-e)&lt;kt?i&gt;0?0:3:y(t[0]-n)&lt;kt?i&gt;0?2:1:y(t[1]-r)&lt;kt?i&gt;0?1:0:i&gt;0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=Cn(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},i}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,i=1+r*(2*n-r),a=Math.sqrt(i)/n;function o(t,e){var r=Math.sqrt(i-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),a-r*Math.cos(t)]}return o.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/n,It((i-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&amp;&amp;(i.valid=!1),(i=a(t)).valid=!0,i},extent:function(s){return arguments.length?(a=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&amp;&amp;(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,i,a=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}return c.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i&gt;=.12&amp;&amp;i&lt;.234&amp;&amp;n&gt;=-.425&amp;&amp;n&lt;-.214?o:i&gt;=.166&amp;&amp;i&lt;.234&amp;&amp;n&gt;=-.214&amp;&amp;n&lt;-.115?s:a).invert(t)},c.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(a.precision(t),o.precision(t),s.precision(t),c):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),o.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),u=+t[0],f=+t[1];return r=a.translate(t).clipExtent([[u-.455*e,f-.238*e],[u+.455*e,f+.238*e]]).stream(l).point,n=o.translate([u-.307*e,f+.201*e]).clipExtent([[u-.425*e+kt,f+.12*e+kt],[u-.214*e-kt,f+.234*e-kt]]).stream(l).point,i=s.translate([u-.205*e,f+.212*e]).clipExtent([[u-.214*e+kt,f+.166*e+kt],[u-.115*e-kt,f+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,fn,hn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function i(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(a,o){pn.point=i,t=r=a,e=n=o},pn.lineEnd=function(){i(t,e)}}var gn={point:function(t,e){t&lt;cn&amp;&amp;(cn=t);t&gt;fn&amp;&amp;(fn=t);e&lt;un&amp;&amp;(un=e);e&gt;hn&amp;&amp;(hn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function mn(){var t=vn(4.5),e=[],r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=vn(e),r},result:function(){if(e.length){var t=e.join(&quot;&quot;);return e=[],t}}};function n(r,n){e.push(&quot;M&quot;,r,&quot;,&quot;,n,t)}function i(t,n){e.push(&quot;M&quot;,t,&quot;,&quot;,n),r.point=a}function a(t,r){e.push(&quot;L&quot;,t,&quot;,&quot;,r)}function o(){r.point=n}function s(){e.push(&quot;Z&quot;)}return r}function vn(t){return&quot;m0,&quot;+t+&quot;a&quot;+t+&quot;,&quot;+t+&quot; 0 1,1 0,&quot;+-2*t+&quot;a&quot;+t+&quot;,&quot;+t+&quot; 0 1,1 0,&quot;+2*t+&quot;z&quot;}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var i=r-t,a=n-e,o=Math.sqrt(i*i+a*a);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Mr+=o,bn(t=r,e=n)}xn.point=function(n,i){xn.point=r,bn(t=n,e=i)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function i(t,e){var i=t-r,a=e-n,o=Math.sqrt(i*i+a*a);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Mr+=o,Ar+=(o=n*t-r*e)*(r+t),Tr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(a,o){xn.point=i,bn(t=r=a,e=n=o)},xn.lineEnd=function(){i(t,e)}}function Mn(t){var e=4.5,r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Tt)}function i(e,n){t.moveTo(e,n),r.point=a}function a(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Ct),n=16;function i(e){return(n?function(e){var r,i,o,s,l,c,u,f,h,p,d,g,m={point:v,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),m.lineStart=_},polygonEnd:function(){e.polygonEnd(),m.lineStart=y}};function v(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){f=NaN,m.point=x,e.lineStart()}function x(r,i){var o=zr([r,i]),s=t(r,i);a(f,h,u,p,d,g,f=s[0],h=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(f,h)}function b(){m.point=v,e.lineEnd()}function _(){y(),m.point=w,m.lineEnd=k}function w(t,e){x(r=t,e),i=f,o=h,s=p,l=d,c=g,m.point=x}function k(){a(f,h,u,p,d,g,i,o,r,s,l,c,n,e),m.lineEnd=b,b()}return m}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function a(n,i,o,s,l,c,u,f,h,p,d,g,m,v){var x=u-n,b=f-i,_=x*x+b*b;if(_&gt;4*e&amp;&amp;m--){var w=s+p,k=l+d,M=c+g,A=Math.sqrt(w*w+k*k+M*M),T=Math.asin(M/=A),S=y(y(M)-1)&lt;kt||y(o-h)&lt;kt?(o+h)/2:Math.atan2(k,w),E=t(S,T),C=E[0],L=E[1],z=C-n,P=L-i,O=b*z-x*P;(O*O/_&gt;e||y((x*z+b*P)/_-.5)&gt;.3||s*p+l*d+c*g&lt;r)&amp;&amp;(a(n,i,o,s,l,c,C,L,S,w/=A,k/=A,M,m,v),v.point(C,L),a(C,L,S,w,k,M,u,f,h,p,d,g,m,v))}}return i.precision=function(t){return arguments.length?(n=(e=t*t)&gt;0&amp;&amp;16,i):Math.sqrt(e)},i}function Tn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function En(t){return Cn(function(){return t})()}function Cn(e){var r,n,i,a,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+a,o-t[1]*c]}),c=150,u=480,f=250,h=0,p=0,d=0,g=0,m=0,v=tn,x=z,b=null,_=null;function w(t){return[(t=i(t[0]*Ct,t[1]*Ct))[0]*c+a,o-t[1]*c]}function k(t){return(t=i.invert((t[0]-a)/c,(o-t[1])/c))&amp;&amp;[t[0]*Lt,t[1]*Lt]}function M(){i=Gr(n=On(d,g,m),r);var t=r(h,p);return a=u-t[0]*c,o=f+t[1]*c,A()}function A(){return s&amp;&amp;(s.valid=!1,s=null),w}return w.stream=function(t){return s&amp;&amp;(s.valid=!1),(s=Ln(v(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(v=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e&gt;0,n=y(e)&gt;kt;return $r(i,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var p,d=[f,h],g=i(f,h),m=r?g?0:o(f,h):g?o(f+(f&lt;0?At:-At),h):0;if(!e&amp;&amp;(c=l=g)&amp;&amp;t.lineStart(),g!==l&amp;&amp;(p=a(e,d),(Fr(e,p)||Fr(d,p))&amp;&amp;(d[0]+=kt,d[1]+=kt,g=i(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&amp;&amp;e&amp;&amp;r^g){var v;m&amp;s||!(v=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||e&amp;&amp;Fr(e,d)||t.point(d[0],d[1]),e=d,l=g,s=m},lineEnd:function(){l&amp;&amp;t.lineEnd(),e=null},clean:function(){return u|(c&amp;&amp;l)&lt;&lt;1}}},Bn(t,6*Ct),r?[0,-t]:[-At,t-At]);function i(t,r){return Math.cos(t)*Math.cos(r)&gt;e}function a(t,r,n){var i=[1,0,0],a=Or(zr(t),zr(r)),o=Pr(a,a),s=a[0],l=o-s*s;if(!l)return!n&amp;&amp;t;var c=e*o/l,u=-e*s/l,f=Or(i,a),h=Dr(i,c);Ir(h,Dr(a,u));var p=f,d=Pr(h,p),g=Pr(p,p),m=d*d-g*(Pr(h,h)-1);if(!(m&lt;0)){var v=Math.sqrt(m),x=Dr(p,(-d-v)/g);if(Ir(x,h),x=Br(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],M=r[1];w&lt;_&amp;&amp;(b=_,_=w,w=b);var A=w-_,T=y(A-At)&lt;kt;if(!T&amp;&amp;M&lt;k&amp;&amp;(b=k,k=M,M=b),T||A&lt;kt?T?k+M&gt;0^x[1]&lt;(y(x[0]-_)&lt;kt?k:M):k&lt;=x[1]&amp;&amp;x[1]&lt;=M:A&gt;At^(_&lt;=x[0]&amp;&amp;x[0]&lt;=w)){var S=Dr(p,(-d+v)/g);return Ir(S,h),[x,Br(S)]}}}function o(e,n){var i=r?t:At-t,a=0;return e&lt;-i?a|=1:e&gt;i&amp;&amp;(a|=2),n&lt;-i?a|=4:n&gt;i&amp;&amp;(a|=8),a}}((b=+t)*Ct),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):z,A()):_},w.scale=function(t){return arguments.length?(c=+t,M()):c},w.translate=function(t){return arguments.length?(u=+t[0],f=+t[1],M()):[u,f]},w.center=function(t){return arguments.length?(h=t[0]%360*Ct,p=t[1]%360*Ct,M()):[h*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Ct,g=t[1]%360*Ct,m=t.length&gt;2?t[2]%360*Ct:0,M()):[d*Lt,g*Lt,m*Lt]},t.rebind(w,l,&quot;precision&quot;),function(){return r=e.apply(this,arguments),w.invert=r.invert&amp;&amp;k,M()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Ct,r*Ct)})}function zn(t,e){return[t,e]}function Pn(t,e){return[t&gt;At?t-Tt:t&lt;-At?t+Tt:t,e]}function On(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):Pn}function In(t){return function(e,r){return[(e+=t)&gt;At?e-Tt:e&lt;-At?e+Tt:e,r]}}function Dn(t){var e=In(t);return e.invert=In(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),i=Math.cos(e),a=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*i-u*a,s*r-c*n),It(u*i+l*a)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*a;return[Math.atan2(l*i+c*a,s*r+u*n),It(u*r-s*n)]},o}function Bn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Fn(r,i),a=Fn(r,a),(o&gt;0?i&lt;a:i&gt;a)&amp;&amp;(i+=o*Tt)):(i=t+o*Tt,a=t-.5*l);for(var c,u=i;o&gt;0?u&gt;a:u&lt;a;u-=l)s.point((c=Br([r,-n*Math.cos(u),-n*Math.sin(u)]))[0],c[1])}}function Fn(t,e){var r=zr(e);r[0]-=t,Rr(r);var n=Ot(-r[1]);return((-r[2]&lt;0?-n:n)+2*Math.PI-kt)%(2*Math.PI)}function Nn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[t,e]})}}function jn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[e,t]})}}function Vn(t){return t.source}function Un(t){return t.target}t.geo.path=function(){var e,r,n,i,a,o=4.5;function s(e){return e&amp;&amp;(&quot;function&quot;==typeof o&amp;&amp;i.pointRadius(+o.apply(this,arguments)),a&amp;&amp;a.valid||(a=n(i)),t.geo.stream(e,a)),i.result()}function l(){return a=null,s}return s.area=function(e){return sn=0,t.geo.stream(e,n(pn)),sn},s.centroid=function(e){return xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,n(xn)),Sr?[Ar/Sr,Tr/Sr]:Mr?[wr/Mr,kr/Mr]:_r?[xr/_r,br/_r]:[NaN,NaN]},s.bounds=function(e){return fn=hn=-(cn=un=1/0),t.geo.stream(e,n(gn)),[[cn,un],[fn,hn]]},s.projection=function(t){return arguments.length?(n=(e=t)?t.stream||(r=t,i=An(function(t,e){return r([t*Lt,e*Lt])}),function(t){return Ln(i(t))}):z,l()):e;var r,i},s.context=function(t){return arguments.length?(i=null==(r=t)?new mn:new Mn(t),&quot;function&quot;!=typeof o&amp;&amp;i.pointRadius(o),l()):r},s.pointRadius=function(t){return arguments.length?(o=&quot;function&quot;==typeof t?t:(i.pointRadius(+t),+t),s):o},s.projection(t.geo.albersUsa()).context(null)},t.geo.transform=function(t){return{stream:function(e){var r=new Tn(e);for(var n in t)r[n]=t[n];return r}}},Tn.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},t.geo.projection=En,t.geo.projectionMutator=Cn,(t.geo.equirectangular=function(){return En(zn)}).raw=zn.invert=zn,t.geo.rotation=function(t){function e(e){return(e=t(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e}return t=On(t[0]%360*Ct,t[1]*Ct,t.length&gt;2?t[2]*Ct:0),e.invert=function(e){return(e=t.invert(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e},e},Pn.invert=zn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function i(){var t=&quot;function&quot;==typeof r?r.apply(this,arguments):r,n=On(-t[0]*Ct,-t[1]*Ct,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:&quot;Polygon&quot;,coordinates:[i]}}return i.origin=function(t){return arguments.length?(r=t,i):r},i.angle=function(r){return arguments.length?(e=Bn((t=+r)*Ct,n*Ct),i):t},i.precision=function(r){return arguments.length?(e=Bn(t*Ct,(n=+r)*Ct),i):n},i.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ct,i=t[1]*Ct,a=e[1]*Ct,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((r=f*o)*r+(r=c*u-l*f*s)*r),l*u+c*f*s)},t.geo.graticule=function(){var e,r,n,i,a,o,s,l,c,u,f,h,p=10,d=p,g=90,m=360,v=2.5;function x(){return{type:&quot;MultiLineString&quot;,coordinates:b()}}function b(){return t.range(Math.ceil(i/g)*g,n,g).map(f).concat(t.range(Math.ceil(l/m)*m,s,m).map(h)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)&gt;kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,a,d).filter(function(t){return y(t%m)&gt;kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:&quot;LineString&quot;,coordinates:t}})},x.outline=function(){return{type:&quot;Polygon&quot;,coordinates:[f(i).concat(h(s).slice(1),f(n).reverse().slice(1),h(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i&gt;n&amp;&amp;(t=i,i=n,n=t),l&gt;s&amp;&amp;(t=l,l=s,s=t),x.precision(v)):[[i,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r&gt;e&amp;&amp;(t=r,r=e,e=t),o&gt;a&amp;&amp;(t=o,o=a,a=t),x.precision(v)):[[r,o],[e,a]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],m=+t[1],x):[g,m]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(v=+t,c=Nn(o,a,90),u=jn(r,e,v),f=Nn(l,s,90),h=jn(i,n,v),x):v},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Vn,i=Un;function a(){return{type:&quot;LineString&quot;,coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}return a.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(t){return arguments.length?(n=t,e=&quot;function&quot;==typeof t?null:t,a):n},a.target=function(t){return arguments.length?(i=t,r=&quot;function&quot;==typeof t?null:t,a):i},a.precision=function(){return arguments.length?a:0},a},t.geo.interpolate=function(t,e){return r=t[0]*Ct,n=t[1]*Ct,i=e[0]*Ct,a=e[1]*Ct,o=Math.cos(n),s=Math.sin(n),l=Math.cos(a),c=Math.sin(a),u=o*Math.cos(r),f=o*Math.sin(r),h=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Rt(a-n)+o*l*Rt(i-r))),g=1/Math.sin(d),(m=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*h,i=r*f+e*p,a=r*s+e*c;return[Math.atan2(i,n)*Lt,Math.atan2(a,Math.sqrt(n*n+i*i))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,m;var r,n,i,a,o,s,l,c,u,f,h,p,d,g,m},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,i){var a=Math.sin(i*=Ct),o=Math.cos(i),s=y((n*=Ct)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*a-e*o*l)*s),e*a+r*o*l),t=n,e=a,r=o}qn.point=function(i,a){t=i*Ct,e=Math.sin(a*=Ct),r=Math.cos(a),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&amp;&amp;r*a/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return En(Gn)}).raw=Gn;var Wn=Hn(function(t){var e=Math.acos(t);return e&amp;&amp;e/Math.sin(e)},z);function Yn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},i=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),a=r*Math.pow(n(t),i)/i;if(!i)return $n;function o(t,e){a&gt;0?e&lt;-Et+kt&amp;&amp;(e=-Et+kt):e&gt;Et-kt&amp;&amp;(e=Et-kt);var r=a/Math.pow(n(e),i);return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}return o.invert=function(t,e){var r=a-e,n=zt(i)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/i,2*Math.atan(Math.pow(a/n,1/i))-Et]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),i=r/n+t;if(y(n)&lt;kt)return zn;function a(t,e){var r=i-e;return[r*Math.sin(n*t),i-r*Math.cos(n*t)]}return a.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/n,i-zt(n)*Math.sqrt(t*t+r*r)]},a}(t.geo.azimuthalEquidistant=function(){return En(Wn)}).raw=Wn,(t.geo.conicConformal=function(){return an(Yn)}).raw=Yn,(t.geo.conicEquidistant=function(){return an(Xn)}).raw=Xn;var Zn=Hn(function(t){return 1/t},Math.atan);function $n(t,e){return[t,Math.log(Math.tan(At/4+e/2))]}function Jn(t){var e,r=En(t),n=r.scale,i=r.translate,a=r.clipExtent;return r.scale=function(){var t=n.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.translate=function(){var t=i.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.clipExtent=function(t){var o=a.apply(r,arguments);if(o===r){if(e=null==t){var s=At*n(),l=i();a([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&amp;&amp;(o=null);return o},r.clipExtent(null)}(t.geo.gnomonic=function(){return En(Zn)}).raw=Zn,$n.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Et]},(t.geo.mercator=function(){return Jn($n)}).raw=$n;var Kn=Hn(function(){return 1},Math.asin);(t.geo.orthographic=function(){return En(Kn)}).raw=Kn;var Qn=Hn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});function ti(t,e){return[Math.log(Math.tan(At/4+e/2)),-t]}function ei(t){return t[0]}function ri(t){return t[1]}function ni(t){for(var e=t.length,r=[0,1],n=2,i=2;i&lt;e;i++){for(;n&gt;1&amp;&amp;Pt(t[r[n-2]],t[r[n-1]],t[i])&lt;=0;)--n;r[n++]=i}return r.slice(0,n)}function ii(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return En(Qn)}).raw=Qn,ti.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Et]},(t.geo.transverseMercator=function(){var t=Jn(ti),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length&gt;2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ti,t.geom={},t.geom.hull=function(t){var e=ei,r=ri;if(arguments.length)return n(t);function n(t){if(t.length&lt;3)return[];var n,i=me(e),a=me(r),o=t.length,s=[],l=[];for(n=0;n&lt;o;n++)s.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(s.sort(ii),n=0;n&lt;o;n++)l.push([s[n][0],-s[n][1]]);var c=ni(s),u=ni(l),f=u[0]===c[0],h=u[u.length-1]===c[c.length-1],p=[];for(n=c.length-1;n&gt;=0;--n)p.push(t[s[c[n]][2]]);for(n=+f;n&lt;u.length-h;++n)p.push(t[s[u[n]][2]]);return p}return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n},t.geom.polygon=function(t){return U(t,ai),t};var ai=t.geom.polygon.prototype=[];function oi(t,e,r){return(r[0]-e[0])*(t[1]-e[1])&lt;(r[1]-e[1])*(t[0]-e[0])}function si(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],c=r[1],u=e[1]-l,f=n[1]-c,h=(s*(l-c)-f*(i-a))/(f*o-s*u);return[i+h*o,l+h*u]}function li(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}ai.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e&lt;r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},ai.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n&lt;i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},ai.clip=function(t){for(var e,r,n,i,a,o,s=li(t),l=-1,c=this.length-li(this),u=this[c-1];++l&lt;c;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r&lt;n;)oi(o=e[r],u,i)?(oi(a,u,i)||t.push(si(a,o,u,i)),t.push(o)):oi(a,u,i)&amp;&amp;t.push(si(a,o,u,i)),a=o;s&amp;&amp;t.push(t[0]),u=i}return t};var ci,ui,fi,hi,pi,di=[],gi=[];function mi(){Ii(this),this.edge=this.site=this.circle=null}function vi(t){var e=di.pop()||new mi;return e.site=t,e}function yi(t){Si(t),fi.remove(t),di.push(t),Ii(t)}function xi(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];yi(t);for(var l=a;l.circle&amp;&amp;y(r-l.circle.x)&lt;kt&amp;&amp;y(n-l.circle.cy)&lt;kt;)a=l.P,s.unshift(l),yi(l),l=a;s.unshift(l),Si(l);for(var c=o;c.circle&amp;&amp;y(r-c.circle.x)&lt;kt&amp;&amp;y(n-c.circle.cy)&lt;kt;)o=c.N,s.push(c),yi(c),c=o;s.push(c),Si(c);var u,f=s.length;for(u=1;u&lt;f;++u)c=s[u],l=s[u-1],zi(c.edge,l.site,c.site,i);l=s[0],(c=s[f-1]).edge=Li(l.site,c.site,null,i),Ti(l),Ti(c)}function bi(t){for(var e,r,n,i,a=t.x,o=t.y,s=fi._;s;)if((n=_i(s,o)-a)&gt;kt)s=s.L;else{if(!((i=a-wi(s,o))&gt;kt)){n&gt;-kt?(e=s.P,r=s):i&gt;-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=vi(t);if(fi.insert(e,l),e||r){if(e===r)return Si(e),r=vi(e.site),fi.insert(l,r),l.edge=r.edge=Li(e.site,l.site),Ti(e),void Ti(r);if(r){Si(e),Si(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,p=t.y-f,d=r.site,g=d.x-u,m=d.y-f,v=2*(h*m-p*g),y=h*h+p*p,x=g*g+m*m,b={x:(m*y-p*x)/v+u,y:(h*x-g*y)/v+f};zi(r.edge,c,d,b),l.edge=Li(c,t,null,b),r.edge=Li(t,d,null,b),Ti(e),Ti(r)}else l.edge=Li(e.site,l.site)}}function _i(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function wi(t,e){var r=t.N;if(r)return _i(r,e);var n=t.site;return n.y===e?n.x:1/0}function ki(t){this.site=t,this.edges=[]}function Mi(t,e){return e.angle-t.angle}function Ai(){Ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ti(t){var e=t.P,r=t.N;if(e&amp;&amp;r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(m=a.y-s)-c*u);if(!(f&gt;=-Mt)){var h=l*l+c*c,p=u*u+m*m,d=(m*h-c*p)/f,g=(l*p-u*h)/f,m=g+s,v=gi.pop()||new Ai;v.arc=t,v.site=i,v.x=d+o,v.y=m+Math.sqrt(d*d+g*g),v.cy=m,t.circle=v;for(var y=null,x=pi._;x;)if(v.y&lt;x.y||v.y===x.y&amp;&amp;v.x&lt;=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}pi.insert(y,v),y||(hi=v)}}}}function Si(t){var e=t.circle;e&amp;&amp;(e.P||(hi=e.N),pi.remove(e),gi.push(e),Ii(e),t.circle=null)}function Ei(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],c=e[1][1],u=t.l,f=t.r,h=u.x,p=u.y,d=f.x,g=f.y,m=(h+d)/2,v=(p+g)/2;if(g===p){if(m&lt;o||m&gt;=s)return;if(h&gt;d){if(a){if(a.y&gt;=c)return}else a={x:m,y:l};r={x:m,y:c}}else{if(a){if(a.y&lt;l)return}else a={x:m,y:c};r={x:m,y:l}}}else if(i=v-(n=(h-d)/(g-p))*m,n&lt;-1||n&gt;1)if(h&gt;d){if(a){if(a.y&gt;=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y&lt;l)return}else a={x:(c-i)/n,y:c};r={x:(l-i)/n,y:l}}else if(p&lt;g){if(a){if(a.x&gt;=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x&lt;o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}function Ci(t,e){this.l=t,this.r=e,this.a=this.b=null}function Li(t,e,r,n){var i=new Ci(t,e);return ci.push(i),r&amp;&amp;zi(i,t,e,r),n&amp;&amp;zi(i,e,t,n),ui[t.i].edges.push(new Pi(i,t,e)),ui[e.i].edges.push(new Pi(i,e,t)),i}function zi(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function Pi(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function Oi(){this._=null}function Ii(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Di(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&amp;&amp;(r.R.U=r),n.L=r}function Ri(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&amp;&amp;(r.L.U=r),n.R=r}function Bi(t){for(;t.L;)t=t.L;return t}function Fi(t,e){var r,n,i,a=t.sort(Ni).pop();for(ci=[],ui=new Array(t.length),fi=new Oi,pi=new Oi;;)if(i=hi,a&amp;&amp;(!i||a.y&lt;i.y||a.y===i.y&amp;&amp;a.x&lt;i.x))a.x===r&amp;&amp;a.y===n||(ui[a.i]=new ki(a),bi(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;xi(i.arc)}e&amp;&amp;(function(t){for(var e,r=ci,n=en(t[0][0],t[0][1],t[1][0],t[1][1]),i=r.length;i--;)(!Ei(e=r[i],t)||!n(e)||y(e.a.x-e.b.x)&lt;kt&amp;&amp;y(e.a.y-e.b.y)&lt;kt)&amp;&amp;(e.a=e.b=null,r.splice(i,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,c,u,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],g=ui,m=g.length;m--;)if((a=g[m])&amp;&amp;a.prepare())for(l=(s=a.edges).length,o=0;o&lt;l;)n=(u=s[o].end()).x,i=u.y,e=(c=s[++o%l].start()).x,r=c.y,(y(n-e)&gt;kt||y(i-r)&gt;kt)&amp;&amp;(s.splice(o,0,new Pi((v=a.site,x=u,b=y(n-f)&lt;kt&amp;&amp;d-i&gt;kt?{x:f,y:y(e-f)&lt;kt?r:d}:y(i-d)&lt;kt&amp;&amp;h-n&gt;kt?{x:y(r-d)&lt;kt?e:h,y:d}:y(n-h)&lt;kt&amp;&amp;i-p&gt;kt?{x:h,y:y(e-h)&lt;kt?r:p}:y(i-p)&lt;kt&amp;&amp;n-f&gt;kt?{x:y(r-p)&lt;kt?e:f,y:p}:null,_=void 0,_=new Ci(v,null),_.a=x,_.b=b,ci.push(_),_),a.site,null)),++l);var v,x,b,_}(e));var o={cells:ui,edges:ci};return fi=pi=ci=ui=null,o}function Ni(t,e){return e.y-t.y||e.x-t.x}ki.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&amp;&amp;t.a||e.splice(r,1);return e.sort(Mi),e.length},Pi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Oi.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&amp;&amp;(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Bi(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&amp;&amp;r.C;)r===(n=r.U).L?(i=n.R)&amp;&amp;i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&amp;&amp;(Di(this,r),r=(t=r).U),r.C=!1,n.C=!0,Ri(this,n)):(i=n.L)&amp;&amp;i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&amp;&amp;(Ri(this,r),r=(t=r).U),r.C=!1,n.C=!0,Di(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&amp;&amp;(t.N.P=t.P),t.P&amp;&amp;(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?Bi(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&amp;&amp;o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&amp;&amp;(t.U=i),!n)if(t&amp;&amp;t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&amp;&amp;(e.C=!1,i.C=!0,Di(this,i),e=i.R),e.L&amp;&amp;e.L.C||e.R&amp;&amp;e.R.C){e.R&amp;&amp;e.R.C||(e.L.C=!1,e.C=!0,Ri(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Di(this,i),t=this._;break}}else if((e=i.L).C&amp;&amp;(e.C=!1,i.C=!0,Ri(this,i),e=i.L),e.L&amp;&amp;e.L.C||e.R&amp;&amp;e.R.C){e.L&amp;&amp;e.L.C||(e.R.C=!1,e.C=!0,Di(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ri(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&amp;&amp;(t.C=!1)}}},t.geom.voronoi=function(t){var e=ei,r=ri,n=e,i=r,a=ji;if(t)return o(t);function o(t){var e=new Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return Fi(s(t),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):c.x&gt;=r&amp;&amp;c.x&lt;=i&amp;&amp;c.y&gt;=n&amp;&amp;c.y&lt;=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Fi(s(t)).edges.filter(function(t){return t.l&amp;&amp;t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Fi(s(t)).cells.forEach(function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(Mi),u=-1,f=c.length,h=c[f-1].edge,p=h.l===l?h.r:h.l;++u&lt;f;)h,i=p,p=(h=c[u].edge).l===l?h.r:h.l,n&lt;i.i&amp;&amp;n&lt;p.i&amp;&amp;(o=i,s=p,((a=l).x-s.x)*(o.y-a.y)-(a.x-o.x)*(s.y-a.y)&lt;0)&amp;&amp;e.push([t[n],t[i.i],t[p.i]])}),e},o.x=function(t){return arguments.length?(n=me(e=t),o):e},o.y=function(t){return arguments.length?(i=me(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?ji:t,o):a===ji?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&amp;&amp;[[0,0],t]):a===ji?null:a&amp;&amp;a[1]},o};var ji=[[-1e6,-1e6],[1e6,1e6]];function Vi(t){return t.x}function Ui(t){return t.y}function qi(e,r){e=t.rgb(e),r=t.rgb(r);var n=e.r,i=e.g,a=e.b,o=r.r-n,s=r.g-i,l=r.b-a;return function(t){return&quot;#&quot;+ce(Math.round(n+o*t))+ce(Math.round(i+s*t))+ce(Math.round(a+l*t))}}function Hi(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Zi(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function Gi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Wi(t,e){var r,n,i,a=Yi.lastIndex=Xi.lastIndex=0,o=-1,s=[],l=[];for(t+=&quot;&quot;,e+=&quot;&quot;;(r=Yi.exec(t))&amp;&amp;(n=Xi.exec(e));)(i=n.index)&gt;a&amp;&amp;(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Gi(r,n)})),a=Xi.lastIndex;return a&lt;e.length&amp;&amp;(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length&lt;2?l[0]?(e=l[0].x,function(t){return e(t)+&quot;&quot;}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n&lt;e;++n)s[(r=l[n]).i]=r.x(t);return s.join(&quot;&quot;)})}t.geom.delaunay=function(e){return t.geom.voronoi().triangles(e)},t.geom.quadtree=function(t,e,r,n,i){var a,o=ei,s=ri;if(a=arguments.length)return o=Vi,s=Ui,3===a&amp;&amp;(i=r,n=e,r=e=0),l(t);function l(t){var l,c,u,f,h,p,d,g,m,v=me(o),x=me(s);if(null!=e)p=e,d=r,g=n,m=i;else if(g=m=-(p=d=1/0),c=[],u=[],h=t.length,a)for(f=0;f&lt;h;++f)(l=t[f]).x&lt;p&amp;&amp;(p=l.x),l.y&lt;d&amp;&amp;(d=l.y),l.x&gt;g&amp;&amp;(g=l.x),l.y&gt;m&amp;&amp;(m=l.y),c.push(l.x),u.push(l.y);else for(f=0;f&lt;h;++f){var b=+v(l=t[f],f),_=+x(l,f);b&lt;p&amp;&amp;(p=b),_&lt;d&amp;&amp;(d=_),b&gt;g&amp;&amp;(g=b),_&gt;m&amp;&amp;(m=_),c.push(b),u.push(_)}var w=g-p,k=m-d;function M(t,e,r,n,i,a,o,s){if(!isNaN(r)&amp;&amp;!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)&lt;.01)A(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r&gt;=l,f=n&gt;=c,h=f&lt;&lt;1|u;t.leaf=!1,u?i=l:o=l,f?a=c:s=c,M(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+v(t,++f),+x(t,f),p,d,g,m)}}),e,r,n,i,a,o,s)}w&gt;k?m=d+w:g=p+k;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+v(t,++f),+x(t,f),p,d,g,m)}};if(T.visit=function(t){!function t(e,r,n,i,a,o){if(!e(r,n,i,a,o)){var s=.5*(n+a),l=.5*(i+o),c=r.nodes;c[0]&amp;&amp;t(e,c[0],n,i,s,l),c[1]&amp;&amp;t(e,c[1],s,i,a,l),c[2]&amp;&amp;t(e,c[2],n,l,s,o),c[3]&amp;&amp;t(e,c[3],s,l,a,o)}}(t,T,p,d,g,m)},T.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,f,h,p){if(!(u&gt;a||f&gt;o||h&lt;n||p&lt;i)){if(d=c.point){var d,g=e-c.x,m=r-c.y,v=g*g+m*m;if(v&lt;l){var y=Math.sqrt(l=v);n=e-y,i=r-y,a=e+y,o=r+y,s=d}}for(var x=c.nodes,b=.5*(u+h),_=.5*(f+p),w=(r&gt;=_)&lt;&lt;1|e&gt;=b,k=w+4;w&lt;k;++w)if(c=x[3&amp;w])switch(3&amp;w){case 0:t(c,u,f,b,_);break;case 1:t(c,b,f,h,_);break;case 2:t(c,u,_,b,p);break;case 3:t(c,b,_,h,p)}}}(t,n,i,a,o),s}(T,t[0],t[1],p,d,g,m)},f=-1,null==e){for(;++f&lt;h;)M(T,t[f],c[f],u[f],p,d,g,m);--f}else t.forEach(T.add);return c=u=t=l=null,T}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,r],[n,i]]},l.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),l):null==e?null:[n-e,i-r]},l},t.interpolateRgb=qi,t.interpolateObject=Hi,t.interpolateNumber=Gi,t.interpolateString=Wi;var Yi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xi=new RegExp(Yi.source,&quot;g&quot;);function Zi(e,r){for(var n,i=t.interpolators.length;--i&gt;=0&amp;&amp;!(n=t.interpolators[i](e,r)););return n}function $i(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r&lt;s;++r)n.push(Zi(t[r],e[r]));for(;r&lt;a;++r)i[r]=t[r];for(;r&lt;o;++r)i[r]=e[r];return function(t){for(r=0;r&lt;s;++r)i[r]=n[r](t);return i}}t.interpolate=Zi,t.interpolators=[function(t,e){var r=typeof e;return(&quot;string&quot;===r?ge.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?qi:Wi:e instanceof Vt?qi:Array.isArray(e)?$i:&quot;object&quot;===r&amp;&amp;isNaN(e)?Hi:Gi)(t,e)}],t.interpolateArray=$i;var Ji=function(){return z},Ki=t.map({linear:Ji,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return ra},cubic:function(){return na},sin:function(){return aa},exp:function(){return oa},circle:function(){return sa},elastic:function(t,e){var r;arguments.length&lt;2&amp;&amp;(e=.45);arguments.length?r=e/Tt*Math.asin(1/t):(t=1,r=e/4);return function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Tt/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return la}}),Qi=t.map({in:z,out:ta,&quot;in-out&quot;:ea,&quot;out-in&quot;:function(t){return ea(ta(t))}});function ta(t){return function(e){return 1-t(1-e)}}function ea(t){return function(e){return.5*(e&lt;.5?t(2*e):2-t(2-2*e))}}function ra(t){return t*t}function na(t){return t*t*t}function ia(t){if(t&lt;=0)return 0;if(t&gt;=1)return 1;var e=t*t,r=e*t;return 4*(t&lt;.5?r:3*(t-e)+r-.75)}function aa(t){return 1-Math.cos(t*Et)}function oa(t){return Math.pow(2,10*(t-1))}function sa(t){return 1-Math.sqrt(1-t*t)}function la(t){return t&lt;1/2.75?7.5625*t*t:t&lt;2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t&lt;2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ca(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ua(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=ha(i),s=fa(i,a),l=ha(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]&lt;a[0]*i[1]&amp;&amp;(i[0]*=-1,i[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-a[0],a[1]))*Lt,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Lt:0}function fa(t,e){return t[0]*e[0]+t[1]*e[1]}function ha(t){var e=Math.sqrt(fa(t,t));return e&amp;&amp;(t[0]/=e,t[1]/=e),e}t.ease=function(t){var e,n=t.indexOf(&quot;-&quot;),i=n&gt;=0?t.slice(0,n):t,a=n&gt;=0?t.slice(n+1):&quot;in&quot;;return i=Ki.get(i)||Ji,a=Qi.get(a)||z,e=a(i.apply(null,r.call(arguments,1))),function(t){return t&lt;=0?0:t&gt;=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&amp;&amp;(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o&gt;180?o-=360:o&lt;-180&amp;&amp;(o+=360);return function(t){return Yt(n+o*t,i+s*t,a+l*t)+&quot;&quot;}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&amp;&amp;(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o&gt;180?o-=360:o&lt;-180&amp;&amp;(o+=360);return function(t){return Ht(n+o*t,i+s*t,a+l*t)+&quot;&quot;}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return te(n+o*t,i+s*t,a+l*t)+&quot;&quot;}},t.interpolateRound=ca,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,&quot;g&quot;);return(t.transform=function(t){if(null!=t){r.setAttribute(&quot;transform&quot;,t);var e=r.transform.baseVal.consolidate()}return new ua(e?e.matrix:pa)})(e)},ua.prototype.toString=function(){return&quot;translate(&quot;+this.translate+&quot;)rotate(&quot;+this.rotate+&quot;)skewX(&quot;+this.skew+&quot;)scale(&quot;+this.scale+&quot;)&quot;};var pa={a:1,b:0,c:0,d:1,e:0,f:0};function da(t){return t.length?t.pop()+&quot;,&quot;:&quot;&quot;}function ga(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(&quot;translate(&quot;,null,&quot;,&quot;,null,&quot;)&quot;);n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else(e[0]||e[1])&amp;&amp;r.push(&quot;translate(&quot;+e+&quot;)&quot;)}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e&gt;180?e+=360:e-t&gt;180&amp;&amp;(t+=360),n.push({i:r.push(da(r)+&quot;rotate(&quot;,null,&quot;)&quot;)-2,x:Gi(t,e)})):e&amp;&amp;r.push(da(r)+&quot;rotate(&quot;+e+&quot;)&quot;)}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(da(r)+&quot;skewX(&quot;,null,&quot;)&quot;)-2,x:Gi(t,e)}):e&amp;&amp;r.push(da(r)+&quot;skewX(&quot;+e+&quot;)&quot;)}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(da(r)+&quot;scale(&quot;,null,&quot;,&quot;,null,&quot;)&quot;);n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else 1===e[0]&amp;&amp;1===e[1]||r.push(da(r)+&quot;scale(&quot;+e+&quot;)&quot;)}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r&lt;a;)n[(e=i[r]).i]=e.x(t);return n.join(&quot;&quot;)}}function ma(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function va(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}function ya(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;var r=xa(t),n=xa(e),i=r.pop(),a=n.pop(),o=null;for(;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function xa(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function ba(t){t.fixed|=2}function _a(t){t.fixed&amp;=-7}function wa(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ka(t){t.fixed&amp;=-5}t.interpolateTransform=ga,t.layout={},t.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r&lt;n;)e.push(ya(t[r]));return e}},t.layout.chord=function(){var e,r,n,i,a,o,s,l={},c=0;function u(){var l,u,h,p,d,g={},m=[],v=t.range(i),y=[];for(e=[],r=[],l=0,p=-1;++p&lt;i;){for(u=0,d=-1;++d&lt;i;)u+=n[p][d];m.push(u),y.push(t.range(i)),l+=u}for(a&amp;&amp;v.sort(function(t,e){return a(m[t],m[e])}),o&amp;&amp;y.forEach(function(t,e){t.sort(function(t,r){return o(n[e][t],n[e][r])})}),l=(Tt-c*i)/l,u=0,p=-1;++p&lt;i;){for(h=u,d=-1;++d&lt;i;){var x=v[p],b=y[x][d],_=n[x][b],w=u,k=u+=_*l;g[x+&quot;-&quot;+b]={index:x,subindex:b,startAngle:w,endAngle:k,value:_}}r[x]={index:x,startAngle:h,endAngle:u,value:m[x]},u+=c}for(p=-1;++p&lt;i;)for(d=p-1;++d&lt;i;){var M=g[p+&quot;-&quot;+d],A=g[d+&quot;-&quot;+p];(M.value||A.value)&amp;&amp;e.push(M.value&lt;A.value?{source:A,target:M}:{source:M,target:A})}s&amp;&amp;f()}function f(){e.sort(function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}return l.matrix=function(t){return arguments.length?(i=(n=t)&amp;&amp;n.length,e=r=null,l):n},l.padding=function(t){return arguments.length?(c=t,e=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(o=t,e=null,l):o},l.sortChords=function(t){return arguments.length?(s=t,e&amp;&amp;f(),l):s},l.chords=function(){return e||u(),e},l.groups=function(){return r||u(),r},l},t.layout.force=function(){var e,r,n,i,a,o,s={},l=t.dispatch(&quot;start&quot;,&quot;tick&quot;,&quot;end&quot;),c=[1,1],u=.9,f=Ma,h=Aa,p=-30,d=Ta,g=.1,m=.64,v=[],y=[];function x(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/m&lt;l){if(l&lt;d){var c=e.charge/l;t.px-=a*c,t.py-=o*c}return!0}if(e.point&amp;&amp;l&amp;&amp;l&lt;d){c=e.pointCharge/l;t.px-=a*c,t.py-=o*c}}return!e.charge}}function b(e){e.px=t.event.x,e.py=t.event.y,s.resume()}return s.tick=function(){if((n*=.99)&lt;.005)return e=null,l.end({type:&quot;end&quot;,alpha:n=0}),!0;var r,s,f,h,d,m,b,_,w,k=v.length,M=y.length;for(s=0;s&lt;M;++s)h=(f=y[s]).source,(m=(_=(d=f.target).x-h.x)*_+(w=d.y-h.y)*w)&amp;&amp;(_*=m=n*a[s]*((m=Math.sqrt(m))-i[s])/m,w*=m,d.x-=_*(b=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=w*b,h.x+=_*(b=1-b),h.y+=w*b);if((b=n*g)&amp;&amp;(_=c[0]/2,w=c[1]/2,s=-1,b))for(;++s&lt;k;)(f=v[s]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(p)for(!function t(e,r,n){var i=0,a=0;e.charge=0;if(!e.leaf)for(var o,s=e.nodes,l=s.length,c=-1;++c&lt;l;)null!=(o=s[c])&amp;&amp;(t(o,r,n),e.charge+=o.charge,i+=o.charge*o.cx,a+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=r*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,a+=u*e.point.y}e.cx=i/e.charge;e.cy=a/e.charge}(r=t.geom.quadtree(v),n,o),s=-1;++s&lt;k;)(f=v[s]).fixed||r.visit(x(f));for(s=-1;++s&lt;k;)(f=v[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*u,f.y-=(f.py-(f.py=f.y))*u);l.tick({type:&quot;tick&quot;,alpha:n})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(c=t,s):c},s.linkDistance=function(t){return arguments.length?(f=&quot;function&quot;==typeof t?t:+t,s):f},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h=&quot;function&quot;==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(u=+t,s):u},s.charge=function(t){return arguments.length?(p=&quot;function&quot;==typeof t?t:+t,s):p},s.chargeDistance=function(t){return arguments.length?(d=t*t,s):Math.sqrt(d)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(m=t*t,s):Math.sqrt(m)},s.alpha=function(t){return arguments.length?(t=+t,n?t&gt;0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:&quot;end&quot;,alpha:n=0})):t&gt;0&amp;&amp;(l.start({type:&quot;start&quot;,alpha:n=t}),e=Me(s.tick)),s):n},s.start=function(){var t,e,r,n=v.length,l=y.length,u=c[0],d=c[1];for(t=0;t&lt;n;++t)(r=v[t]).index=t,r.weight=0;for(t=0;t&lt;l;++t)&quot;number&quot;==typeof(r=y[t]).source&amp;&amp;(r.source=v[r.source]),&quot;number&quot;==typeof r.target&amp;&amp;(r.target=v[r.target]),++r.source.weight,++r.target.weight;for(t=0;t&lt;n;++t)r=v[t],isNaN(r.x)&amp;&amp;(r.x=g(&quot;x&quot;,u)),isNaN(r.y)&amp;&amp;(r.y=g(&quot;y&quot;,d)),isNaN(r.px)&amp;&amp;(r.px=r.x),isNaN(r.py)&amp;&amp;(r.py=r.y);if(i=[],&quot;function&quot;==typeof f)for(t=0;t&lt;l;++t)i[t]=+f.call(this,y[t],t);else for(t=0;t&lt;l;++t)i[t]=f;if(a=[],&quot;function&quot;==typeof h)for(t=0;t&lt;l;++t)a[t]=+h.call(this,y[t],t);else for(t=0;t&lt;l;++t)a[t]=h;if(o=[],&quot;function&quot;==typeof p)for(t=0;t&lt;n;++t)o[t]=+p.call(this,v[t],t);else for(t=0;t&lt;n;++t)o[t]=p;function g(r,i){if(!e){for(e=new Array(n),c=0;c&lt;n;++c)e[c]=[];for(c=0;c&lt;l;++c){var a=y[c];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}for(var o,s=e[t],c=-1,u=s.length;++c&lt;u;)if(!isNaN(o=s[c][r]))return o;return Math.random()*i}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(r||(r=t.behavior.drag().origin(z).on(&quot;dragstart.force&quot;,ba).on(&quot;drag.force&quot;,b).on(&quot;dragend.force&quot;,_a)),!arguments.length)return r;this.on(&quot;mouseover.force&quot;,wa).on(&quot;mouseout.force&quot;,ka).call(r)},t.rebind(s,l,&quot;on&quot;)};var Ma=20,Aa=1,Ta=1/0;function Sa(e,r){return t.rebind(e,r,&quot;sort&quot;,&quot;children&quot;,&quot;value&quot;),e.nodes=e,e.links=Oa,e}function Ea(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&amp;&amp;(n=i.length))for(var n,i;--n&gt;=0;)r.push(i[n])}function Ca(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&amp;&amp;(i=a.length))for(var i,a,o=-1;++o&lt;i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function La(t){return t.children}function za(t){return t.value}function Pa(t,e){return e.value-t.value}function Oa(e){return t.merge(e.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}t.layout.hierarchy=function(){var t=Pa,e=La,r=za;function n(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(c=e.call(n,a,a.depth))&amp;&amp;(l=c.length)){for(var l,c,u;--l&gt;=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&amp;&amp;(a.value=0),a.children=c}else r&amp;&amp;(a.value=+r.call(n,a,a.depth)||0),delete a.children;return Ca(i,function(e){var n,i;t&amp;&amp;(n=e.children)&amp;&amp;n.sort(t),r&amp;&amp;(i=e.parent)&amp;&amp;(i.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&amp;&amp;(Ea(t,function(t){t.children&amp;&amp;(t.value=0)}),Ca(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&amp;&amp;(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&amp;&amp;(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++c&lt;o;)t(s=a[c],r,l=s.value*n,i),r+=l}}(i[0],0,r[0],r[1]/function t(e){var r=e.children,n=0;if(r&amp;&amp;(i=r.length))for(var i,a=-1;++a&lt;i;)n=Math.max(n,t(r[a]));return 1+n}(i[0])),i}return n.size=function(t){return arguments.length?(r=t,n):r},Sa(n,e)},t.layout.pie=function(){var e=Number,r=Ia,n=0,i=Tt,a=0;function o(s){var l,c=s.length,u=s.map(function(t,r){return+e.call(o,t,r)}),f=+(&quot;function&quot;==typeof n?n.apply(this,arguments):n),h=(&quot;function&quot;==typeof i?i.apply(this,arguments):i)-f,p=Math.min(Math.abs(h)/c,+(&quot;function&quot;==typeof a?a.apply(this,arguments):a)),d=p*(h&lt;0?-1:1),g=t.sum(u),m=g?(h-c*d)/g:0,v=t.range(c),y=[];return null!=r&amp;&amp;v.sort(r===Ia?function(t,e){return u[e]-u[t]}:function(t,e){return r(s[t],s[e])}),v.forEach(function(t){y[t]={data:s[t],value:l=u[t],startAngle:f,endAngle:f+=l*m+d,padAngle:p}}),y}return o.value=function(t){return arguments.length?(e=t,o):e},o.sort=function(t){return arguments.length?(r=t,o):r},o.startAngle=function(t){return arguments.length?(n=t,o):n},o.endAngle=function(t){return arguments.length?(i=t,o):i},o.padAngle=function(t){return arguments.length?(a=t,o):a},o};var Ia={};function Da(t){return t.x}function Ra(t){return t.y}function Ba(t,e,r){t.y0=e,t.y=r}t.layout.stack=function(){var e=z,r=ja,n=Va,i=Ba,a=Da,o=Ra;function s(l,c){if(!(p=l.length))return l;var u=l.map(function(t,r){return e.call(s,t,r)}),f=u.map(function(t){return t.map(function(t,e){return[a.call(s,t,e),o.call(s,t,e)]})}),h=r.call(s,f,c);u=t.permute(u,h),f=t.permute(f,h);var p,d,g,m,v=n.call(s,f,c),y=u[0].length;for(g=0;g&lt;y;++g)for(i.call(s,u[0][g],m=v[g],f[0][g][1]),d=1;d&lt;p;++d)i.call(s,u[d][g],m+=f[d-1][g][1],f[d][g][1]);return l}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(t){return arguments.length?(r=&quot;function&quot;==typeof t?t:Fa.get(t)||ja,s):r},s.offset=function(t){return arguments.length?(n=&quot;function&quot;==typeof t?t:Na.get(t)||Va,s):n},s.x=function(t){return arguments.length?(a=t,s):a},s.y=function(t){return arguments.length?(o=t,s):o},s.out=function(t){return arguments.length?(i=t,s):i},s};var Fa=t.map({&quot;inside-out&quot;:function(e){var r,n,i=e.length,a=e.map(Ua),o=e.map(qa),s=t.range(i).sort(function(t,e){return a[t]-a[e]}),l=0,c=0,u=[],f=[];for(r=0;r&lt;i;++r)n=s[r],l&lt;c?(l+=o[n],u.push(n)):(c+=o[n],f.push(n));return f.reverse().concat(u)},reverse:function(e){return t.range(e.length).reverse()},default:ja}),Na=t.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r&lt;a;++r){for(e=0,n=0;e&lt;i;e++)n+=t[e][r][1];n&gt;s&amp;&amp;(s=n),o.push(n)}for(r=0;r&lt;a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,c,u=t.length,f=t[0],h=f.length,p=[];for(p[0]=l=c=0,r=1;r&lt;h;++r){for(e=0,i=0;e&lt;u;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e&lt;u;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n&lt;e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}p[r]=l-=i?a/i*s:0,l&lt;c&amp;&amp;(c=l)}for(r=0;r&lt;h;++r)p[r]-=c;return p},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r&lt;a;++r){for(e=0,n=0;e&lt;i;e++)n+=t[e][r][1];if(n)for(e=0;e&lt;i;e++)t[e][r][1]/=n;else for(e=0;e&lt;i;e++)t[e][r][1]=o}for(r=0;r&lt;a;++r)s[r]=0;return s},zero:Va});function ja(e){return t.range(e.length)}function Va(t){for(var e=-1,r=t[0].length,n=[];++e&lt;r;)n[e]=0;return n}function Ua(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r&lt;a;++r)(e=t[r][1])&gt;i&amp;&amp;(n=r,i=e);return n}function qa(t){return t.reduce(Ha,0)}function Ha(t,e){return t+e[1]}function Ga(t,e){return Wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Wa(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r&lt;=e;)a[r]=i*r+n;return a}function Ya(e){return[t.min(e),t.max(e)]}function Xa(t,e){return t.value-e.value}function Za(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function $a(t,e){t._pack_next=e,e._pack_prev=t}function Ja(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i&gt;r*r+n*n}function Ka(t){if((e=t.children)&amp;&amp;(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,f=1/0,h=-1/0;if(e.forEach(Qa),(r=e[0]).x=-r.r,r.y=0,x(r),l&gt;1&amp;&amp;((n=e[1]).x=n.r,n.y=0,x(n),l&gt;2))for(eo(r,n,i=e[2]),x(i),Za(r,i),r._pack_prev=i,Za(i,n),n=r._pack_next,a=3;a&lt;l;a++){eo(r,n,i=e[a]);var p=0,d=1,g=1;for(o=n._pack_next;o!==n;o=o._pack_next,d++)if(Ja(o,i)){p=1;break}if(1==p)for(s=r._pack_prev;s!==o._pack_prev&amp;&amp;!Ja(s,i);s=s._pack_prev,g++);p?(d&lt;g||d==g&amp;&amp;n.r&lt;r.r?$a(r,n=o):$a(r=s,n),a--):(Za(r,i),n=i,x(i))}var m=(c+u)/2,v=(f+h)/2,y=0;for(a=0;a&lt;l;a++)(i=e[a]).x-=m,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(to)}function x(t){c=Math.min(t.x-t.r,c),u=Math.max(t.x+t.r,u),f=Math.min(t.y-t.r,f),h=Math.max(t.y+t.r,h)}}function Qa(t){t._pack_next=t._pack_prev=t}function to(t){delete t._pack_next,delete t._pack_prev}function eo(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&amp;&amp;(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+c*a,r.y=t.y+l*a-c*i}else r.x=t.x+n,r.y=t.y}function ro(t,e){return t.parent==e.parent?1:2}function no(t){var e=t.children;return e.length?e[0]:t.t}function io(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function ao(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function oo(t,e,r){return t.a.parent===e.parent?t.a:r}function so(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function lo(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i&lt;0&amp;&amp;(r+=i/2,i=0),a&lt;0&amp;&amp;(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function co(t){var e=t[0],r=t[t.length-1];return e&lt;r?[e,r]:[r,e]}function uo(t){return t.rangeExtent?t.rangeExtent():co(t.range())}function fo(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}}function ho(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o&lt;a&amp;&amp;(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function po(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:go}t.layout.histogram=function(){var e=!0,r=Number,n=Ya,i=Ga;function a(a,o){for(var s,l,c=[],u=a.map(r,this),f=n.call(this,u,o),h=i.call(this,f,u,o),p=(o=-1,u.length),d=h.length-1,g=e?1:1/p;++o&lt;d;)(s=c[o]=[]).dx=h[o+1]-(s.x=h[o]),s.y=0;if(d&gt;0)for(o=-1;++o&lt;p;)(l=u[o])&gt;=f[0]&amp;&amp;l&lt;=f[1]&amp;&amp;((s=c[t.bisect(h,l,1,d)-1]).y+=g,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=me(t),a):n},a.bins=function(t){return arguments.length?(i=&quot;number&quot;==typeof t?function(e){return Wa(e,t)}:me(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xa),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:&quot;function&quot;==typeof e?e:function(){return e};if(s.x=s.y=0,Ca(s,function(t){t.r=+u(t.value)}),Ca(s,Ka),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ca(s,function(t){t.r+=f}),Ca(s,Ka),Ca(s,function(t){t.r-=f})}return function t(e,r,n,i){var a=e.children;e.x=r+=i*e.x;e.y=n+=i*e.y;e.r*=i;if(a)for(var o=-1,s=a.length;++o&lt;s;)t(a[o],r,n,i)}(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return a.size=function(t){return arguments.length?(i=t,a):i},a.radius=function(t){return arguments.length?(e=null==t||&quot;function&quot;==typeof t?t:+t,a):e},a.padding=function(t){return arguments.length?(n=+t,a):n},Sa(a,r)},t.layout.tree=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=null;function a(t,a){var c=e.call(this,t,a),u=c[0],f=function(t){var e,r={A:null,children:[t]},n=[r];for(;null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o&lt;s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&amp;&amp;i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(u);if(Ca(f,o),f.parent.m=-f.z,Ea(f,s),i)Ea(u,l);else{var h=u,p=u,d=u;Ea(u,function(t){t.x&lt;h.x&amp;&amp;(h=t),t.x&gt;p.x&amp;&amp;(p=t),t.depth&gt;d.depth&amp;&amp;(d=t)});var g=r(h,p)/2-h.x,m=n[0]/(p.x+r(p,h)/2+g),v=n[1]/(d.depth||1);Ea(u,function(t){t.x=(t.x+g)*m,t.y=t.depth*v})}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a&gt;=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&amp;&amp;(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=io(s),a=no(a),s&amp;&amp;a;)l=no(l),(o=io(o)).a=t,(i=s.z+f-a.z-c+r(s._,a._))&gt;0&amp;&amp;(ao(oo(s,t,n),t,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&amp;&amp;!io(o)&amp;&amp;(o.t=s,o.m+=f-u),a&amp;&amp;!no(l)&amp;&amp;(l.t=a,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Sa(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;Ca(c,function(e){var n=e.children;n&amp;&amp;n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var f=function t(e){var r=e.children;return r&amp;&amp;r.length?t(r[0]):e}(c),h=function t(e){var r,n=e.children;return n&amp;&amp;(r=n.length)?t(n[r-1]):e}(c),p=f.x-r(f,h)/2,d=h.x+r(h,f)/2;return Ca(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Sa(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=so,s=!1,l=&quot;squarify&quot;,c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i&lt;a;)n=(r=t[i]).value*(e&lt;0?0:e),r.area=isNaN(n)||n&lt;=0?0:n}function f(t){var e=t.children;if(e&amp;&amp;e.length){var r,n,i,a=o(t),s=[],c=e.slice(),h=1/0,g=&quot;slice&quot;===l?a.dx:&quot;dice&quot;===l?a.dy:&quot;slice-dice&quot;===l?1&amp;t.depth?a.dy:a.dx:Math.min(a.dx,a.dy);for(u(c,a.dx*a.dy/t.value),s.area=0;(i=c.length)&gt;0;)s.push(r=c[i-1]),s.area+=r.area,&quot;squarify&quot;!==l||(n=p(s,g))&lt;=h?(c.pop(),h=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&amp;&amp;(d(s,g,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&amp;&amp;e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&amp;&amp;(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++o&lt;s;)(r=t[o].area)&amp;&amp;(r&lt;a&amp;&amp;(a=r),r&gt;i&amp;&amp;(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u&gt;r.dy)&amp;&amp;(u=r.dy);++o&lt;s;)(a=t[o]).x=l,a.y=c,a.dy=u,l+=a.dx=Math.min(r.x+r.dx-l,u?n(a.area/u):0);a.z=!0,a.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((i||u&gt;r.dx)&amp;&amp;(u=r.dx);++o&lt;s;)(a=t[o]).x=l,a.y=c,a.dx=u,c+=a.dy=Math.min(r.y+r.dy-c,u?n(a.area/u):0);a.z=!1,a.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function g(t){var n=e||r(t),a=n[0];return a.x=a.y=0,a.value?(a.dx=i[0],a.dy=i[1]):a.dx=a.dy=0,e&amp;&amp;r.revalue(a),u([a],a.dx*a.dy/a.value),(e?h:f)(a),s&amp;&amp;(e=n),n}return g.size=function(t){return arguments.length?(i=t,g):i},g.padding=function(t){if(!arguments.length)return a;function e(e){return lo(e,t)}var r;return o=null==(a=t)?so:&quot;function&quot;==(r=typeof t)?function(e){var r=t.call(g,e,e.depth);return null==r?so(e):lo(e,&quot;number&quot;==typeof r?[r,r,r,r]:r)}:&quot;number&quot;===r?(t=[t,t,t,t],e):e,g},g.round=function(t){return arguments.length?(n=t?Math.round:Number,g):n!=Number},g.sticky=function(t){return arguments.length?(s=t,e=null,g):s},g.ratio=function(t){return arguments.length?(c=t,g):c},g.mode=function(t){return arguments.length?(l=t+&quot;&quot;,g):l},Sa(g,r)},t.random={normal:function(t,e){var r=arguments.length;return r&lt;2&amp;&amp;(e=1),r&lt;1&amp;&amp;(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i&gt;1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r&lt;t;r++)e+=Math.random();return e}}},t.scale={};var go={floor:z,ceil:z};function mo(e,r,n,i){var a=[],o=[],s=0,l=Math.min(e.length,r.length)-1;for(e[l]&lt;e[0]&amp;&amp;(e=e.slice().reverse(),r=r.slice().reverse());++s&lt;=l;)a.push(n(e[s-1],e[s])),o.push(i(r[s-1],r[s]));return function(r){var n=t.bisect(e,r,1,l)-1;return o[n](a[n](r))}}function vo(e,r){return t.rebind(e,r,&quot;range&quot;,&quot;rangeRound&quot;,&quot;interpolate&quot;,&quot;clamp&quot;)}function yo(t,e){return ho(t,po(xo(t,e)[2])),ho(t,po(xo(t,e)[2])),t}function xo(t,e){null==e&amp;&amp;(e=10);var r=co(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a&lt;=.15?i*=10:a&lt;=.35?i*=5:a&lt;=.75&amp;&amp;(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function bo(e,r){return t.range.apply(t,xo(e,r))}function _o(e,r,n){var i=xo(e,r);if(n){var a=Le.exec(n);if(a.shift(),&quot;s&quot;===a[8]){var o=t.formatPrefix(Math.max(y(i[0]),y(i[1])));return a[7]||(a[7]=&quot;.&quot;+ko(o.scale(i[2]))),a[8]=&quot;f&quot;,n=t.format(a.join(&quot;&quot;)),function(t){return n(o.scale(t))+o.symbol}}a[7]||(a[7]=&quot;.&quot;+function(t,e){var r=ko(e[2]);return t in wo?Math.abs(r-ko(Math.max(y(e[0]),y(e[1]))))+ +(&quot;e&quot;!==t):r-2*(&quot;%&quot;===t)}(a[8],i)),n=a.join(&quot;&quot;)}else n=&quot;,.&quot;+ko(i[2])+&quot;f&quot;;return t.format(n)}t.scale.linear=function(){return function t(e,r,n,i){var a,o;function s(){var t=Math.min(e.length,r.length)&gt;2?mo:fo,s=i?va:ma;return a=t(e,r,s,n),o=t(r,e,s,Zi),l}function l(t){return a(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ca)};l.clamp=function(t){return arguments.length?(i=t,s()):i};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,i)};return s()}([0,1],[0,1],Zi,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,i,a){function o(t){return(i?Math.log(t&lt;0?0:t):-Math.log(t&gt;0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(i=t[0]&gt;=0,r.domain((a=t.map(Number)).map(o)),l):a};l.base=function(t){return arguments.length?(n=+t,r.domain(a.map(o)),l):n};l.nice=function(){var t=ho(a.map(o),i?Math:Ao);return r.domain(t),a=t.map(s),l};l.ticks=function(){var t=co(a),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),f=n%1?2:n;if(isFinite(u-c)){if(i){for(;c&lt;u;c++)for(var h=1;h&lt;f;h++)e.push(s(c)*h);e.push(s(c))}else for(e.push(s(c));c++&lt;u;)for(var h=f-1;h&gt;0;h--)e.push(s(c)*h);for(c=0;e[c]&lt;r;c++);for(u=e.length;e[u-1]&gt;l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return Mo;arguments.length&lt;2?r=Mo:&quot;function&quot;!=typeof r&amp;&amp;(r=t.format(r));var i=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n&lt;n-.5&amp;&amp;(e*=n),e&lt;=i?r(t):&quot;&quot;}};l.copy=function(){return e(r.copy(),n,i,a)};return vo(l,r)}(t.scale.linear().domain([0,1]),10,!0,[1,10])};var Mo=t.format(&quot;.0e&quot;),Ao={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function To(t){return function(e){return e&lt;0?-Math.pow(-e,t):Math.pow(e,t)}}t.scale.pow=function(){return function t(e,r,n){var i=To(r),a=To(1/r);function o(t){return e(i(t))}o.invert=function(t){return a(e.invert(t))};o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),o):n};o.ticks=function(t){return bo(n,t)};o.tickFormat=function(t,e){return _o(n,t,e)};o.nice=function(t){return o.domain(yo(n,t))};o.exponent=function(t){return arguments.length?(i=To(r=t),a=To(1/r),e.domain(n.map(i)),o):r};o.copy=function(){return t(e.copy(),r,n)};return vo(o,e)}(t.scale.linear(),1,[0,1])},t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return function e(r,n){var i,a,o;function s(t){return a[((i.get(t)||(&quot;range&quot;===n.t?i.set(t,r.push(t)):NaN))-1)%a.length]}function l(e,n){return t.range(r.length).map(function(t){return e+n*t})}s.domain=function(t){if(!arguments.length)return r;r=[],i=new b;for(var e,a=-1,o=t.length;++a&lt;o;)i.has(e=t[a])||i.set(e,r.push(e));return s[n.t].apply(s,n.a)};s.range=function(t){return arguments.length?(a=t,o=0,n={t:&quot;range&quot;,a:arguments},s):a};s.rangePoints=function(t,e){arguments.length&lt;2&amp;&amp;(e=0);var i=t[0],c=t[1],u=r.length&lt;2?(i=(i+c)/2,0):(c-i)/(r.length-1+e);return a=l(i+u*e/2,u),o=0,n={t:&quot;rangePoints&quot;,a:arguments},s};s.rangeRoundPoints=function(t,e){arguments.length&lt;2&amp;&amp;(e=0);var i=t[0],c=t[1],u=r.length&lt;2?(i=c=Math.round((i+c)/2),0):(c-i)/(r.length-1+e)|0;return a=l(i+Math.round(u*e/2+(c-i-(r.length-1+e)*u)/2),u),o=0,n={t:&quot;rangeRoundPoints&quot;,a:arguments},s};s.rangeBands=function(t,e,i){arguments.length&lt;2&amp;&amp;(e=0),arguments.length&lt;3&amp;&amp;(i=e);var c=t[1]&lt;t[0],u=t[c-0],f=t[1-c],h=(f-u)/(r.length-e+2*i);return a=l(u+h*i,h),c&amp;&amp;a.reverse(),o=h*(1-e),n={t:&quot;rangeBands&quot;,a:arguments},s};s.rangeRoundBands=function(t,e,i){arguments.length&lt;2&amp;&amp;(e=0),arguments.length&lt;3&amp;&amp;(i=e);var c=t[1]&lt;t[0],u=t[c-0],f=t[1-c],h=Math.floor((f-u)/(r.length-e+2*i));return a=l(u+Math.round((f-u-(r.length-e)*h)/2),h),c&amp;&amp;a.reverse(),o=Math.round(h*(1-e)),n={t:&quot;rangeRoundBands&quot;,a:arguments},s};s.rangeBand=function(){return o};s.rangeExtent=function(){return co(n.a[0])};s.copy=function(){return e(r,n)};return s.domain(r)}([],{t:&quot;range&quot;,a:[[]]})},t.scale.category10=function(){return t.scale.ordinal().range(So)},t.scale.category20=function(){return t.scale.ordinal().range(Eo)},t.scale.category20b=function(){return t.scale.ordinal().range(Co)},t.scale.category20c=function(){return t.scale.ordinal().range(Lo)};var So=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(se),Eo=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(se),Co=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(se),Lo=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(se);function zo(){return 0}t.scale.quantile=function(){return function e(r,n){var i;function a(){var e=0,a=n.length;for(i=[];++e&lt;a;)i[e-1]=t.quantile(r,e/a);return o}function o(e){if(!isNaN(e=+e))return n[t.bisect(i,e)]}o.domain=function(t){return arguments.length?(r=t.map(p).filter(d).sort(h),a()):r};o.range=function(t){return arguments.length?(n=t,a()):n};o.quantiles=function(){return i};o.invertExtent=function(t){return(t=n.indexOf(t))&lt;0?[NaN,NaN]:[t&gt;0?i[t-1]:r[0],t&lt;i.length?i[t]:r[r.length-1]]};o.copy=function(){return e(r,n)};return a()}([],[])},t.scale.quantize=function(){return function t(e,r,n){var i,a;function o(t){return n[Math.max(0,Math.min(a,Math.floor(i*(t-e))))]}function s(){return i=n.length/(r-e),a=n.length-1,o}o.domain=function(t){return arguments.length?(e=+t[0],r=+t[t.length-1],s()):[e,r]};o.range=function(t){return arguments.length?(n=t,s()):n};o.invertExtent=function(t){return[t=(t=n.indexOf(t))&lt;0?NaN:t/i+e,t+1/i]};o.copy=function(){return t(e,r,n)};return s()}(0,1,[0,1])},t.scale.threshold=function(){return function e(r,n){function i(e){if(e&lt;=e)return n[t.bisect(r,e)]}i.domain=function(t){return arguments.length?(r=t,i):r};i.range=function(t){return arguments.length?(n=t,i):n};i.invertExtent=function(t){return t=n.indexOf(t),[r[t-1],r[t]]};i.copy=function(){return e(r,n)};return i}([.5],[0,1])},t.scale.identity=function(){return function t(e){function r(t){return+t}r.invert=r;r.domain=r.range=function(t){return arguments.length?(e=t.map(r),r):e};r.ticks=function(t){return bo(e,t)};r.tickFormat=function(t,r){return _o(e,t,r)};r.copy=function(){return t(e)};return r}([0,1])},t.svg={},t.svg.arc=function(){var t=Oo,e=Io,r=zo,n=Po,i=Do,a=Ro,o=Bo;function s(){var s=Math.max(0,+t.apply(this,arguments)),c=Math.max(0,+e.apply(this,arguments)),u=i.apply(this,arguments)-Et,f=a.apply(this,arguments)-Et,h=Math.abs(f-u),p=u&gt;f?0:1;if(c&lt;s&amp;&amp;(d=c,c=s,s=d),h&gt;=St)return l(c,p)+(s?l(s,1-p):&quot;&quot;)+&quot;Z&quot;;var d,g,m,v,y,x,b,_,w,k,M,A,T=0,S=0,E=[];if((v=(+o.apply(this,arguments)||0)/2)&amp;&amp;(m=n===Po?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&amp;&amp;(S=It(m/c*Math.sin(v))),s&amp;&amp;(T=It(m/s*Math.sin(v)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var C=Math.abs(f-u-2*S)&lt;=At?0:1;if(S&amp;&amp;Fo(y,x,b,_)===p^C){var L=(u+f)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-T),k=s*Math.sin(f-T),M=s*Math.cos(u+T),A=s*Math.sin(u+T);var z=Math.abs(u-f+2*T)&lt;=At?0:1;if(T&amp;&amp;Fo(w,k,M,A)===1-p^z){var P=(u+f)/2;w=s*Math.cos(P),k=s*Math.sin(P),M=A=null}}else w=k=0;if(h&gt;kt&amp;&amp;(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))&gt;.001){g=s&lt;c^p?0:1;var O=d,I=d;if(h&lt;At){var D=null==M?[w,k]:null==b?[y,x]:si([y,x],[M,A],[b,_],[w,k]),R=y-D[0],B=x-D[1],F=b-D[0],N=_-D[1],j=1/Math.sin(Math.acos((R*F+B*N)/(Math.sqrt(R*R+B*B)*Math.sqrt(F*F+N*N)))/2),V=Math.sqrt(D[0]*D[0]+D[1]*D[1]);I=Math.min(d,(s-V)/(j-1)),O=Math.min(d,(c-V)/(j+1))}if(null!=b){var U=No(null==M?[w,k]:[M,A],[y,x],c,O,p),q=No([b,_],[w,k],c,O,p);d===O?E.push(&quot;M&quot;,U[0],&quot;A&quot;,O,&quot;,&quot;,O,&quot; 0 0,&quot;,g,&quot; &quot;,U[1],&quot;A&quot;,c,&quot;,&quot;,c,&quot; 0 &quot;,1-p^Fo(U[1][0],U[1][1],q[1][0],q[1][1]),&quot;,&quot;,p,&quot; &quot;,q[1],&quot;A&quot;,O,&quot;,&quot;,O,&quot; 0 0,&quot;,g,&quot; &quot;,q[0]):E.push(&quot;M&quot;,U[0],&quot;A&quot;,O,&quot;,&quot;,O,&quot; 0 1,&quot;,g,&quot; &quot;,q[0])}else E.push(&quot;M&quot;,y,&quot;,&quot;,x);if(null!=M){var H=No([y,x],[M,A],s,-I,p),G=No([w,k],null==b?[y,x]:[b,_],s,-I,p);d===I?E.push(&quot;L&quot;,G[0],&quot;A&quot;,I,&quot;,&quot;,I,&quot; 0 0,&quot;,g,&quot; &quot;,G[1],&quot;A&quot;,s,&quot;,&quot;,s,&quot; 0 &quot;,p^Fo(G[1][0],G[1][1],H[1][0],H[1][1]),&quot;,&quot;,1-p,&quot; &quot;,H[1],&quot;A&quot;,I,&quot;,&quot;,I,&quot; 0 0,&quot;,g,&quot; &quot;,H[0]):E.push(&quot;L&quot;,G[0],&quot;A&quot;,I,&quot;,&quot;,I,&quot; 0 0,&quot;,g,&quot; &quot;,H[0])}else E.push(&quot;L&quot;,w,&quot;,&quot;,k)}else E.push(&quot;M&quot;,y,&quot;,&quot;,x),null!=b&amp;&amp;E.push(&quot;A&quot;,c,&quot;,&quot;,c,&quot; 0 &quot;,C,&quot;,&quot;,p,&quot; &quot;,b,&quot;,&quot;,_),E.push(&quot;L&quot;,w,&quot;,&quot;,k),null!=M&amp;&amp;E.push(&quot;A&quot;,s,&quot;,&quot;,s,&quot; 0 &quot;,z,&quot;,&quot;,1-p,&quot; &quot;,M,&quot;,&quot;,A);return E.push(&quot;Z&quot;),E.join(&quot;&quot;)}function l(t,e){return&quot;M0,&quot;+t+&quot;A&quot;+t+&quot;,&quot;+t+&quot; 0 1,&quot;+e+&quot; 0,&quot;+-t+&quot;A&quot;+t+&quot;,&quot;+t+&quot; 0 1,&quot;+e+&quot; 0,&quot;+t}return s.innerRadius=function(e){return arguments.length?(t=me(e),s):t},s.outerRadius=function(t){return arguments.length?(e=me(t),s):e},s.cornerRadius=function(t){return arguments.length?(r=me(t),s):r},s.padRadius=function(t){return arguments.length?(n=t==Po?Po:me(t),s):n},s.startAngle=function(t){return arguments.length?(i=me(t),s):i},s.endAngle=function(t){return arguments.length?(a=me(t),s):a},s.padAngle=function(t){return arguments.length?(o=me(t),s):o},s.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Et;return[Math.cos(n)*r,Math.sin(n)*r]},s};var Po=&quot;auto&quot;;function Oo(t){return t.innerRadius}function Io(t){return t.outerRadius}function Do(t){return t.startAngle}function Ro(t){return t.endAngle}function Bo(t){return t&amp;&amp;t.padAngle}function Fo(t,e,r,n){return(t-r)*e-(e-n)*t&gt;0?0:1}function No(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,p=e[1]+c,d=(u+h)/2,g=(f+p)/2,m=h-u,v=p-f,y=m*m+v*v,x=r-n,b=u*p-h*f,_=(v&lt;0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-m*_)/y,k=(-b*m-v*_)/y,M=(b*v+m*_)/y,A=(-b*m+v*_)/y,T=w-d,S=k-g,E=M-d,C=A-g;return T*T+S*S&gt;E*E+C*C&amp;&amp;(w=M,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ei,r=ri,n=Wr,i=Uo,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,f=a.length,h=me(e),p=me(r);function d(){l.push(&quot;M&quot;,i(t(c),o))}for(;++u&lt;f;)n.call(this,s=a[u],u)?c.push([+h.call(this,s,u),+p.call(this,s,u)]):c.length&amp;&amp;(d(),c=[]);return c.length&amp;&amp;d(),l.length?l.join(&quot;&quot;):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(r=t,s):r},s.defined=function(t){return arguments.length?(n=t,s):n},s.interpolate=function(t){return arguments.length?(a=&quot;function&quot;==typeof t?i=t:(i=Vo.get(t)||Uo).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}t.svg.line=function(){return jo(z)};var Vo=t.map({linear:Uo,&quot;linear-closed&quot;:qo,step:function(t){var e=0,r=t.length,n=t[0],i=[n[0],&quot;,&quot;,n[1]];for(;++e&lt;r;)i.push(&quot;H&quot;,(n[0]+(n=t[e])[0])/2,&quot;V&quot;,n[1]);r&gt;1&amp;&amp;i.push(&quot;H&quot;,n[0]);return i.join(&quot;&quot;)},&quot;step-before&quot;:Ho,&quot;step-after&quot;:Go,basis:Xo,&quot;basis-open&quot;:function(t){if(t.length&lt;4)return Uo(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n&lt;3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(Zo(Ko,a)+&quot;,&quot;+Zo(Ko,o)),--n;for(;++n&lt;i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Qo(r,a,o);return r.join(&quot;&quot;)},&quot;basis-closed&quot;:function(t){var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];for(;++n&lt;4;)r=t[n%i],o.push(r[0]),s.push(r[1]);e=[Zo(Ko,o),&quot;,&quot;,Zo(Ko,s)],--n;for(;++n&lt;a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Qo(e,o,s);return e.join(&quot;&quot;)},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,c=-1;++c&lt;=r;)n=t[c],i=c/r,n[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return Xo(t)},cardinal:function(t,e){return t.length&lt;3?Uo(t):t[0]+Wo(t,Yo(t,e))},&quot;cardinal-open&quot;:function(t,e){return t.length&lt;4?Uo(t):t[1]+Wo(t.slice(1,-1),Yo(t,e))},&quot;cardinal-closed&quot;:function(t,e){return t.length&lt;3?qo(t):t[0]+Wo((t.push(t[0]),t),Yo([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length&lt;3?Uo(t):t[0]+Wo(t,function(t){var e,r,n,i,a=[],o=function(t){var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=ts(i,a);for(;++e&lt;r;)n[e]=(o+(o=ts(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;for(;++s&lt;l;)e=ts(t[s],t[s+1]),y(e)&lt;kt?o[s]=o[s+1]=0:(r=o[s]/e,n=o[s+1]/e,(i=r*r+n*n)&gt;9&amp;&amp;(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s&lt;=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Uo(t){return t.length&gt;1?t.join(&quot;L&quot;):t+&quot;Z&quot;}function qo(t){return t.join(&quot;L&quot;)+&quot;Z&quot;}function Ho(t){for(var e=0,r=t.length,n=t[0],i=[n[0],&quot;,&quot;,n[1]];++e&lt;r;)i.push(&quot;V&quot;,(n=t[e])[1],&quot;H&quot;,n[0]);return i.join(&quot;&quot;)}function Go(t){for(var e=0,r=t.length,n=t[0],i=[n[0],&quot;,&quot;,n[1]];++e&lt;r;)i.push(&quot;H&quot;,(n=t[e])[0],&quot;V&quot;,n[1]);return i.join(&quot;&quot;)}function Wo(t,e){if(e.length&lt;1||t.length!=e.length&amp;&amp;t.length!=e.length+2)return Uo(t);var r=t.length!=e.length,n=&quot;&quot;,i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&amp;&amp;(n+=&quot;Q&quot;+(a[0]-2*o[0]/3)+&quot;,&quot;+(a[1]-2*o[1]/3)+&quot;,&quot;+a[0]+&quot;,&quot;+a[1],i=t[1],l=2),e.length&gt;1){s=e[1],a=t[l],l++,n+=&quot;C&quot;+(i[0]+o[0])+&quot;,&quot;+(i[1]+o[1])+&quot;,&quot;+(a[0]-s[0])+&quot;,&quot;+(a[1]-s[1])+&quot;,&quot;+a[0]+&quot;,&quot;+a[1];for(var c=2;c&lt;e.length;c++,l++)a=t[l],s=e[c],n+=&quot;S&quot;+(a[0]-s[0])+&quot;,&quot;+(a[1]-s[1])+&quot;,&quot;+a[0]+&quot;,&quot;+a[1]}if(r){var u=t[l];n+=&quot;Q&quot;+(a[0]+2*s[0]/3)+&quot;,&quot;+(a[1]+2*s[1]/3)+&quot;,&quot;+u[0]+&quot;,&quot;+u[1]}return n}function Yo(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s&lt;l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Xo(t){if(t.length&lt;3)return Uo(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,&quot;,&quot;,a,&quot;L&quot;,Zo(Ko,o),&quot;,&quot;,Zo(Ko,s)];for(t.push(t[r-1]);++e&lt;=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Qo(l,o,s);return t.pop(),l.push(&quot;L&quot;,n),l.join(&quot;&quot;)}function Zo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}Vo.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var $o=[0,2/3,1/3,0],Jo=[0,1/3,2/3,0],Ko=[0,1/6,2/3,1/6];function Qo(t,e,r){t.push(&quot;C&quot;,Zo($o,e),&quot;,&quot;,Zo($o,r),&quot;,&quot;,Zo(Jo,e),&quot;,&quot;,Zo(Jo,r),&quot;,&quot;,Zo(Ko,e),&quot;,&quot;,Zo(Ko,r))}function ts(t,e){return(e[1]-t[1])/(e[0]-t[0])}function es(t){for(var e,r,n,i=-1,a=t.length;++i&lt;a;)r=(e=t[i])[0],n=e[1]-Et,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function rs(t){var e=ei,r=ei,n=0,i=ri,a=Wr,o=Uo,s=o.key,l=o,c=&quot;L&quot;,u=.7;function f(s){var f,h,p,d=[],g=[],m=[],v=-1,y=s.length,x=me(e),b=me(n),_=e===r?function(){return h}:me(r),w=n===i?function(){return p}:me(i);function k(){d.push(&quot;M&quot;,o(t(m),u),c,l(t(g.reverse()),u),&quot;Z&quot;)}for(;++v&lt;y;)a.call(this,f=s[v],v)?(g.push([h=+x.call(this,f,v),p=+b.call(this,f,v)]),m.push([+_.call(this,f,v),+w.call(this,f,v)])):g.length&amp;&amp;(k(),g=[],m=[]);return g.length&amp;&amp;k(),d.length?d.join(&quot;&quot;):null}return f.x=function(t){return arguments.length?(e=r=t,f):r},f.x0=function(t){return arguments.length?(e=t,f):e},f.x1=function(t){return arguments.length?(r=t,f):r},f.y=function(t){return arguments.length?(n=i=t,f):i},f.y0=function(t){return arguments.length?(n=t,f):n},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(a=t,f):a},f.interpolate=function(t){return arguments.length?(s=&quot;function&quot;==typeof t?o=t:(o=Vo.get(t)||Uo).key,l=o.reverse||o,c=o.closed?&quot;M&quot;:&quot;L&quot;,f):s},f.tension=function(t){return arguments.length?(u=t,f):u},f}function ns(t){return t.radius}function is(t){return[t.x,t.y]}function as(){return 64}function os(){return&quot;circle&quot;}function ss(t){var e=Math.sqrt(t/At);return&quot;M0,&quot;+e+&quot;A&quot;+e+&quot;,&quot;+e+&quot; 0 1,1 0,&quot;+-e+&quot;A&quot;+e+&quot;,&quot;+e+&quot; 0 1,1 0,&quot;+e+&quot;Z&quot;}t.svg.line.radial=function(){var t=jo(es);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Ho.reverse=Go,Go.reverse=Ho,t.svg.area=function(){return rs(z)},t.svg.area.radial=function(){var t=rs(es);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},t.svg.chord=function(){var t=Vn,e=Un,r=ns,n=Do,i=Ro;function a(r,n){var i,a,c=o(this,t,r,n),u=o(this,e,r,n);return&quot;M&quot;+c.p0+s(c.r,c.p1,c.a1-c.a0)+(a=u,(i=c).a0==a.a0&amp;&amp;i.a1==a.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+s(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+&quot;Z&quot;}function o(t,e,a,o){var s=e.call(t,a,o),l=r.call(t,s,o),c=n.call(t,s,o)-Et,u=i.call(t,s,o)-Et;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function s(t,e,r){return&quot;A&quot;+t+&quot;,&quot;+t+&quot; 0 &quot;+ +(r&gt;At)+&quot;,1 &quot;+e}function l(t,e,r,n){return&quot;Q 0,0 &quot;+n}return a.radius=function(t){return arguments.length?(r=me(t),a):r},a.source=function(e){return arguments.length?(t=me(e),a):t},a.target=function(t){return arguments.length?(e=me(t),a):e},a.startAngle=function(t){return arguments.length?(n=me(t),a):n},a.endAngle=function(t){return arguments.length?(i=me(t),a):i},a},t.svg.diagonal=function(){var t=Vn,e=Un,r=is;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return&quot;M&quot;+(l=l.map(r))[0]+&quot;C&quot;+l[1]+&quot; &quot;+l[2]+&quot; &quot;+l[3]}return n.source=function(e){return arguments.length?(t=me(e),n):t},n.target=function(t){return arguments.length?(e=me(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=is,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Et;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=as;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=me(e),r):t},r.size=function(t){return arguments.length?(e=me(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return&quot;M&quot;+-3*e+&quot;,&quot;+-e+&quot;H&quot;+-e+&quot;V&quot;+-3*e+&quot;H&quot;+e+&quot;V&quot;+-e+&quot;H&quot;+3*e+&quot;V&quot;+e+&quot;H&quot;+e+&quot;V&quot;+3*e+&quot;H&quot;+-e+&quot;V&quot;+e+&quot;H&quot;+-3*e+&quot;Z&quot;},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return&quot;M0,&quot;+-e+&quot;L&quot;+r+&quot;,0 0,&quot;+e+&quot; &quot;+-r+&quot;,0Z&quot;},square:function(t){var e=Math.sqrt(t)/2;return&quot;M&quot;+-e+&quot;,&quot;+-e+&quot;L&quot;+e+&quot;,&quot;+-e+&quot; &quot;+e+&quot;,&quot;+e+&quot; &quot;+-e+&quot;,&quot;+e+&quot;Z&quot;},&quot;triangle-down&quot;:function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return&quot;M0,&quot;+r+&quot;L&quot;+e+&quot;,&quot;+-r+&quot; &quot;+-e+&quot;,&quot;+-r+&quot;Z&quot;},&quot;triangle-up&quot;:function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return&quot;M0,&quot;+-r+&quot;L&quot;+e+&quot;,&quot;+r+&quot; &quot;+-e+&quot;,&quot;+r+&quot;Z&quot;}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Ct);Y.transition=function(t){for(var e,r,n=ds||++vs,i=bs(t),a=[],o=gs||{time:Date.now(),ease:ia,delay:0,duration:250},s=-1,l=this.length;++s&lt;l;){a.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u&lt;f;)(r=c[u])&amp;&amp;_s(r,u,i,n,o),e.push(r)}return ps(a,i,n)},Y.interrupt=function(t){return this.each(null==t?fs:hs(bs(t)))};var fs=hs(bs());function hs(t){return function(){var e,r,n;(e=this[t])&amp;&amp;(n=e[r=e.active])&amp;&amp;(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&amp;&amp;n.event.interrupt.call(this,this.__data__,n.index))}}function ps(t,e,r){return U(t,ms),t.namespace=e,t.id=r,t}var ds,gs,ms=[],vs=0;function ys(t,e,r,n){var i=t.id,a=t.namespace;return ut(t,&quot;function&quot;==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function xs(t){return null==t&amp;&amp;(t=&quot;&quot;),function(){this.textContent=t}}function bs(t){return null==t?&quot;__transition__&quot;:&quot;__transition_&quot;+t+&quot;__&quot;}function _s(t,e,r,n,i){var a,o,s,l,c,u=t[r]||(t[r]={active:0,count:0}),f=u[n];function h(r){var i=u.active,h=u[i];for(var d in h&amp;&amp;(h.timer.c=null,h.timer.t=NaN,--u.count,delete u[i],h.event&amp;&amp;h.event.interrupt.call(t,t.__data__,h.index)),u)if(+d&lt;n){var g=u[d];g.timer.c=null,g.timer.t=NaN,--u.count,delete u[d]}o.c=p,Me(function(){return o.c&amp;&amp;p(r||1)&amp;&amp;(o.c=null,o.t=NaN),1},0,a),u.active=n,f.event&amp;&amp;f.event.start.call(t,t.__data__,e),c=[],f.tween.forEach(function(r,n){(n=n.call(t,t.__data__,e))&amp;&amp;c.push(n)}),l=f.ease,s=f.duration}function p(i){for(var a=i/s,o=l(a),h=c.length;h&gt;0;)c[--h].call(t,o);if(a&gt;=1)return f.event&amp;&amp;f.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}f||(a=i.time,o=Me(function(t){var e=f.delay;if(o.t=e+a,e&lt;=t)return h(t-e);o.c=h},0,a),f=u[n]={tween:new b,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}ms.call=Y.call,ms.empty=Y.empty,ms.node=Y.node,ms.size=Y.size,t.transition=function(e,r){return e&amp;&amp;e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=ms,ms.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++s&lt;l;){o.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u&lt;f;)(n=c[u])&amp;&amp;(r=t.call(n,n.__data__,u,s))?(&quot;__data__&quot;in n&amp;&amp;(r.__data__=n.__data__),_s(r,u,a,i,n[a][i]),e.push(r)):e.push(null)}return ps(o,a,i)},ms.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=Z(t);for(var c=-1,u=this.length;++c&lt;u;)for(var f=this[c],h=-1,p=f.length;++h&lt;p;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,c),l.push(e=[]);for(var d=-1,g=r.length;++d&lt;g;)(i=r[d])&amp;&amp;_s(i,d,s,o,a),e.push(i)}return ps(l,s,o)},ms.filter=function(t){var e,r,n=[];&quot;function&quot;!=typeof t&amp;&amp;(t=ct(t));for(var i=0,a=this.length;i&lt;a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s&lt;l;s++)(r=o[s])&amp;&amp;t.call(r,r.__data__,s,i)&amp;&amp;e.push(r)}return ps(n,this.namespace,this.id)},ms.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length&lt;2?this.node()[n][r].tween.get(t):ut(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},ms.attr=function(e,r){if(arguments.length&lt;2){for(r in e)this.attr(r,e[r]);return this}var n=&quot;transform&quot;==e?ga:Zi,i=t.ns.qualify(e);function a(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}return ys(this,&quot;attr.&quot;+e,r,i.local?function(t){return null==t?o:(t+=&quot;&quot;,function(){var e,r=this.getAttributeNS(i.space,i.local);return r!==t&amp;&amp;(e=n(r,t),function(t){this.setAttributeNS(i.space,i.local,e(t))})})}:function(t){return null==t?a:(t+=&quot;&quot;,function(){var e,r=this.getAttribute(i);return r!==t&amp;&amp;(e=n(r,t),function(t){this.setAttribute(i,e(t))})})})},ms.attrTween=function(e,r){var n=t.ns.qualify(e);return this.tween(&quot;attr.&quot;+e,n.local?function(t,e){var i=r.call(this,t,e,this.getAttributeNS(n.space,n.local));return i&amp;&amp;function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,e){var i=r.call(this,t,e,this.getAttribute(n));return i&amp;&amp;function(t){this.setAttribute(n,i(t))}})},ms.style=function(t,e,r){var n=arguments.length;if(n&lt;3){if(&quot;string&quot;!=typeof t){for(r in n&lt;2&amp;&amp;(e=&quot;&quot;),t)this.style(r,t[r],e);return this}r=&quot;&quot;}function i(){this.style.removeProperty(t)}return ys(this,&quot;style.&quot;+t,e,function(e){return null==e?i:(e+=&quot;&quot;,function(){var n,i=o(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&amp;&amp;(n=Zi(i,e),function(e){this.style.setProperty(t,n(e),r)})})})},ms.styleTween=function(t,e,r){return arguments.length&lt;3&amp;&amp;(r=&quot;&quot;),this.tween(&quot;style.&quot;+t,function(n,i){var a=e.call(this,n,i,o(this).getComputedStyle(this,null).getPropertyValue(t));return a&amp;&amp;function(e){this.style.setProperty(t,a(e),r)}})},ms.text=function(t){return ys(this,&quot;text&quot;,t,xs)},ms.remove=function(){var t=this.namespace;return this.each(&quot;end.transition&quot;,function(){var e;this[t].count&lt;2&amp;&amp;(e=this.parentNode)&amp;&amp;e.removeChild(this)})},ms.ease=function(e){var r=this.id,n=this.namespace;return arguments.length&lt;1?this.node()[n][r].ease:(&quot;function&quot;!=typeof e&amp;&amp;(e=t.ease.apply(t,arguments)),ut(this,function(t){t[n][r].ease=e}))},ms.delay=function(t){var e=this.id,r=this.namespace;return arguments.length&lt;1?this.node()[r][e].delay:ut(this,&quot;function&quot;==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},ms.duration=function(t){var e=this.id,r=this.namespace;return arguments.length&lt;1?this.node()[r][e].duration:ut(this,&quot;function&quot;==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},ms.each=function(e,r){var n=this.id,i=this.namespace;if(arguments.length&lt;2){var a=gs,o=ds;try{ds=n,ut(this,function(t,r,a){gs=t[i][n],e.call(t,t.__data__,r,a)})}finally{gs=a,ds=o}}else ut(this,function(a){var o=a[i][n];(o.event||(o.event=t.dispatch(&quot;start&quot;,&quot;end&quot;,&quot;interrupt&quot;))).on(e,r)});return this},ms.transition=function(){for(var t,e,r,n=this.id,i=++vs,a=this.namespace,o=[],s=0,l=this.length;s&lt;l;s++){o.push(t=[]);for(var c,u=0,f=(c=this[s]).length;u&lt;f;u++)(e=c[u])&amp;&amp;_s(e,u,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return ps(o,a,i)},t.svg.axis=function(){var e,r=t.scale.linear(),i=ws,a=6,o=6,s=3,l=[10],c=null;function u(n){n.each(function(){var n,u=t.select(this),f=this.__chart__||r,h=this.__chart__=r.copy(),p=null==c?h.ticks?h.ticks.apply(h,l):h.domain():c,d=null==e?h.tickFormat?h.tickFormat.apply(h,l):z:e,g=u.selectAll(&quot;.tick&quot;).data(p,h),m=g.enter().insert(&quot;g&quot;,&quot;.domain&quot;).attr(&quot;class&quot;,&quot;tick&quot;).style(&quot;opacity&quot;,kt),v=t.transition(g.exit()).style(&quot;opacity&quot;,kt).remove(),y=t.transition(g.order()).style(&quot;opacity&quot;,1),x=Math.max(a,0)+s,b=uo(h),_=u.selectAll(&quot;.domain&quot;).data([0]),w=(_.enter().append(&quot;path&quot;).attr(&quot;class&quot;,&quot;domain&quot;),t.transition(_));m.append(&quot;line&quot;),m.append(&quot;text&quot;);var k,M,A,T,S=m.select(&quot;line&quot;),E=y.select(&quot;line&quot;),C=g.select(&quot;text&quot;).text(d),L=m.select(&quot;text&quot;),P=y.select(&quot;text&quot;),O=&quot;top&quot;===i||&quot;left&quot;===i?-1:1;if(&quot;bottom&quot;===i||&quot;top&quot;===i?(n=Ms,k=&quot;x&quot;,A=&quot;y&quot;,M=&quot;x2&quot;,T=&quot;y2&quot;,C.attr(&quot;dy&quot;,O&lt;0?&quot;0em&quot;:&quot;.71em&quot;).style(&quot;text-anchor&quot;,&quot;middle&quot;),w.attr(&quot;d&quot;,&quot;M&quot;+b[0]+&quot;,&quot;+O*o+&quot;V0H&quot;+b[1]+&quot;V&quot;+O*o)):(n=As,k=&quot;y&quot;,A=&quot;x&quot;,M=&quot;y2&quot;,T=&quot;x2&quot;,C.attr(&quot;dy&quot;,&quot;.32em&quot;).style(&quot;text-anchor&quot;,O&lt;0?&quot;end&quot;:&quot;start&quot;),w.attr(&quot;d&quot;,&quot;M&quot;+O*o+&quot;,&quot;+b[0]+&quot;H0V&quot;+b[1]+&quot;H&quot;+O*o)),S.attr(T,O*a),L.attr(A,O*x),E.attr(M,0).attr(T,O*a),P.attr(k,0).attr(A,O*x),h.rangeBand){var I=h,D=I.rangeBand()/2;f=h=function(t){return I(t)+D}}else f.rangeBand?f=h:v.call(n,h,f);m.call(n,f,h),y.call(n,h,h)})}return u.scale=function(t){return arguments.length?(r=t,u):r},u.orient=function(t){return arguments.length?(i=t in ks?t+&quot;&quot;:ws,u):i},u.ticks=function(){return arguments.length?(l=n(arguments),u):l},u.tickValues=function(t){return arguments.length?(c=t,u):c},u.tickFormat=function(t){return arguments.length?(e=t,u):e},u.tickSize=function(t){var e=arguments.length;return e?(a=+t,o=+arguments[e-1],u):a},u.innerTickSize=function(t){return arguments.length?(a=+t,u):a},u.outerTickSize=function(t){return arguments.length?(o=+t,u):o},u.tickPadding=function(t){return arguments.length?(s=+t,u):s},u.tickSubdivide=function(){return arguments.length&amp;&amp;u},u};var ws=&quot;bottom&quot;,ks={top:1,right:1,bottom:1,left:1};function Ms(t,e,r){t.attr(&quot;transform&quot;,function(t){var n=e(t);return&quot;translate(&quot;+(isFinite(n)?n:r(t))+&quot;,0)&quot;})}function As(t,e,r){t.attr(&quot;transform&quot;,function(t){var n=e(t);return&quot;translate(0,&quot;+(isFinite(n)?n:r(t))+&quot;)&quot;})}t.svg.brush=function(){var e,r,n=j(h,&quot;brushstart&quot;,&quot;brush&quot;,&quot;brushend&quot;),i=null,a=null,s=[0,0],l=[0,0],c=!0,u=!0,f=Ss[0];function h(e){e.each(function(){var e=t.select(this).style(&quot;pointer-events&quot;,&quot;all&quot;).style(&quot;-webkit-tap-highlight-color&quot;,&quot;rgba(0,0,0,0)&quot;).on(&quot;mousedown.brush&quot;,m).on(&quot;touchstart.brush&quot;,m),r=e.selectAll(&quot;.background&quot;).data([0]);r.enter().append(&quot;rect&quot;).attr(&quot;class&quot;,&quot;background&quot;).style(&quot;visibility&quot;,&quot;hidden&quot;).style(&quot;cursor&quot;,&quot;crosshair&quot;),e.selectAll(&quot;.extent&quot;).data([0]).enter().append(&quot;rect&quot;).attr(&quot;class&quot;,&quot;extent&quot;).style(&quot;cursor&quot;,&quot;move&quot;);var n=e.selectAll(&quot;.resize&quot;).data(f,z);n.exit().remove(),n.enter().append(&quot;g&quot;).attr(&quot;class&quot;,function(t){return&quot;resize &quot;+t}).style(&quot;cursor&quot;,function(t){return Ts[t]}).append(&quot;rect&quot;).attr(&quot;x&quot;,function(t){return/[ew]$/.test(t)?-3:null}).attr(&quot;y&quot;,function(t){return/^[ns]/.test(t)?-3:null}).attr(&quot;width&quot;,6).attr(&quot;height&quot;,6).style(&quot;visibility&quot;,&quot;hidden&quot;),n.style(&quot;display&quot;,h.empty()?&quot;none&quot;:null);var o,s=t.transition(e),l=t.transition(r);i&amp;&amp;(o=uo(i),l.attr(&quot;x&quot;,o[0]).attr(&quot;width&quot;,o[1]-o[0]),d(s)),a&amp;&amp;(o=uo(a),l.attr(&quot;y&quot;,o[0]).attr(&quot;height&quot;,o[1]-o[0]),g(s)),p(s)})}function p(t){t.selectAll(&quot;.resize&quot;).attr(&quot;transform&quot;,function(t){return&quot;translate(&quot;+s[+/e$/.test(t)]+&quot;,&quot;+l[+/^s/.test(t)]+&quot;)&quot;})}function d(t){t.select(&quot;.extent&quot;).attr(&quot;x&quot;,s[0]),t.selectAll(&quot;.extent,.n&gt;rect,.s&gt;rect&quot;).attr(&quot;width&quot;,s[1]-s[0])}function g(t){t.select(&quot;.extent&quot;).attr(&quot;y&quot;,l[0]),t.selectAll(&quot;.extent,.e&gt;rect,.w&gt;rect&quot;).attr(&quot;height&quot;,l[1]-l[0])}function m(){var f,m,v=this,y=t.select(t.event.target),x=n.of(v,arguments),b=t.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&amp;&amp;i,k=!/^(e|w)$/.test(_)&amp;&amp;a,M=y.classed(&quot;extent&quot;),A=xt(v),T=t.mouse(v),S=t.select(o(v)).on(&quot;keydown.brush&quot;,function(){32==t.event.keyCode&amp;&amp;(M||(f=null,T[0]-=s[1],T[1]-=l[1],M=2),F())}).on(&quot;keyup.brush&quot;,function(){32==t.event.keyCode&amp;&amp;2==M&amp;&amp;(T[0]+=s[1],T[1]+=l[1],M=0,F())});if(t.event.changedTouches?S.on(&quot;touchmove.brush&quot;,L).on(&quot;touchend.brush&quot;,P):S.on(&quot;mousemove.brush&quot;,L).on(&quot;mouseup.brush&quot;,P),b.interrupt().selectAll(&quot;*&quot;).interrupt(),M)T[0]=s[0]-T[0],T[1]=l[0]-T[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);m=[s[1-E]-T[0],l[1-C]-T[1]],T[0]=s[E],T[1]=l[C]}else t.event.altKey&amp;&amp;(f=T.slice());function L(){var e=t.mouse(v),r=!1;m&amp;&amp;(e[0]+=m[0],e[1]+=m[1]),M||(t.event.altKey?(f||(f=[(s[0]+s[1])/2,(l[0]+l[1])/2]),T[0]=s[+(e[0]&lt;f[0])],T[1]=l[+(e[1]&lt;f[1])]):f=null),w&amp;&amp;z(e,i,0)&amp;&amp;(d(b),r=!0),k&amp;&amp;z(e,a,1)&amp;&amp;(g(b),r=!0),r&amp;&amp;(p(b),x({type:&quot;brush&quot;,mode:M?&quot;move&quot;:&quot;resize&quot;}))}function z(t,n,i){var a,o,h=uo(n),p=h[0],d=h[1],g=T[i],m=i?l:s,v=m[1]-m[0];if(M&amp;&amp;(p-=g,d-=v+g),a=(i?u:c)?Math.max(p,Math.min(d,t[i])):t[i],M?o=(a+=g)+v:(f&amp;&amp;(g=Math.max(p,Math.min(d,2*f[i]-a))),g&lt;a?(o=a,a=g):o=g),m[0]!=a||m[1]!=o)return i?r=null:e=null,m[0]=a,m[1]=o,!0}function P(){L(),b.style(&quot;pointer-events&quot;,&quot;all&quot;).selectAll(&quot;.resize&quot;).style(&quot;display&quot;,h.empty()?&quot;none&quot;:null),t.select(&quot;body&quot;).style(&quot;cursor&quot;,null),S.on(&quot;mousemove.brush&quot;,null).on(&quot;mouseup.brush&quot;,null).on(&quot;touchmove.brush&quot;,null).on(&quot;touchend.brush&quot;,null).on(&quot;keydown.brush&quot;,null).on(&quot;keyup.brush&quot;,null),A(),x({type:&quot;brushend&quot;})}b.style(&quot;pointer-events&quot;,&quot;none&quot;).selectAll(&quot;.resize&quot;).style(&quot;display&quot;,null),t.select(&quot;body&quot;).style(&quot;cursor&quot;,y.style(&quot;cursor&quot;)),x({type:&quot;brushstart&quot;}),L()}return h.event=function(i){i.each(function(){var i=n.of(this,arguments),a={x:s,y:l,i:e,j:r},o=this.__chart__||a;this.__chart__=a,ds?t.select(this).transition().each(&quot;start.brush&quot;,function(){e=o.i,r=o.j,s=o.x,l=o.y,i({type:&quot;brushstart&quot;})}).tween(&quot;brush:brush&quot;,function(){var t=$i(s,a.x),n=$i(l,a.y);return e=r=null,function(e){s=a.x=t(e),l=a.y=n(e),i({type:&quot;brush&quot;,mode:&quot;resize&quot;})}}).each(&quot;end.brush&quot;,function(){e=a.i,r=a.j,i({type:&quot;brush&quot;,mode:&quot;resize&quot;}),i({type:&quot;brushend&quot;})}):(i({type:&quot;brushstart&quot;}),i({type:&quot;brush&quot;,mode:&quot;resize&quot;}),i({type:&quot;brushend&quot;}))})},h.x=function(t){return arguments.length?(f=Ss[!(i=t)&lt;&lt;1|!a],h):i},h.y=function(t){return arguments.length?(f=Ss[!i&lt;&lt;1|!(a=t)],h):a},h.clamp=function(t){return arguments.length?(i&amp;&amp;a?(c=!!t[0],u=!!t[1]):i?c=!!t:a&amp;&amp;(u=!!t),h):i&amp;&amp;a?[c,u]:i?c:a?u:null},h.extent=function(t){var n,o,c,u,f;return arguments.length?(i&amp;&amp;(n=t[0],o=t[1],a&amp;&amp;(n=n[0],o=o[0]),e=[n,o],i.invert&amp;&amp;(n=i(n),o=i(o)),o&lt;n&amp;&amp;(f=n,n=o,o=f),n==s[0]&amp;&amp;o==s[1]||(s=[n,o])),a&amp;&amp;(c=t[0],u=t[1],i&amp;&amp;(c=c[1],u=u[1]),r=[c,u],a.invert&amp;&amp;(c=a(c),u=a(u)),u&lt;c&amp;&amp;(f=c,c=u,u=f),c==l[0]&amp;&amp;u==l[1]||(l=[c,u])),h):(i&amp;&amp;(e?(n=e[0],o=e[1]):(n=s[0],o=s[1],i.invert&amp;&amp;(n=i.invert(n),o=i.invert(o)),o&lt;n&amp;&amp;(f=n,n=o,o=f))),a&amp;&amp;(r?(c=r[0],u=r[1]):(c=l[0],u=l[1],a.invert&amp;&amp;(c=a.invert(c),u=a.invert(u)),u&lt;c&amp;&amp;(f=c,c=u,u=f))),i&amp;&amp;a?[[n,c],[o,u]]:i?[n,o]:a&amp;&amp;[c,u])},h.clear=function(){return h.empty()||(s=[0,0],l=[0,0],e=r=null),h},h.empty=function(){return!!i&amp;&amp;s[0]==s[1]||!!a&amp;&amp;l[0]==l[1]},t.rebind(h,n,&quot;on&quot;)};var Ts={n:&quot;ns-resize&quot;,e:&quot;ew-resize&quot;,s:&quot;ns-resize&quot;,w:&quot;ew-resize&quot;,nw:&quot;nwse-resize&quot;,ne:&quot;nesw-resize&quot;,se:&quot;nwse-resize&quot;,sw:&quot;nesw-resize&quot;},Ss=[[&quot;n&quot;,&quot;e&quot;,&quot;s&quot;,&quot;w&quot;,&quot;nw&quot;,&quot;ne&quot;,&quot;se&quot;,&quot;sw&quot;],[&quot;e&quot;,&quot;w&quot;],[&quot;n&quot;,&quot;s&quot;],[]],Es=Oe.format=sr.timeFormat,Cs=Es.utc,Ls=Cs(&quot;%Y-%m-%dT%H:%M:%S.%LZ&quot;);function zs(t){return t.toISOString()}function Ps(e,r,n){function i(t){return e(t)}function a(e,n){var i=(e[1]-e[0])/n,a=t.bisect(Is,i);return a==Is.length?[r.year,xo(e.map(function(t){return t/31536e6}),n)[2]]:a?r[i/Is[a-1]&lt;Is[a]/i?a-1:a]:[Bs,xo(e,n)[2]]}return i.invert=function(t){return Os(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain().map(Os)},i.nice=function(t,e){var r=i.domain(),n=co(r),o=null==t?a(n,10):&quot;number&quot;==typeof t&amp;&amp;a(n,t);function s(r){return!isNaN(r)&amp;&amp;!t.range(r,Os(+r+1),e).length}return o&amp;&amp;(t=o[0],e=o[1]),i.domain(ho(r,e&gt;1?{floor:function(e){for(;s(e=t.floor(e));)e=Os(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Os(+e+1);return e}}:t))},i.ticks=function(t,e){var r=co(i.domain()),n=null==t?a(r,10):&quot;number&quot;==typeof t?a(r,t):!t.range&amp;&amp;[{range:t},e];return n&amp;&amp;(t=n[0],e=n[1]),t.range(r[0],Os(+r[1]+1),e&lt;1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Ps(e.copy(),r,n)},vo(i,e)}function Os(t){return new Date(t)}Es.iso=Date.prototype.toISOString&amp;&amp;+new Date(&quot;2000-01-01T00:00:00.000Z&quot;)?zs:Ls,zs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},zs.toString=Ls.toString,Oe.second=Be(function(t){return new Ie(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Oe.seconds=Oe.second.range,Oe.seconds.utc=Oe.second.utc.range,Oe.minute=Be(function(t){return new Ie(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Oe.minutes=Oe.minute.range,Oe.minutes.utc=Oe.minute.utc.range,Oe.hour=Be(function(t){var e=t.getTimezoneOffset()/60;return new Ie(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Oe.hours=Oe.hour.range,Oe.hours.utc=Oe.hour.utc.range,Oe.month=Be(function(t){return(t=Oe.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Oe.months=Oe.month.range,Oe.months.utc=Oe.month.utc.range;var Is=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[Oe.second,1],[Oe.second,5],[Oe.second,15],[Oe.second,30],[Oe.minute,1],[Oe.minute,5],[Oe.minute,15],[Oe.minute,30],[Oe.hour,1],[Oe.hour,3],[Oe.hour,6],[Oe.hour,12],[Oe.day,1],[Oe.day,2],[Oe.week,1],[Oe.month,1],[Oe.month,3],[Oe.year,1]],Rs=Es.multi([[&quot;.%L&quot;,function(t){return t.getMilliseconds()}],[&quot;:%S&quot;,function(t){return t.getSeconds()}],[&quot;%I:%M&quot;,function(t){return t.getMinutes()}],[&quot;%I %p&quot;,function(t){return t.getHours()}],[&quot;%a %d&quot;,function(t){return t.getDay()&amp;&amp;1!=t.getDate()}],[&quot;%b %d&quot;,function(t){return 1!=t.getDate()}],[&quot;%B&quot;,function(t){return t.getMonth()}],[&quot;%Y&quot;,Wr]]),Bs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(Os)},floor:z,ceil:z};Ds.year=Oe.year,Oe.scale=function(){return Ps(t.scale.linear(),Ds,Rs)};var Fs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Cs.multi([[&quot;.%L&quot;,function(t){return t.getUTCMilliseconds()}],[&quot;:%S&quot;,function(t){return t.getUTCSeconds()}],[&quot;%I:%M&quot;,function(t){return t.getUTCMinutes()}],[&quot;%I %p&quot;,function(t){return t.getUTCHours()}],[&quot;%a %d&quot;,function(t){return t.getUTCDay()&amp;&amp;1!=t.getUTCDate()}],[&quot;%b %d&quot;,function(t){return 1!=t.getUTCDate()}],[&quot;%B&quot;,function(t){return t.getUTCMonth()}],[&quot;%Y&quot;,Wr]]);function js(t){return JSON.parse(t.responseText)}function Vs(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}Fs.year=Oe.year.utc,Oe.scale.utc=function(){return Ps(t.scale.linear(),Fs,Ns)},t.text=ve(function(t){return t.responseText}),t.json=function(t,e){return ye(t,&quot;application/json&quot;,js,e)},t.html=function(t,e){return ye(t,&quot;text/html&quot;,Vs,e)},t.xml=ve(function(t){return t.responseXML}),&quot;object&quot;==typeof e&amp;&amp;e.exports?e.exports=t:this.d3=t}()},{}],148:[function(t,e,r){e.exports=function(){for(var t=0;t&lt;arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],149:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;incremental-convex-hull&quot;),i=t(&quot;uniq&quot;);function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a&lt;i;++a){var o=n[a]-r[a];if(o)return o}return 0}e.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s&lt;1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map(function(t,e){return[t[0],e]});n.sort(function(t,e){return t[0]-e[0]});for(var i=new Array(t-1),a=1;a&lt;t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}r&amp;&amp;i.push([-1,i[0][1]],[i[t-1][1],-1]);return i}(r,t,e);for(var l=new Array(r),c=1,u=0;u&lt;r;++u){for(var f=t[u],h=new Array(s+1),p=0,d=0;d&lt;s;++d){var g=f[d];h[d]=g,p+=g*g}h[s]=p,l[u]=new a(h,u),c=Math.max(p,c)}i(l,o),r=l.length;for(var m=new Array(r+s+1),v=new Array(r+s+1),y=(s+1)*(s+1)*c,x=new Array(s+1),u=0;u&lt;=s;++u)x[u]=0;x[s]=y,m[0]=x.slice(),v[0]=-1;for(var u=0;u&lt;=s;++u){var h=x.slice();h[u]=1,m[u+1]=h,v[u+1]=-1}for(var u=0;u&lt;r;++u){var b=l[u];m[u+s+1]=b.point,v[u+s+1]=b.index}var _=n(m,!1);_=e?_.filter(function(t){for(var e=0,r=0;r&lt;=s;++r){var n=v[t[r]];if(n&lt;0&amp;&amp;++e&gt;=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e&lt;=s;++e){var r=v[t[e]];if(r&lt;0)return!1;t[e]=r}return!0});if(1&amp;s)for(var u=0;u&lt;_.length;++u){var b=_[u],h=b[0];b[0]=b[1],b[1]=h}return _}},{&quot;incremental-convex-hull&quot;:394,uniq:521}],150:[function(t,e,r){&quot;use strict&quot;;e.exports=a;var n=(a.canvas=document.createElement(&quot;canvas&quot;)).getContext(&quot;2d&quot;),i=o([32,126]);function a(t,e){Array.isArray(t)&amp;&amp;(t=t.join(&quot;, &quot;));var r,a={},s=16,l=.05;e&amp;&amp;(2===e.length&amp;&amp;&quot;number&quot;==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&amp;&amp;(r=e.pairs),e.fontSize&amp;&amp;(s=e.fontSize),null!=e.threshold&amp;&amp;(l=e.threshold))),r||(r=i),n.font=s+&quot;px &quot;+t;for(var c=0;c&lt;r.length;c++){var u=r[c],f=n.measureText(u[0]).width+n.measureText(u[1]).width,h=n.measureText(u).width;if(Math.abs(f-h)&gt;s*l){var p=(h-f)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r&lt;=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i&lt;t[1];i++){var a=n+String.fromCharCode(i);e.push(a)}return e}a.createPairs=o,a.ascii=i},{}],151:[function(t,e,r){(function(t){var r=!1;if(&quot;undefined&quot;!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);if(n[0]=1,r=!0,1072693248===i[1]){e.exports=function(t){return n[0]=t,[i[0],i[1]]},e.exports.pack=function(t,e){return i[0]=t,i[1]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[0]},e.exports.hi=function(t){return n[0]=t,i[1]}}else if(1072693248===i[0]){e.exports=function(t){return n[0]=t,[i[1],i[0]]},e.exports.pack=function(t,e){return i[1]=t,i[0]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[1]},e.exports.hi=function(t){return n[0]=t,i[0]}}else r=!1}if(!r){var a=new t(8);e.exports=function(t){return a.writeDoubleLE(t,0,!0),[a.readUInt32LE(0,!0),a.readUInt32LE(4,!0)]},e.exports.pack=function(t,e){return a.writeUInt32LE(t,0,!0),a.writeUInt32LE(e,4,!0),a.readDoubleLE(0,!0)},e.exports.lo=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(0,!0)},e.exports.hi=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)&gt;&gt;&gt;31},e.exports.exponent=function(t){return(e.exports.hi(t)&lt;&lt;1&gt;&gt;&gt;21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&amp;n;return 2146435072&amp;n&amp;&amp;(i+=1&lt;&lt;20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&amp;e.exports.hi(t))}}).call(this,t(&quot;buffer&quot;).Buffer)},{buffer:92}],152:[function(t,e,r){var n=t(&quot;abs-svg-path&quot;),i=t(&quot;normalize-svg-path&quot;),a={M:&quot;moveTo&quot;,C:&quot;bezierCurveTo&quot;};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{&quot;abs-svg-path&quot;:47,&quot;normalize-svg-path&quot;:432}],153:[function(t,e,r){e.exports=function(t){switch(t){case&quot;int8&quot;:return Int8Array;case&quot;int16&quot;:return Int16Array;case&quot;int32&quot;:return Int32Array;case&quot;uint8&quot;:return Uint8Array;case&quot;uint16&quot;:return Uint16Array;case&quot;uint32&quot;:return Uint32Array;case&quot;float32&quot;:return Float32Array;case&quot;float64&quot;:return Float64Array;case&quot;array&quot;:return Array;case&quot;uint8_clamped&quot;:return Uint8ClampedArray}}},{}],154:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){switch(&quot;undefined&quot;==typeof e&amp;&amp;(e=0),typeof t){case&quot;number&quot;:if(t&gt;0)return function(t,e){var r,n;for(r=new Array(t),n=0;n&lt;t;++n)r[n]=e;return r}(0|t,e);break;case&quot;object&quot;:if(&quot;number&quot;==typeof t.length)return function t(e,r,n){var i=0|e[n];if(i&lt;=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a&lt;i;++a)o[a]=r;else for(a=0;a&lt;i;++a)o[a]=t(e,r,n+1);return o}(t,e,0)}return[]}},{}],155:[function(t,e,r){&quot;use strict&quot;;function n(t,e,r){r=r||2;var n,s,l,c,u,p,g,m=e&amp;&amp;e.length,v=m?e[0]*r:t.length,y=i(t,0,v,r,!0),x=[];if(!y)return x;if(m&amp;&amp;(y=function(t,e,r,n){var o,s,l,c,u,p=[];for(o=0,s=e.length;o&lt;s;o++)l=e[o]*n,c=o&lt;s-1?e[o+1]*n:t.length,(u=i(t,l,c,n,!1))===u.next&amp;&amp;(u.steiner=!0),p.push(d(u));for(p.sort(f),o=0;o&lt;p.length;o++)h(p[o],r),r=a(r,r.next);return r}(t,e,y,r)),t.length&gt;80*r){n=l=t[0],s=c=t[1];for(var b=r;b&lt;v;b+=r)(u=t[b])&lt;n&amp;&amp;(n=u),(p=t[b+1])&lt;s&amp;&amp;(s=p),u&gt;l&amp;&amp;(l=u),p&gt;c&amp;&amp;(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function i(t,e,r,n,i){var a,o;if(i===A(t,e,r,n)&gt;0)for(a=e;a&lt;r;a+=n)o=w(a,t[a],t[a+1],o);else for(a=r-n;a&gt;=e;a-=n)o=w(a,t[a],t[a+1],o);return o&amp;&amp;y(o,o.next)&amp;&amp;(k(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&amp;&amp;0!==v(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,f,h){if(t){!h&amp;&amp;f&amp;&amp;function(t,e,r,n){var i=t;do{null===i.z&amp;&amp;(i.z=p(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e&lt;c&amp;&amp;(s++,n=n.nextZ);e++);for(l=c;s&gt;0||l&gt;0&amp;&amp;n;)0!==s&amp;&amp;(0===l||!n||r.z&lt;=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o&gt;1)}(i)}(t,n,i,f);for(var d,g,m=t;t.prev!==t.next;)if(d=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(t,e,r),e,r,n,i,f,2):2===h&amp;&amp;u(t,e,r,n,i,f):o(a(t),e,r,n,i,f,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(v(e,r,n)&gt;=0)return!1;for(var i=t.next.next;i!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&amp;&amp;v(i.prev,i,i.next)&gt;=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(v(i,a,o)&gt;=0)return!1;for(var s=i.x&lt;a.x?i.x&lt;o.x?i.x:o.x:a.x&lt;o.x?a.x:o.x,l=i.y&lt;a.y?i.y&lt;o.y?i.y:o.y:a.y&lt;o.y?a.y:o.y,c=i.x&gt;a.x?i.x&gt;o.x?i.x:o.x:a.x&gt;o.x?a.x:o.x,u=i.y&gt;a.y?i.y&gt;o.y?i.y:o.y:a.y&gt;o.y?a.y:o.y,f=p(s,l,e,r,n),h=p(c,u,e,r,n),d=t.prevZ,m=t.nextZ;d&amp;&amp;d.z&gt;=f&amp;&amp;m&amp;&amp;m.z&lt;=h;){if(d!==t.prev&amp;&amp;d!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;v(d.prev,d,d.next)&gt;=0)return!1;if(d=d.prevZ,m!==t.prev&amp;&amp;m!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&amp;&amp;v(m.prev,m,m.next)&gt;=0)return!1;m=m.nextZ}for(;d&amp;&amp;d.z&gt;=f;){if(d!==t.prev&amp;&amp;d!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;v(d.prev,d,d.next)&gt;=0)return!1;d=d.prevZ}for(;m&amp;&amp;m.z&lt;=h;){if(m!==t.prev&amp;&amp;m!==t.next&amp;&amp;g(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&amp;&amp;v(m.prev,m,m.next)&gt;=0)return!1;m=m.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!y(i,a)&amp;&amp;x(i,n,n.next,a)&amp;&amp;b(i,a)&amp;&amp;b(a,i)&amp;&amp;(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),k(n),k(n.next),n=t=a),n=n.next}while(n!==t);return n}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&amp;&amp;m(l,c)){var u=_(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a&lt;=n.y&amp;&amp;a&gt;=n.next.y&amp;&amp;n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s&lt;=i&amp;&amp;s&gt;o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x&lt;n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;n=r.next;for(;n!==c;)i&gt;=n.x&amp;&amp;n.x&gt;=u&amp;&amp;i!==n.x&amp;&amp;g(a&lt;f?i:o,a,u,f,a&lt;f?o:i,a,n.x,n.y)&amp;&amp;((l=Math.abs(a-n.y)/(i-n.x))&lt;h||l===h&amp;&amp;n.x&gt;r.x)&amp;&amp;b(n,t)&amp;&amp;(r=n,h=l),n=n.next;return r}(t,e)){var r=_(e,t);a(r,r.next)}}function p(t,e,r,n,i){return(t=1431655765&amp;((t=858993459&amp;((t=252645135&amp;((t=16711935&amp;((t=32767*(t-r)*i)|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2))|t&lt;&lt;1))|(e=1431655765&amp;((e=858993459&amp;((e=252645135&amp;((e=16711935&amp;((e=32767*(e-n)*i)|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))|e&lt;&lt;1))&lt;&lt;1}function d(t){var e=t,r=t;do{e.x&lt;r.x&amp;&amp;(r=e),e=e.next}while(e!==t);return r}function g(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)&gt;=0&amp;&amp;(t-o)*(n-s)-(r-o)*(e-s)&gt;=0&amp;&amp;(r-o)*(a-s)-(i-o)*(n-s)&gt;=0}function m(t,e){return t.next.i!==e.i&amp;&amp;t.prev.i!==e.i&amp;&amp;!function(t,e){var r=t;do{if(r.i!==t.i&amp;&amp;r.next.i!==t.i&amp;&amp;r.i!==e.i&amp;&amp;r.next.i!==e.i&amp;&amp;x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&amp;&amp;b(t,e)&amp;&amp;b(e,t)&amp;&amp;function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y&gt;a!=r.next.y&gt;a&amp;&amp;r.next.y!==r.y&amp;&amp;i&lt;(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&amp;&amp;(n=!n),r=r.next}while(r!==t);return n}(t,e)}function v(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&amp;&amp;t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&amp;&amp;y(r,n)||y(t,n)&amp;&amp;y(r,e))||v(t,e,r)&gt;0!=v(t,e,n)&gt;0&amp;&amp;v(r,n,t)&gt;0!=v(r,n,e)&gt;0}function b(t,e){return v(t.prev,t,t.next)&lt;0?v(t,e,t.next)&gt;=0&amp;&amp;v(t,t.prev,e)&gt;=0:v(t,e,t.prev)&lt;0||v(t,t.next,e)&lt;0}function _(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&amp;&amp;(t.prevZ.nextZ=t.nextZ),t.nextZ&amp;&amp;(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var i=0,a=e,o=r-n;a&lt;r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}e.exports=n,e.exports.default=n,n.deviation=function(t,e,r,n){var i=e&amp;&amp;e.length,a=i?e[0]*r:t.length,o=Math.abs(A(t,0,a,r));if(i)for(var s=0,l=e.length;s&lt;l;s++){var c=e[s]*r,u=s&lt;l-1?e[s+1]*r:t.length;o-=Math.abs(A(t,c,u,r))}var f=0;for(s=0;s&lt;n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&amp;&amp;0===f?0:Math.abs((f-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i&lt;t.length;i++){for(var a=0;a&lt;t[i].length;a++)for(var o=0;o&lt;e;o++)r.vertices.push(t[i][a][o]);i&gt;0&amp;&amp;(n+=t[i-1].length,r.holes.push(n))}return r}},{}],156:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=t.length;if(&quot;number&quot;!=typeof e){e=0;for(var i=0;i&lt;r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;for(var o=new Array(e),i=0;i&lt;e;++i)o[i]=[];for(var i=0;i&lt;r;++i){var a=t[i];o[a[0]].push(a[1]),o[a[1]].push(a[0])}for(var s=0;s&lt;e;++s)n(o[s],function(t,e){return t-e});return o};var n=t(&quot;uniq&quot;)},{uniq:521}],157:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../../object/valid-value&quot;);e.exports=function(){return n(this).length=0,this}},{&quot;../../object/valid-value&quot;:189}],158:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Array.from:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:159,&quot;./shim&quot;:160}],159:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t,e,r=Array.from;return&quot;function&quot;==typeof r&amp;&amp;(e=r(t=[&quot;raz&quot;,&quot;dwa&quot;]),Boolean(e&amp;&amp;e!==t&amp;&amp;&quot;dwa&quot;===e[1]))}},{}],160:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es6-symbol&quot;).iterator,i=t(&quot;../../function/is-arguments&quot;),a=t(&quot;../../function/is-function&quot;),o=t(&quot;../../number/to-pos-integer&quot;),s=t(&quot;../../object/valid-callable&quot;),l=t(&quot;../../object/valid-value&quot;),c=t(&quot;../../object/is-value&quot;),u=t(&quot;../../string/is-string&quot;),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(t){var e,r,g,m,v,y,x,b,_,w,k=arguments[1],M=arguments[2];if(t=Object(l(t)),c(k)&amp;&amp;s(k),this&amp;&amp;this!==Array&amp;&amp;a(this))e=this;else{if(!k){if(i(t))return 1!==(v=t.length)?Array.apply(null,t):((m=new Array(1))[0]=t[0],m);if(f(t)){for(m=new Array(v=t.length),r=0;r&lt;v;++r)m[r]=t[r];return m}}m=[]}if(!f(t))if(void 0!==(_=t[n])){for(x=s(_).call(t),e&amp;&amp;(m=new e),b=x.next(),r=0;!b.done;)w=k?h.call(k,M,b.value,r):b.value,e?(p.value=w,d(m,r,p)):m[r]=w,b=x.next(),++r;v=r}else if(u(t)){for(v=t.length,e&amp;&amp;(m=new e),r=0,g=0;r&lt;v;++r)w=t[r],r+1&lt;v&amp;&amp;(y=w.charCodeAt(0))&gt;=55296&amp;&amp;y&lt;=56319&amp;&amp;(w+=t[++r]),w=k?h.call(k,M,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&amp;&amp;(m=new e(v)),r=0;r&lt;v;++r)w=k?h.call(k,M,t[r],r):t[r],e?(p.value=w,d(m,r,p)):m[r]=w;return e&amp;&amp;(p.value=null,m.length=v),m}},{&quot;../../function/is-arguments&quot;:161,&quot;../../function/is-function&quot;:162,&quot;../../number/to-pos-integer&quot;:168,&quot;../../object/is-value&quot;:178,&quot;../../object/valid-callable&quot;:187,&quot;../../object/valid-value&quot;:189,&quot;../../string/is-string&quot;:193,&quot;es6-symbol&quot;:203}],161:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(t){return n.call(t)===i}},{}],162:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString,i=n.call(t(&quot;./noop&quot;));e.exports=function(t){return&quot;function&quot;==typeof t&amp;&amp;n.call(t)===i}},{&quot;./noop&quot;:163}],163:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){}},{}],164:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Math.sign:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:165,&quot;./shim&quot;:166}],165:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t=Math.sign;return&quot;function&quot;==typeof t&amp;&amp;(1===t(10)&amp;&amp;-1===t(-20))}},{}],166:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t&gt;0?1:-1}},{}],167:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../math/sign&quot;),i=Math.abs,a=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&amp;&amp;isFinite(t)?n(t)*a(i(t)):t}},{&quot;../math/sign&quot;:164}],168:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./to-integer&quot;),i=Math.max;e.exports=function(t){return i(0,n(t))}},{&quot;./to-integer&quot;:167}],169:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./valid-callable&quot;),i=t(&quot;./valid-value&quot;),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,c){var u,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),u=s(r),h&amp;&amp;u.sort(&quot;function&quot;==typeof h?a.call(h,r):void 0),&quot;function&quot;!=typeof t&amp;&amp;(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,f,r[t],t,r,n):e})}}},{&quot;./valid-callable&quot;:187,&quot;./valid-value&quot;:189}],170:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Object.assign:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:171,&quot;./shim&quot;:172}],171:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t,e=Object.assign;return&quot;function&quot;==typeof e&amp;&amp;(e(t={foo:&quot;raz&quot;},{bar:&quot;dwa&quot;},{trzy:&quot;trzy&quot;}),t.foo+t.bar+t.trzy===&quot;razdwatrzy&quot;)}},{}],172:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../keys&quot;),i=t(&quot;../valid-value&quot;),a=Math.max;e.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o&lt;l;++o)e=arguments[o],n(e).forEach(s);if(void 0!==r)throw r;return t}},{&quot;../keys&quot;:179,&quot;../valid-value&quot;:189}],173:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../array/from&quot;),i=t(&quot;./assign&quot;),a=t(&quot;./valid-value&quot;);e.exports=function(t){var e=Object(a(t)),r=arguments[1],o=Object(arguments[2]);if(e!==t&amp;&amp;!r)return e;var s={};return r?n(r,function(e){(o.ensure||e in t)&amp;&amp;(s[e]=t[e])}):i(s,t),s}},{&quot;../array/from&quot;:158,&quot;./assign&quot;:170,&quot;./valid-value&quot;:189}],174:[function(t,e,r){&quot;use strict&quot;;var n,i,a,o,s=Object.create;t(&quot;./set-prototype-of/is-implemented&quot;)()||(n=t(&quot;./set-prototype-of/shim&quot;)),e.exports=n?1!==n.level?s:(i={},a={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){a[t]=&quot;__proto__&quot;!==t?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(i,a),Object.defineProperty(n,&quot;nullPolyfill&quot;,{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},{&quot;./set-prototype-of/is-implemented&quot;:185,&quot;./set-prototype-of/shim&quot;:186}],175:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./_iterate&quot;)(&quot;forEach&quot;)},{&quot;./_iterate&quot;:169}],176:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return&quot;function&quot;==typeof t}},{}],177:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-value&quot;),i={function:!0,object:!0};e.exports=function(t){return n(t)&amp;&amp;i[typeof t]||!1}},{&quot;./is-value&quot;:178}],178:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../function/noop&quot;)();e.exports=function(t){return t!==n&amp;&amp;null!==t}},{&quot;../function/noop&quot;:163}],179:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Object.keys:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:180,&quot;./shim&quot;:181}],180:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){try{return Object.keys(&quot;primitive&quot;),!0}catch(t){return!1}}},{}],181:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;../is-value&quot;),i=Object.keys;e.exports=function(t){return i(n(t)?Object(t):t)}},{&quot;../is-value&quot;:178}],182:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./valid-callable&quot;),i=t(&quot;./for-each&quot;),a=Function.prototype.call;e.exports=function(t,e){var r={},o=arguments[2];return n(e),i(t,function(t,n,i,s){r[n]=a.call(e,o,t,n,i,s)}),r}},{&quot;./for-each&quot;:175,&quot;./valid-callable&quot;:187}],183:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-value&quot;),i=Array.prototype.forEach,a=Object.create;e.exports=function(t){var e=a(null);return i.call(arguments,function(t){n(t)&amp;&amp;function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)}),e}},{&quot;./is-value&quot;:178}],184:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Object.setPrototypeOf:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:185,&quot;./shim&quot;:186}],185:[function(t,e,r){&quot;use strict&quot;;var n=Object.create,i=Object.getPrototypeOf,a={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return&quot;function&quot;==typeof t&amp;&amp;i(t(e(null),a))===a}},{}],186:[function(t,e,r){&quot;use strict&quot;;var n,i,a,o,s=t(&quot;../is-object&quot;),l=t(&quot;../valid-value&quot;),c=Object.prototype.isPrototypeOf,u=Object.defineProperty,f={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError(&quot;Prototype must be null or an object&quot;)},e.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,&quot;__proto__&quot;);if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&amp;&amp;{level:1})}())?(2===i.level?i.set?(o=i.set,a=function(t,e){return o.call(n(t,e),e),t}):a=function(t,e){return n(t,e).__proto__=e,t}:a=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&amp;&amp;delete t.nullPolyfill.__proto__,null===r&amp;&amp;(r=t.nullPolyfill),e.__proto__=r,i&amp;&amp;u(t.nullPolyfill,&quot;__proto__&quot;,f),e},Object.defineProperty(a,&quot;level&quot;,{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null,t(&quot;../create&quot;)},{&quot;../create&quot;:174,&quot;../is-object&quot;:177,&quot;../valid-value&quot;:189}],187:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){if(&quot;function&quot;!=typeof t)throw new TypeError(t+&quot; is not a function&quot;);return t}},{}],188:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-object&quot;);e.exports=function(t){if(!n(t))throw new TypeError(t+&quot; is not an Object&quot;);return t}},{&quot;./is-object&quot;:177}],189:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-value&quot;);e.exports=function(t){if(!n(t))throw new TypeError(&quot;Cannot use null or undefined&quot;);return t}},{&quot;./is-value&quot;:178}],190:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?String.prototype.contains:t(&quot;./shim&quot;)},{&quot;./is-implemented&quot;:191,&quot;./shim&quot;:192}],191:[function(t,e,r){&quot;use strict&quot;;var n=&quot;razdwatrzy&quot;;e.exports=function(){return&quot;function&quot;==typeof n.contains&amp;&amp;(!0===n.contains(&quot;dwa&quot;)&amp;&amp;!1===n.contains(&quot;foo&quot;))}},{}],192:[function(t,e,r){&quot;use strict&quot;;var n=String.prototype.indexOf;e.exports=function(t){return n.call(this,t,arguments[1])&gt;-1}},{}],193:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString,i=n.call(&quot;&quot;);e.exports=function(t){return&quot;string&quot;==typeof t||t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;(t instanceof String||n.call(t)===i)||!1}},{}],194:[function(t,e,r){&quot;use strict&quot;;var n=Object.create(null),i=Math.random;e.exports=function(){var t;do{t=i().toString(36).slice(2)}while(n[t]);return t}},{}],195:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/set-prototype-of&quot;),a=t(&quot;es5-ext/string/#/contains&quot;),o=t(&quot;d&quot;),s=t(&quot;es6-symbol&quot;),l=t(&quot;./&quot;),c=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);l.call(this,t),e=e?a.call(e,&quot;key+value&quot;)?&quot;key+value&quot;:a.call(e,&quot;key&quot;)?&quot;key&quot;:&quot;value&quot;:&quot;value&quot;,c(this,&quot;__kind__&quot;,o(&quot;&quot;,e))},i&amp;&amp;i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o(function(t){return&quot;value&quot;===this.__kind__?this.__list__[t]:&quot;key+value&quot;===this.__kind__?[t,this.__list__[t]]:t})}),c(n.prototype,s.toStringTag,o(&quot;c&quot;,&quot;Array Iterator&quot;))},{&quot;./&quot;:198,d:138,&quot;es5-ext/object/set-prototype-of&quot;:184,&quot;es5-ext/string/#/contains&quot;:190,&quot;es6-symbol&quot;:203}],196:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/function/is-arguments&quot;),i=t(&quot;es5-ext/object/valid-callable&quot;),a=t(&quot;es5-ext/string/is-string&quot;),o=t(&quot;./get&quot;),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(t,e){var r,u,f,h,p,d,g,m,v=arguments[2];if(s(t)||n(t)?r=&quot;array&quot;:a(t)?r=&quot;string&quot;:t=o(t),i(e),f=function(){h=!0},&quot;array&quot;!==r)if(&quot;string&quot;!==r)for(u=t.next();!u.done;){if(l.call(e,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p&lt;d&amp;&amp;(g=t[p],p+1&lt;d&amp;&amp;(m=g.charCodeAt(0))&gt;=55296&amp;&amp;m&lt;=56319&amp;&amp;(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,function(t){return l.call(e,v,t,f),h})}},{&quot;./get&quot;:197,&quot;es5-ext/function/is-arguments&quot;:161,&quot;es5-ext/object/valid-callable&quot;:187,&quot;es5-ext/string/is-string&quot;:193}],197:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/function/is-arguments&quot;),i=t(&quot;es5-ext/string/is-string&quot;),a=t(&quot;./array&quot;),o=t(&quot;./string&quot;),s=t(&quot;./valid-iterable&quot;),l=t(&quot;es6-symbol&quot;).iterator;e.exports=function(t){return&quot;function&quot;==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},{&quot;./array&quot;:195,&quot;./string&quot;:200,&quot;./valid-iterable&quot;:201,&quot;es5-ext/function/is-arguments&quot;:161,&quot;es5-ext/string/is-string&quot;:193,&quot;es6-symbol&quot;:203}],198:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/array/#/clear&quot;),a=t(&quot;es5-ext/object/assign&quot;),o=t(&quot;es5-ext/object/valid-callable&quot;),s=t(&quot;es5-ext/object/valid-value&quot;),l=t(&quot;d&quot;),c=t(&quot;d/auto-bind&quot;),u=t(&quot;es6-symbol&quot;),f=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);h(this,{__list__:l(&quot;w&quot;,s(t)),__context__:l(&quot;w&quot;,e),__nextIndex__:l(&quot;w&quot;,0)}),e&amp;&amp;(o(e.on),e.on(&quot;_add&quot;,this._onAdd),e.on(&quot;_delete&quot;,this._onDelete),e.on(&quot;_clear&quot;,this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l(function(){var t;if(this.__list__)return this.__redo__&amp;&amp;void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__&lt;this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:l(function(t){return this.__list__[t]}),_unBind:l(function(){this.__list__=null,delete this.__redo__,this.__context__&amp;&amp;(this.__context__.off(&quot;_add&quot;,this._onAdd),this.__context__.off(&quot;_delete&quot;,this._onDelete),this.__context__.off(&quot;_clear&quot;,this._onClear),this.__context__=null)}),toString:l(function(){return&quot;[object &quot;+(this[u.toStringTag]||&quot;Object&quot;)+&quot;]&quot;})},c({_onAdd:l(function(t){t&gt;=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(e,r){e&gt;=t&amp;&amp;(this.__redo__[r]=++e)},this),this.__redo__.push(t)):f(this,&quot;__redo__&quot;,l(&quot;c&quot;,[t])))}),_onDelete:l(function(t){var e;t&gt;=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&amp;&amp;(-1!==(e=this.__redo__.indexOf(t))&amp;&amp;this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e&gt;t&amp;&amp;(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&amp;&amp;i.call(this.__redo__),this.__nextIndex__=0})}))),f(n.prototype,u.iterator,l(function(){return this}))},{d:138,&quot;d/auto-bind&quot;:137,&quot;es5-ext/array/#/clear&quot;:157,&quot;es5-ext/object/assign&quot;:170,&quot;es5-ext/object/valid-callable&quot;:187,&quot;es5-ext/object/valid-value&quot;:189,&quot;es6-symbol&quot;:203}],199:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;es5-ext/function/is-arguments&quot;),i=t(&quot;es5-ext/object/is-value&quot;),a=t(&quot;es5-ext/string/is-string&quot;),o=t(&quot;es6-symbol&quot;).iterator,s=Array.isArray;e.exports=function(t){return!!i(t)&amp;&amp;(!!s(t)||(!!a(t)||(!!n(t)||&quot;function&quot;==typeof t[o])))}},{&quot;es5-ext/function/is-arguments&quot;:161,&quot;es5-ext/object/is-value&quot;:178,&quot;es5-ext/string/is-string&quot;:193,&quot;es6-symbol&quot;:203}],200:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/set-prototype-of&quot;),a=t(&quot;d&quot;),o=t(&quot;es6-symbol&quot;),s=t(&quot;./&quot;),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);t=String(t),s.call(this,t),l(this,&quot;__length__&quot;,a(&quot;&quot;,t.length))},i&amp;&amp;i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a(function(){if(this.__list__)return this.__nextIndex__&lt;this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:a(function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0))&gt;=55296&amp;&amp;e&lt;=56319?r+this.__list__[this.__nextIndex__++]:r})}),l(n.prototype,o.toStringTag,a(&quot;c&quot;,&quot;String Iterator&quot;))},{&quot;./&quot;:198,d:138,&quot;es5-ext/object/set-prototype-of&quot;:184,&quot;es6-symbol&quot;:203}],201:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-iterable&quot;);e.exports=function(t){if(!n(t))throw new TypeError(t+&quot; is not iterable&quot;);return t}},{&quot;./is-iterable&quot;:199}],202:[function(t,e,r){(function(n,i){!function(t,n){&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){&quot;use strict&quot;;function e(t){return&quot;function&quot;==typeof t}var r=Array.isArray?Array.isArray:function(t){return&quot;[object Array]&quot;===Object.prototype.toString.call(t)},a=0,o=void 0,s=void 0,l=function(t,e){g[a]=t,g[a+1]=e,2===(a+=2)&amp;&amp;(s?s(m):_())};var c=&quot;undefined&quot;!=typeof window?window:void 0,u=c||{},f=u.MutationObserver||u.WebKitMutationObserver,h=&quot;undefined&quot;==typeof self&amp;&amp;&quot;undefined&quot;!=typeof n&amp;&amp;&quot;[object process]&quot;==={}.toString.call(n),p=&quot;undefined&quot;!=typeof Uint8ClampedArray&amp;&amp;&quot;undefined&quot;!=typeof importScripts&amp;&amp;&quot;undefined&quot;!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(m,1)}}var g=new Array(1e3);function m(){for(var t=0;t&lt;a;t+=2){(0,g[t])(g[t+1]),g[t]=void 0,g[t+1]=void 0}a=0}var v,y,x,b,_=void 0;function w(t,e){var r=arguments,n=this,i=new this.constructor(A);void 0===i[M]&amp;&amp;U(i);var a,o=n._state;return o?(a=r[o-1],l(function(){return j(o,i,a,n._result)})):R(n,i,t,e),i}function k(t){if(t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;t.constructor===this)return t;var e=new this(A);return P(e,t),e}h?_=function(){return n.nextTick(m)}:f?(y=0,x=new f(m),b=document.createTextNode(&quot;&quot;),x.observe(b,{characterData:!0}),_=function(){b.data=y=++y%2}):p?((v=new MessageChannel).port1.onmessage=m,_=function(){return v.port2.postMessage(0)}):_=void 0===c&amp;&amp;&quot;function&quot;==typeof t?function(){try{var e=t(&quot;vertx&quot;);return o=e.runOnLoop||e.runOnContext,function(){o(m)}}catch(t){return d()}}():d();var M=Math.random().toString(36).substring(16);function A(){}var T=void 0,S=1,E=2,C=new F;function L(t){try{return t.then}catch(t){return C.error=t,C}}function z(t,r,n){r.constructor===t.constructor&amp;&amp;n===w&amp;&amp;r.constructor.resolve===k?function(t,e){e._state===S?I(t,e._result):e._state===E?D(t,e._result):R(e,void 0,function(e){return P(t,e)},function(e){return D(t,e)})}(t,r):n===C?D(t,C.error):void 0===n?I(t,r):e(n)?function(t,e,r){l(function(t){var n=!1,i=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?P(t,r):I(t,r))},function(e){n||(n=!0,D(t,e))},t._label);!n&amp;&amp;i&amp;&amp;(n=!0,D(t,i))},t)}(t,r,n):I(t,r)}function P(t,e){var r;t===e?D(t,new TypeError(&quot;You cannot resolve a promise with itself&quot;)):&quot;function&quot;==typeof(r=e)||&quot;object&quot;==typeof r&amp;&amp;null!==r?z(t,e,L(e)):I(t,e)}function O(t){t._onerror&amp;&amp;t._onerror(t._result),B(t)}function I(t,e){t._state===T&amp;&amp;(t._result=e,t._state=S,0!==t._subscribers.length&amp;&amp;l(B,t))}function D(t,e){t._state===T&amp;&amp;(t._state=E,t._result=e,l(O,t))}function R(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+S]=r,i[a+E]=n,0===a&amp;&amp;t._state&amp;&amp;l(B,t)}function B(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,i=void 0,a=t._result,o=0;o&lt;e.length;o+=3)n=e[o],i=e[o+r],n?j(r,n,i,a):i(a);t._subscribers.length=0}}function F(){this.error=null}var N=new F;function j(t,r,n,i){var a=e(n),o=void 0,s=void 0,l=void 0,c=void 0;if(a){if((o=function(t,e){try{return t(e)}catch(t){return N.error=t,N}}(n,i))===N?(c=!0,s=o.error,o=null):l=!0,r===o)return void D(r,new TypeError(&quot;A promises callback cannot return that same promise.&quot;))}else o=i,l=!0;r._state!==T||(a&amp;&amp;l?P(r,o):c?D(r,s):t===S?I(r,o):t===E&amp;&amp;D(r,o))}var V=0;function U(t){t[M]=V++,t._state=void 0,t._result=void 0,t._subscribers=[]}function q(t,e){this._instanceConstructor=t,this.promise=new t(A),this.promise[M]||U(this.promise),r(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?I(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&amp;&amp;I(this.promise,this._result))):D(this.promise,new Error(&quot;Array Methods must be provided an Array&quot;))}function H(t){this[M]=V++,this._result=this._state=void 0,this._subscribers=[],A!==t&amp;&amp;(&quot;function&quot;!=typeof t&amp;&amp;function(){throw new TypeError(&quot;You must pass a resolver function as the first argument to the promise constructor&quot;)}(),this instanceof H?function(t,e){try{e(function(e){P(t,e)},function(e){D(t,e)})}catch(e){D(t,e)}}(this,t):function(){throw new TypeError(&quot;Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.&quot;)}())}function G(){var t=void 0;if(&quot;undefined&quot;!=typeof i)t=i;else if(&quot;undefined&quot;!=typeof self)t=self;else try{t=Function(&quot;return this&quot;)()}catch(t){throw new Error(&quot;polyfill failed because global object is unavailable in this environment&quot;)}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if(&quot;[object Promise]&quot;===r&amp;&amp;!e.cast)return}t.Promise=H}return q.prototype._enumerate=function(){for(var t=this.length,e=this._input,r=0;this._state===T&amp;&amp;r&lt;t;r++)this._eachEntry(e[r],r)},q.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===k){var i=L(t);if(i===w&amp;&amp;t._state!==T)this._settledAt(t._state,e,t._result);else if(&quot;function&quot;!=typeof i)this._remaining--,this._result[e]=t;else if(r===H){var a=new r(A);z(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},q.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===T&amp;&amp;(this._remaining--,t===E?D(n,r):this._result[e]=r),0===this._remaining&amp;&amp;I(n,this._result)},q.prototype._willSettleAt=function(t,e){var r=this;R(t,void 0,function(t){return r._settledAt(S,e,t)},function(t){return r._settledAt(E,e,t)})},H.all=function(t){return new q(this,t).promise},H.race=function(t){var e=this;return r(t)?new e(function(r,n){for(var i=t.length,a=0;a&lt;i;a++)e.resolve(t[a]).then(r,n)}):new e(function(t,e){return e(new TypeError(&quot;You must pass an array to race.&quot;))})},H.resolve=k,H.reject=function(t){var e=new this(A);return D(e,t),e},H._setScheduler=function(t){s=t},H._setAsap=function(t){l=t},H._asap=l,H.prototype={constructor:H,then:w,catch:function(t){return this.then(null,t)}},G(),H.polyfill=G,H.Promise=H,H})}).call(this,t(&quot;_process&quot;),&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{_process:462}],203:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?Symbol:t(&quot;./polyfill&quot;)},{&quot;./is-implemented&quot;:204,&quot;./polyfill&quot;:206}],204:[function(t,e,r){&quot;use strict&quot;;var n={object:!0,symbol:!0};e.exports=function(){var t;if(&quot;function&quot;!=typeof Symbol)return!1;t=Symbol(&quot;test symbol&quot;);try{String(t)}catch(t){return!1}return!!n[typeof Symbol.iterator]&amp;&amp;(!!n[typeof Symbol.toPrimitive]&amp;&amp;!!n[typeof Symbol.toStringTag])}},{}],205:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return!!t&amp;&amp;(&quot;symbol&quot;==typeof t||!!t.constructor&amp;&amp;(&quot;Symbol&quot;===t.constructor.name&amp;&amp;&quot;Symbol&quot;===t[t.constructor.toStringTag]))}},{}],206:[function(t,e,r){&quot;use strict&quot;;var n,i,a,o,s=t(&quot;d&quot;),l=t(&quot;./validate-symbol&quot;),c=Object.create,u=Object.defineProperties,f=Object.defineProperty,h=Object.prototype,p=c(null);if(&quot;function&quot;==typeof Symbol){n=Symbol;try{String(n()),o=!0}catch(t){}}var d,g=(d=c(null),function(t){for(var e,r,n=0;d[t+(n||&quot;&quot;)];)++n;return d[t+=n||&quot;&quot;]=!0,f(h,e=&quot;@@&quot;+t,s.gs(null,function(t){r||(r=!0,f(this,e,s(t)),r=!1)})),e});a=function(t){if(this instanceof a)throw new TypeError(&quot;Symbol is not a constructor&quot;);return i(t)},e.exports=i=function t(e){var r;if(this instanceof t)throw new TypeError(&quot;Symbol is not a constructor&quot;);return o?n(e):(r=c(a.prototype),e=void 0===e?&quot;&quot;:String(e),u(r,{__description__:s(&quot;&quot;,e),__name__:s(&quot;&quot;,g(e))}))},u(i,{for:s(function(t){return p[t]?p[t]:p[t]=i(String(t))}),keyFor:s(function(t){var e;for(e in l(t),p)if(p[e]===t)return e}),hasInstance:s(&quot;&quot;,n&amp;&amp;n.hasInstance||i(&quot;hasInstance&quot;)),isConcatSpreadable:s(&quot;&quot;,n&amp;&amp;n.isConcatSpreadable||i(&quot;isConcatSpreadable&quot;)),iterator:s(&quot;&quot;,n&amp;&amp;n.iterator||i(&quot;iterator&quot;)),match:s(&quot;&quot;,n&amp;&amp;n.match||i(&quot;match&quot;)),replace:s(&quot;&quot;,n&amp;&amp;n.replace||i(&quot;replace&quot;)),search:s(&quot;&quot;,n&amp;&amp;n.search||i(&quot;search&quot;)),species:s(&quot;&quot;,n&amp;&amp;n.species||i(&quot;species&quot;)),split:s(&quot;&quot;,n&amp;&amp;n.split||i(&quot;split&quot;)),toPrimitive:s(&quot;&quot;,n&amp;&amp;n.toPrimitive||i(&quot;toPrimitive&quot;)),toStringTag:s(&quot;&quot;,n&amp;&amp;n.toStringTag||i(&quot;toStringTag&quot;)),unscopables:s(&quot;&quot;,n&amp;&amp;n.unscopables||i(&quot;unscopables&quot;))}),u(a.prototype,{constructor:s(i),toString:s(&quot;&quot;,function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return&quot;Symbol (&quot;+l(this).__description__+&quot;)&quot;}),valueOf:s(function(){return l(this)})}),f(i.prototype,i.toPrimitive,s(&quot;&quot;,function(){var t=l(this);return&quot;symbol&quot;==typeof t?t:t.toString()})),f(i.prototype,i.toStringTag,s(&quot;c&quot;,&quot;Symbol&quot;)),f(a.prototype,i.toStringTag,s(&quot;c&quot;,i.prototype[i.toStringTag])),f(a.prototype,i.toPrimitive,s(&quot;c&quot;,i.prototype[i.toPrimitive]))},{&quot;./validate-symbol&quot;:207,d:138}],207:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./is-symbol&quot;);e.exports=function(t){if(!n(t))throw new TypeError(t+&quot; is not a symbol&quot;);return t}},{&quot;./is-symbol&quot;:205}],208:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./is-implemented&quot;)()?WeakMap:t(&quot;./polyfill&quot;)},{&quot;./is-implemented&quot;:209,&quot;./polyfill&quot;:211}],209:[function(t,e,r){&quot;use strict&quot;;e.exports=function(){var t,e;if(&quot;function&quot;!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},&quot;one&quot;],[{},&quot;two&quot;],[{},&quot;three&quot;]])}catch(t){return!1}return&quot;[object WeakMap]&quot;===String(t)&amp;&amp;(&quot;function&quot;==typeof t.set&amp;&amp;(t.set({},1)===t&amp;&amp;(&quot;function&quot;==typeof t.delete&amp;&amp;(&quot;function&quot;==typeof t.has&amp;&amp;&quot;one&quot;===t.get(e)))))}},{}],210:[function(t,e,r){&quot;use strict&quot;;e.exports=&quot;function&quot;==typeof WeakMap&amp;&amp;&quot;[object WeakMap]&quot;===Object.prototype.toString.call(new WeakMap)},{}],211:[function(t,e,r){&quot;use strict&quot;;var n,i=t(&quot;es5-ext/object/set-prototype-of&quot;),a=t(&quot;es5-ext/object/valid-object&quot;),o=t(&quot;es5-ext/object/valid-value&quot;),s=t(&quot;es5-ext/string/random-uniq&quot;),l=t(&quot;d&quot;),c=t(&quot;es6-iterator/get&quot;),u=t(&quot;es6-iterator/for-of&quot;),f=t(&quot;es6-symbol&quot;).toStringTag,h=t(&quot;./is-native-implemented&quot;),p=Array.isArray,d=Object.defineProperty,g=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError(&quot;Constructor requires 'new'&quot;);return t=h&amp;&amp;i&amp;&amp;WeakMap!==n?i(new WeakMap,m(this)):this,null!=e&amp;&amp;(p(e)||(e=c(e))),d(t,&quot;__weakMapData__&quot;,l(&quot;c&quot;,&quot;$weakMap$&quot;+s())),e?(u(e,function(e){o(e),t.set(e[0],e[1])}),t):t},h&amp;&amp;(i&amp;&amp;i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:l(n)})),Object.defineProperties(n.prototype,{delete:l(function(t){return!!g.call(a(t),this.__weakMapData__)&amp;&amp;(delete t[this.__weakMapData__],!0)}),get:l(function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:l(function(t){return g.call(a(t),this.__weakMapData__)}),set:l(function(t,e){return d(a(t),this.__weakMapData__,l(&quot;c&quot;,e)),this}),toString:l(function(){return&quot;[object WeakMap]&quot;})}),d(n.prototype,f,l(&quot;c&quot;,&quot;WeakMap&quot;))},{&quot;./is-native-implemented&quot;:210,d:138,&quot;es5-ext/object/set-prototype-of&quot;:184,&quot;es5-ext/object/valid-object&quot;:188,&quot;es5-ext/object/valid-value&quot;:189,&quot;es5-ext/string/random-uniq&quot;:194,&quot;es6-iterator/for-of&quot;:196,&quot;es6-iterator/get&quot;:197,&quot;es6-symbol&quot;:203}],212:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}},{}],213:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=typeof t;if(&quot;string&quot;===e){var r=t;if(0===(t=+t)&amp;&amp;function(t){for(var e,r=t.length,n=0;n&lt;r;n++)if(((e=t.charCodeAt(n))&lt;9||e&gt;13)&amp;&amp;32!==e&amp;&amp;133!==e&amp;&amp;160!==e&amp;&amp;5760!==e&amp;&amp;6158!==e&amp;&amp;(e&lt;8192||e&gt;8205)&amp;&amp;8232!==e&amp;&amp;8233!==e&amp;&amp;8239!==e&amp;&amp;8287!==e&amp;&amp;8288!==e&amp;&amp;12288!==e&amp;&amp;65279!==e)return!1;return!0}(r))return!1}else if(&quot;number&quot;!==e)return!1;return t-t&lt;1}},{}],214:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:if(&quot;number&quot;==typeof t){var n=l(t);return new o(n,n,0)}return new o(t,l(t.length),0);case 2:if(&quot;number&quot;==typeof e){var n=l(t.length);return new o(t,n,+e)}r=0;case 3:if(t.length!==e.length)throw new Error(&quot;state and velocity lengths must match&quot;);return new o(t,e,r)}};var n=t(&quot;cubic-hermite&quot;),i=t(&quot;binary-search-bounds&quot;);function a(t,e,r){return Math.min(e,Math.max(t,r))}function o(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n&lt;this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}var s=o.prototype;function l(t){for(var e=new Array(t),r=0;r&lt;t;++r)e[r]=0;return e}s.flush=function(t){var e=i.gt(this._time,t)-1;e&lt;=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},s.curve=function(t){var e=this._time,r=e.length,o=i.le(e,t),s=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,f=this.bounds;if(o&lt;0)for(var h=u-1,p=0;p&lt;u;++p,--h)s[p]=l[h];else if(o&gt;=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p&lt;u;++p,--h)s[p]=l[h]+d*c[h]}else{h=u*(o+1)-1;var g=e[o],m=e[o+1]-g||1,v=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(p=0;p&lt;u;++p,--h)v[p]=l[h],x[p]=c[h]*m,y[p]=l[h+u],b[p]=c[h+u]*m,_=_&amp;&amp;v[p]===y[p]&amp;&amp;x[p]===b[p]&amp;&amp;0===x[p];if(_)for(p=0;p&lt;u;++p)s[p]=v[p];else n(v,x,y,b,(t-g)/m,s)}var w=f[0],k=f[1];for(p=0;p&lt;u;++p)s[p]=a(w[p],k[p],s[p]);return s},s.dcurve=function(t){var e=this._time,r=e.length,a=i.le(e,t),o=this._scratch[0],s=this._state,l=this._velocity,c=this.dimension;if(a&gt;=r-1)for(var u=s.length-1,f=(e[r-1],0);f&lt;c;++f,--u)o[f]=l[u];else{u=c*(a+1)-1;var h=e[a],p=e[a+1]-h||1,d=this._scratch[1],g=this._scratch[2],m=this._scratch[3],v=this._scratch[4],y=!0;for(f=0;f&lt;c;++f,--u)d[f]=s[u],m[f]=l[u]*p,g[f]=s[u+c],v[f]=l[u+c]*p,y=y&amp;&amp;d[f]===g[f]&amp;&amp;m[f]===v[f]&amp;&amp;0===m[f];if(y)for(f=0;f&lt;c;++f)o[f]=0;else{n.derivative(d,m,g,v,(t-h)/p,o);for(f=0;f&lt;c;++f)o[f]/=p}}return o},s.lastT=function(){var t=this._time;return t[t.length-1]},s.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r&gt;=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t&lt;e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1];this._time.push(e,t);for(var u=0;u&lt;2;++u)for(var f=0;f&lt;r;++f)n.push(n[o++]),i.push(0);this._time.push(t);for(f=r;f&gt;0;--f)n.push(a(l[f-1],c[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t&lt;e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=t-e,l=this.bounds,c=l[0],u=l[1],f=s&gt;1e-6?1/s:0;this._time.push(t);for(var h=r;h&gt;0;--h){var p=a(c[h-1],u[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t&lt;this.lastT()||arguments.length!==e+1)){var r=this._state,n=this._velocity,i=this.bounds,o=i[0],s=i[1];this._time.push(t);for(var l=e;l&gt;0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t&lt;=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,f=u&gt;1e-6?1/u:0;this._time.push(t);for(var h=r;h&gt;0;--h){var p=arguments[h];n.push(a(l[h-1],c[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t&lt;e)){var r=this.dimension,n=this._state,i=this._velocity,o=n.length-r,s=this.bounds,l=s[0],c=s[1],u=t-e;this._time.push(t);for(var f=r-1;f&gt;=0;--f)n.push(a(l[f],c[f],n[o]+u*i[o])),i.push(0),o+=1}}},{&quot;binary-search-bounds&quot;:78,&quot;cubic-hermite&quot;:132}],215:[function(t,e,r){var n=t(&quot;dtype&quot;);e.exports=function(t,e,r){if(!t)throw new TypeError(&quot;must specify data as first parameter&quot;);if(r=0|+(r||0),Array.isArray(t)&amp;&amp;t[0]&amp;&amp;&quot;number&quot;==typeof t[0][0]){var i,a,o,s,l=t[0].length,c=t.length*l;e&amp;&amp;&quot;string&quot;!=typeof e||(e=new(n(e||&quot;float32&quot;))(c+r));var u=e.length-r;if(c!==u)throw new Error(&quot;source length &quot;+c+&quot; (&quot;+l+&quot;x&quot;+t.length+&quot;) does not match destination length &quot;+u);for(i=0,o=r;i&lt;t.length;i++)for(a=0;a&lt;l;a++)e[o++]=null===t[i][a]?NaN:t[i][a]}else if(e&amp;&amp;&quot;string&quot;!=typeof e)e.set(t,r);else{var f=n(e||&quot;float32&quot;);if(Array.isArray(t)||&quot;array&quot;===e)for(e=new f(t.length+r),i=0,o=r,s=e.length;o&lt;s;o++,i++)e[o]=null===t[i]?NaN:t[i];else 0===r?e=new f(t):(e=new f(t.length+r)).set(t,r)}return e}},{dtype:153}],216:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;css-font/stringify&quot;),i=[32,126];e.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement(&quot;canvas&quot;),a=t.font,o=&quot;number&quot;==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;a&amp;&amp;&quot;string&quot;!=typeof a&amp;&amp;(a=n(a));if(Array.isArray(s)){if(2===s.length&amp;&amp;&quot;number&quot;==typeof s[0]&amp;&amp;&quot;number&quot;==typeof s[1]){for(var l=[],c=s[0],u=0;c&lt;=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split(&quot;&quot;);e=e.slice(),r.width=e[0],r.height=e[1];var f=r.getContext(&quot;2d&quot;);f.fillStyle=&quot;#000&quot;,f.fillRect(0,0,r.width,r.height),f.font=a,f.textAlign=&quot;center&quot;,f.textBaseline=&quot;middle&quot;,f.fillStyle=&quot;#fff&quot;;for(var h=o[0]/2,p=o[1]/2,c=0;c&lt;s.length;c++)f.fillText(s[c],h,p),(h+=o[0])&gt;e[0]-o[0]/2&amp;&amp;(h=o[0]/2,p+=o[1]);return r}},{&quot;css-font/stringify&quot;:129}],217:[function(t,e,r){&quot;use strict&quot;;function n(t,e){e||(e={}),(&quot;string&quot;==typeof t||Array.isArray(t))&amp;&amp;(e.family=t);var r=Array.isArray(e.family)?e.family.join(&quot;, &quot;):e.family;if(!r)throw Error(&quot;`family` must be defined&quot;);var s=e.size||e.fontSize||e.em||48,l=e.weight||e.fontWeight||&quot;&quot;,c=(t=[e.style||e.fontStyle||&quot;&quot;,l,s].join(&quot; &quot;)+&quot;px &quot;+r,e.origin||&quot;top&quot;);if(n.cache[r]&amp;&amp;s&lt;=n.cache[r].em)return i(n.cache[r],c);var u=e.canvas||n.canvas,f=u.getContext(&quot;2d&quot;),h={upper:void 0!==e.upper?e.upper:&quot;H&quot;,lower:void 0!==e.lower?e.lower:&quot;x&quot;,descent:void 0!==e.descent?e.descent:&quot;p&quot;,ascent:void 0!==e.ascent?e.ascent:&quot;h&quot;,tittle:void 0!==e.tittle?e.tittle:&quot;i&quot;,overshoot:void 0!==e.overshoot?e.overshoot:&quot;O&quot;},p=Math.ceil(1.5*s);u.height=p,u.width=.5*p,f.font=t;var d={top:0};f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillStyle=&quot;black&quot;,f.fillText(&quot;H&quot;,0,0);var g=a(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline=&quot;bottom&quot;,f.fillText(&quot;H&quot;,0,p);var m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=&quot;alphabetic&quot;,f.fillText(&quot;H&quot;,0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,f.clearRect(0,0,p,p),f.textBaseline=&quot;middle&quot;,f.fillText(&quot;H&quot;,0,.5*p);var y=a(f.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=&quot;hanging&quot;,f.fillText(&quot;H&quot;,0,.5*p);var x=a(f.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=&quot;ideographic&quot;,f.fillText(&quot;H&quot;,0,p);var b=a(f.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,h.upper&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.upper,0,0),d.upper=a(f.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),h.lower&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.lower,0,0),d.lower=a(f.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),h.tittle&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.tittle,0,0),d.tittle=a(f.getImageData(0,0,p,p))),h.ascent&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.ascent,0,0),d.ascent=a(f.getImageData(0,0,p,p))),h.descent&amp;&amp;(f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.descent,0,0),d.descent=o(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline=&quot;top&quot;,f.fillText(h.overshoot,0,0);var _=o(f.getImageData(0,0,p,p));d.overshoot=_-v}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in&quot;string&quot;==typeof e&amp;&amp;(e=t[e]),t)&quot;em&quot;!==n&amp;&amp;(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n&lt;r.length;n+=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}function o(t){for(var e=t.height,r=t.data,n=r.length-1;n&gt;0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(&quot;canvas&quot;),n.cache={}},{}],218:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return new c(t||d,null)};var n=0,i=1;function a(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function o(t){return new a(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new a(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function f(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,&quot;keys&quot;,{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,&quot;values&quot;,{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,&quot;length&quot;,{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],f=[];o;){var h=r(t,o.key);u.push(o),f.push(h),o=h&lt;=0?o.left:o.right}u.push(new a(n,t,e,null,null,1));for(var p=u.length-2;p&gt;=0;--p){o=u[p];f[p]&lt;=0?u[p]=new a(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new a(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p&gt;1;--p){var d=u[p-1];o=u[p];if(d._color===i||o._color===i)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(m=g.right)||m._color!==n){if(g._color=n,g.left=d.right,d._color=i,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p&gt;=3)(v=u[p-3]).left===g?v.left=d:v.right=d;break}d._color=i,g.right=s(i,m),g._color=n,p-=1}else{if(!(m=g.right)||m._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=i,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p&gt;=3)(v=u[p-3]).left===g?v.left=o:v.right=o;break}d._color=i,g.right=s(i,m),g._color=n,p-=1}else if(d.right===o){if(!(m=g.left)||m._color!==n){if(g._color=n,g.right=d.left,d._color=i,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p&gt;=3)(v=u[p-3]).right===g?v.right=d:v.left=d;break}d._color=i,g.left=s(i,m),g._color=n,p-=1}else{var m;if(!(m=g.left)||m._color!==n){var v;if(d.left=o.right,g._color=n,g.right=o.left,o._color=i,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p&gt;=3)(v=u[p-3]).right===g?v.right=o:v.left=o;break}d._color=i,g.left=s(i,m),g._color=n,p-=1}}return u[0]._color=i,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&amp;&amp;(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,i){if(r(e,i.key)&lt;=0){var a;if(i.left&amp;&amp;(a=t(e,r,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return t(e,r,n,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)&gt;=0)return;return function t(e,r,n,i,a){var o,s=n(e,a.key),l=n(r,a.key);if(s&lt;=0){if(a.left&amp;&amp;(o=t(e,r,n,i,a.left)))return o;if(l&gt;0&amp;&amp;(o=i(a.key,a.value)))return o}if(l&gt;0&amp;&amp;a.right)return t(e,r,n,i,a.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,&quot;begin&quot;,{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new f(this,t)}}),Object.defineProperty(u,&quot;end&quot;,{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new f(this,t)}}),u.at=function(t){if(t&lt;0)return new f(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t&lt;e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new f(this,r);if(t-=1,!e.right)break;if(t&gt;=e.right._count)break;e=e.right}return new f(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&lt;=0&amp;&amp;(i=n.length),r=a&lt;=0?r.left:r.right}return n.length=i,new f(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&lt;0&amp;&amp;(i=n.length),r=a&lt;0?r.left:r.right}return n.length=i,new f(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&gt;0&amp;&amp;(i=n.length),r=a&lt;=0?r.left:r.right}return n.length=i,new f(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a&gt;=0&amp;&amp;(i=n.length),r=a&lt;0?r.left:r.right}return n.length=i,new f(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new f(this,n);r=i&lt;=0?r.left:r.right}return new f(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n&lt;=0?r.left:r.right}};var h=f.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return t&lt;e?-1:t&gt;e?1:0}Object.defineProperty(h,&quot;valid&quot;,{get:function(){return this._stack.length&gt;0}}),Object.defineProperty(h,&quot;node&quot;,{get:function(){return this._stack.length&gt;0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new f(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new a(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u&gt;=0;--u){(r=t[u]).left===t[u+1]?e[u]=new a(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&amp;&amp;r.right){var f=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var h=e[f-1];e.push(new a(r._color,h.key,h.value,r.left,r.right,r._count)),e[f-1].key=r.key,e[f-1].value=r.value;for(u=e.length-2;u&gt;=f;--u)r=e[u],e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count);e[f-1].left=e[f]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&amp;&amp;(d.right=null),e.pop();for(u=0;u&lt;e.length;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(r.left||r.right){r.left?p(r,r.left):r.right&amp;&amp;p(r,r.right),r._color=i;for(u=0;u&lt;e.length-1;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(1===e.length)return new c(this.tree._compare,null);for(u=0;u&lt;e.length;++u)e[u]._count--;var g=e[e.length-2];return function(t){for(var e,r,a,c,u=t.length-1;u&gt;=0;--u){if(e=t[u],0===u)return void(e._color=i);if((r=t[u-1]).left===e){if((a=r.right).right&amp;&amp;a.right._color===n)return c=(a=r.right=o(a)).right=o(a.right),r.right=a.left,a.left=r,a.right=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).left===r?f.left=a:f.right=a),void(t[u-1]=a);if(a.left&amp;&amp;a.left._color===n)return c=(a=r.right=o(a)).left=o(a.left),r.right=c.left,a.left=c.right,c.left=r,c.right=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u&gt;1&amp;&amp;((f=t[u-2]).left===r?f.left=c:f.right=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.right=s(n,a));r.right=s(n,a);continue}a=o(a),r.right=a.left,a.left=r,a._color=r._color,r._color=n,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).left===r?f.left=a:f.right=a),t[u-1]=a,t[u]=r,u+1&lt;t.length?t[u+1]=e:t.push(e),u+=2}else{if((a=r.left).left&amp;&amp;a.left._color===n)return c=(a=r.left=o(a)).left=o(a.left),r.left=a.right,a.right=r,a.left=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).right===r?f.right=a:f.left=a),void(t[u-1]=a);if(a.right&amp;&amp;a.right._color===n)return c=(a=r.left=o(a)).right=o(a.right),r.left=c.right,a.right=c.left,c.right=r,c.left=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u&gt;1&amp;&amp;((f=t[u-2]).right===r?f.right=c:f.left=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.left=s(n,a));r.left=s(n,a);continue}var f;a=o(a),r.left=a.right,a.right=r,a._color=r._color,r._color=n,l(r),l(a),u&gt;1&amp;&amp;((f=t[u-2]).right===r?f.right=a:f.left=a),t[u-1]=a,t[u]=r,u+1&lt;t.length?t[u+1]=e:t.push(e),u+=2}}}(e),g.left===r?g.left=null:g.right=null,new c(this.tree._compare,e[0])},Object.defineProperty(h,&quot;key&quot;,{get:function(){if(this._stack.length&gt;0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,&quot;value&quot;,{get:function(){if(this._stack.length&gt;0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,&quot;index&quot;,{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&amp;&amp;(t=e[e.length-1].left._count);for(var n=e.length-2;n&gt;=0;--n)e[n+1]===e[n].right&amp;&amp;(++t,e[n].left&amp;&amp;(t+=e[n].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length&gt;0&amp;&amp;t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,&quot;hasNext&quot;,{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e&gt;0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var e=this._stack;if(0===e.length)throw new Error(&quot;Can't update empty node!&quot;);var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new a(n._color,n.key,t,n.left,n.right,n._count);for(var i=e.length-2;i&gt;=0;--i)(n=e[i]).left===e[i+1]?r[i]=new a(n._color,n.key,n.value,r[i+1],n.right,n._count):r[i]=new a(n._color,n.key,n.value,n.left,r[i+1],n._count);return new c(this.tree._compare,r[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length&gt;0&amp;&amp;t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,&quot;hasPrev&quot;,{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e&gt;0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],219:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],i=607/128,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t&lt;0)return Number(&quot;0/0&quot;);for(var e=a[0],r=a.length-1;r&gt;0;--r)e+=a[r]/(t+r);var n=t+i+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e&lt;.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e&gt;100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i&lt;9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},e.exports.log=o},{}],220:[function(t,e,r){e.exports=function(t,e){if(&quot;string&quot;!=typeof t)throw new TypeError(&quot;must specify type string&quot;);if(e=e||{},&quot;undefined&quot;==typeof document&amp;&amp;!e.canvas)return null;var r=e.canvas||document.createElement(&quot;canvas&quot;);&quot;number&quot;==typeof e.width&amp;&amp;(r.width=e.width);&quot;number&quot;==typeof e.height&amp;&amp;(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf(&quot;webgl&quot;)&amp;&amp;a.push(&quot;experimental-&quot;+t);for(var o=0;o&lt;a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},{}],221:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=new u(t);return r.update(e),r};var n=t(&quot;./lib/text.js&quot;),i=t(&quot;./lib/lines.js&quot;),a=t(&quot;./lib/background.js&quot;),o=t(&quot;./lib/cube.js&quot;),s=t(&quot;./lib/ticks.js&quot;),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[&quot;sans-serif&quot;,&quot;sans-serif&quot;,&quot;sans-serif&quot;],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;],this.labelEnable=[!0,!0,!0],this.labelFont=&quot;sans-serif&quot;,this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=u.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&amp;&amp;Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s&lt;3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),u=!1,f=!1;if(&quot;bounds&quot;in t)for(var h=t.bounds,p=0;p&lt;2;++p)for(var d=0;d&lt;3;++d)h[p][d]!==this.bounds[p][d]&amp;&amp;(f=!0),this.bounds[p][d]=h[p][d];if(&quot;ticks&quot;in t){r=t.ticks,u=!0,this.autoTicks=!1;for(p=0;p&lt;3;++p)this.tickSpacing[p]=0}else a(&quot;tickSpacing&quot;)&amp;&amp;(this.autoTicks=!0,f=!0);if(this._firstInit&amp;&amp;(&quot;ticks&quot;in t||&quot;tickSpacing&quot;in t||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&amp;&amp;this.autoTicks&amp;&amp;(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(p=0;p&lt;3;++p)r[p].sort(function(t,e){return t.x-e.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o(&quot;tickEnable&quot;),l(&quot;tickFont&quot;)&amp;&amp;(u=!0),a(&quot;tickSize&quot;),a(&quot;tickAngle&quot;),a(&quot;tickPad&quot;),c(&quot;tickColor&quot;);var g=l(&quot;labels&quot;);l(&quot;labelFont&quot;)&amp;&amp;(g=!0),o(&quot;labelEnable&quot;),a(&quot;labelSize&quot;),a(&quot;labelPad&quot;),c(&quot;labelColor&quot;),o(&quot;lineEnable&quot;),o(&quot;lineMirror&quot;),a(&quot;lineWidth&quot;),c(&quot;lineColor&quot;),o(&quot;lineTickEnable&quot;),o(&quot;lineTickMirror&quot;),a(&quot;lineTickLength&quot;),a(&quot;lineTickWidth&quot;),c(&quot;lineTickColor&quot;),o(&quot;gridEnable&quot;),a(&quot;gridWidth&quot;),c(&quot;gridColor&quot;),o(&quot;zeroEnable&quot;),c(&quot;zeroLineColor&quot;),a(&quot;zeroLineWidth&quot;),o(&quot;backgroundEnable&quot;),c(&quot;backgroundColor&quot;),this._text?this._text&amp;&amp;(g||u)&amp;&amp;this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&amp;&amp;u&amp;&amp;(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h];function d(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u&lt;3;++u)if(e!==u){var f=a,h=s,p=o,d=l;c&amp;1&lt;&lt;u&amp;&amp;(f=s,h=a,p=l,d=o),f[u]=r[0][u],h[u]=r[1][u],i[u]&gt;0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],m={model:l,view:l,projection:l};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||m;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=o(r,n,i,a),u=s.cubeEdges,f=s.axis,h=n[12],b=n[13],_=n[14],w=n[15],k=this.pixelRatio*(i[3]*h+i[7]*b+i[11]*_+i[15]*w)/e.drawingBufferHeight,M=0;M&lt;3;++M)this.lastCubeProps.cubeEdges[M]=u[M],this.lastCubeProps.axis[M]=f[M];var A=p;for(M=0;M&lt;3;++M)d(p[M],M,this.bounds,u,f);e=this.gl;var T=g;for(M=0;M&lt;3;++M)this.backgroundEnable[M]?T[M]=f[M]:T[M]=0;this._background.draw(r,n,i,a,T,this.backgroundColor),this._lines.bind(r,n,i,this);for(M=0;M&lt;3;++M){var S=[0,0,0];f[M]&gt;0?S[M]=a[1][M]:S[M]=a[0][M];for(var E=0;E&lt;2;++E){var C=(M+1+E)%3,L=(M+1+(1^E))%3;this.gridEnable[C]&amp;&amp;this._lines.drawGrid(C,L,this.bounds,S,this.gridColor[C],this.gridWidth[C]*this.pixelRatio)}for(E=0;E&lt;2;++E){C=(M+1+E)%3,L=(M+1+(1^E))%3;this.zeroEnable[L]&amp;&amp;a[0][L]&lt;=0&amp;&amp;a[1][L]&gt;=0&amp;&amp;this._lines.drawZero(C,L,this.bounds,S,this.zeroLineColor[L],this.zeroLineWidth[L]*this.pixelRatio)}}for(M=0;M&lt;3;++M){this.lineEnable[M]&amp;&amp;this._lines.drawAxisLine(M,this.bounds,A[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&amp;&amp;this._lines.drawAxisLine(M,this.bounds,A[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var z=c(v,A[M].primalMinor),P=c(y,A[M].mirrorMinor),O=this.lineTickLength;for(E=0;E&lt;3;++E){var I=k/r[5*E];z[E]*=O[E]*I,P[E]*=O[E]*I}this.lineTickEnable[M]&amp;&amp;this._lines.drawAxisTicks(M,A[M].primalOffset,z,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&amp;&amp;this._lines.drawAxisTicks(M,A[M].mirrorOffset,P,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);for(M=0;M&lt;3;++M){var D=A[M].primalMinor,R=c(x,A[M].primalOffset);for(E=0;E&lt;3;++E)this.lineTickEnable[M]&amp;&amp;(R[E]+=k*D[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[M]){for(E=0;E&lt;3;++E)R[E]+=k*D[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],R,this.tickColor[M])}if(this.labelEnable[M]){for(E=0;E&lt;3;++E)R[E]+=k*D[E]*this.labelPad[E]/r[5*E];R[M]+=.5*(a[0][M]+a[1][M]),this._text.drawLabel(M,this.labelSize[M],this.labelAngle[M],R,this.labelColor[M])}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{&quot;./lib/background.js&quot;:222,&quot;./lib/cube.js&quot;:223,&quot;./lib/lines.js&quot;:224,&quot;./lib/text.js&quot;:226,&quot;./lib/ticks.js&quot;:227}],222:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=[],r=[],s=0,l=0;l&lt;3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p&lt;=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d&lt;=1;d+=2){f[c]=d;for(var g=-1;g&lt;=1;g+=2)f[u]=g,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var m=c;c=u,u=m}var v=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,v,x,b)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders&quot;).bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s&lt;3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:225,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],223:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,a){i(s,e,t),i(s,r,s);for(var p=0,y=0;y&lt;2;++y){u[2]=a[y][2];for(var x=0;x&lt;2;++x){u[1]=a[x][1];for(var b=0;b&lt;2;++b)u[0]=a[b][0],h(l[p],u,s),p+=1}}for(var _=-1,y=0;y&lt;8;++y){for(var w=l[y][3],k=0;k&lt;3;++k)c[y][k]=l[y][k]/w;w&lt;0&amp;&amp;(_&lt;0?_=y:c[y][2]&lt;c[_][2]&amp;&amp;(_=y))}if(_&lt;0){_=0;for(var M=0;M&lt;3;++M){for(var A=(M+2)%3,T=(M+1)%3,S=-1,E=-1,C=0;C&lt;2;++C){var L=C&lt;&lt;M,z=L+(C&lt;&lt;A)+(1-C&lt;&lt;T),P=L+(1-C&lt;&lt;A)+(C&lt;&lt;T);o(c[L],c[z],c[P],f)&lt;0||(C?S=1:E=1)}if(S&lt;0||E&lt;0)E&gt;S&amp;&amp;(_|=1&lt;&lt;M);else{for(var C=0;C&lt;2;++C){var L=C&lt;&lt;M,z=L+(C&lt;&lt;A)+(1-C&lt;&lt;T),P=L+(1-C&lt;&lt;A)+(C&lt;&lt;T),O=d([l[L],l[z],l[P],l[L+(1&lt;&lt;A)+(1&lt;&lt;T)]]);C?S=O:E=O}E&gt;S&amp;&amp;(_|=1&lt;&lt;M)}}}for(var I=7^_,D=-1,y=0;y&lt;8;++y)y!==_&amp;&amp;y!==I&amp;&amp;(D&lt;0?D=y:c[D][1]&gt;c[y][1]&amp;&amp;(D=y));for(var R=-1,y=0;y&lt;3;++y){var B=D^1&lt;&lt;y;if(B!==_&amp;&amp;B!==I){R&lt;0&amp;&amp;(R=B);var T=c[B];T[0]&lt;c[R][0]&amp;&amp;(R=B)}}for(var F=-1,y=0;y&lt;3;++y){var B=D^1&lt;&lt;y;if(B!==_&amp;&amp;B!==I&amp;&amp;B!==R){F&lt;0&amp;&amp;(F=B);var T=c[B];T[0]&gt;c[F][0]&amp;&amp;(F=B)}}var N=g;N[0]=N[1]=N[2]=0,N[n.log2(R^D)]=D&amp;R,N[n.log2(D^F)]=D&amp;F;var j=7^F;j===_||j===I?(j=7^R,N[n.log2(F^j)]=j&amp;F):N[n.log2(R^j)]=j&amp;R;for(var V=m,U=_,M=0;M&lt;3;++M)V[M]=U&amp;1&lt;&lt;M?-1:1;return v};var n=t(&quot;bit-twiddle&quot;),i=t(&quot;gl-mat4/multiply&quot;),a=(t(&quot;gl-mat4/invert&quot;),t(&quot;split-polygon&quot;)),o=t(&quot;robust-orientation&quot;),s=new Array(16),l=(new Array(16),new Array(8)),c=new Array(8),u=new Array(3),f=[0,0,0];function h(t,e,r){for(var n=0;n&lt;4;++n){t[n]=r[12+n];for(var i=0;i&lt;3;++i)t[n]+=e[i]*r[4*i+n]}}!function(){for(var t=0;t&lt;8;++t)l[t]=[1,1,1,1],c[t]=[1,1,1]}();var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(t){for(var e=0;e&lt;p.length;++e)if((t=a.positive(t,p[e])).length&lt;3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],o=0;for(e=1;e+1&lt;t.length;++e){var s=t[e],l=t[e+1],c=s[0]/s[3]-n,u=s[1]/s[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;o+=Math.abs(c*h-u*f)}return o}var g=[1,1,1],m=[0,0,0],v={cubeEdges:g,axis:m}},{&quot;bit-twiddle&quot;:79,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;robust-orientation&quot;:483,&quot;split-polygon&quot;:500}],224:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var o=[],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var f=0;f&lt;3;++f){for(var h=o.length/3|0,d=0;d&lt;r[f].length;++d){var g=+r[f][d].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var m=o.length/3|0;s[f]=h,l[f]=m-h;for(var h=o.length/3|0,v=0;v&lt;r[f].length;++v){var g=+r[f][v].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var m=o.length/3|0;c[f]=h,u[f]=m-h}var y=n(t,new Float32Array(o)),x=i(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=a(t);return b.attributes.position.location=0,new p(t,y,x,b,l,s,u,c)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders&quot;).line,o=[0,0,0],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[1,1];function f(t){return t[0]=t[1]=t[2]=0,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function p(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}var d=p.prototype;d.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=u,this.vao.bind()},d.unbind=function(){this.vao.unbind()},d.drawAxisLine=function(t,e,r,n,i){var a=f(s);this.shader.uniforms.majorAxis=s,a[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=a;var o,u=h(c,r);u[t]+=e[0][t],this.shader.uniforms.offset=u,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=n,(o=f(l))[(t+2)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6),(o=f(l))[(t+1)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6)},d.drawAxisTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=f(o);a[t]=1,this.shader.uniforms.majorAxis=a,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=n,this.shader.uniforms.lineWidth=i;var s=f(l);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},d.drawGrid=function(t,e,r,n,i,a){if(this.gridCount[t]){var u=f(s);u[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=u;var p=h(c,n);p[e]+=r[0][e],this.shader.uniforms.offset=p;var d=f(o);d[t]=1,this.shader.uniforms.majorAxis=d;var g=f(l);g[t]=1,this.shader.uniforms.screenAxis=g,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},d.drawZero=function(t,e,r,n,i,a){var o=f(s);this.shader.uniforms.majorAxis=o,o[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=o;var u=h(c,n);u[t]+=r[0][t],this.shader.uniforms.offset=u;var p=f(l);p[e]=1,this.shader.uniforms.screenAxis=p,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,6)},d.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:225,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],225:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\nuniform float lineWidth;\nuniform vec2 screenShape;\n\nvec3 project(vec3 p) {\n  vec4 pp = projection * view * model * vec4(p, 1.0);\n  return pp.xyz / max(pp.w, 0.0001);\n}\n\nvoid main() {\n  vec3 major = position.x * majorAxis;\n  vec3 minor = position.y * minorAxis;\n\n  vec3 vPosition = major + minor + offset;\n  vec3 pPosition = project(vPosition);\n  vec3 offset = project(vPosition + screenAxis * position.z);\n\n  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\n\n  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}&quot;]);r.line=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;}])};var s=n([&quot;#define GLSLIFY 1\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, axis;\nuniform float scale, angle, pixelScale;\nuniform vec2 resolution;\n\nvoid main() {  \n  //Compute plane offset\n  vec2 planeCoord = position.xy * pixelScale;\n  mat2 planeXform = scale * mat2(cos(angle), sin(angle),\n                                -sin(angle), cos(angle));\n  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n  //Compute world offset\n  float axisDistance = position.z;\n  vec3 dataPosition = axisDistance * axis + offset;\n  vec4 worldPosition = model * vec4(dataPosition, 1);\n  \n  //Compute clip position\n  vec4 viewPosition = view * worldPosition;\n  vec4 clipPosition = projection * viewPosition;\n  clipPosition /= clipPosition.w;\n\n  //Apply text offset in clip coordinates\n  clipPosition += vec4(viewOffset, 0, 0);\n\n  //Done\n  gl_Position = clipPosition;\n}&quot;]),l=n([&quot;precision mediump float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}&quot;]);r.text=function(t){return i(t,s,l,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;}])};var c=n([&quot;#define GLSLIFY 1\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n  if(dot(normal, enable) &gt; 0.0) {\n    vec3 nPosition = mix(bounds[0], bounds[1], 0.5 * (position + 1.0));\n    gl_Position = projection * view * model * vec4(nPosition, 1.0);\n  } else {\n    gl_Position = vec4(0,0,0,0);\n  }\n  colorChannel = abs(normal);\n}&quot;]),u=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n  gl_FragColor = colorChannel.x * colors[0] + \n                 colorChannel.y * colors[1] +\n                 colorChannel.z * colors[2];\n}&quot;]);r.bg=function(t){return i(t,c,u,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],226:[function(t,e,r){(function(r){&quot;use strict&quot;;e.exports=function(t,e,r,a,s,l){var u=n(t),f=i(t,[{buffer:u,size:3}]),h=o(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,a,s,l),p};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;vectorize-text&quot;),o=t(&quot;./shaders&quot;).text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,f=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){this.gl;var o=[];function s(t,e,r,n){var i=l[r];i||(i=l[r]={});var s=i[e];s||(s=i[e]=function(t,e){try{return a(t,e)}catch(t){return console.warn(&quot;error vectorizing text:&quot;,t),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:&quot;center&quot;,textBaseline:&quot;middle&quot;}));for(var c=(n||12)/12,u=s.positions,f=s.cells,h=0,p=f.length;h&lt;p;++h)for(var d=f[h],g=2;g&gt;=0;--g){var m=u[d[g]];o.push(c*m[0],-c*m[1],t)}}for(var c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],p=0;p&lt;3;++p){f[p]=o.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r),h[p]=(o.length/3|0)-f[p],c[p]=o.length/3|0;for(var d=0;d&lt;n[p].length;++d)n[p][d].text&amp;&amp;s(n[p][d].x,n[p][d].text,n[p][d].font||i,n[p][d].fontSize||12);u[p]=(o.length/3|0)-c[p]}this.buffer.update(o),this.tickOffset=c,this.tickCount=u,this.labelOffset=f,this.labelCount=h};var h=[0,0,0];u.drawTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=h;a[0]=a[1]=a[2]=0,a[t]=1,this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}};var p=[0,0,0];u.drawLabel=function(t,e,r,n,i){this.labelCount[t]&amp;&amp;(this.shader.uniforms.axis=p,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this,t(&quot;_process&quot;))},{&quot;./shaders&quot;:225,_process:462,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308,&quot;vectorize-text&quot;:524}],227:[function(t,e,r){&quot;use strict&quot;;function n(t,e){var r=t+&quot;&quot;,n=r.indexOf(&quot;.&quot;),i=0;n&gt;=0&amp;&amp;(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+&quot;&quot;;if(s.indexOf(&quot;e&quot;)&gt;=0)return s;var l=o/a,c=o%a;o&lt;0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=&quot;&quot;+l;if(o&lt;0&amp;&amp;(u=&quot;-&quot;+u),i){for(var f=&quot;&quot;+c;f.length&lt;i;)f=&quot;0&quot;+f;return u+&quot;.&quot;+f}return u}r.create=function(t,e){for(var r=[],i=0;i&lt;3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]&lt;=t[1][i];++o)a.push({x:o*e[i],text:n(e[i],o)});for(var o=-1;o*e[i]&gt;=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r&lt;3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n&lt;t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},{}],228:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,l,f){var h=e.model||c,p=e.view||c,v=e.projection||c,y=t.bounds,x=(f=f||a(h,p,v,y)).axis;f.edges;o(u,p,h),o(u,v,u);for(var b=g,_=0;_&lt;3;++_)b[_].lo=1/0,b[_].hi=-1/0,b[_].pixelsPerDataUnit=1/0;var w=n(s(u,u));s(u,u);for(var k=0;k&lt;3;++k){var M=(k+1)%3,A=(k+2)%3,T=m;t:for(var _=0;_&lt;2;++_){var S=[];if(x[k]&lt;0!=!!_){T[k]=y[_][k];for(var E=0;E&lt;2;++E){T[M]=y[E^_][M];for(var C=0;C&lt;2;++C)T[A]=y[C^E^_][A],S.push(T.slice())}for(var E=0;E&lt;w.length;++E){if(0===S.length)continue t;S=i.positive(S,w[E])}for(var E=0;E&lt;S.length;++E)for(var A=S[E],L=d(m,u,A,r,l),C=0;C&lt;3;++C)b[C].lo=Math.min(b[C].lo,A[C]),b[C].hi=Math.max(b[C].hi,A[C]),C!==k&amp;&amp;(b[C].pixelsPerDataUnit=Math.min(b[C].pixelsPerDataUnit,Math.abs(L[C])))}}}return b};var n=t(&quot;extract-frustum-planes&quot;),i=t(&quot;split-polygon&quot;),a=t(&quot;./lib/cube.js&quot;),o=t(&quot;gl-mat4/multiply&quot;),s=t(&quot;gl-mat4/transpose&quot;),l=t(&quot;gl-vec4/transformMat4&quot;),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),u=new Float32Array(16);function f(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}var h=[0,0,0,1],p=[0,0,0,1];function d(t,e,r,n,i){for(var a=0;a&lt;3;++a){for(var o=h,s=p,c=0;c&lt;3;++c)s[c]=o[c]=r[c];s[3]=o[3]=1,s[a]+=1,l(s,s,e),s[3]&lt;0&amp;&amp;(t[a]=1/0),o[a]-=1,l(o,o,e),o[3]&lt;0&amp;&amp;(t[a]=1/0);var u=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(u*u+f*f)}return t}var g=[new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0)],m=[0,0,0]},{&quot;./lib/cube.js&quot;:223,&quot;extract-frustum-planes&quot;:212,&quot;gl-mat4/multiply&quot;:255,&quot;gl-mat4/transpose&quot;:263,&quot;gl-vec4/transformMat4&quot;:379,&quot;split-polygon&quot;:500}],229:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;),i=t(&quot;ndarray-ops&quot;),a=t(&quot;ndarray&quot;),o=[&quot;uint8&quot;,&quot;uint8_clamped&quot;,&quot;uint16&quot;,&quot;uint32&quot;,&quot;int8&quot;,&quot;int16&quot;,&quot;int32&quot;,&quot;float32&quot;];function s(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}var l=s.prototype;function c(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a&lt;0)return t.bufferData(e,i,n),o;if(o+a&gt;r)throw new Error(&quot;gl-buffer: If resizing buffer, must not specify offset&quot;);return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a&lt;i;++a)r[a]=t[a];return r}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(t,e){if(&quot;number&quot;!=typeof e&amp;&amp;(e=-1),this.bind(),&quot;object&quot;==typeof t&amp;&amp;&quot;undefined&quot;!=typeof t.shape){var r=t.dtype;if(o.indexOf(r)&lt;0&amp;&amp;(r=&quot;float32&quot;),this.type===this.gl.ELEMENT_ARRAY_BUFFER)r=gl.getExtension(&quot;OES_element_index_uint&quot;)&amp;&amp;&quot;uint16&quot;!==r?&quot;uint32&quot;:&quot;uint16&quot;;if(r===t.dtype&amp;&amp;function(t,e){for(var r=1,n=e.length-1;n&gt;=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&amp;&amp;t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e&lt;0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,&quot;uint16&quot;):u(t,&quot;float32&quot;),this.length=c(this.gl,this.type,this.length,this.usage,e&lt;0?f:f.subarray(0,t.length),e),n.free(f)}else if(&quot;object&quot;==typeof t&amp;&amp;&quot;number&quot;==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if(&quot;number&quot;!=typeof t&amp;&amp;void 0!==t)throw new Error(&quot;gl-buffer: Invalid data type&quot;);if(e&gt;=0)throw new Error(&quot;gl-buffer: Cannot specify offset when resizing buffer&quot;);(t|=0)&lt;=0&amp;&amp;(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&amp;&amp;r!==t.ELEMENT_ARRAY_BUFFER)throw new Error(&quot;gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER&quot;);if(n!==t.DYNAMIC_DRAW&amp;&amp;n!==t.STATIC_DRAW&amp;&amp;n!==t.STREAM_DRAW)throw new Error(&quot;gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW&quot;);var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:430,&quot;ndarray-ops&quot;:424,&quot;typedarray-pool&quot;:519}],230:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-vec3&quot;),i=(t(&quot;gl-vec4&quot;),function(t,e){for(var r=0;r&lt;t.length;r++)if(t[r]&gt;=e)return r-1;return r}),a=n.create(),o=n.create(),s=function(t,e,r){return t&lt;e?e:t&gt;r?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],f=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=i(r[0],c),m=i(r[1],u),v=i(r[2],f),y=g+1,x=m+1,b=v+1;if(l&amp;&amp;(g=s(g,0,h-1),y=s(y,0,h-1),m=s(m,0,p-1),x=s(x,0,p-1),v=s(v,0,d-1),b=s(b,0,d-1)),g&lt;0||m&lt;0||v&lt;0||y&gt;=h||x&gt;=p||b&gt;=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][m])/(r[1][x]-r[1][m]),k=(f-r[2][v])/(r[2][b]-r[2][v]);(_&lt;0||_&gt;1||isNaN(_))&amp;&amp;(_=0),(w&lt;0||w&gt;1||isNaN(w))&amp;&amp;(w=0),(k&lt;0||k&gt;1||isNaN(k))&amp;&amp;(k=0);var M=v*h*p,A=b*h*p,T=m*h,S=x*h,E=g,C=y,L=e[T+M+E],z=e[T+M+C],P=e[S+M+E],O=e[S+M+C],I=e[T+A+E],D=e[T+A+C],R=e[S+A+E],B=e[S+A+C],F=n.create();return n.lerp(F,L,z,_),n.lerp(a,P,O,_),n.lerp(F,F,a,w),n.lerp(a,I,D,_),n.lerp(o,R,B,_),n.lerp(a,a,o,w),n.lerp(F,F,a,k),F};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],i=[],a=0;a&lt;n.length;a++)for(var o=0;o&lt;r.length;o++)for(var s=0;s&lt;e.length;s++)i.push([n[a],r[o],e[s]]);return i}(t.meshgrid);var i=t.meshgrid,a=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vertexNormals:[],vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&amp;&amp;(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var s=0,c=1/0,u=-1/0,f=1/0,h=-1/0,p=1/0,d=-1/0,g=null,m=null,v=[],y=1/0,x=0;x&lt;r.length;x++){var b,_=r[x];c=Math.min(_[0],c),u=Math.max(_[0],u),f=Math.min(_[1],f),h=Math.max(_[1],h),p=Math.min(_[2],p),d=Math.max(_[2],d),b=i?l(_,a,i,!0):a[x],n.length(b)&gt;s&amp;&amp;(s=n.length(b)),x&amp;&amp;(y=Math.min(y,2*n.distance(g,_)/(n.length(m)+n.length(b)))),g=_,m=b,v.push(b)}var w=[c,f,p],k=[u,h,d];e&amp;&amp;(e[0]=w,e[1]=k),0===s&amp;&amp;(s=1);var M=1/s;isFinite(y)&amp;&amp;!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var i=n.create();return void 0!==t&amp;&amp;n.set(i,t,e,r),i}(0,1,0),T=t.coneSize||.5;t.absoluteConeSize&amp;&amp;(T=t.absoluteConeSize*M),o.coneScale=T;x=0;for(var S=0;x&lt;r.length;x++)for(var E=(_=r[x])[0],C=_[1],L=_[2],z=v[x],P=n.length(z)*M,O=0;O&lt;8;O++){o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.positions.push([E,C,L,S++]),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vertexIntensity.push(P,P,P),o.vertexIntensity.push(P,P,P),o.vertexNormals.push(A,A,A),o.vertexNormals.push(A,A,A);var I=o.positions.length;o.cells.push([I-6,I-5,I-4],[I-3,I-2,I-1])}return o},e.exports.createConeMesh=t(&quot;./lib/conemesh&quot;)},{&quot;./lib/conemesh&quot;:232,&quot;gl-vec3&quot;:327,&quot;gl-vec4&quot;:363}],231:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;barycentric&quot;),i=t(&quot;polytope-closest-point/lib/closest_point_2d.js&quot;);function a(t,e){for(var r=[0,0,0,0],n=0;n&lt;4;++n)for(var i=0;i&lt;4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s&lt;3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}e.exports=function(t,e,r,a,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u&lt;t.length;++u)c[u]=o(t[u],r,a,s,l);for(var f=0,h=1/0,u=0;u&lt;c.length;++u){for(var p=0,d=0;d&lt;2;++d)p+=Math.pow(c[u][d]-e[d],2);p&lt;h&amp;&amp;(h=p,f=u)}for(var g=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o&lt;2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return r=Math.sqrt(r),a=Math.sqrt(a),r+a&lt;1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),m=0,u=0;u&lt;3;++u){if(g[u]&lt;-.001||g[u]&gt;1.0001)return null;m+=g[u]}if(Math.abs(m-1)&gt;.001)return null;return[f,function(t,e){for(var r=[0,0,0],n=0;n&lt;t.length;++n)for(var i=t[n],a=e[n],o=0;o&lt;3;++o)r[o]+=a*i[o];return r}(t,g),g]}},{barycentric:60,&quot;polytope-closest-point/lib/closest_point_2d.js&quot;:461}],232:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;normals&quot;),l=t(&quot;gl-mat4/multiply&quot;),c=t(&quot;gl-mat4/invert&quot;),u=t(&quot;ndarray&quot;),f=t(&quot;colormap&quot;),h=t(&quot;simplicial-complex-contour&quot;),p=t(&quot;typedarray-pool&quot;),d=t(&quot;./shaders&quot;),g=(t(&quot;./closest-point&quot;),d.meshShader),m=d.pickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,y,x,b,_,w,k,M,A,T,S,E){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=E,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=v,this._view=v,this._projection=v,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,m.vertex,m.fragment,null,m.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity&gt;=1},x.isTransparent=function(){return this.opacity&lt;1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&amp;&amp;this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l&lt;a;++l)for(var c=r[l],u=0;u&lt;2;++u){var f=c[0];2===c.length&amp;&amp;(f=c[u]);for(var d=n[f][0],g=n[f][1],m=i[f],v=1-m,y=this.positions[d],x=this.positions[g],b=0;b&lt;3;++b)o[s++]=m*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,&quot;contourEnable&quot;in t&amp;&amp;(this.contourEnable=t.contourEnable),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=t.contourColor),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;lightPosition&quot;in t&amp;&amp;(this.lightPosition=t.lightPosition),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;ambient&quot;in t&amp;&amp;(this.ambientLight=t.ambient),&quot;diffuse&quot;in t&amp;&amp;(this.diffuseLight=t.diffuse),&quot;specular&quot;in t&amp;&amp;(this.specularLight=t.specular),&quot;roughness&quot;in t&amp;&amp;(this.roughness=t.roughness),&quot;fresnel&quot;in t&amp;&amp;(this.fresnel=t.fresnel),void 0!==t.vectorScale&amp;&amp;(this.vectorScale=t.vectorScale),void 0!==t.coneScale&amp;&amp;(this.coneScale=t.coneScale),void 0!==t.coneOffset&amp;&amp;(this.coneOffset=t.coneOffset),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&amp;&amp;(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:&quot;rgba&quot;}),r=new Uint8Array(1024),n=0;n&lt;256;++n){for(var i=e[n],a=0;a&lt;3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&amp;&amp;r&amp;&amp;i){var a=[],l=[],c=[],h=[],p=[],d=[],g=[],m=[],v=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&amp;&amp;!A&amp;&amp;(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var E=t.vertexColors,C=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,P=t.vertexIntensity,O=t.cellUVs,I=t.cellIntensity,D=1/0,R=-1/0;if(!z&amp;&amp;!O)if(P)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B&lt;P.length;++B){var F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else if(I)for(B=0;B&lt;I.length;++B){F=I[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B&lt;n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=P||(I?function(t,e,r){for(var n=new Array(e),i=0;i&lt;e;++i)n[i]=0;var a=t.length;for(i=0;i&lt;a;++i)for(var o=t[i],s=0;s&lt;o.length;++s)n[o[s]]=r[i];return n}(r,n.length,I):function(t){for(var e=t.length,r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B&lt;n.length;++B)for(var V=n[B],U=0;U&lt;3;++U)!isNaN(V[U])&amp;&amp;isFinite(V[U])&amp;&amp;(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B&lt;r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U&lt;3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=E?E[X]:C?C[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U&lt;2;++U){V=n[X=W[U]];for(var Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U&lt;2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=E?E[X]:C?C[B]:L).length?m.push(Z[0],Z[1],Z[2],1):m.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],v.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U&lt;3;++U)for(V=n[X=W[U]],Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U&lt;3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2]),3===(Z=E?E[X]:C?C[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(m),this.edgeUVs.update(v),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o&lt;3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o&lt;3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o&lt;3;++o){for(var p=u[12+o],d=0;d&lt;3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount&gt;0&amp;&amp;((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount&gt;0&amp;&amp;this.lineWidth&gt;0&amp;&amp;((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount&gt;0&amp;&amp;((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&amp;&amp;this.contourCount&gt;0&amp;&amp;this.contourLineWidth&gt;0&amp;&amp;((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount&gt;0&amp;&amp;(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount&gt;0&amp;&amp;(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount&gt;0)&amp;&amp;((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&amp;&amp;(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),m=i(t),v=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:m,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:3}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),z=i(t),P=new y(t,l,r,null,null,s,null,null,c,f,m,h,p,d,v,x,k,_,w,M,A,C,T,S,E,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return P.update(e),P}},{&quot;./closest-point&quot;:231,&quot;./shaders&quot;:233,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-shader&quot;:286,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,normals:433,&quot;simplicial-complex-contour&quot;:491,&quot;typedarray-pool&quot;:519}],233:[function(t,e,r){var n=t(&quot;glslify&quot;),i=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n//   segment + 0 top vertex\n//   segment + 1 perimeter vertex a+1\n//   segment + 2 perimeter vertex a\n//   segment + 3 center base vertex\n//   segment + 4 perimeter vertex a\n//   segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\n\n  const float segmentCount = 8.0;\n\n  index = mod(index, segmentCount * 6.0);\n\n  float segment = floor(index/6.0);\n  float segmentIndex = index - (segment*6.0);\n\n  normal = -normalize(d);\n\n  if (segmentIndex == 3.0) {\n    return mix(vec3(0.0), -d, coneOffset);\n  }\n\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n  vec3 v2 = v1 - d;\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d)*0.25;\n  vec3 y = v * sin(angle) * length(d)*0.25;\n  vec3 v3 = v2 + x + y;\n  if (segmentIndex &lt;= 2.0) {\n    vec3 tx = u * sin(angle);\n    vec3 ty = v * -cos(angle);\n    vec3 tangent = tx + ty;\n    normal = normalize(cross(v3 - v1, tangent));\n  }\n\n  if (segmentIndex == 0.0) {\n    return mix(d, vec3(0.0), coneOffset);\n  }\n  return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float coneScale;\n\nuniform float coneOffset;\n\nuniform mat4 model\n           , view\n           , projection;\nuniform vec3 eyePosition\n           , lightPosition;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  // Scale the vector magnitude to stay constant with\n  // model &amp; view changes.\n  vec3 normal;\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal), 0.0);\n  normal = normalize(normal * inverse(mat3(model)));\n\n  // vec4 m_position  = model * vec4(conePosition, 1.0);\n  vec4 t_position  = view * conePosition;\n  gl_Position      = projection * t_position;\n  f_color          = color; //vec4(position.w, color.r, 0, 0);\n  f_normal         = normal;\n  f_data           = conePosition.xyz;\n  f_eyeDirection   = eyePosition   - conePosition.xyz;\n  f_lightDirection = lightPosition - conePosition.xyz;\n  f_uv             = uv;\n}\n&quot;]),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n            , fresnel\n            , kambient\n            , kdiffuse\n            , kspecular\n            , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  //if(any(lessThan(f_data, clipBounds[0])) || \n  //   any(greaterThan(f_data, clipBounds[1]))) {\n  //  discard;\n  //}\n\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n  \n  if(!gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor =  texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n//   segment + 0 top vertex\n//   segment + 1 perimeter vertex a+1\n//   segment + 2 perimeter vertex a\n//   segment + 3 center base vertex\n//   segment + 4 perimeter vertex a\n//   segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\n\n  const float segmentCount = 8.0;\n\n  index = mod(index, segmentCount * 6.0);\n\n  float segment = floor(index/6.0);\n  float segmentIndex = index - (segment*6.0);\n\n  normal = -normalize(d);\n\n  if (segmentIndex == 3.0) {\n    return mix(vec3(0.0), -d, coneOffset);\n  }\n\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n  vec3 v2 = v1 - d;\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d)*0.25;\n  vec3 y = v * sin(angle) * length(d)*0.25;\n  vec3 v3 = v2 + x + y;\n  if (segmentIndex &lt;= 2.0) {\n    vec3 tx = u * sin(angle);\n    vec3 ty = v * -cos(angle);\n    vec3 tangent = tx + ty;\n    normal = normalize(cross(v3 - v1, tangent));\n  }\n\n  if (segmentIndex == 0.0) {\n    return mix(d, vec3(0.0), coneOffset);\n  }\n  return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nuniform float vectorScale;\nuniform float coneScale;\nuniform float coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  vec3 normal;\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal), 0.0);\n  gl_Position = projection * view * conePosition;\n  f_id        = id;\n  f_position  = position.xyz;\n}\n&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if(any(lessThan(f_position, clipBounds[0])) || \n     any(greaterThan(f_position, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}&quot;]);r.meshShader={vertex:i,fragment:a,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;},{name:&quot;vector&quot;,type:&quot;vec3&quot;}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;},{name:&quot;vector&quot;,type:&quot;vec3&quot;}]}},{glslify:390}],234:[function(t,e,r){e.exports={0:&quot;NONE&quot;,1:&quot;ONE&quot;,2:&quot;LINE_LOOP&quot;,3:&quot;LINE_STRIP&quot;,4:&quot;TRIANGLES&quot;,5:&quot;TRIANGLE_STRIP&quot;,6:&quot;TRIANGLE_FAN&quot;,256:&quot;DEPTH_BUFFER_BIT&quot;,512:&quot;NEVER&quot;,513:&quot;LESS&quot;,514:&quot;EQUAL&quot;,515:&quot;LEQUAL&quot;,516:&quot;GREATER&quot;,517:&quot;NOTEQUAL&quot;,518:&quot;GEQUAL&quot;,519:&quot;ALWAYS&quot;,768:&quot;SRC_COLOR&quot;,769:&quot;ONE_MINUS_SRC_COLOR&quot;,770:&quot;SRC_ALPHA&quot;,771:&quot;ONE_MINUS_SRC_ALPHA&quot;,772:&quot;DST_ALPHA&quot;,773:&quot;ONE_MINUS_DST_ALPHA&quot;,774:&quot;DST_COLOR&quot;,775:&quot;ONE_MINUS_DST_COLOR&quot;,776:&quot;SRC_ALPHA_SATURATE&quot;,1024:&quot;STENCIL_BUFFER_BIT&quot;,1028:&quot;FRONT&quot;,1029:&quot;BACK&quot;,1032:&quot;FRONT_AND_BACK&quot;,1280:&quot;INVALID_ENUM&quot;,1281:&quot;INVALID_VALUE&quot;,1282:&quot;INVALID_OPERATION&quot;,1285:&quot;OUT_OF_MEMORY&quot;,1286:&quot;INVALID_FRAMEBUFFER_OPERATION&quot;,2304:&quot;CW&quot;,2305:&quot;CCW&quot;,2849:&quot;LINE_WIDTH&quot;,2884:&quot;CULL_FACE&quot;,2885:&quot;CULL_FACE_MODE&quot;,2886:&quot;FRONT_FACE&quot;,2928:&quot;DEPTH_RANGE&quot;,2929:&quot;DEPTH_TEST&quot;,2930:&quot;DEPTH_WRITEMASK&quot;,2931:&quot;DEPTH_CLEAR_VALUE&quot;,2932:&quot;DEPTH_FUNC&quot;,2960:&quot;STENCIL_TEST&quot;,2961:&quot;STENCIL_CLEAR_VALUE&quot;,2962:&quot;STENCIL_FUNC&quot;,2963:&quot;STENCIL_VALUE_MASK&quot;,2964:&quot;STENCIL_FAIL&quot;,2965:&quot;STENCIL_PASS_DEPTH_FAIL&quot;,2966:&quot;STENCIL_PASS_DEPTH_PASS&quot;,2967:&quot;STENCIL_REF&quot;,2968:&quot;STENCIL_WRITEMASK&quot;,2978:&quot;VIEWPORT&quot;,3024:&quot;DITHER&quot;,3042:&quot;BLEND&quot;,3088:&quot;SCISSOR_BOX&quot;,3089:&quot;SCISSOR_TEST&quot;,3106:&quot;COLOR_CLEAR_VALUE&quot;,3107:&quot;COLOR_WRITEMASK&quot;,3317:&quot;UNPACK_ALIGNMENT&quot;,3333:&quot;PACK_ALIGNMENT&quot;,3379:&quot;MAX_TEXTURE_SIZE&quot;,3386:&quot;MAX_VIEWPORT_DIMS&quot;,3408:&quot;SUBPIXEL_BITS&quot;,3410:&quot;RED_BITS&quot;,3411:&quot;GREEN_BITS&quot;,3412:&quot;BLUE_BITS&quot;,3413:&quot;ALPHA_BITS&quot;,3414:&quot;DEPTH_BITS&quot;,3415:&quot;STENCIL_BITS&quot;,3553:&quot;TEXTURE_2D&quot;,4352:&quot;DONT_CARE&quot;,4353:&quot;FASTEST&quot;,4354:&quot;NICEST&quot;,5120:&quot;BYTE&quot;,5121:&quot;UNSIGNED_BYTE&quot;,5122:&quot;SHORT&quot;,5123:&quot;UNSIGNED_SHORT&quot;,5124:&quot;INT&quot;,5125:&quot;UNSIGNED_INT&quot;,5126:&quot;FLOAT&quot;,5386:&quot;INVERT&quot;,5890:&quot;TEXTURE&quot;,6401:&quot;STENCIL_INDEX&quot;,6402:&quot;DEPTH_COMPONENT&quot;,6406:&quot;ALPHA&quot;,6407:&quot;RGB&quot;,6408:&quot;RGBA&quot;,6409:&quot;LUMINANCE&quot;,6410:&quot;LUMINANCE_ALPHA&quot;,7680:&quot;KEEP&quot;,7681:&quot;REPLACE&quot;,7682:&quot;INCR&quot;,7683:&quot;DECR&quot;,7936:&quot;VENDOR&quot;,7937:&quot;RENDERER&quot;,7938:&quot;VERSION&quot;,9728:&quot;NEAREST&quot;,9729:&quot;LINEAR&quot;,9984:&quot;NEAREST_MIPMAP_NEAREST&quot;,9985:&quot;LINEAR_MIPMAP_NEAREST&quot;,9986:&quot;NEAREST_MIPMAP_LINEAR&quot;,9987:&quot;LINEAR_MIPMAP_LINEAR&quot;,10240:&quot;TEXTURE_MAG_FILTER&quot;,10241:&quot;TEXTURE_MIN_FILTER&quot;,10242:&quot;TEXTURE_WRAP_S&quot;,10243:&quot;TEXTURE_WRAP_T&quot;,10497:&quot;REPEAT&quot;,10752:&quot;POLYGON_OFFSET_UNITS&quot;,16384:&quot;COLOR_BUFFER_BIT&quot;,32769:&quot;CONSTANT_COLOR&quot;,32770:&quot;ONE_MINUS_CONSTANT_COLOR&quot;,32771:&quot;CONSTANT_ALPHA&quot;,32772:&quot;ONE_MINUS_CONSTANT_ALPHA&quot;,32773:&quot;BLEND_COLOR&quot;,32774:&quot;FUNC_ADD&quot;,32777:&quot;BLEND_EQUATION_RGB&quot;,32778:&quot;FUNC_SUBTRACT&quot;,32779:&quot;FUNC_REVERSE_SUBTRACT&quot;,32819:&quot;UNSIGNED_SHORT_4_4_4_4&quot;,32820:&quot;UNSIGNED_SHORT_5_5_5_1&quot;,32823:&quot;POLYGON_OFFSET_FILL&quot;,32824:&quot;POLYGON_OFFSET_FACTOR&quot;,32854:&quot;RGBA4&quot;,32855:&quot;RGB5_A1&quot;,32873:&quot;TEXTURE_BINDING_2D&quot;,32926:&quot;SAMPLE_ALPHA_TO_COVERAGE&quot;,32928:&quot;SAMPLE_COVERAGE&quot;,32936:&quot;SAMPLE_BUFFERS&quot;,32937:&quot;SAMPLES&quot;,32938:&quot;SAMPLE_COVERAGE_VALUE&quot;,32939:&quot;SAMPLE_COVERAGE_INVERT&quot;,32968:&quot;BLEND_DST_RGB&quot;,32969:&quot;BLEND_SRC_RGB&quot;,32970:&quot;BLEND_DST_ALPHA&quot;,32971:&quot;BLEND_SRC_ALPHA&quot;,33071:&quot;CLAMP_TO_EDGE&quot;,33170:&quot;GENERATE_MIPMAP_HINT&quot;,33189:&quot;DEPTH_COMPONENT16&quot;,33306:&quot;DEPTH_STENCIL_ATTACHMENT&quot;,33635:&quot;UNSIGNED_SHORT_5_6_5&quot;,33648:&quot;MIRRORED_REPEAT&quot;,33901:&quot;ALIASED_POINT_SIZE_RANGE&quot;,33902:&quot;ALIASED_LINE_WIDTH_RANGE&quot;,33984:&quot;TEXTURE0&quot;,33985:&quot;TEXTURE1&quot;,33986:&quot;TEXTURE2&quot;,33987:&quot;TEXTURE3&quot;,33988:&quot;TEXTURE4&quot;,33989:&quot;TEXTURE5&quot;,33990:&quot;TEXTURE6&quot;,33991:&quot;TEXTURE7&quot;,33992:&quot;TEXTURE8&quot;,33993:&quot;TEXTURE9&quot;,33994:&quot;TEXTURE10&quot;,33995:&quot;TEXTURE11&quot;,33996:&quot;TEXTURE12&quot;,33997:&quot;TEXTURE13&quot;,33998:&quot;TEXTURE14&quot;,33999:&quot;TEXTURE15&quot;,34000:&quot;TEXTURE16&quot;,34001:&quot;TEXTURE17&quot;,34002:&quot;TEXTURE18&quot;,34003:&quot;TEXTURE19&quot;,34004:&quot;TEXTURE20&quot;,34005:&quot;TEXTURE21&quot;,34006:&quot;TEXTURE22&quot;,34007:&quot;TEXTURE23&quot;,34008:&quot;TEXTURE24&quot;,34009:&quot;TEXTURE25&quot;,34010:&quot;TEXTURE26&quot;,34011:&quot;TEXTURE27&quot;,34012:&quot;TEXTURE28&quot;,34013:&quot;TEXTURE29&quot;,34014:&quot;TEXTURE30&quot;,34015:&quot;TEXTURE31&quot;,34016:&quot;ACTIVE_TEXTURE&quot;,34024:&quot;MAX_RENDERBUFFER_SIZE&quot;,34041:&quot;DEPTH_STENCIL&quot;,34055:&quot;INCR_WRAP&quot;,34056:&quot;DECR_WRAP&quot;,34067:&quot;TEXTURE_CUBE_MAP&quot;,34068:&quot;TEXTURE_BINDING_CUBE_MAP&quot;,34069:&quot;TEXTURE_CUBE_MAP_POSITIVE_X&quot;,34070:&quot;TEXTURE_CUBE_MAP_NEGATIVE_X&quot;,34071:&quot;TEXTURE_CUBE_MAP_POSITIVE_Y&quot;,34072:&quot;TEXTURE_CUBE_MAP_NEGATIVE_Y&quot;,34073:&quot;TEXTURE_CUBE_MAP_POSITIVE_Z&quot;,34074:&quot;TEXTURE_CUBE_MAP_NEGATIVE_Z&quot;,34076:&quot;MAX_CUBE_MAP_TEXTURE_SIZE&quot;,34338:&quot;VERTEX_ATTRIB_ARRAY_ENABLED&quot;,34339:&quot;VERTEX_ATTRIB_ARRAY_SIZE&quot;,34340:&quot;VERTEX_ATTRIB_ARRAY_STRIDE&quot;,34341:&quot;VERTEX_ATTRIB_ARRAY_TYPE&quot;,34342:&quot;CURRENT_VERTEX_ATTRIB&quot;,34373:&quot;VERTEX_ATTRIB_ARRAY_POINTER&quot;,34466:&quot;NUM_COMPRESSED_TEXTURE_FORMATS&quot;,34467:&quot;COMPRESSED_TEXTURE_FORMATS&quot;,34660:&quot;BUFFER_SIZE&quot;,34661:&quot;BUFFER_USAGE&quot;,34816:&quot;STENCIL_BACK_FUNC&quot;,34817:&quot;STENCIL_BACK_FAIL&quot;,34818:&quot;STENCIL_BACK_PASS_DEPTH_FAIL&quot;,34819:&quot;STENCIL_BACK_PASS_DEPTH_PASS&quot;,34877:&quot;BLEND_EQUATION_ALPHA&quot;,34921:&quot;MAX_VERTEX_ATTRIBS&quot;,34922:&quot;VERTEX_ATTRIB_ARRAY_NORMALIZED&quot;,34930:&quot;MAX_TEXTURE_IMAGE_UNITS&quot;,34962:&quot;ARRAY_BUFFER&quot;,34963:&quot;ELEMENT_ARRAY_BUFFER&quot;,34964:&quot;ARRAY_BUFFER_BINDING&quot;,34965:&quot;ELEMENT_ARRAY_BUFFER_BINDING&quot;,34975:&quot;VERTEX_ATTRIB_ARRAY_BUFFER_BINDING&quot;,35040:&quot;STREAM_DRAW&quot;,35044:&quot;STATIC_DRAW&quot;,35048:&quot;DYNAMIC_DRAW&quot;,35632:&quot;FRAGMENT_SHADER&quot;,35633:&quot;VERTEX_SHADER&quot;,35660:&quot;MAX_VERTEX_TEXTURE_IMAGE_UNITS&quot;,35661:&quot;MAX_COMBINED_TEXTURE_IMAGE_UNITS&quot;,35663:&quot;SHADER_TYPE&quot;,35664:&quot;FLOAT_VEC2&quot;,35665:&quot;FLOAT_VEC3&quot;,35666:&quot;FLOAT_VEC4&quot;,35667:&quot;INT_VEC2&quot;,35668:&quot;INT_VEC3&quot;,35669:&quot;INT_VEC4&quot;,35670:&quot;BOOL&quot;,35671:&quot;BOOL_VEC2&quot;,35672:&quot;BOOL_VEC3&quot;,35673:&quot;BOOL_VEC4&quot;,35674:&quot;FLOAT_MAT2&quot;,35675:&quot;FLOAT_MAT3&quot;,35676:&quot;FLOAT_MAT4&quot;,35678:&quot;SAMPLER_2D&quot;,35680:&quot;SAMPLER_CUBE&quot;,35712:&quot;DELETE_STATUS&quot;,35713:&quot;COMPILE_STATUS&quot;,35714:&quot;LINK_STATUS&quot;,35715:&quot;VALIDATE_STATUS&quot;,35716:&quot;INFO_LOG_LENGTH&quot;,35717:&quot;ATTACHED_SHADERS&quot;,35718:&quot;ACTIVE_UNIFORMS&quot;,35719:&quot;ACTIVE_UNIFORM_MAX_LENGTH&quot;,35720:&quot;SHADER_SOURCE_LENGTH&quot;,35721:&quot;ACTIVE_ATTRIBUTES&quot;,35722:&quot;ACTIVE_ATTRIBUTE_MAX_LENGTH&quot;,35724:&quot;SHADING_LANGUAGE_VERSION&quot;,35725:&quot;CURRENT_PROGRAM&quot;,36003:&quot;STENCIL_BACK_REF&quot;,36004:&quot;STENCIL_BACK_VALUE_MASK&quot;,36005:&quot;STENCIL_BACK_WRITEMASK&quot;,36006:&quot;FRAMEBUFFER_BINDING&quot;,36007:&quot;RENDERBUFFER_BINDING&quot;,36048:&quot;FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE&quot;,36049:&quot;FRAMEBUFFER_ATTACHMENT_OBJECT_NAME&quot;,36050:&quot;FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL&quot;,36051:&quot;FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE&quot;,36053:&quot;FRAMEBUFFER_COMPLETE&quot;,36054:&quot;FRAMEBUFFER_INCOMPLETE_ATTACHMENT&quot;,36055:&quot;FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT&quot;,36057:&quot;FRAMEBUFFER_INCOMPLETE_DIMENSIONS&quot;,36061:&quot;FRAMEBUFFER_UNSUPPORTED&quot;,36064:&quot;COLOR_ATTACHMENT0&quot;,36096:&quot;DEPTH_ATTACHMENT&quot;,36128:&quot;STENCIL_ATTACHMENT&quot;,36160:&quot;FRAMEBUFFER&quot;,36161:&quot;RENDERBUFFER&quot;,36162:&quot;RENDERBUFFER_WIDTH&quot;,36163:&quot;RENDERBUFFER_HEIGHT&quot;,36164:&quot;RENDERBUFFER_INTERNAL_FORMAT&quot;,36168:&quot;STENCIL_INDEX8&quot;,36176:&quot;RENDERBUFFER_RED_SIZE&quot;,36177:&quot;RENDERBUFFER_GREEN_SIZE&quot;,36178:&quot;RENDERBUFFER_BLUE_SIZE&quot;,36179:&quot;RENDERBUFFER_ALPHA_SIZE&quot;,36180:&quot;RENDERBUFFER_DEPTH_SIZE&quot;,36181:&quot;RENDERBUFFER_STENCIL_SIZE&quot;,36194:&quot;RGB565&quot;,36336:&quot;LOW_FLOAT&quot;,36337:&quot;MEDIUM_FLOAT&quot;,36338:&quot;HIGH_FLOAT&quot;,36339:&quot;LOW_INT&quot;,36340:&quot;MEDIUM_INT&quot;,36341:&quot;HIGH_INT&quot;,36346:&quot;SHADER_COMPILER&quot;,36347:&quot;MAX_VERTEX_UNIFORM_VECTORS&quot;,36348:&quot;MAX_VARYING_VECTORS&quot;,36349:&quot;MAX_FRAGMENT_UNIFORM_VECTORS&quot;,37440:&quot;UNPACK_FLIP_Y_WEBGL&quot;,37441:&quot;UNPACK_PREMULTIPLY_ALPHA_WEBGL&quot;,37442:&quot;CONTEXT_LOST_WEBGL&quot;,37443:&quot;UNPACK_COLORSPACE_CONVERSION_WEBGL&quot;,37444:&quot;BROWSER_DEFAULT_WEBGL&quot;}},{}],235:[function(t,e,r){var n=t(&quot;./1.0/numbers&quot;);e.exports=function(t){return n[t]}},{&quot;./1.0/numbers&quot;:234}],236:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders/index&quot;),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1}var l=s.prototype;function c(t,e){for(var r=0;r&lt;3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return this.opacity&gt;=1},l.isTransparent=function(){return this.opacity&lt;1},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f&lt;3;++f)e.lineWidth(this.lineWidth[f]),r.capSize=this.capSize[f]*u,this.lineCount[f]&amp;&amp;e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e&lt;3;++e){for(var r=[],n=1;n&lt;=2;++n)for(var i=-1;i&lt;=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=u[n],a=0;a&lt;i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}l.update=function(t){&quot;lineWidth&quot;in(t=t||{})&amp;&amp;(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),&quot;capSize&quot;in t&amp;&amp;(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&amp;&amp;n){var i=[],a=r.length,o=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s&lt;3;++s){this.lineOffset[s]=o;t:for(var l=0;l&lt;a;++l){for(var u=r[l],h=0;h&lt;3;++h)if(isNaN(u[h])||!isFinite(u[h]))continue t;var p=n[l],d=e[s];if(Array.isArray(d[0])&amp;&amp;(d=e[l]),3===d.length&amp;&amp;(d=[d[0],d[1],d[2],1]),!isNaN(p[0][s])&amp;&amp;!isNaN(p[1][s])){var g;if(p[0][s]&lt;0)(g=u.slice())[s]+=p[0][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s);if(p[1][s]&gt;0)(g=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{&quot;./shaders/index&quot;:237,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],237:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n  vec4 worldPosition  = model * vec4(position, 1.0);\n  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n  gl_Position         = projection * view * worldPosition;\n  fragColor           = color;\n  fragPosition        = position;\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n  if(any(lessThan(fragPosition, clipBounds[0])) || any(greaterThan(fragPosition, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = opacity * fragColor;\n}&quot;]);e.exports=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;offset&quot;,type:&quot;vec3&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],238:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-texture2d&quot;);e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension(&quot;WEBGL_draw_buffers&quot;);!l&amp;&amp;c&amp;&amp;function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n&lt;=r;++n){for(var i=new Array(r),a=0;a&lt;n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(var a=n;a&lt;r;++a)i[a]=t.NONE;l[n]=i}}(t,c);Array.isArray(e)&amp;&amp;(n=r,r=0|e[1],e=0|e[0]);if(&quot;number&quot;!=typeof e)throw new Error(&quot;gl-fbo: Missing shape parameter&quot;);var u=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e&lt;0||e&gt;u||r&lt;0||r&gt;u)throw new Error(&quot;gl-fbo: Parameters are too large for FBO&quot;);var f=1;if(&quot;color&quot;in(n=n||{})){if((f=Math.max(0|n.color,0))&lt;0)throw new Error(&quot;gl-fbo: Must specify a nonnegative number of colors&quot;);if(f&gt;1){if(!c)throw new Error(&quot;gl-fbo: Multiple draw buffer extension not supported&quot;);if(f&gt;t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(&quot;gl-fbo: Context does not support &quot;+f+&quot; draw buffers&quot;)}}var h=t.UNSIGNED_BYTE,p=t.getExtension(&quot;OES_texture_float&quot;);if(n.float&amp;&amp;f&gt;0){if(!p)throw new Error(&quot;gl-fbo: Context does not support floating point textures&quot;);h=t.FLOAT}else n.preferFloat&amp;&amp;f&gt;0&amp;&amp;p&amp;&amp;(h=t.FLOAT);var g=!0;&quot;depth&quot;in n&amp;&amp;(g=!!n.depth);var m=!1;&quot;stencil&quot;in n&amp;&amp;(m=!!n.stencil);return new d(t,e,r,h,f,g,m,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error(&quot;gl-fbo: Framebuffer unsupported&quot;);case a:throw new Error(&quot;gl-fbo: Framebuffer incomplete attachment&quot;);case o:throw new Error(&quot;gl-fbo: Framebuffer incomplete dimensions&quot;);case s:throw new Error(&quot;gl-fbo: Framebuffer incomplete missing attachment&quot;);default:throw new Error(&quot;gl-fbo: Framebuffer failed for unspecified reason&quot;)}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d&lt;i;++d)this.color[d]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=n,this._useDepth=a,this._useStencil=o;var g=this,m=[0|e,0|r];Object.defineProperties(m,{0:{get:function(){return g._shape[0]},set:function(t){return g.width=t}},1:{get:function(){return g._shape[1]},set:function(t){return g.height=t}}}),this._shapeVector=m,function(t){var e=c(t.gl),r=t.gl,n=t.handle=r.createFramebuffer(),i=t._shape[0],a=t._shape[1],o=t.color.length,s=t._ext,d=t._useStencil,g=t._useDepth,m=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,n);for(var v=0;v&lt;o;++v)t.color[v]=h(r,i,a,m,r.RGBA,r.COLOR_ATTACHMENT0+v);0===o?(t._color_rb=p(r,i,a,r.RGBA4,r.COLOR_ATTACHMENT0),s&amp;&amp;s.drawBuffersWEBGL(l[0])):o&gt;1&amp;&amp;s.drawBuffersWEBGL(l[o]);var y=r.getExtension(&quot;WEBGL_depth_texture&quot;);y?d?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&amp;&amp;(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&amp;&amp;d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&amp;&amp;(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&amp;&amp;(t.depth.dispose(),t.depth=null),t._depth_rb&amp;&amp;(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),v=0;v&lt;t.color.length;++v)t.color[v].dispose(),t.color[v]=null;t._color_rb&amp;&amp;(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),u(r,e),f(x)}u(r,e)}(this)}var g=d.prototype;function m(t,e,r){if(t._destroyed)throw new Error(&quot;gl-fbo: Can't resize destroyed FBO&quot;);if(t._shape[0]!==e||t._shape[1]!==r){var n=t.gl,i=n.getParameter(n.MAX_RENDERBUFFER_SIZE);if(e&lt;0||e&gt;i||r&lt;0||r&gt;i)throw new Error(&quot;gl-fbo: Can't resize FBO, invalid dimensions&quot;);t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o&lt;t.color.length;++o)t.color[o].shape=t._shape;t._color_rb&amp;&amp;(n.bindRenderbuffer(n.RENDERBUFFER,t._color_rb),n.renderbufferStorage(n.RENDERBUFFER,n.RGBA4,t._shape[0],t._shape[1])),t.depth&amp;&amp;(t.depth.shape=t._shape),t._depth_rb&amp;&amp;(n.bindRenderbuffer(n.RENDERBUFFER,t._depth_rb),t._useDepth&amp;&amp;t._useStencil?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&amp;&amp;n.renderbufferStorage(n.RENDERBUFFER,n.STENCIL_INDEX,t._shape[0],t._shape[1])),n.bindFramebuffer(n.FRAMEBUFFER,t.handle);var s=n.checkFramebufferStatus(n.FRAMEBUFFER);s!==n.FRAMEBUFFER_COMPLETE&amp;&amp;(t.dispose(),u(n,a),f(s)),u(n,a)}}Object.defineProperties(g,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error(&quot;gl-fbo: Shape vector must be length 2&quot;);var e=0|t[0],r=0|t[1];return m(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return m(this,t|=0,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,m(this,this._shape[0],t),t},enumerable:!1}}),g.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},g.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&amp;&amp;(this.depth.dispose(),this.depth=null),this._depth_rb&amp;&amp;(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e&lt;this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&amp;&amp;(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{&quot;gl-texture2d&quot;:303}],239:[function(t,e,r){var n=t(&quot;sprintf-js&quot;).sprintf,i=t(&quot;gl-constants/lookup&quot;),a=t(&quot;glsl-shader-name&quot;),o=t(&quot;add-line-numbers&quot;);e.exports=function(t,e,r){&quot;use strict&quot;;var s=a(e)||&quot;of unknown name (see npm glsl-shader-name)&quot;,l=&quot;unknown type&quot;;void 0!==r&amp;&amp;(l=r===i.FRAGMENT_SHADER?&quot;fragment&quot;:&quot;vertex&quot;);for(var c=n(&quot;Error compiling %s shader %s:\n&quot;,l,s),u=n(&quot;%s%s&quot;,c,t),f=t.split(&quot;\n&quot;),h={},p=0;p&lt;f.length;p++){var d=f[p];if(&quot;&quot;!==d&amp;&amp;&quot;\0&quot;!==d){var g=parseInt(d.split(&quot;:&quot;)[2]);if(isNaN(g))throw new Error(n(&quot;Could not parse error: %s&quot;,d));h[g]=d}}for(var m=o(e).split(&quot;\n&quot;),p=0;p&lt;m.length;p++)if(h[p+3]||h[p+2]||h[p+1]){var v=m[p];if(c+=v+&quot;\n&quot;,h[p+1]){var y=h[p+1];y=y.substr(y.split(&quot;:&quot;,3).join(&quot;:&quot;).length+1).trim(),c+=n(&quot;^^^ %s\n\n&quot;,y)}}return{long:c.trim(),short:u.trim()}}},{&quot;add-line-numbers&quot;:48,&quot;gl-constants/lookup&quot;:235,&quot;glsl-shader-name&quot;:382,&quot;sprintf-js&quot;:501}],240:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=t.gl,n=o(r,l.vertex,l.fragment),i=o(r,l.pickVertex,l.pickFragment),a=s(r),u=s(r),f=s(r),h=s(r),p=new c(t,n,i,a,u,f,h);return p.update(e),t.addObject(p),p};var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;iota-array&quot;),a=t(&quot;typedarray-pool&quot;),o=t(&quot;gl-shader&quot;),s=t(&quot;gl-buffer&quot;),l=t(&quot;./lib/shaders&quot;);function c(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var u,f=c.prototype,h=[0,0,1,0,0,1,1,0,1,1,0,1];f.draw=(u=[1,0,0,0,1,0,0,0,1],function(){var t=this.plot,e=this.shader,r=this.bounds,n=this.numVertices;if(!(n&lt;=0)){var i=t.gl,a=t.dataBox,o=r[2]-r[0],s=r[3]-r[1],l=a[2]-a[0],c=a[3]-a[1];u[0]=2*o/l,u[4]=2*s/c,u[6]=2*(r[0]-a[0])/l-1,u[7]=2*(r[1]-a[1])/c-1,e.bind();var f=e.uniforms;f.viewTransform=u,f.shape=this.shape;var h=e.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(i.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(i.UNSIGNED_BYTE,!0),i.drawArrays(i.TRIANGLES,0,n)}}),f.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o&lt;=0)){var s=n.gl,l=n.dataBox,c=a[2]-a[0],u=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*c/f,t[4]=2*u/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var p=0;p&lt;4;++p)e[p]=r&gt;&gt;8*p&amp;255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r&lt;n||r&gt;=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,f=this.bounds,p=f[0]=r[0],d=f[1]=o[0],g=1/((f[2]=r[r.length-1])-p),m=1/((f[3]=o[o.length-1])-d),v=e[0],y=e[1];this.shape=[v,y];var x=(v-1)*(y-1)*(h.length&gt;&gt;&gt;1);this.numVertices=x;for(var b=a.mallocUint8(4*x),_=a.mallocFloat32(2*x),w=a.mallocUint8(2*x),k=a.mallocUint32(x),M=0,A=0;A&lt;y-1;++A)for(var T=m*(o[A]-d),S=m*(o[A+1]-d),E=0;E&lt;v-1;++E)for(var C=g*(r[E]-p),L=g*(r[E+1]-p),z=0;z&lt;h.length;z+=2){var P,O,I,D,R=h[z],B=h[z+1],F=s[(A+B)*v+(E+R)],N=n.le(l,F);if(N&lt;0)P=c[0],O=c[1],I=c[2],D=c[3];else if(N===u-1)P=c[4*u-4],O=c[4*u-3],I=c[4*u-2],D=c[4*u-1];else{var j=(F-l[N])/(l[N+1]-l[N]),V=1-j,U=4*N,q=4*(N+1);P=V*c[U]+j*c[q],O=V*c[U+1]+j*c[q+1],I=V*c[U+2]+j*c[q+2],D=V*c[U+3]+j*c[q+3]}b[4*M]=255*P,b[4*M+1]=255*O,b[4*M+2]=255*I,b[4*M+3]=255*D,_[2*M]=.5*C+.5*L,_[2*M+1]=.5*T+.5*S,w[2*M]=R,w[2*M+1]=B,k[M]=A*v+E,M+=1}this.positionBuffer.update(_),this.weightBuffer.update(w),this.colorBuffer.update(b),this.idBuffer.update(k),a.free(_),a.free(b),a.free(w),a.free(k)},f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{&quot;./lib/shaders&quot;:241,&quot;binary-search-bounds&quot;:242,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286,&quot;iota-array&quot;:397,&quot;typedarray-pool&quot;:519}],241:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;);e.exports={fragment:n([&quot;precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\n}\n&quot;]),vertex:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 color;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragColor;\n\nvoid main() {\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n  fragColor = color;\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n&quot;]),pickFragment:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nuniform vec2 shape;\nuniform vec4 pickOffset;\n\nvoid main() {\n  vec2 d = step(.5, vWeight);\n  vec4 id = fragId + pickOffset;\n  id.x += d.x + d.y*shape.x;\n\n  id.y += floor(id.x / 256.0);\n  id.x -= floor(id.x / 256.0) * 256.0;\n\n  id.z += floor(id.y / 256.0);\n  id.y -= floor(id.y / 256.0) * 256.0;\n\n  id.w += floor(id.z / 256.0);\n  id.z -= floor(id.z / 256.0) * 256.0;\n\n  gl_FragColor = id/255.;\n}\n&quot;]),pickVertex:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n  vWeight = weight;\n\n  fragId = pickId;\n\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n&quot;])}},{glslify:390}],242:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{dup:98}],243:[function(t,e,r){var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, nextPosition;\nattribute float arcLength, lineWidth;\nattribute vec4 color;\n\nuniform vec2 screenShape;\nuniform float pixelRatio;\nuniform mat4 model, view, projection;\n\nvarying vec4 fragColor;\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\n\nvoid main() {\n  vec4 projected = projection * view * model * vec4(position, 1.0);\n  vec4 tangentClip = projection * view * model * vec4(nextPosition - position, 0.0);\n  vec2 tangent = normalize(screenShape * tangentClip.xy);\n  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(tangent.y, -tangent.x) / screenShape;\n\n  gl_Position = vec4(projected.xy + projected.w * offset, projected.zw);\n\n  worldPosition = position;\n  pixelArcLength = arcLength;\n  fragColor = color;\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3      clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float     dashScale;\nuniform float     opacity;\n\nvarying vec3    worldPosition;\nvarying float   pixelArcLength;\nvarying vec4    fragColor;\n\nvoid main() {\n  if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n    discard;\n  }\n  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n  if(dashWeight &lt; 0.5) {\n    discard;\n  }\n  gl_FragColor = fragColor * opacity;\n}\n&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX  1.70141184e38\n#define FLOAT_MIN  1.17549435e-38\n\nlowp vec4 encode_float_1540259130(highp float v) {\n  highp float av = abs(v);\n\n  //Handle special cases\n  if(av &lt; FLOAT_MIN) {\n    return vec4(0.0, 0.0, 0.0, 0.0);\n  } else if(v &gt; FLOAT_MAX) {\n    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n  } else if(v &lt; -FLOAT_MAX) {\n    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n  }\n\n  highp vec4 c = vec4(0,0,0,0);\n\n  //Compute exponent and mantissa\n  highp float e = floor(log2(av));\n  highp float m = av * pow(2.0, -e) - 1.0;\n  \n  //Unpack mantissa\n  c[1] = floor(128.0 * m);\n  m -= c[1] / 128.0;\n  c[2] = floor(32768.0 * m);\n  m -= c[2] / 32768.0;\n  c[3] = floor(8388608.0 * m);\n  \n  //Unpack exponent\n  highp float ebias = e + 127.0;\n  c[0] = floor(ebias / 2.0);\n  ebias -= c[0] * 2.0;\n  c[1] += floor(ebias) * 128.0; \n\n  //Unpack sign bit\n  c[0] += 128.0 * step(0.0, -v);\n\n  //Scale back to range\n  return c / 255.0;\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n  if(any(lessThan(worldPosition, clipBounds[0])) || any(greaterThan(worldPosition, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\n}&quot;]),l=[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;nextPosition&quot;,type:&quot;vec3&quot;},{name:&quot;arcLength&quot;,type:&quot;float&quot;},{name:&quot;lineWidth&quot;,type:&quot;float&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{&quot;gl-shader&quot;:286,glslify:390}],244:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl||t.scene&amp;&amp;t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=f(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),h=l(new Array(1024),[256,1,4]),p=0;p&lt;1024;++p)h.data[p]=255;var d=a(e,h);d.wrap=e.REPEAT;var g=new m(e,r,o,s,c,d);return g.update(t),g};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;gl-texture2d&quot;),o=t(&quot;glsl-read-float&quot;),s=t(&quot;binary-search-bounds&quot;),l=t(&quot;ndarray&quot;),c=t(&quot;./lib/shaders&quot;),u=c.createShader,f=c.createPickShader,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n&lt;3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r&lt;3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function m(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}var v=m.prototype;v.isTransparent=function(){return this.opacity&lt;1},v.isOpaque=function(){return this.opacity&gt;=1},v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.drawTransparent=v.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()},v.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()},v.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;&quot;dashScale&quot;in t&amp;&amp;(this.dashScale=t.dashScale),&quot;opacity&quot;in t&amp;&amp;(this.opacity=+t.opacity);var i=t.position||t.positions;if(i){var a=t.color||t.colors||[0,0,0,1],o=t.lineWidth||1,c=[],u=[],f=[],h=0,d=0,g=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],m=!1;t:for(e=1;e&lt;i.length;++e){var v,y,x,b=i[e-1],_=i[e];for(u.push(h),f.push(b.slice()),r=0;r&lt;3;++r){if(isNaN(b[r])||isNaN(_[r])||!isFinite(b[r])||!isFinite(_[r])){if(!n&amp;&amp;c.length&gt;0){for(var w=0;w&lt;24;++w)c.push(c[c.length-12]);d+=2,m=!0}continue t}g[0][r]=Math.min(g[0][r],b[r],_[r]),g[1][r]=Math.max(g[1][r],b[r],_[r])}Array.isArray(a[0])?(v=a[e-1],y=a[e]):v=y=a,3===v.length&amp;&amp;(v=[v[0],v[1],v[2],1]),3===y.length&amp;&amp;(y=[y[0],y[1],y[2],1]),x=Array.isArray(o)?o[e-1]:o;var k=h;if(h+=p(b,_),m){for(r=0;r&lt;2;++r)c.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,v[0],v[1],v[2],v[3]);d+=2,m=!1}c.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,v[0],v[1],v[2],v[3],_[0],_[1],_[2],b[0],b[1],b[2],h,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],h,x,y[0],y[1],y[2],y[3]),d+=4}if(this.buffer.update(c),u.push(h),f.push(i[i.length-1].slice()),this.bounds=g,this.vertexCount=d,this.points=f,this.arcLength=u,&quot;dashes&quot;in t){var M=t.dashes.slice();for(M.unshift(0),e=1;e&lt;M.length;++e)M[e]=M[e-1]+M[e];var A=l(new Array(1024),[256,1,4]);for(e=0;e&lt;256;++e){for(r=0;r&lt;4;++r)A.set(e,0,r,0);1&amp;s.le(M,M[M.length-1]*e/255)?A.set(e,0,0,0):A.set(e,0,0,255)}this.texture.setPixels(A)}}},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},v.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=o(t.value[0],t.value[1],t.value[2],0),r=s.le(this.arcLength,e);if(r&lt;0)return null;if(r===this.arcLength.length-1)return new g(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],a=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),l=1-a,c=[0,0,0],u=0;u&lt;3;++u)c[u]=l*n[u]+a*i[u];var f=Math.min(a&lt;.5?r:r+1,this.points.length-1);return new g(e,c,f,this.points[f])}},{&quot;./lib/shaders&quot;:243,&quot;binary-search-bounds&quot;:78,&quot;gl-buffer&quot;:229,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,&quot;glsl-read-float&quot;:381,ndarray:430}],245:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null}},{}],246:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,p=c*a-o*l,d=r*f+n*h+i*p;return d?(d=1/d,t[0]=f*d,t[1]=(-u*n+i*c)*d,t[2]=(s*n-i*o)*d,t[3]=h*d,t[4]=(u*r-i*l)*d,t[5]=(-s*r+i*a)*d,t[6]=p*d,t[7]=(-c*r+n*l)*d,t[8]=(o*r-n*a)*d,t):null}},{}],247:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],248:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],249:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],p=t[12],d=t[13],g=t[14],m=t[15];return(e*o-r*a)*(f*m-h*g)-(e*s-n*a)*(u*m-h*d)+(e*l-i*a)*(u*g-f*d)+(r*s-n*o)*(c*m-h*p)-(r*l-i*o)*(c*g-f*p)+(n*l-i*s)*(c*d-u*p)}},{}],250:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,c=r*o,u=n*o,f=n*s,h=i*o,p=i*s,d=i*l,g=a*o,m=a*s,v=a*l;return t[0]=1-f-d,t[1]=u+v,t[2]=h-m,t[3]=0,t[4]=u-v,t[5]=1-c-d,t[6]=p+g,t[7]=0,t[8]=h+m,t[9]=p-g,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],251:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,p=i*l,d=i*c,g=a*c,m=o*s,v=o*l,y=o*c;return t[0]=1-(p+g),t[1]=f+y,t[2]=h-v,t[3]=0,t[4]=f-y,t[5]=1-(u+g),t[6]=d+m,t[7]=0,t[8]=h+v,t[9]=d-m,t[10]=1-(u+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],252:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],253:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],m=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*m-h*d,T=u*v-p*d,S=f*m-h*g,E=f*v-p*g,C=h*v-p*m,L=y*C-x*E+b*S+_*T-w*A+k*M;if(!L)return null;return L=1/L,t[0]=(s*C-l*E+c*S)*L,t[1]=(i*E-n*C-a*S)*L,t[2]=(g*k-m*w+v*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*C-c*A)*L,t[5]=(r*C-i*T+a*A)*L,t[6]=(m*b-d*k-v*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*E-s*T+c*M)*L,t[9]=(n*T-r*E-a*M)*L,t[10]=(d*w-g*b+v*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-m*y)*L,t[15]=(u*_-f*x+h*y)*L,t}},{}],254:[function(t,e,r){var n=t(&quot;./identity&quot;);e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,p,d,g=e[0],m=e[1],v=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];if(Math.abs(g-_)&lt;1e-6&amp;&amp;Math.abs(m-w)&lt;1e-6&amp;&amp;Math.abs(v-k)&lt;1e-6)return n(t);f=g-_,h=m-w,p=v-k,d=1/Math.sqrt(f*f+h*h+p*p),a=x*(p*=d)-b*(h*=d),o=b*(f*=d)-y*p,s=y*h-x*f,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0);l=h*s-p*o,c=p*a-f*s,u=f*o-h*a,(d=Math.sqrt(l*l+c*c+u*u))?(l*=d=1/d,c*=d,u*=d):(l=0,c=0,u=0);return t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=u,t[10]=p,t[11]=0,t[12]=-(a*g+o*m+s*v),t[13]=-(l*g+c*m+u*v),t[14]=-(f*g+h*m+p*v),t[15]=1,t}},{&quot;./identity&quot;:252}],255:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],m=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*m,t[2]=x*a+b*c+_*p+w*v,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*m,t[6]=x*a+b*c+_*p+w*v,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*m,t[10]=x*a+b*c+_*p+w*v,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}},{}],256:[function(t,e,r){e.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},{}],257:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,k,M,A,T,S,E=n[0],C=n[1],L=n[2],z=Math.sqrt(E*E+C*C+L*L);if(Math.abs(z)&lt;1e-6)return null;E*=z=1/z,C*=z,L*=z,i=Math.sin(r),a=Math.cos(r),o=1-a,s=e[0],l=e[1],c=e[2],u=e[3],f=e[4],h=e[5],p=e[6],d=e[7],g=e[8],m=e[9],v=e[10],y=e[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,M=L*C*o+E*i,A=E*L*o+C*i,T=C*L*o-E*i,S=L*L*o+a,t[0]=s*x+f*b+g*_,t[1]=l*x+h*b+m*_,t[2]=c*x+p*b+v*_,t[3]=u*x+d*b+y*_,t[4]=s*w+f*k+g*M,t[5]=l*w+h*k+m*M,t[6]=c*w+p*k+v*M,t[7]=u*w+d*k+y*M,t[8]=s*A+f*T+g*S,t[9]=l*A+h*T+m*S,t[10]=c*A+p*T+v*S,t[11]=u*A+d*T+y*S,e!==t&amp;&amp;(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},{}],258:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&amp;&amp;(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],259:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&amp;&amp;(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],260:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];e!==t&amp;&amp;(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],261:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],262:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],m=r[1],v=r[2];e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*m+f*v+e[12],t[13]=i*g+l*m+h*v+e[13],t[14]=a*g+c*m+p*v+e[14],t[15]=o*g+u*m+d*v+e[15]);return t}},{}],263:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],264:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){switch(e.length){case 0:break;case 1:t[0]=1/e[0];break;case 4:n(t,e);break;case 9:i(t,e);break;case 16:a(t,e);break;default:throw new Error(&quot;currently supports matrices up to 4x4&quot;)}return t};var n=t(&quot;gl-mat2/invert&quot;),i=t(&quot;gl-mat3/invert&quot;),a=t(&quot;gl-mat4/invert&quot;)},{&quot;gl-mat2/invert&quot;:245,&quot;gl-mat3/invert&quot;:246,&quot;gl-mat4/invert&quot;:253}],265:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;barycentric&quot;),i=t(&quot;polytope-closest-point/lib/closest_point_2d.js&quot;);function a(t,e){for(var r=[0,0,0,0],n=0;n&lt;4;++n)for(var i=0;i&lt;4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s&lt;3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}e.exports=function(t,e,r,a,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u&lt;t.length;++u)c[u]=o(t[u],r,a,s,l);for(var f=0,h=1/0,u=0;u&lt;c.length;++u){for(var p=0,d=0;d&lt;2;++d)p+=Math.pow(c[u][d]-e[d],2);p&lt;h&amp;&amp;(h=p,f=u)}for(var g=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o&lt;2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return r=Math.sqrt(r),a=Math.sqrt(a),r+a&lt;1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),m=0,u=0;u&lt;3;++u){if(g[u]&lt;-.001||g[u]&gt;1.0001)return null;m+=g[u]}if(Math.abs(m-1)&gt;.001)return null;return[f,function(t,e){for(var r=[0,0,0],n=0;n&lt;t.length;++n)for(var i=t[n],a=e[n],o=0;o&lt;3;++o)r[o]+=a*i[o];return r}(t,g),g]}},{barycentric:60,&quot;polytope-closest-point/lib/closest_point_2d.js&quot;:461}],266:[function(t,e,r){var n=t(&quot;glslify&quot;),i=n([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n           , view\n           , projection;\nuniform vec3 eyePosition\n           , lightPosition;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  vec4 m_position  = model * vec4(position, 1.0);\n  vec4 t_position  = view * m_position;\n  gl_Position      = projection * t_position;\n  f_color          = color;\n  f_normal         = normal;\n  f_data           = position;\n  f_eyeDirection   = eyePosition   - position;\n  f_lightDirection = lightPosition - position;\n  f_uv             = uv;\n}\n&quot;]),a=n([&quot;#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nvec3 normals(vec3 pos) {\n  vec3 fdx = dFdx(pos);\n  vec3 fdy = dFdy(pos);\n  return normalize(cross(fdx, fdy));\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n            , fresnel\n            , kambient\n            , kdiffuse\n            , kspecular\n            , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if(any(lessThan(f_data, clipBounds[0])) ||\n     any(greaterThan(f_data, clipBounds[1]))) {\n    discard;\n  }\n\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n\n  vec3 normal = normals(f_data);\n\n  if (\n    dot(N, normal) &lt; 0.0\n    ) {\n      N = -N;\n  }\n\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n  f_color = color;\n  f_data  = position;\n  f_uv    = uv;\n}&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n  if(any(lessThan(f_data, clipBounds[0])) || \n     any(greaterThan(f_data, clipBounds[1]))) {\n    discard;\n  }\n\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}&quot;]),l=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0])) || \n     any(greaterThan(position, clipBounds[1]))) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    gl_Position = projection * view * model * vec4(position, 1.0);\n  }\n  gl_PointSize = pointSize;\n  f_color = color;\n  f_uv = uv;\n}&quot;]),c=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\n  if(dot(pointR, pointR) &gt; 0.25) {\n    discard;\n  }\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}&quot;]),u=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n  f_id        = id;\n  f_position  = position;\n}&quot;]),f=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if(any(lessThan(f_position, clipBounds[0])) || \n     any(greaterThan(f_position, clipBounds[1]))) {\n    discard;\n  }\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}&quot;]),h=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3  position;\nattribute float pointSize;\nattribute vec4  id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0])) || \n     any(greaterThan(position, clipBounds[1]))) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    gl_Position  = projection * view * model * vec4(position, 1.0);\n    gl_PointSize = pointSize;\n  }\n  f_id         = id;\n  f_position   = position;\n}&quot;]),p=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n}&quot;]),d=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n  gl_FragColor = vec4(contourColor,1);\n}\n&quot;]);r.meshShader={vertex:i,fragment:a,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;},{name:&quot;pointSize&quot;,type:&quot;float&quot;}]},r.pickShader={vertex:u,fragment:f,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;}]},r.pointPickShader={vertex:h,fragment:f,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;pointSize&quot;,type:&quot;float&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:&quot;position&quot;,type:&quot;vec3&quot;}]}},{glslify:390}],267:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;normals&quot;),l=t(&quot;gl-mat4/multiply&quot;),c=t(&quot;gl-mat4/invert&quot;),u=t(&quot;ndarray&quot;),f=t(&quot;colormap&quot;),h=t(&quot;simplicial-complex-contour&quot;),p=t(&quot;typedarray-pool&quot;),d=t(&quot;./lib/shaders&quot;),g=t(&quot;./lib/closest-point&quot;),m=d.meshShader,v=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,k,M,A,T,S){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=m,this.edgeUVs=v,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=M,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var M=k.prototype;function A(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function T(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function S(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function E(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}M.isOpaque=function(){return this.opacity&gt;=1},M.isTransparent=function(){return this.opacity&lt;1},M.pickSlots=1,M.setPickBase=function(t){this.pickId=t},M.highlight=function(t){if(t&amp;&amp;this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l&lt;a;++l)for(var c=r[l],u=0;u&lt;2;++u){var f=c[0];2===c.length&amp;&amp;(f=c[u]);for(var d=n[f][0],g=n[f][1],m=i[f],v=1-m,y=this.positions[d],x=this.positions[g],b=0;b&lt;3;++b)o[s++]=m*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},M.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,&quot;contourEnable&quot;in t&amp;&amp;(this.contourEnable=t.contourEnable),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=t.contourColor),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;lightPosition&quot;in t&amp;&amp;(this.lightPosition=t.lightPosition),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;ambient&quot;in t&amp;&amp;(this.ambientLight=t.ambient),&quot;diffuse&quot;in t&amp;&amp;(this.diffuseLight=t.diffuse),&quot;specular&quot;in t&amp;&amp;(this.specularLight=t.specular),&quot;roughness&quot;in t&amp;&amp;(this.roughness=t.roughness),&quot;fresnel&quot;in t&amp;&amp;(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&amp;&amp;(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:&quot;rgba&quot;}),r=new Uint8Array(1024),n=0;n&lt;256;++n){for(var i=e[n],a=0;a&lt;3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&amp;&amp;r){var i=[],a=[],l=[],c=[],h=[],p=[],d=[],g=[],m=[],v=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,k=t.cellNormals,M=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,A=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&amp;&amp;!k&amp;&amp;(k=s.faceNormals(r,n,A)),k||w||(w=s.vertexNormals(r,n,M));var T=t.vertexColors,S=t.cellColors,E=t.meshColor||[1,1,1,1],C=t.vertexUVs,L=t.vertexIntensity,z=t.cellUVs,P=t.cellIntensity,O=1/0,I=-1/0;if(!C&amp;&amp;!z)if(L)if(t.vertexIntensityBounds)O=+t.vertexIntensityBounds[0],I=+t.vertexIntensityBounds[1];else for(var D=0;D&lt;L.length;++D){var R=L[D];O=Math.min(O,R),I=Math.max(I,R)}else if(P)for(D=0;D&lt;P.length;++D){R=P[D];O=Math.min(O,R),I=Math.max(I,R)}else for(D=0;D&lt;n.length;++D){R=n[D][2];O=Math.min(O,R),I=Math.max(I,R)}this.intensity=L||(P?function(t,e,r){for(var n=new Array(e),i=0;i&lt;e;++i)n[i]=0;var a=t.length;for(i=0;i&lt;a;++i)for(var o=t[i],s=0;s&lt;o.length;++s)n[o[s]]=r[i];return n}(r,n.length,P):function(t){for(var e=t.length,r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n][2];return r}(n));var B=t.pointSizes,F=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(D=0;D&lt;n.length;++D)for(var N=n[D],j=0;j&lt;3;++j)!isNaN(N[j])&amp;&amp;isFinite(N[j])&amp;&amp;(this.bounds[0][j]=Math.min(this.bounds[0][j],N[j]),this.bounds[1][j]=Math.max(this.bounds[1][j],N[j]));var V=0,U=0,q=0;t:for(D=0;D&lt;r.length;++D){var H=r[D];switch(H.length){case 1:for(N=n[W=H[0]],j=0;j&lt;3;++j)if(isNaN(N[j])||!isFinite(N[j]))continue t;v.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:E).length?y.push(Y[0],Y[1],Y[2],1):y.push(Y[0],Y[1],Y[2],Y[3]),X=C?C[W]:L?[(L[W]-O)/(I-O),0]:z?z[D]:P?[(P[D]-O)/(I-O),0]:[(N[2]-O)/(I-O),0],x.push(X[0],X[1]),B?b.push(B[W]):b.push(F),_.push(D),q+=1;break;case 2:for(j=0;j&lt;2;++j){N=n[W=H[j]];for(var G=0;G&lt;3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t}for(j=0;j&lt;2;++j){N=n[W=H[j]];p.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:E).length?d.push(Y[0],Y[1],Y[2],1):d.push(Y[0],Y[1],Y[2],Y[3]),X=C?C[W]:L?[(L[W]-O)/(I-O),0]:z?z[D]:P?[(P[D]-O)/(I-O),0]:[(N[2]-O)/(I-O),0],g.push(X[0],X[1]),m.push(D)}U+=1;break;case 3:for(j=0;j&lt;3;++j)for(N=n[W=H[j]],G=0;G&lt;3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t;for(j=0;j&lt;3;++j){var W,Y,X,Z;N=n[W=H[j]];i.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:E).length?a.push(Y[0],Y[1],Y[2],1):a.push(Y[0],Y[1],Y[2],Y[3]),X=C?C[W]:L?[(L[W]-O)/(I-O),0]:z?z[D]:P?[(P[D]-O)/(I-O),0]:[(N[2]-O)/(I-O),0],c.push(X[0],X[1]),Z=w?w[W]:k[D],l.push(Z[0],Z[1],Z[2]),h.push(D)}V+=1}}this.pointCount=q,this.edgeCount=U,this.triangleCount=V,this.pointPositions.update(v),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(p),this.edgeColors.update(d),this.edgeUVs.update(g),this.edgeIds.update(new Uint32Array(m)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(c),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(h))}},M.drawTransparent=M.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o&lt;3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o&lt;3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o&lt;3;++o){for(var p=u[12+o],d=0;d&lt;3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount&gt;0&amp;&amp;((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount&gt;0&amp;&amp;this.lineWidth&gt;0&amp;&amp;((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount&gt;0&amp;&amp;((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&amp;&amp;this.contourCount&gt;0&amp;&amp;this.contourLineWidth&gt;0&amp;&amp;((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},M.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount&gt;0&amp;&amp;(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount&gt;0&amp;&amp;(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount&gt;0)&amp;&amp;((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},M.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;a&lt;r.length;++a)i[a]=n[r[a]];var o=g(i,[t.coord[0],this._resolution[1]-t.coord[1]],this._model,this._view,this._projection,this._resolution);if(!o)return null;var s=o[2],l=0;for(a=0;a&lt;r.length;++a)l+=s[a]*this.intensity[r[a]];return{position:o[1],index:r[o[0]],cell:r,cellId:e,intensity:l,dataCoordinate:this.positions[r[o[0]]]}},M.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},e.exports=function(t,e){if(1===arguments.length&amp;&amp;(t=(e=t).gl),!(t.getExtension(&quot;OES_standard_derivatives&quot;)||t.getExtension(&quot;MOZ_OES_standard_derivatives&quot;)||t.getExtension(&quot;WEBKIT_OES_standard_derivatives&quot;)))throw new Error(&quot;derivatives not supported&quot;);var r=function(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}(t),s=function(t){var e=n(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),l=A(t),c=T(t),f=S(t),h=E(t),p=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=t.LINEAR_MIPMAP_LINEAR,p.magFilter=t.LINEAR;var d=i(t),g=i(t),y=i(t),x=i(t),b=i(t),_=a(t,[{buffer:d,type:t.FLOAT,size:3},{buffer:b,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:y,type:t.FLOAT,size:2},{buffer:x,type:t.FLOAT,size:3}]),w=i(t),M=i(t),C=i(t),L=i(t),z=a(t,[{buffer:w,type:t.FLOAT,size:3},{buffer:L,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:C,type:t.FLOAT,size:2}]),P=i(t),O=i(t),I=i(t),D=i(t),R=i(t),B=a(t,[{buffer:P,type:t.FLOAT,size:3},{buffer:R,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:O,type:t.FLOAT,size:4},{buffer:I,type:t.FLOAT,size:2},{buffer:D,type:t.FLOAT,size:1}]),F=i(t),N=new k(t,p,r,s,l,c,f,h,d,b,g,y,x,_,w,L,M,C,z,P,R,O,I,D,B,F,a(t,[{buffer:F,type:t.FLOAT,size:3}]));return N.update(e),N}},{&quot;./lib/closest-point&quot;:265,&quot;./lib/shaders&quot;:266,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-shader&quot;:286,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,normals:433,&quot;simplicial-complex-contour&quot;:491,&quot;typedarray-pool&quot;:519}],268:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e,[0,0,0,1,1,0,1,1]),s=i(e,a.boxVert,a.lineFrag);return new o(t,r,s)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;./shaders&quot;);function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawBox=(s=[0,0],l=[0,0],function(t,e,r,n,i){var a=this.plot,o=this.shader,c=a.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,o.uniforms.lo=s,o.uniforms.hi=l,o.uniforms.color=i,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:271,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],269:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e),a=i(e,o.gridVert,o.gridFrag),l=i(e,o.tickVert,o.gridFrag);return new s(t,r,a,l)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;binary-search-bounds&quot;),o=t(&quot;./shaders&quot;);function s(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function l(t,e){return t-e}var c,u,f,h,p,d=s.prototype;d.draw=(c=[0,0],u=[0,0],f=[0,0],function(){for(var t=this.plot,e=this.vbo,r=this.shader,n=this.ticks,i=t.gl,a=t._tickBounds,o=t.dataBox,s=t.viewBox,l=t.gridLineWidth,h=t.gridLineColor,p=t.gridLineEnable,d=t.pixelRatio,g=0;g&lt;2;++g){var m=a[g],v=a[g+2]-m,y=.5*(o[g+2]+o[g]),x=o[g+2]-o[g];u[g]=2*v/x,c[g]=2*(m-y)/x}r.bind(),e.bind(),r.attributes.dataCoord.pointer(),r.uniforms.dataShift=c,r.uniforms.dataScale=u;var b=0;for(g=0;g&lt;2;++g){f[0]=f[1]=0,f[g]=1,r.uniforms.dataAxis=f,r.uniforms.lineWidth=l[g]/(s[g+2]-s[g])*d,r.uniforms.color=h[g];var _=6*n[g].length;p[g]&amp;&amp;_&amp;&amp;i.drawArrays(i.TRIANGLES,b,_),b+=_}}),d.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],i=[0,0],o=[0,0];return function(){for(var s=this.plot,c=this.vbo,u=this.tickShader,f=this.ticks,h=s.gl,p=s._tickBounds,d=s.dataBox,g=s.viewBox,m=s.pixelRatio,v=s.screenBox,y=v[2]-v[0],x=v[3]-v[1],b=g[2]-g[0],_=g[3]-g[1],w=0;w&lt;2;++w){var k=p[w],M=p[w+2]-k,A=.5*(d[w+2]+d[w]),T=d[w+2]-d[w];e[w]=2*M/T,t[w]=2*(k-A)/T}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var S=u.uniforms;S.dataShift=t,S.dataScale=e;var E=s.tickMarkLength,C=s.tickMarkWidth,L=s.tickMarkColor,z=6*f[0].length,P=Math.min(a.ge(f[0],(d[0]-p[0])/(p[2]-p[0]),l),f[0].length),O=Math.min(a.gt(f[0],(d[2]-p[0])/(p[2]-p[0]),l),f[0].length),I=0+6*P,D=6*Math.max(0,O-P),R=Math.min(a.ge(f[1],(d[1]-p[1])/(p[3]-p[1]),l),f[1].length),B=Math.min(a.gt(f[1],(d[3]-p[1])/(p[3]-p[1]),l),f[1].length),F=z+6*R,N=6*Math.max(0,B-R);i[0]=2*(g[0]-E[1])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=E[1]*m/y,o[1]=C[1]*m/x,N&amp;&amp;(S.color=L[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[1]-E[0])/x-1,o[0]=C[0]*m/y,o[1]=E[0]*m/x,D&amp;&amp;(S.color=L[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,I,D)),i[0]=2*(g[2]+E[3])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=E[3]*m/y,o[1]=C[3]*m/x,N&amp;&amp;(S.color=L[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[3]+E[2])/x-1,o[0]=C[2]*m/y,o[1]=E[2]*m/x,D&amp;&amp;(S.color=L[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,I,D))}}(),d.update=(h=[1,1,-1,-1,1,-1],p=[1,-1,1,1,-1,-1],function(t){for(var e=t.ticks,r=t.bounds,n=new Float32Array(18*(e[0].length+e[1].length)),i=(this.plot.zeroLineEnable,0),a=[[],[]],o=0;o&lt;2;++o)for(var s=a[o],l=e[o],c=r[o],u=r[o+2],f=0;f&lt;l.length;++f){var d=(l[f].x-c)/(u-c);s.push(d);for(var g=0;g&lt;6;++g)n[i++]=d,n[i++]=h[g],n[i++]=p[g]}this.ticks=a,this.vbo.update(n)}),d.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{&quot;./shaders&quot;:271,&quot;binary-search-bounds&quot;:273,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],270:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e,[-1,-1,-1,1,1,-1,1,1]),s=i(e,a.lineVert,a.lineFrag);return new o(t,r,s)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;./shaders&quot;);function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawLine=(s=[0,0],l=[0,0],function(t,e,r,n,i,a){var o=this.plot,c=this.shader,u=o.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,c.uniforms.start=s,c.uniforms.end=l,c.uniforms.width=i*o.pixelRatio,c.uniforms.color=a,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:271,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],271:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=n([&quot;precision lowp float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\n}\n&quot;]);e.exports={lineVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 start, end;\nuniform float width;\n\nvec2 perp(vec2 v) {\n  return vec2(v.y, -v.x);\n}\n\nvec2 screen(vec2 v) {\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n  vec2 delta = normalize(perp(start - end));\n  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\n  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\n}\n&quot;]),lineFrag:i,textVert:n([&quot;#define GLSLIFY 1\nattribute vec3 textCoordinate;\n\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\nuniform float angle;\n\nvoid main() {\n  float dataOffset  = textCoordinate.z;\n  vec2 glyphOffset  = textCoordinate.xy;\n  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\n    glyphMatrix * glyphOffset * textScale + screenOffset;\n  gl_Position = vec4(screenCoordinate, 0, 1);\n}\n&quot;]),textFrag:i,gridVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale;\nuniform float lineWidth;\n\nvoid main() {\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\n  gl_Position = vec4(pos, 0, 1);\n}\n&quot;]),gridFrag:i,boxVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 lo, hi;\n\nvec2 screen(vec2 v) {\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\n}\n&quot;]),tickVert:n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n&quot;])}},{glslify:390}],272:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e),a=i(e,s.textVert,s.textFrag);return new l(t,r,a)};var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-shader&quot;),a=t(&quot;text-cache&quot;),o=t(&quot;binary-search-bounds&quot;),s=t(&quot;./shaders&quot;);function l(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var c,u,f,h,p,d,g=l.prototype;g.drawTicks=(c=[0,0],u=[0,0],f=[0,0],function(t){var e=this.plot,r=this.shader,n=this.tickX[t],i=this.tickOffset[t],a=e.gl,s=e.viewBox,l=e.dataBox,h=e.screenBox,p=e.pixelRatio,d=e.tickEnable,g=e.tickPad,m=e.tickColor,v=e.tickAngle,y=e.labelEnable,x=e.labelPad,b=e.labelColor,_=e.labelAngle,w=this.labelOffset[t],k=this.labelCount[t],M=o.lt(n,l[t]),A=o.le(n,l[t+2]);c[0]=c[1]=0,c[t]=1,u[t]=(s[2+t]+s[t])/(h[2+t]-h[t])-1;var T=2/h[2+(1^t)]-h[1^t];u[1^t]=T*s[1^t]-1,d[t]&amp;&amp;(u[1^t]-=T*p*g[t],M&lt;A&amp;&amp;i[A]&gt;i[M]&amp;&amp;(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=m[t],r.uniforms.angle=v[t],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t]&amp;&amp;k&amp;&amp;(u[1^t]-=T*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,k)),u[1^t]=T*s[2+(1^t)]-1,d[t+2]&amp;&amp;(u[1^t]+=T*p*g[t+2],M&lt;A&amp;&amp;i[A]&gt;i[M]&amp;&amp;(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=m[t+2],r.uniforms.angle=v[t+2],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t+2]&amp;&amp;k&amp;&amp;(u[1^t]+=T*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u&lt;2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o&lt;2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],f=a[o],g=a[o+2]-f,m=i[o],v=i[o+2]-m;p[o]=2*l/u*g/v,h[o]=2*(s-c)/u*g/v}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o&lt;2;++o){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e&lt;h.length;++e){var p=h[e],d=p.x,g=p.text,m=p.font||&quot;sans-serif&quot;;i=p.fontSize||12;for(var v=1/(c[o+2]-c[o]),y=c[o],x=g.split(&quot;\n&quot;),b=0;b&lt;x.length;b++)for(n=a(m,x[b]).data,r=0;r&lt;n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(d-y)*v);u.push(Math.floor(s.length/3)),f.push(d)}this.tickOffset[o]=u,this.tickX[o]=f}for(o=0;o&lt;2;++o){for(this.labelOffset[o]=Math.floor(s.length/3),n=a(t.labelFont[o],t.labels[o],{textAlign:&quot;center&quot;}).data,i=t.labelSize[o],e=0;e&lt;n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[o]=Math.floor(s.length/3)-this.labelOffset[o]}for(this.titleOffset=Math.floor(s.length/3),n=a(t.titleFont,t.title).data,i=t.titleSize,e=0;e&lt;n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},g.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{&quot;./shaders&quot;:271,&quot;binary-search-bounds&quot;:273,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286,&quot;text-cache&quot;:510}],273:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{dup:98}],274:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=n(e,[e.drawingBufferWidth,e.drawingBufferHeight]),c=new l(e,r);return c.grid=i(c),c.text=a(c),c.line=o(c),c.box=s(c),c.update(t),c};var n=t(&quot;gl-select-static&quot;),i=t(&quot;./lib/grid&quot;),a=t(&quot;./lib/text&quot;),o=t(&quot;./lib/line&quot;),s=t(&quot;./lib/box&quot;);function l(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var c=l.prototype;function u(t){for(var e=t.slice(),r=0;r&lt;e.length;++r)e[r]=e[r].slice();return e}function f(t,e){return t.x-e.x}c.setDirty=function(){this.dirty=this.pickDirty=!0},c.setOverlayDirty=function(){this.dirty=!0},c.nextDepthValue=function(){return this._depthCounter++/65536},c.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&amp;&amp;(this._pickTimeout&amp;&amp;clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var c=this.borderColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var u=this.backgroundColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,p=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var d=0;d&lt;2;++d)if(f[d]&amp;&amp;n[d]&lt;=0&amp;&amp;n[d+2]&gt;=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],h[d]):o.drawLine(e[0],g,e[2],g,p[d],h[d])}}for(d=0;d&lt;l.length;++d)l[d].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var m=this.borderLineEnable,v=this.borderLineWidth,y=this.borderLineColor;for(m[1]&amp;&amp;o.drawLine(r[0],r[1]-.5*v[1]*i,r[0],r[3]+.5*v[3]*i,v[1],y[1]),m[0]&amp;&amp;o.drawLine(r[0]-.5*v[0]*i,r[1],r[2]+.5*v[2]*i,r[1],v[0],y[0]),m[3]&amp;&amp;o.drawLine(r[2],r[1]-.5*v[1]*i,r[2],r[3]+.5*v[3]*i,v[3],y[3]),m[2]&amp;&amp;o.drawLine(r[0]-.5*v[0]*i,r[3],r[2]+.5*v[2]*i,r[3],v[2],y[2]),s.bind(),d=0;d&lt;2;++d)s.drawTicks(d);this.titleEnable&amp;&amp;s.drawTitle();var x=this.overlays;for(d=0;d&lt;x.length;++d)x[d].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},c.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl;this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n&lt;r.length;++n)e=r[n].drawPick(e);t.end()}},c.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]&lt;&lt;8)+(s.value[1]&lt;&lt;16)+(s.value[2]&lt;&lt;24),c=this.objects,u=0;u&lt;c.length;++u){var f=c[u].pick(a,o,l);if(f)return f}return null}},c.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},c.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&amp;&amp;(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},c.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},c.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]);this.screenBox;this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,i=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/i,10,10/i]),this.borderColor=!1!==t.borderColor&amp;&amp;(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=u(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=u(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=u(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!(&quot;titleEnable&quot;in t&amp;&amp;!t.titleEnable),this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=u(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=u(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=u(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var a=t.ticks||[[],[]],o=this._tickBounds;o[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(var s=0;s&lt;2;++s){var l=a[s].slice(0);0!==l.length&amp;&amp;(l.sort(f),o[s]=Math.min(o[s],l[0].x),o[s+2]=Math.max(o[s+2],l[l.length-1].x))}this.grid.update({bounds:o,ticks:a}),this.text.update({bounds:o,ticks:a,labels:t.labels||[&quot;x&quot;,&quot;y&quot;],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||[&quot;sans-serif&quot;,&quot;sans-serif&quot;],title:t.title||&quot;&quot;,titleSize:t.titleSize||18,titleFont:t.titleFont||&quot;sans-serif&quot;}),this.static=!!t.static,this.setDirty()},c.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t&gt;=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t&gt;=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)&lt;0&amp;&amp;(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;r&lt;e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},c.addOverlay=function(t){this.overlays.indexOf(t)&lt;0&amp;&amp;(this.overlays.push(t),this.setOverlayDirty())},c.removeOverlay=function(t){for(var e=this.overlays,r=0;r&lt;e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},{&quot;./lib/box&quot;:268,&quot;./lib/grid&quot;:269,&quot;./lib/line&quot;:270,&quot;./lib/text&quot;:272,&quot;gl-select-static&quot;:285}],275:[function(t,e,r){var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n  uv = position;\n  gl_Position = vec4(position, 0, 1);\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n  gl_FragColor = min(vec4(1,1,1,1), accum);\n}&quot;]);e.exports=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec2&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],276:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=!1,r=((t=t||{}).pixelRatio||parseFloat(window.devicePixelRatio),t.canvas);if(!r)if(r=document.createElement(&quot;canvas&quot;),t.container){var v=t.container;v.appendChild(r)}else document.body.appendChild(r);var y=t.gl;y||(y=function(t,e){var r=null;try{(r=t.getContext(&quot;webgl&quot;,e))||(r=t.getContext(&quot;experimental-webgl&quot;,e))}catch(t){return null}return r}(r,t.glOptions||{premultipliedAlpha:!0,antialias:!0}));if(!y)throw new Error(&quot;webgl not supported&quot;);var x=t.bounds||[[-10,-10,-10],[10,10,10]],b=new d,_=l(y,[y.drawingBufferWidth,y.drawingBufferHeight],{preferFloat:!p}),w=h(y),k=t.camera||{eye:[2,0,0],center:[0,0,0],up:[0,1,0],zoomMin:.1,zoomMax:100,mode:&quot;turntable&quot;},M=t.axes||{},A=i(y,M);A.enable=!M.disable;var T=t.spikes||{},S=o(y,T),E=[],C=[],L=[],z=[],P=!0,O=!0,I=new Array(16),D=new Array(16),R={view:null,projection:I,model:D},O=!0,B=[y.drawingBufferWidth,y.drawingBufferHeight],F={gl:y,contextLost:!1,pixelRatio:t.pixelRatio||parseFloat(window.devicePixelRatio),canvas:r,selection:b,camera:n(r,k),axes:A,axesPixels:null,spikes:S,bounds:x,objects:E,shape:B,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:m(t.autoResize),autoBounds:m(t.autoBounds),autoScale:!!t.autoScale,autoCenter:m(t.autoCenter),clipToBounds:m(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null},N=[y.drawingBufferWidth/F.pixelRatio|0,y.drawingBufferHeight/F.pixelRatio|0];function j(){if(!e&amp;&amp;F.autoResize){var t=r.parentNode,n=1,i=1;t&amp;&amp;t!==document.body?(n=t.clientWidth,i=t.clientHeight):(n=window.innerWidth,i=window.innerHeight);var a=0|Math.ceil(n*F.pixelRatio),o=0|Math.ceil(i*F.pixelRatio);if(a!==r.width||o!==r.height){r.width=a,r.height=o;var s=r.style;s.position=s.position||&quot;absolute&quot;,s.left=&quot;0px&quot;,s.top=&quot;0px&quot;,s.width=n+&quot;px&quot;,s.height=i+&quot;px&quot;,P=!0}}}F.autoResize&amp;&amp;j();function V(){for(var t=E.length,e=z.length,r=0;r&lt;e;++r)L[r]=0;t:for(var r=0;r&lt;t;++r){var n=E[r],i=n.pickSlots;if(i){for(var a=0;a&lt;e;++a)if(L[a]+i&lt;255){C[r]=a,n.setPickBase(L[a]+1),L[a]+=i;continue t}var o=s(y,B);C[r]=e,z.push(o),L.push(i),n.setPickBase(1),e+=1}else C[r]=-1}for(;e&gt;0&amp;&amp;0===L[e-1];)L.pop(),z.pop().dispose()}window.addEventListener(&quot;resize&quot;,j),F.update=function(t){e||(t=t||{},P=!0,O=!0)},F.add=function(t){e||(t.axes=A,E.push(t),C.push(-1),P=!0,O=!0,V())},F.remove=function(t){if(!e){var r=E.indexOf(t);r&lt;0||(E.splice(r,1),C.pop(),P=!0,O=!0,V())}},F.dispose=function(){if(!e&amp;&amp;(e=!0,window.removeEventListener(&quot;resize&quot;,j),r.removeEventListener(&quot;webglcontextlost&quot;,H),F.mouseListener.enabled=!1,!F.contextLost)){A.dispose(),S.dispose();for(var t=0;t&lt;E.length;++t)E[t].dispose();_.dispose();for(var t=0;t&lt;z.length;++t)z[t].dispose();w.dispose(),y=null,A=null,S=null,E=[]}};var U=!1,q=0;function H(){if(F.contextLost)return!0;y.isContextLost()&amp;&amp;(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&amp;&amp;F.oncontextloss())}F.mouseListener=u(r,function(t,r,n){if(!e){var i=z.length,a=E.length,o=b.object;b.distance=1/0,b.mouse[0]=r,b.mouse[1]=n,b.object=null,b.screen=null,b.dataCoordinate=b.dataPosition=null;var s=!1;if(t&amp;&amp;q)U=!0;else{U&amp;&amp;(O=!0),U=!1;for(var l=0;l&lt;i;++l){var c=z[l].query(r,N[1]-n-1,F.pickRadius);if(c){if(c.distance&gt;b.distance)continue;for(var u=0;u&lt;a;++u){var f=E[u];if(C[u]===l){var h=f.pick(c);h&amp;&amp;(b.buttons=t,b.screen=c.coord,b.distance=c.distance,b.object=f,b.index=h.distance,b.dataPosition=h.position,b.dataCoordinate=h.dataCoordinate,b.data=h,s=!0)}}}}}o&amp;&amp;o!==b.object&amp;&amp;(o.highlight&amp;&amp;o.highlight(null),P=!0),b.object&amp;&amp;(b.object.highlight&amp;&amp;b.object.highlight(b.data),P=!0),(s=s||b.object!==o)&amp;&amp;F.onselect&amp;&amp;F.onselect(b),1&amp;t&amp;&amp;!(1&amp;q)&amp;&amp;F.onclick&amp;&amp;F.onclick(b),q=t}}),r.addEventListener(&quot;webglcontextlost&quot;,H);var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=[G[0].slice(),G[1].slice()];function Y(){if(!H()){j();var t=F.camera.tick();R.view=F.camera.matrix,P=P||t,O=O||t,A.pixelRatio=F.pixelRatio,S.pixelRatio=F.pixelRatio;var e=E.length,r=G[0],n=G[1];r[0]=r[1]=r[2]=1/0,n[0]=n[1]=n[2]=-1/0;for(var i=0;i&lt;e;++i){var o=E[i];o.pixelRatio=F.pixelRatio,o.axes=F.axes,P=P||!!o.dirty,O=O||!!o.dirty;var s=o.bounds;if(s)for(var l=s[0],u=s[1],h=0;h&lt;3;++h)r[h]=Math.min(r[h],l[h]),n[h]=Math.max(n[h],u[h])}var p=F.bounds;if(F.autoBounds)for(var h=0;h&lt;3;++h){if(n[h]&lt;r[h])r[h]=-1,n[h]=1;else{r[h]===n[h]&amp;&amp;(r[h]-=1,n[h]+=1);var d=.05*(n[h]-r[h]);r[h]=r[h]-d,n[h]=n[h]+d}p[0][h]=r[h],p[1][h]=n[h]}for(var m=!1,h=0;h&lt;3;++h)m=m||W[0][h]!==p[0][h]||W[1][h]!==p[1][h],W[0][h]=p[0][h],W[1][h]=p[1][h];if(O=O||m,P=P||m){if(m){for(var v=[0,0,0],i=0;i&lt;3;++i)v[i]=g((p[1][i]-p[0][i])/10);A.autoTicks?A.update({bounds:p,tickSpacing:v}):A.update({bounds:p})}var x=y.drawingBufferWidth,k=y.drawingBufferHeight;B[0]=x,B[1]=k,N[0]=0|Math.max(x/F.pixelRatio,1),N[1]=0|Math.max(k/F.pixelRatio,1),f(I,F.fovy,x/k,F.zNear,F.zFar);for(var i=0;i&lt;16;++i)D[i]=0;D[15]=1;for(var M=0,i=0;i&lt;3;++i)M=Math.max(M,p[1][i]-p[0][i]);for(var i=0;i&lt;3;++i)F.autoScale?D[5*i]=F.aspect[i]/(p[1][i]-p[0][i]):D[5*i]=1/M,F.autoCenter&amp;&amp;(D[12+i]=.5*-D[5*i]*(p[0][i]+p[1][i]));for(var i=0;i&lt;e;++i){var o=E[i];o.axesBounds=p,F.clipToBounds&amp;&amp;(o.clipBounds=p)}b.object&amp;&amp;(F.snapToData?S.position=b.dataCoordinate:S.position=b.dataPosition,S.bounds=p),O&amp;&amp;(O=!1,function(){if(H())return;y.colorMask(!0,!0,!0,!0),y.depthMask(!0),y.disable(y.BLEND),y.enable(y.DEPTH_TEST);for(var t=E.length,e=z.length,r=0;r&lt;e;++r){var n=z[r];n.shape=N,n.begin();for(var i=0;i&lt;t;++i)if(C[i]===r){var a=E[i];a.drawPick&amp;&amp;(a.pixelRatio=1,a.drawPick(R))}n.end()}}()),F.axesPixels=a(F.axes,R,x,k),F.onrender&amp;&amp;F.onrender(),y.bindFramebuffer(y.FRAMEBUFFER,null),y.viewport(0,0,x,k);var T=F.clearColor;y.clearColor(T[0],T[1],T[2],T[3]),y.clear(y.COLOR_BUFFER_BIT|y.DEPTH_BUFFER_BIT),y.depthMask(!0),y.colorMask(!0,!0,!0,!0),y.enable(y.DEPTH_TEST),y.depthFunc(y.LEQUAL),y.disable(y.BLEND),y.disable(y.CULL_FACE);var L=!1;A.enable&amp;&amp;(L=L||A.isTransparent(),A.draw(R)),S.axes=A,b.object&amp;&amp;S.draw(R),y.disable(y.CULL_FACE);for(var i=0;i&lt;e;++i){var o=E[i];o.axes=A,o.pixelRatio=F.pixelRatio,o.isOpaque&amp;&amp;o.isOpaque()&amp;&amp;o.draw(R),o.isTransparent&amp;&amp;o.isTransparent()&amp;&amp;(L=!0)}if(L){_.shape=B,_.bind(),y.clear(y.DEPTH_BUFFER_BIT),y.colorMask(!1,!1,!1,!1),y.depthMask(!0),y.depthFunc(y.LESS),A.enable&amp;&amp;A.isTransparent()&amp;&amp;A.drawTransparent(R);for(var i=0;i&lt;e;++i){var o=E[i];o.isOpaque&amp;&amp;o.isOpaque()&amp;&amp;o.draw(R)}y.enable(y.BLEND),y.blendEquation(y.FUNC_ADD),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.colorMask(!0,!0,!0,!0),y.depthMask(!1),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),A.isTransparent()&amp;&amp;A.drawTransparent(R);for(var i=0;i&lt;e;++i){var o=E[i];o.isTransparent&amp;&amp;o.isTransparent()&amp;&amp;o.drawTransparent(R)}y.bindFramebuffer(y.FRAMEBUFFER,null),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.disable(y.DEPTH_TEST),w.bind(),_.color[0].bind(0),w.uniforms.accumBuffer=0,c(y),y.disable(y.BLEND)}P=!1;for(var i=0;i&lt;e;++i)E[i].dirty=!1}}}return function t(){e||F.contextLost||(requestAnimationFrame(t),Y())}(),F.redraw=function(){e||(P=!0,Y())},F};var n=t(&quot;3d-view-controls&quot;),i=t(&quot;gl-axes3d&quot;),a=t(&quot;gl-axes3d/properties&quot;),o=t(&quot;gl-spikes3d&quot;),s=t(&quot;gl-select-static&quot;),l=t(&quot;gl-fbo&quot;),c=t(&quot;a-big-triangle&quot;),u=t(&quot;mouse-change&quot;),f=t(&quot;gl-mat4/perspective&quot;),h=t(&quot;./lib/shader&quot;),p=t(&quot;is-mobile&quot;)();function d(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e&lt;0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e&gt;0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function m(t){return&quot;boolean&quot;!=typeof t||t}},{&quot;./lib/shader&quot;:275,&quot;3d-view-controls&quot;:43,&quot;a-big-triangle&quot;:46,&quot;gl-axes3d&quot;:221,&quot;gl-axes3d/properties&quot;:228,&quot;gl-fbo&quot;:238,&quot;gl-mat4/perspective&quot;:256,&quot;gl-select-static&quot;:285,&quot;gl-spikes3d&quot;:295,&quot;is-mobile&quot;:401,&quot;mouse-change&quot;:415}],277:[function(t,e,r){var n=t(&quot;glslify&quot;);r.pointVertex=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform float pointCloud;\n\nhighp float rand(vec2 co) {\n  highp float a = 12.9898;\n  highp float b = 78.233;\n  highp float c = 43758.5453;\n  highp float d = dot(co.xy, vec2(a, b));\n  highp float e = mod(d, 3.14);\n  return fract(sin(e) * c);\n}\n\nvoid main() {\n  vec3 hgPosition = matrix * vec3(position, 1);\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\n    // if we don't jitter the point size a bit, overall point cloud\n    // saturation 'jumps' on zooming, which is disturbing and confusing\n  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\n  if(pointCloud != 0.0) { // pointCloud is truthy\n    // get the same square surface as circle would be\n    gl_PointSize *= 0.886;\n  }\n}&quot;]),r.pointFragment=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color, borderColor;\nuniform float centerFraction;\nuniform float pointCloud;\n\nvoid main() {\n  float radius;\n  vec4 baseColor;\n  if(pointCloud != 0.0) { // pointCloud is truthy\n    if(centerFraction == 1.0) {\n      gl_FragColor = color;\n    } else {\n      gl_FragColor = mix(borderColor, color, centerFraction);\n    }\n  } else {\n    radius = length(2.0 * gl_PointCoord.xy - 1.0);\n    if(radius &gt; 1.0) {\n      discard;\n    }\n    baseColor = mix(borderColor, color, step(radius, centerFraction));\n    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n  }\n}\n&quot;]),r.pickVertex=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n  vec3 hgPosition = matrix * vec3(position, 1);\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\n  gl_PointSize = pointSize;\n\n  vec4 id = pickId + pickOffset;\n  id.y += floor(id.x / 256.0);\n  id.x -= floor(id.x / 256.0) * 256.0;\n\n  id.z += floor(id.y / 256.0);\n  id.y -= floor(id.y / 256.0) * 256.0;\n\n  id.w += floor(id.z / 256.0);\n  id.z -= floor(id.z / 256.0) * 256.0;\n\n  fragId = id;\n}\n&quot;]),r.pickFragment=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n  float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n  if(radius &gt; 1.0) {\n    discard;\n  }\n  gl_FragColor = fragId / 255.0;\n}\n&quot;])},{glslify:390}],278:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;typedarray-pool&quot;),o=t(&quot;./lib/shader&quot;);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),f=new s(t,a,l,c,u);return f.update(e),t.addObject(f),f};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r(&quot;sizeMin&quot;,.5),this.sizeMax=r(&quot;sizeMax&quot;,20),this.color=r(&quot;color&quot;,[1,0,0,1]).slice(),this.areaRatio=r(&quot;areaRatio&quot;,1),this.borderColor=r(&quot;borderColor&quot;,[0,0,0,1]).slice(),this.blend=r(&quot;blend&quot;,!1);var n=t.positions.length&gt;&gt;&gt;1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&amp;&amp;t.idToIndex.length&gt;=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e&lt;n;e++)c[e]=e;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),i||a.free(l),o||a.free(c),this.pointCount=n,this.pickOffset=0},u.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0],function(t){var e=void 0!==t,r=e?this.pickShader:this.shader,n=this.plot.gl,i=this.plot.dataBox;if(0===this.pointCount)return t;var a=i[2]-i[0],o=i[3]-i[1],s=function(t,e){var r,n=0,i=t.length&gt;&gt;&gt;1;for(r=0;r&lt;i;r++){var a=t[2*r],o=t[2*r+1];a&gt;=e[0]&amp;&amp;a&lt;=e[2]&amp;&amp;o&gt;=e[1]&amp;&amp;o&lt;=e[3]&amp;&amp;n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u&lt;5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&amp;&amp;(c[0]=255&amp;t,c[1]=t&gt;&gt;8&amp;255,c[2]=t&gt;&gt;16&amp;255,c[3]=t&gt;&gt;24&amp;255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&amp;&amp;!this.blend&amp;&amp;n.disable(n.BLEND),h&amp;&amp;n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&amp;&amp;!this.blend&amp;&amp;n.enable(n.BLEND),h&amp;&amp;n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r&lt;n||r&gt;=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{&quot;./lib/shader&quot;:277,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286,&quot;typedarray-pool&quot;:519}],279:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],p=r[0],d=r[1],g=r[2],m=r[3];(a=c*p+u*d+f*g+h*m)&lt;0&amp;&amp;(a=-a,p=-p,d=-d,g=-g,m=-m);1-a&gt;1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*f+l*g,t[3]=s*h+l*m,t}},{}],280:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;vectorize-text&quot;);e.exports=function(t,e){var r=i[e];r||(r=i[e]={});if(t in r)return r[t];for(var a=n(t,{textAlign:&quot;center&quot;,textBaseline:&quot;middle&quot;,lineHeight:1,font:e}),o=n(t,{triangles:!0,textAlign:&quot;center&quot;,textBaseline:&quot;middle&quot;,lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;l&lt;a.positions.length;++l)for(var c=a.positions[l],u=0;u&lt;2;++u)s[0][u]=Math.min(s[0][u],c[u]),s[1][u]=Math.max(s[1][u],c[u]);return r[t]=[o,a,s]};var i={}},{&quot;vectorize-text&quot;:524}],281:[function(t,e,r){var n=t(&quot;gl-shader&quot;),i=t(&quot;glslify&quot;),a=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0]))   || \n     any(greaterThan(position, clipBounds[1])) ) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float scale = 1.0;\n    if(distance(highlightId, id) &lt; 0.0001) {\n      scale = highlightScale;\n    }\n\n    vec4 worldPosition = model * vec4(position, 1);\n    vec4 viewPosition = view * worldPosition;\n    viewPosition = viewPosition / viewPosition.w;\n    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n    \n    gl_Position = clipPosition;\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = position;\n  }\n}&quot;]),o=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0])) || any(greaterThan(position, clipBounds[1]))) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float scale = pixelRatio;\n    if(distance(highlightId.bgr, id.bgr) &lt; 0.001) {\n      scale *= highlightScale;\n    }\n\n    vec4 worldPosition = model * vec4(position, 1.0);\n    vec4 viewPosition = view * worldPosition;\n    vec4 clipPosition = projection * viewPosition;\n    clipPosition /= clipPosition.w;\n    \n    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = position;\n  }\n}&quot;]),s=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(position, clipBounds[0]))   ||\n     any(greaterThan(position, clipBounds[1])) ) {\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float lscale = pixelRatio * scale;\n    if(distance(highlightId, id) &lt; 0.0001) {\n      lscale *= highlightScale;\n    }\n\n    vec4 clipCenter   = projection * view * model * vec4(position, 1);\n    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n    gl_Position = clipPosition;\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = dataPosition;\n  }\n}\n&quot;]),l=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(dataCoordinate, fragClipBounds[0]))   ||\n     any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\n    discard;\n  } else {\n    gl_FragColor = interpColor * opacity;\n  }\n}\n&quot;]),c=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if(any(lessThan(dataCoordinate, fragClipBounds[0]))   || \n     any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\n    discard;\n  } else {\n    gl_FragColor = vec4(pickGroup, pickId.bgr);\n  }\n}&quot;]),u=[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;glyph&quot;,type:&quot;vec2&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},m={vertex:s,fragment:c,attributes:u};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return v(t,f)},r.createOrtho=function(t){return v(t,h)},r.createProject=function(t){return v(t,p)},r.createPickPerspective=function(t){return v(t,d)},r.createPickOrtho=function(t){return v(t,g)},r.createPickProject=function(t){return v(t,m)}},{&quot;gl-shader&quot;:286,glslify:390}],282:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;typedarray-pool&quot;),o=t(&quot;gl-mat4/multiply&quot;),s=t(&quot;./lib/shaders&quot;),l=t(&quot;./lib/glyphs&quot;),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function f(t,e,r,n){return u(n,n),u(n,n),u(n,n)}function h(t,e){this.index=t,this.dataCoordinate=this.position=e}function p(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new h(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=s.createPerspective(e),a=s.createOrtho(e),o=s.createProject(e),l=s.createPickPerspective(e),c=s.createPickOrtho(e),u=s.createPickProject(e),f=n(e),h=n(e),d=n(e),g=n(e),m=i(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:d,size:2,type:e.FLOAT},{buffer:g,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),v=new p(e,r,a,o,f,h,d,g,m,l,c,u);return v.update(t),v};var d=p.prototype;d.pickSlots=1,d.setPickBase=function(t){this.pickId=t},d.isTransparent=function(){if(this.opacity&lt;1)return!0;for(var t=0;t&lt;3;++t)if(this.axesProject[t]&amp;&amp;this.projectOpacity[t]&lt;1)return!0;return!1},d.isOpaque=function(){if(this.opacity&gt;=1)return!0;for(var t=0;t&lt;3;++t)if(this.axesProject[t]&amp;&amp;this.projectOpacity[t]&gt;=1)return!0;return!1};var g=[0,0],m=[0,0,0],v=[0,0,0],y=[0,0,0,1],x=[0,0,0,1],b=c.slice(),_=[0,0,0],w=[[0,0,0],[0,0,0]];function k(t){return t[0]=t[1]=t[2]=0,t}function M(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function A(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function T(t,e,r,n,i){var a,s=e.axesProject,l=e.gl,u=t.uniforms,h=r.model||c,p=r.view||c,d=r.projection||c,T=e.axesBounds,S=function(t){for(var e=w,r=0;r&lt;2;++r)for(var n=0;n&lt;3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);a=e.axes&amp;&amp;e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],g[0]=2/l.drawingBufferWidth,g[1]=2/l.drawingBufferHeight,t.bind(),u.view=p,u.projection=d,u.screenSize=g,u.highlightId=e.highlightId,u.highlightScale=e.highlightScale,u.clipBounds=S,u.pickGroup=e.pickId/255,u.pixelRatio=e.pixelRatio;for(var E=0;E&lt;3;++E)if(s[E]&amp;&amp;e.projectOpacity[E]&lt;1===n){u.scale=e.projectScale[E],u.opacity=e.projectOpacity[E];for(var C=b,L=0;L&lt;16;++L)C[L]=0;for(L=0;L&lt;4;++L)C[5*L]=1;C[5*E]=0,a[E]&lt;0?C[12+E]=T[0][E]:C[12+E]=T[1][E],o(C,h,C),u.model=C;var z=(E+1)%3,P=(E+2)%3,O=k(m),I=k(v);O[z]=1,I[P]=1;var D=f(0,0,0,M(y,O)),R=f(0,0,0,M(x,I));if(Math.abs(D[1])&gt;Math.abs(R[1])){var B=D;D=R,R=B,B=O,O=I,I=B;var F=z;z=P,P=F}D[0]&lt;0&amp;&amp;(O[z]=-1),R[1]&gt;0&amp;&amp;(I[P]=-1);var N=0,j=0;for(L=0;L&lt;4;++L)N+=Math.pow(h[4*z+L],2),j+=Math.pow(h[4*P+L],2);O[z]/=Math.sqrt(N),I[P]/=Math.sqrt(j),u.axes[0]=O,u.axes[1]=I,u.fragClipBounds[0]=A(_,S[0],E,-1e8),u.fragClipBounds[1]=A(_,S[1],E,1e8),e.vao.draw(l.TRIANGLES,e.vertexCount),e.lineWidth&gt;0&amp;&amp;(l.lineWidth(e.lineWidth),e.vao.draw(l.LINES,e.lineVertexCount,e.vertexCount))}}var S=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function E(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity&lt;1||a){t.bind();var s=t.uniforms;s.model=n.model||c,s.view=n.view||c,s.projection=n.projection||c,g[0]=2/o.drawingBufferWidth,g[1]=2/o.drawingBufferHeight,s.screenSize=g,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=S,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth&gt;0&amp;&amp;(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}T(e,r,n,i),r.vao.unbind()}d.draw=function(t){E(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},d.drawTransparent=function(t){E(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},d.drawPick=function(t){E(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},d.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]&lt;&lt;8)+(t.value[0]&lt;&lt;16);if(e&gt;=this.pointCount||e&lt;0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i&lt;3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},d.highlight=function(t){if(t){var e=t.index,r=255&amp;e,n=e&gt;&gt;8&amp;255,i=e&gt;&gt;16&amp;255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},d.update=function(t){if(&quot;perspective&quot;in(t=t||{})&amp;&amp;(this.useOrtho=!t.perspective),&quot;orthographic&quot;in t&amp;&amp;(this.useOrtho=!!t.orthographic),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;project&quot;in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if(&quot;projectScale&quot;in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(&quot;projectOpacity&quot;in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),this.dirty=!0;var n=t.position;if(n){var i=t.font||&quot;normal&quot;,o=t.alignment||[0,0],s=[1/0,1/0,1/0],c=[-1/0,-1/0,-1/0],u=t.glyph,f=t.color,h=t.size,p=t.angle,d=t.lineColor,g=0,m=0,v=0,y=n.length;t:for(var x=0;x&lt;y;++x){for(var b=n[x],_=0;_&lt;3;++_)if(isNaN(b[_])||!isFinite(b[_]))continue t;var w=(B=Array.isArray(u)?l(u[x],i):l(u||&quot;\u25cf&quot;,i))[0],k=B[1],M=B[2];m+=3*w.cells.length,v+=2*k.edges.length}var A=m+v,T=a.mallocFloat(3*A),S=a.mallocFloat(4*A),E=a.mallocFloat(2*A),C=a.mallocUint32(A),L=[0,o[1]],z=0,P=m,O=[0,0,0,1],I=[0,0,0,1],D=Array.isArray(f)&amp;&amp;Array.isArray(f[0]),R=Array.isArray(d)&amp;&amp;Array.isArray(d[0]);t:for(x=0;x&lt;y;++x){var B;for(b=n[x],_=0;_&lt;3;++_){if(isNaN(b[_])||!isFinite(b[_])){g+=1;continue t}c[_]=Math.max(c[_],b[_]),s[_]=Math.min(s[_],b[_])}var F;w=(B=Array.isArray(u)?l(u[x],i):l(u||&quot;\u25cf&quot;,i))[0],k=B[1],M=B[2];if(Array.isArray(f)){if(3===(F=D?f[x]:f).length){for(_=0;_&lt;3;++_)O[_]=F[_];O[3]=1}else if(4===F.length)for(_=0;_&lt;4;++_)O[_]=F[_]}else O[0]=O[1]=O[2]=0,O[3]=1;if(Array.isArray(d)){if(3===(F=R?d[x]:d).length){for(_=0;_&lt;3;++_)I[_]=F[_];I[_]=1}else if(4===F.length)for(_=0;_&lt;4;++_)I[_]=F[_]}else I[0]=I[1]=I[2]=0,I[3]=1;var N=.5;Array.isArray(h)?N=+h[x]:h?N=+h:this.useOrtho&amp;&amp;(N=12);var j=0;Array.isArray(p)?j=+p[x]:p&amp;&amp;(j=+p);var V=Math.cos(j),U=Math.sin(j);for(b=n[x],_=0;_&lt;3;++_)c[_]=Math.max(c[_],b[_]),s[_]=Math.min(s[_],b[_]);o[0]&lt;0?L[0]=o[0]*(1+M[1][0]):o[0]&gt;0&amp;&amp;(L[0]=-o[0]*(1+M[0][0]));var q=w.cells,H=w.positions;for(_=0;_&lt;q.length;++_)for(var G=q[_],W=0;W&lt;3;++W){for(var Y=0;Y&lt;3;++Y)T[3*z+Y]=b[Y];for(Y=0;Y&lt;4;++Y)S[4*z+Y]=O[Y];C[z]=g;var X=H[G[W]];E[2*z]=N*(V*X[0]-U*X[1]+L[0]),E[2*z+1]=N*(U*X[0]+V*X[1]+L[1]),z+=1}for(q=k.edges,H=k.positions,_=0;_&lt;q.length;++_)for(G=q[_],W=0;W&lt;2;++W){for(Y=0;Y&lt;3;++Y)T[3*P+Y]=b[Y];for(Y=0;Y&lt;4;++Y)S[4*P+Y]=I[Y];C[P]=g;X=H[G[W]];E[2*P]=N*(V*X[0]-U*X[1]+L[0]),E[2*P+1]=N*(U*X[0]+V*X[1]+L[1]),P+=1}g+=1}this.vertexCount=m,this.lineVertexCount=v,this.pointBuffer.update(T),this.colorBuffer.update(S),this.glyphBuffer.update(E),this.idBuffer.update(new Uint32Array(C)),a.free(T),a.free(S),a.free(E),a.free(C),this.bounds=[s,c],this.points=n,this.pointCount=n.length}},d.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{&quot;./lib/glyphs&quot;:280,&quot;./lib/shaders&quot;:281,&quot;gl-buffer&quot;:229,&quot;gl-mat4/multiply&quot;:255,&quot;gl-vao&quot;:308,&quot;typedarray-pool&quot;:519}],283:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;);r.boxVertex=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n&quot;]),r.boxFragment=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n  gl_FragColor = color;\n}\n&quot;])},{glslify:390}],284:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;./lib/shaders&quot;);function o(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}e.exports=function(t,e){var r=t.gl,s=i(r,[0,0,0,1,1,0,1,1]),l=n(r,a.boxVertex,a.boxFragment),c=new o(t,s,l);return c.update(e),t.addOverlay(c),c};var s=o.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,c=t.viewBox,u=t.pixelRatio,f=(e[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],h=(e[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],p=(e[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],d=(e[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(f=Math.max(f,c[0]),h=Math.max(h,c[1]),p=Math.min(p,c[2]),d=Math.min(d,c[3]),!(p&lt;f||d&lt;h)){o.bind();var g=s[2]-s[0],m=s[3]-s[1];if(this.outerFill&amp;&amp;(o.drawBox(0,0,g,h,i),o.drawBox(0,h,f,d,i),o.drawBox(0,d,g,m,i),o.drawBox(p,h,g,d,i)),this.innerFill&amp;&amp;o.drawBox(f,h,p,d,n),r&gt;0){var v=r*u;o.drawBox(f-v,h-v,p+v,h+v,a),o.drawBox(f-v,d-v,p+v,d+v,a),o.drawBox(f-v,h-v,f+v,d+v,a),o.drawBox(p-v,h-v,p+v,d+v,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{&quot;./lib/shaders&quot;:283,&quot;gl-buffer&quot;:229,&quot;gl-shader&quot;:286}],285:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=n(t,e),a=i.mallocUint8(e[0]*e[1]*4);return new c(t,r,a)};var n=t(&quot;gl-fbo&quot;),i=t(&quot;typedarray-pool&quot;),a=t(&quot;ndarray&quot;),o=t(&quot;bit-twiddle&quot;).nextPow2,s=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;array&quot;,{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},&quot;scalar&quot;,&quot;scalar&quot;,&quot;index&quot;],pre:{body:&quot;{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}&quot;,args:[],thisVars:[&quot;this_closestD2&quot;,&quot;this_closestX&quot;,&quot;this_closestY&quot;],localVars:[]},body:{body:&quot;{if(_inline_16_arg0_&lt;255||_inline_16_arg1_&lt;255||_inline_16_arg2_&lt;255||_inline_16_arg3_&lt;255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_f&lt;this_closestD2&amp;&amp;(this_closestD2=_inline_16_f,this_closestX=_inline_16_arg6_[0],this_closestY=_inline_16_arg6_[1])}}&quot;,args:[{name:&quot;_inline_16_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg1_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg4_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg5_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_16_arg6_&quot;,lvalue:!1,rvalue:!0,count:4}],thisVars:[&quot;this_closestD2&quot;,&quot;this_closestX&quot;,&quot;this_closestY&quot;],localVars:[&quot;_inline_16_a&quot;,&quot;_inline_16_f&quot;,&quot;_inline_16_l&quot;]},post:{body:&quot;{return[this_closestX,this_closestY,this_closestD2]}&quot;,args:[],thisVars:[&quot;this_closestD2&quot;,&quot;this_closestX&quot;,&quot;this_closestY&quot;],localVars:[]},debug:!1,funcName:&quot;cwise&quot;,blockSize:64});function l(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function c(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&amp;&amp;(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=c.prototype;Object.defineProperty(u,&quot;shape&quot;,{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4&gt;this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;a&lt;r*e*4;++a)n[a]=255}return t}}}),u.begin=function(){var t=this.gl;this.shape;t&amp;&amp;(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},u.end=function(){var t=this.gl;t&amp;&amp;(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},u.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,&quot;number&quot;!=typeof r&amp;&amp;(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),o=0|Math.min(Math.max(t+r,0),n[0]),c=0|Math.min(Math.max(e-r,0),n[1]),u=0|Math.min(Math.max(e+r,0),n[1]);if(o&lt;=i||u&lt;=c)return null;var f=[o-i,u-c],h=a(this.buffer,[f[0],f[1],4],[4,4*n[0],1],4*(i+n[0]*c)),p=s(h.hi(f[0],f[1],1),r,r),d=p[0],g=p[1];return d&lt;0||Math.pow(this.radius,2)&lt;p[2]?null:new l(d+i|0,g+c|0,h.get(d,g,0),[h.get(d,g,1),h.get(d,g,2),h.get(d,g,3)],Math.sqrt(p[2]))},u.dispose=function(){this.gl&amp;&amp;(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&amp;&amp;clearTimeout(this._readTimeout))}},{&quot;bit-twiddle&quot;:79,&quot;cwise/lib/wrapper&quot;:136,&quot;gl-fbo&quot;:238,ndarray:430,&quot;typedarray-pool&quot;:519}],286:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/create-uniforms&quot;),i=t(&quot;./lib/create-attributes&quot;),a=t(&quot;./lib/reflect&quot;),o=t(&quot;./lib/shader-cache&quot;),s=t(&quot;./lib/runtime-reflect&quot;),l=t(&quot;./lib/GLError&quot;);function c(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var u=c.prototype;function f(t,e){return t.name&lt;e.name?-1:1}u.bind=function(){var t;this.program||this._relink();var e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e&gt;r)for(t=r;t&lt;e;t++)this.gl.enableVertexAttribArray(t);else if(r&gt;e)for(t=e;t&lt;r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},u.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e&lt;t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&amp;&amp;this._fref.dispose(),this._vref&amp;&amp;this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},u.update=function(t,e,r,c){if(!e||1===arguments.length){var u=t;t=u.vertex,e=u.fragment,r=u.uniforms,c=u.attributes}var h=this,p=h.gl,d=h._vref;h._vref=o.shader(p,p.VERTEX_SHADER,t),d&amp;&amp;d.dispose(),h.vertShader=h._vref.shader;var g=this._fref;if(h._fref=o.shader(p,p.FRAGMENT_SHADER,e),g&amp;&amp;g.dispose(),h.fragShader=h._fref.shader,!r||!c){var m=p.createProgram();if(p.attachShader(m,h.fragShader),p.attachShader(m,h.vertShader),p.linkProgram(m),!p.getProgramParameter(m,p.LINK_STATUS)){var v=p.getProgramInfoLog(m);throw new l(v,&quot;Error linking program:&quot;+v)}r=r||s.uniforms(p,m),c=c||s.attributes(p,m),p.deleteProgram(m)}(c=c.slice()).sort(f);var y,x=[],b=[],_=[];for(y=0;y&lt;c.length;++y){var w=c[y];if(w.type.indexOf(&quot;mat&quot;)&gt;=0){for(var k=0|w.type.charAt(w.type.length-1),M=new Array(k),A=0;A&lt;k;++A)M[A]=_.length,b.push(w.name+&quot;[&quot;+A+&quot;]&quot;),&quot;number&quot;==typeof w.location?_.push(w.location+A):Array.isArray(w.location)&amp;&amp;w.location.length===k&amp;&amp;&quot;number&quot;==typeof w.location[A]?_.push(0|w.location[A]):_.push(-1);x.push({name:w.name,type:w.type,locations:M})}else x.push({name:w.name,type:w.type,locations:[_.length]}),b.push(w.name),&quot;number&quot;==typeof w.location?_.push(0|w.location):_.push(-1)}var T=0;for(y=0;y&lt;_.length;++y)if(_[y]&lt;0){for(;_.indexOf(T)&gt;=0;)T+=1;_[y]=T}var S=new Array(r.length);function E(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t&lt;r.length;++t)S[t]=p.getUniformLocation(h.program,r[t].name)}E(),h._relink=E,h.types={uniforms:a(r),attributes:a(c)},h.attributes=i(p,h,x,_),Object.defineProperty(h,&quot;uniforms&quot;,n(p,h,r,S))},e.exports=function(t,e,r,n,i){var a=new c(t);return a.update(e,r,n,i),a}},{&quot;./lib/GLError&quot;:287,&quot;./lib/create-attributes&quot;:288,&quot;./lib/create-uniforms&quot;:289,&quot;./lib/reflect&quot;:290,&quot;./lib/runtime-reflect&quot;:291,&quot;./lib/shader-cache&quot;:292}],287:[function(t,e,r){function n(t,e,r){this.shortMessage=e||&quot;&quot;,this.longMessage=r||&quot;&quot;,this.rawError=t||&quot;&quot;,this.message=&quot;gl-shader: &quot;+(e||t||&quot;&quot;)+(r?&quot;\n&quot;+r:&quot;&quot;),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name=&quot;GLError&quot;,n.prototype.constructor=n,e.exports=n},{}],288:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,i){for(var a={},l=0,c=r.length;l&lt;c;++l){var u=r[l],f=u.name,h=u.type,p=u.locations;switch(h){case&quot;bool&quot;:case&quot;int&quot;:case&quot;float&quot;:o(t,e,p[0],i,1,a,f);break;default:if(h.indexOf(&quot;vec&quot;)&gt;=0){var d=h.charCodeAt(h.length-1)-48;if(d&lt;2||d&gt;4)throw new n(&quot;&quot;,&quot;Invalid data type for attribute &quot;+f+&quot;: &quot;+h);o(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf(&quot;mat&quot;)&gt;=0))throw new n(&quot;&quot;,&quot;Unknown data type for attribute &quot;+f+&quot;: &quot;+h);var d=h.charCodeAt(h.length-1)-48;if(d&lt;2||d&gt;4)throw new n(&quot;&quot;,&quot;Invalid data type for attribute &quot;+f+&quot;: &quot;+h);s(t,e,p,i,d,a,f)}}}return a};var n=t(&quot;./GLError&quot;);function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;function o(t,e,r,n,a,o,s){for(var l=[&quot;gl&quot;,&quot;v&quot;],c=[],u=0;u&lt;a;++u)l.push(&quot;x&quot;+u),c.push(&quot;x&quot;+u);l.push(&quot;if(x0.length===void 0){return gl.vertexAttrib&quot;+a+&quot;f(v,&quot;+c.join()+&quot;)}else{return gl.vertexAttrib&quot;+a+&quot;fv(v,x0)}&quot;);var f=Function.apply(null,l),h=new i(t,e,r,n,a,f);Object.defineProperty(o,s,{set:function(e){return t.disableVertexAttribArray(n[r]),f(t,n[r],e),e},get:function(){return h},enumerable:!0})}function s(t,e,r,n,i,a,s){for(var l=new Array(i),c=new Array(i),u=0;u&lt;i;++u)o(t,e,r[u],n,i,l,u),c[u]=l[u];Object.defineProperty(l,&quot;location&quot;,{set:function(t){if(Array.isArray(t))for(var e=0;e&lt;i;++e)c[e].location=t[e];else for(e=0;e&lt;i;++e)c[e].location=t+e;return t},get:function(){for(var t=new Array(i),e=0;e&lt;i;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,a,o,s){e=e||t.FLOAT,a=!!a,o=o||i*i,s=s||0;for(var l=0;l&lt;i;++l){var c=n[r[l]];t.vertexAttribPointer(c,i,e,a,o,s+l*i),t.enableVertexAttribArray(c)}};var f=new Array(i),h=t[&quot;vertexAttrib&quot;+i+&quot;fv&quot;];Object.defineProperty(a,s,{set:function(e){for(var a=0;a&lt;i;++a){var o=n[r[a]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[a]);else{for(var s=0;s&lt;i;++s)f[s]=e[i*a+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}a.pointer=function(t,e,r,n){var i=this._gl,a=this._locations[this._index];i.vertexAttribPointer(a,this._dimension,t||i.FLOAT,!!e,r||0,n||0),i.enableVertexAttribArray(a)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,&quot;location&quot;,{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&amp;&amp;(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{&quot;./GLError&quot;:287}],289:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./reflect&quot;),i=t(&quot;./GLError&quot;);function a(t){return new Function(&quot;y&quot;,&quot;return function(){return y}&quot;)(t)}function o(t,e){for(var r=new Array(t),n=0;n&lt;t;++n)r[n]=e;return r}e.exports=function(t,e,r,s){function l(t,e,r){switch(r){case&quot;bool&quot;:case&quot;int&quot;:case&quot;sampler2D&quot;:case&quot;samplerCube&quot;:return&quot;gl.uniform1i(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;case&quot;float&quot;:return&quot;gl.uniform1f(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;default:var n=r.indexOf(&quot;vec&quot;);if(!(0&lt;=n&amp;&amp;n&lt;=1&amp;&amp;r.length===4+n)){if(0===r.indexOf(&quot;mat&quot;)&amp;&amp;4===r.length){var a=r.charCodeAt(r.length-1)-48;if(a&lt;2||a&gt;4)throw new i(&quot;&quot;,&quot;Invalid uniform dimension type for matrix &quot;+name+&quot;: &quot;+r);return&quot;gl.uniformMatrix&quot;+a+&quot;fv(locations[&quot;+e+&quot;],false,obj&quot;+t+&quot;)&quot;}throw new i(&quot;&quot;,&quot;Unknown uniform data type for &quot;+name+&quot;: &quot;+r)}var a=r.charCodeAt(r.length-1)-48;if(a&lt;2||a&gt;4)throw new i(&quot;&quot;,&quot;Invalid data type&quot;);switch(r.charAt(0)){case&quot;b&quot;:case&quot;i&quot;:return&quot;gl.uniform&quot;+a+&quot;iv(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;case&quot;v&quot;:return&quot;gl.uniform&quot;+a+&quot;fv(locations[&quot;+e+&quot;],obj&quot;+t+&quot;)&quot;;default:throw new i(&quot;&quot;,&quot;Unrecognized data type for vector &quot;+name+&quot;: &quot;+r)}}}function c(e){for(var n=[&quot;return function updateProperty(obj){&quot;],i=function t(e,r){if(&quot;object&quot;!=typeof r)return[[e,r]];var n=[];for(var i in r){var a=r[i],o=e;parseInt(i)+&quot;&quot;===i?o+=&quot;[&quot;+i+&quot;]&quot;:o+=&quot;.&quot;+i,&quot;object&quot;==typeof a?n.push.apply(n,t(o,a)):n.push([o,a])}return n}(&quot;&quot;,e),a=0;a&lt;i.length;++a){var o=i[a],c=o[0],u=o[1];s[u]&amp;&amp;n.push(l(c,u,r[u].type))}n.push(&quot;return obj}&quot;);var f=new Function(&quot;gl&quot;,&quot;locations&quot;,n.join(&quot;\n&quot;));return f(t,s)}function u(n,l,u){if(&quot;object&quot;==typeof u){var h=f(u);Object.defineProperty(n,l,{get:a(h),set:c(u),enumerable:!0,configurable:!1})}else s[u]?Object.defineProperty(n,l,{get:(p=u,new Function(&quot;gl&quot;,&quot;wrapper&quot;,&quot;locations&quot;,&quot;return function(){return gl.getUniform(wrapper.program,locations[&quot;+p+&quot;])}&quot;)(t,e,s)),set:c(u),enumerable:!0,configurable:!1}):n[l]=function(t){switch(t){case&quot;bool&quot;:return!1;case&quot;int&quot;:case&quot;sampler2D&quot;:case&quot;samplerCube&quot;:case&quot;float&quot;:return 0;default:var e=t.indexOf(&quot;vec&quot;);if(0&lt;=e&amp;&amp;e&lt;=1&amp;&amp;t.length===4+e){var r=t.charCodeAt(t.length-1)-48;if(r&lt;2||r&gt;4)throw new i(&quot;&quot;,&quot;Invalid data type&quot;);return&quot;b&quot;===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf(&quot;mat&quot;)&amp;&amp;4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r&lt;2||r&gt;4)throw new i(&quot;&quot;,&quot;Invalid uniform dimension type for matrix &quot;+name+&quot;: &quot;+t);return o(r*r,0)}throw new i(&quot;&quot;,&quot;Unknown uniform data type for &quot;+name+&quot;: &quot;+t)}}(r[u].type);var p}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r&lt;t.length;++r)u(e,r,t[r])}else for(var n in e={},t)u(e,n,t[n]);return e}var h=n(r,!0);return{get:a(f(h)),set:c(h),enumerable:!0,configurable:!0}}},{&quot;./GLError&quot;:287,&quot;./reflect&quot;:290}],290:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r={},n=0;n&lt;t.length;++n)for(var i=t[n].name,a=i.split(&quot;.&quot;),o=r,s=0;s&lt;a.length;++s){var l=a[s].split(&quot;[&quot;);if(l.length&gt;1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c&lt;l.length;++c){var u=parseInt(l[c]);c&lt;l.length-1||s&lt;a.length-1?(u in o||(c&lt;l.length-1?o[u]=[]:o[u]={}),o=o[u]):o[u]=e?n:t[n].type}}else s&lt;a.length-1?(l[0]in o||(o[l[0]]={}),o=o[l[0]]):o[l[0]]=e?n:t[n].type}return r}},{}],291:[function(t,e,r){&quot;use strict&quot;;r.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),n=[],i=0;i&lt;r;++i){var o=t.getActiveUniform(e,i);if(o){var s=a(t,o.type);if(o.size&gt;1)for(var l=0;l&lt;o.size;++l)n.push({name:o.name.replace(&quot;[0]&quot;,&quot;[&quot;+l+&quot;]&quot;),type:s});else n.push({name:o.name,type:s})}}return n},r.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),n=[],i=0;i&lt;r;++i){var o=t.getActiveAttrib(e,i);o&amp;&amp;n.push({name:o.name,type:a(t,o.type)})}return n};var n={FLOAT:&quot;float&quot;,FLOAT_VEC2:&quot;vec2&quot;,FLOAT_VEC3:&quot;vec3&quot;,FLOAT_VEC4:&quot;vec4&quot;,INT:&quot;int&quot;,INT_VEC2:&quot;ivec2&quot;,INT_VEC3:&quot;ivec3&quot;,INT_VEC4:&quot;ivec4&quot;,BOOL:&quot;bool&quot;,BOOL_VEC2:&quot;bvec2&quot;,BOOL_VEC3:&quot;bvec3&quot;,BOOL_VEC4:&quot;bvec4&quot;,FLOAT_MAT2:&quot;mat2&quot;,FLOAT_MAT3:&quot;mat3&quot;,FLOAT_MAT4:&quot;mat4&quot;,SAMPLER_2D:&quot;sampler2D&quot;,SAMPLER_CUBE:&quot;samplerCube&quot;},i=null;function a(t,e){if(!i){var r=Object.keys(n);i={};for(var a=0;a&lt;r.length;++a){var o=r[a];i[t[o]]=n[o]}}return i[e]}},{}],292:[function(t,e,r){&quot;use strict&quot;;r.shader=function(t,e,r){return u(t).getShaderReference(e,r)},r.program=function(t,e,r,n,i){return u(t).getProgram(e,r,n,i)};var n=t(&quot;./GLError&quot;),i=t(&quot;gl-format-compiler-error&quot;),a=new(&quot;undefined&quot;==typeof WeakMap?t(&quot;weakmap-shim&quot;):WeakMap),o=0;function s(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(t){this.gl=t,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n&lt;i;++n){var a=t.programs[r[n]];a&amp;&amp;(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var c=l.prototype;function u(t){var e=a.get(t);return e||(e=new l(t),a.set(t,e)),e}c.getShaderReference=function(t,e){var r=this.gl,a=this.shaders[t===r.FRAGMENT_SHADER|0],l=a[e];if(l&amp;&amp;r.isShader(l.shader))l.count+=1;else{var c=function(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(a);try{var s=i(o,r,e)}catch(t){throw console.warn(&quot;Failed to format compiler error: &quot;+t),new n(o,&quot;Error compiling shader:\n&quot;+o)}throw new n(o,s.short,s.long)}return a}(r,t,e);l=a[e]=new s(o++,e,t,c,[],1,this)}return l},c.getProgram=function(t,e,r,i){var a=[t.id,e.id,r.join(&quot;:&quot;),i.join(&quot;:&quot;)].join(&quot;@&quot;),o=this.programs[a];return o&amp;&amp;this.gl.isProgram(o)||(this.programs[a]=o=function(t,e,r,i,a){var o=t.createProgram();t.attachShader(o,e),t.attachShader(o,r);for(var s=0;s&lt;i.length;++s)t.bindAttribLocation(o,a[s],i[s]);if(t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS)){var l=t.getProgramInfoLog(o);throw new n(l,&quot;Error linking program: &quot;+l)}return o}(this.gl,t.shader,e.shader,r,i),t.programs.push(a),e.programs.push(a)),o}},{&quot;./GLError&quot;:287,&quot;gl-format-compiler-error&quot;:239,&quot;weakmap-shim&quot;:529}],293:[function(t,e,r){&quot;use strict&quot;;function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}e.exports=function(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r};var i=n.prototype;i.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},i.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]&lt;=n[0]&amp;&amp;n[0]&lt;=o[2]&amp;&amp;o[1]&lt;=n[1]&amp;&amp;n[1]&lt;=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),c=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&amp;&amp;a.drawLine(l,c,s[0],c,e[0],r[0]),t[1]&amp;&amp;a.drawLine(l,c,l,s[1],e[1],r[1]),t[2]&amp;&amp;a.drawLine(l,c,s[2],c,e[2],r[2]),t[3]&amp;&amp;a.drawLine(l,c,l,s[3],e[3],r[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],294:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;glslify&quot;),i=t(&quot;gl-shader&quot;),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n  vec3 vertexPosition = mix(coordinates[0],\n    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n  vec2 delta = weight * clipOffset * screenShape;\n  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n  gl_FragColor = fragColor;\n}&quot;]);e.exports=function(t){return i(t,a,o,null,[{name:&quot;position&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec3&quot;},{name:&quot;weight&quot;,type:&quot;float&quot;}])}},{&quot;gl-shader&quot;:286,glslify:390}],295:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-buffer&quot;),i=t(&quot;gl-vao&quot;),a=t(&quot;./shaders/index&quot;);e.exports=function(t,e){var r=[];function o(t,e,n,i,a,o){var s=[t,e,n,0,0,0,1];s[i+3]=1,s[i]=a,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[i]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[i]=a,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(t,r),c=i(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),u=a(t);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var f=new s(t,l,c,u);return f.update(e),f};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,c=[0,0,0],u=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||o,s=t.view||o,l=t.projection||o;this.axes&amp;&amp;(i=this.axes.lastCubeProps.axis);for(var h=c,p=u,d=0;d&lt;3;++d)i&amp;&amp;i[d]&lt;0?(h[d]=this.bounds[0][d],p[d]=this.bounds[1][d]):(h[d]=this.bounds[1][d],p[d]=this.bounds[0][d]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,h,p],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(d=0;d&lt;3;++d)n.uniforms.lineWidth=this.lineWidth[d]*this.pixelRatio,this.enabled[d]&amp;&amp;(r.draw(e.TRIANGLES,6,6*d),this.drawSides[d]&amp;&amp;r.draw(e.TRIANGLES,12,18+12*d));r.unbind()},l.update=function(t){t&amp;&amp;(&quot;bounds&quot;in t&amp;&amp;(this.bounds=t.bounds),&quot;position&quot;in t&amp;&amp;(this.position=t.position),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;colors&quot;in t&amp;&amp;(this.colors=t.colors),&quot;enabled&quot;in t&amp;&amp;(this.enabled=t.enabled),&quot;drawSides&quot;in t&amp;&amp;(this.drawSides=t.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{&quot;./shaders/index&quot;:294,&quot;gl-buffer&quot;:229,&quot;gl-vao&quot;:308}],296:[function(t,e,r){arguments[4][231][0].apply(r,arguments)},{barycentric:60,dup:231,&quot;polytope-closest-point/lib/closest_point_2d.js&quot;:461}],297:[function(t,e,r){var n=t(&quot;glslify&quot;),i=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat inverse(float m) {\n  return 1.0 / m;\n}\n\nmat2 inverse(mat2 m) {\n  return mat2(m[1][1],-m[0][1],\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\n}\n\nmat3 inverse(mat3 m) {\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\n\n  float b01 = a22 * a11 - a12 * a21;\n  float b11 = -a22 * a10 + a12 * a20;\n  float b21 = a21 * a10 - a11 * a20;\n\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\n\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\n}\n\nmat4 inverse(mat4 m) {\n  float\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\n\n      b00 = a00 * a11 - a01 * a10,\n      b01 = a00 * a12 - a02 * a10,\n      b02 = a00 * a13 - a03 * a10,\n      b03 = a01 * a12 - a02 * a11,\n      b04 = a01 * a13 - a03 * a11,\n      b05 = a02 * a13 - a03 * a12,\n      b06 = a20 * a31 - a21 * a30,\n      b07 = a20 * a32 - a22 * a30,\n      b08 = a20 * a33 - a23 * a30,\n      b09 = a21 * a32 - a22 * a31,\n      b10 = a21 * a33 - a23 * a31,\n      b11 = a22 * a33 - a23 * a32,\n\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n  return mat4(\n      a11 * b11 - a12 * b10 + a13 * b09,\n      a02 * b10 - a01 * b11 - a03 * b09,\n      a31 * b05 - a32 * b04 + a33 * b03,\n      a22 * b04 - a21 * b05 - a23 * b03,\n      a12 * b08 - a10 * b11 - a13 * b07,\n      a00 * b11 - a02 * b08 + a03 * b07,\n      a32 * b02 - a30 * b05 - a33 * b01,\n      a20 * b05 - a22 * b02 + a23 * b01,\n      a10 * b10 - a11 * b08 + a13 * b06,\n      a01 * b08 - a00 * b10 - a03 * b06,\n      a30 * b04 - a31 * b02 + a33 * b00,\n      a21 * b02 - a20 * b04 - a23 * b00,\n      a11 * b07 - a10 * b09 - a12 * b06,\n      a00 * b09 - a01 * b07 + a02 * b06,\n      a31 * b01 - a30 * b03 - a32 * b00,\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\n}\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n  float segmentCount = 8.0;\n\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d);\n  vec3 y = v * sin(angle) * length(d);\n  vec3 v3 = x + y;\n\n  normal = normalize(v3);\n\n  return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float tubeScale;\n\nuniform mat4 model\n           , view\n           , projection;\nuniform vec3 eyePosition\n           , lightPosition;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  // Scale the vector magnitude to stay constant with\n  // model &amp; view changes.\n  vec3 normal;\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal), 0.0);\n  normal = normalize(normal * inverse(mat3(model)));\n\n  vec4 t_position  = view * tubePosition;\n  gl_Position      = projection * t_position;\n  f_color          = color;\n  f_normal         = normal;\n  f_data           = tubePosition.xyz;\n  f_eyeDirection   = eyePosition   - tubePosition.xyz;\n  f_lightDirection = lightPosition - tubePosition.xyz;\n  f_uv             = uv;\n}\n&quot;]),a=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n            , fresnel\n            , kambient\n            , kdiffuse\n            , kspecular\n            , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n  \n  if(!gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor =  texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}&quot;]),o=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| &gt; 0  U  ||b|| &gt; 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x &gt; v.z*v.z || v.y*v.y &gt; v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n  float segmentCount = 8.0;\n\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d);\n  vec3 y = v * sin(angle) * length(d);\n  vec3 v3 = x + y;\n\n  normal = normalize(v3);\n\n  return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  vec3 normal;\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal), 0.0);\n  gl_Position = projection * view * tubePosition;\n  f_id        = id;\n  f_position  = position.xyz;\n}\n&quot;]),s=n([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}&quot;]);r.meshShader={vertex:i,fragment:a,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;},{name:&quot;color&quot;,type:&quot;vec4&quot;},{name:&quot;uv&quot;,type:&quot;vec2&quot;},{name:&quot;vector&quot;,type:&quot;vec4&quot;}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:&quot;position&quot;,type:&quot;vec4&quot;},{name:&quot;id&quot;,type:&quot;vec4&quot;},{name:&quot;vector&quot;,type:&quot;vec4&quot;}]}},{glslify:390}],298:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-shader&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;normals&quot;),l=t(&quot;gl-mat4/multiply&quot;),c=t(&quot;gl-mat4/invert&quot;),u=t(&quot;ndarray&quot;),f=t(&quot;colormap&quot;),h=t(&quot;simplicial-complex-contour&quot;),p=t(&quot;typedarray-pool&quot;),d=t(&quot;./shaders&quot;),g=(t(&quot;./closest-point&quot;),d.meshShader),m=d.pickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,y,x,b,_,w,k,M,A,T,S,E){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=E,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=v,this._view=v,this._projection=v,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,m.vertex,m.fragment,null,m.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity&gt;=1},x.isTransparent=function(){return this.opacity&lt;1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&amp;&amp;this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l&lt;a;++l)for(var c=r[l],u=0;u&lt;2;++u){var f=c[0];2===c.length&amp;&amp;(f=c[u]);for(var d=n[f][0],g=n[f][1],m=i[f],v=1-m,y=this.positions[d],x=this.positions[g],b=0;b&lt;3;++b)o[s++]=m*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,&quot;contourEnable&quot;in t&amp;&amp;(this.contourEnable=t.contourEnable),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=t.contourColor),&quot;lineWidth&quot;in t&amp;&amp;(this.lineWidth=t.lineWidth),&quot;lightPosition&quot;in t&amp;&amp;(this.lightPosition=t.lightPosition),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;ambient&quot;in t&amp;&amp;(this.ambientLight=t.ambient),&quot;diffuse&quot;in t&amp;&amp;(this.diffuseLight=t.diffuse),&quot;specular&quot;in t&amp;&amp;(this.specularLight=t.specular),&quot;roughness&quot;in t&amp;&amp;(this.roughness=t.roughness),&quot;fresnel&quot;in t&amp;&amp;(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&amp;&amp;(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:&quot;rgba&quot;}),r=new Uint8Array(1024),n=0;n&lt;256;++n){for(var i=e[n],a=0;a&lt;3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&amp;&amp;r&amp;&amp;i){void 0!==t.tubeScale&amp;&amp;(this.tubeScale=t.tubeScale);var a=[],l=[],c=[],h=[],p=[],d=[],g=[],m=[],v=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n,this.vectors=i;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&amp;&amp;!A&amp;&amp;(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var E=t.vertexColors,C=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,P=t.vertexIntensity,O=t.cellUVs,I=t.cellIntensity,D=1/0,R=-1/0;if(!z&amp;&amp;!O)if(P)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B&lt;P.length;++B){var F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else if(I)for(B=0;B&lt;I.length;++B){F=I[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B&lt;n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=P||(I?function(t,e,r){for(var n=new Array(e),i=0;i&lt;e;++i)n[i]=0;var a=t.length;for(i=0;i&lt;a;++i)for(var o=t[i],s=0;s&lt;o.length;++s)n[o[s]]=r[i];return n}(r,n.length,I):function(t){for(var e=t.length,r=new Array(e),n=0;n&lt;e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B&lt;n.length;++B)for(var V=n[B],U=0;U&lt;3;++U)!isNaN(V[U])&amp;&amp;isFinite(V[U])&amp;&amp;(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B&lt;r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U&lt;3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=E?E[X]:C?C[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U&lt;2;++U){V=n[X=W[U]];for(var Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U&lt;2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=E?E[X]:C?C[B]:L).length?m.push(Z[0],Z[1],Z[2],1):m.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],v.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U&lt;3;++U)for(V=n[X=W[U]],Y=0;Y&lt;3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U&lt;3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2],K[3]),3===(Z=E?E[X]:C?C[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:P?[(P[X]-D)/(R-D),0]:O?O[B]:I?[(I[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(m),this.edgeUVs.update(v),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o&lt;3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o&lt;3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o&lt;3;++o){for(var p=u[12+o],d=0;d&lt;3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount&gt;0&amp;&amp;((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount&gt;0&amp;&amp;this.lineWidth&gt;0&amp;&amp;((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount&gt;0&amp;&amp;((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&amp;&amp;this.contourCount&gt;0&amp;&amp;this.contourLineWidth&gt;0&amp;&amp;((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||v,n=t.view||v,i=t.projection||v,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o&lt;3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount&gt;0&amp;&amp;(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount&gt;0&amp;&amp;(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount&gt;0)&amp;&amp;((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&amp;&amp;(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),m=i(t),v=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:m,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:4}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),z=i(t),P=new y(t,l,r,null,null,s,null,null,c,f,m,h,p,d,v,x,k,_,w,M,A,C,T,S,E,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return P.update(e),P}},{&quot;./closest-point&quot;:296,&quot;./shaders&quot;:297,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-shader&quot;:286,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,normals:433,&quot;simplicial-complex-contour&quot;:491,&quot;typedarray-pool&quot;:519}],299:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;gl-vec3&quot;),i=t(&quot;gl-vec4&quot;),a=function(t,e,r,a){for(var o=0,s=0;s&lt;t.length;s++)for(var l=t[s].velocities,c=0;c&lt;l.length;c++){var u=n.length(l[c]);u&gt;o&amp;&amp;(o=u)}var f=t.map(function(t){return function(t,e,r,a){var o,s,l,c=t.points,u=t.velocities,f=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var h=[],p=[],d=[],g=[],m=[],v=[],y=0,x=0,b=i.create(),_=i.create(),w=0;w&lt;c.length;w++){o=c[w],s=u[w],l=f[w],0===e&amp;&amp;(l=.05*r),x=n.length(s)/a,b=i.create(),n.copy(b,s),b[3]=l;for(var k=0;k&lt;8;k++)m[k]=[o[0],o[1],o[2],k];if(g.length&gt;0)for(k=0;k&lt;8;k++){var M=(k+1)%8;h.push(g[k],m[k],m[M],m[M],g[M],g[k]),d.push(_,b,b,b,_,_),v.push(y,x,x,x,y,y),p.push([h.length-6,h.length-5,h.length-4],[h.length-3,h.length-2,h.length-1])}var A=g;g=m,m=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:h,cells:p,vectors:d,vertexIntensity:v}}(t,r,a,o)}),h=[],p=[],d=[],g=[];for(s=0;s&lt;f.length;s++){var m=f[s],v=h.length;h=h.concat(m.positions),d=d.concat(m.vectors),g=g.concat(m.vertexIntensity);for(c=0;c&lt;m.cells.length;c++){var y=m.cells[c],x=[];p.push(x);for(var b=0;b&lt;y.length;b++)x.push(y[b]+v)}}return{positions:h,cells:p,vectors:d,vertexIntensity:g,colormap:e}},o=function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=this.getVelocity(r);n.subtract(a,a,e),n.scale(a,a,1e4),n.add(r,t,[0,i,0]);var o=this.getVelocity(r);n.subtract(o,o,e),n.scale(o,o,1e4),n.add(r,t,[0,0,i]);var s=this.getVelocity(r);return n.subtract(s,s,e),n.scale(s,s,1e4),n.add(r,a,o),n.add(r,r,s),r},s=function(t){return h(t,this.vectors,this.meshgrid,this.clampBorders)},l=function(t,e){for(var r=0;r&lt;t.length;r++){var n=t[r];if(n===e)return r;if(n&gt;e)return r-1}return r},c=n.create(),u=n.create(),f=function(t,e,r){return t&lt;e?e:t&gt;r?r:t},h=function(t,e,r,i){var a=t[0],o=t[1],s=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],a),m=l(r[1],o),v=l(r[2],s),y=g+1,x=m+1,b=v+1;if(r[0][g]===a&amp;&amp;(y=g),r[1][m]===o&amp;&amp;(x=m),r[2][v]===s&amp;&amp;(b=v),i&amp;&amp;(g=f(g,0,h-1),y=f(y,0,h-1),m=f(m,0,p-1),x=f(x,0,p-1),v=f(v,0,d-1),b=f(b,0,d-1)),g&lt;0||m&lt;0||v&lt;0||y&gt;=h||x&gt;=p||b&gt;=d)return n.create();var _=(a-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][m])/(r[1][x]-r[1][m]),k=(s-r[2][v])/(r[2][b]-r[2][v]);(_&lt;0||_&gt;1||isNaN(_))&amp;&amp;(_=0),(w&lt;0||w&gt;1||isNaN(w))&amp;&amp;(w=0),(k&lt;0||k&gt;1||isNaN(k))&amp;&amp;(k=0);var M=v*h*p,A=b*h*p,T=m*h,S=x*h,E=g,C=y,L=e[T+M+E],z=e[T+M+C],P=e[S+M+E],O=e[S+M+C],I=e[T+A+E],D=e[T+A+C],R=e[S+A+E],B=e[S+A+C],F=n.create();return n.lerp(F,L,z,_),n.lerp(c,P,O,_),n.lerp(F,F,c,w),n.lerp(c,I,D,_),n.lerp(u,R,B,_),n.lerp(c,c,u,w),n.lerp(F,F,c,k),F},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r&lt;t.length;r++){var n=Math.abs(t[r]-t[r-1]);n&lt;e&amp;&amp;(e=n)}return e};e.exports=function(t,e){var r=t.startingPositions,i=t.maxLength||1e3,l=t.tubeSize||1,c=t.absoluteTubeSize;t.getDivergence||(t.getDivergence=o),t.getVelocity||(t.getVelocity=s),void 0===t.clampBorders&amp;&amp;(t.clampBorders=!0);var u=[],f=e[0][0],h=e[0][1],d=e[0][2],g=e[1][0],m=e[1][1],v=e[1][2],y=function(t,e){var r=e[0],n=e[1],i=e[2];return r&gt;=f&amp;&amp;r&lt;=g&amp;&amp;n&gt;=h&amp;&amp;n&lt;=m&amp;&amp;i&gt;=d&amp;&amp;i&lt;=v},x=10*n.distance(e[0],e[1])/i,b=x*x,_=1,w=0;n.create();r.length&gt;=2&amp;&amp;(_=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=0;s&lt;t.length;s++){var l=t[s],c=l[0],u=l[1],f=l[2];i[c]||(e.push(c),i[c]=!0),a[u]||(r.push(u),a[u]=!0),o[f]||(n.push(f),o[f]=!0)}var h=p(e),d=p(r),g=p(n),m=Math.min(h,d,g);return isFinite(m)?m:1}(r));for(var k=0;k&lt;r.length;k++){var M=n.create();n.copy(M,r[k]);var A=[M],T=[],S=t.getVelocity(M),E=M;T.push(S);var C=[],L=t.getDivergence(M,S);(I=n.length(L))&gt;w&amp;&amp;!isNaN(I)&amp;&amp;isFinite(I)&amp;&amp;(w=I),C.push(I),u.push({points:A,velocities:T,divergences:C});for(var z=0;z&lt;100*i&amp;&amp;A.length&lt;i&amp;&amp;y(0,M);){z++;var P=n.clone(S),O=n.squaredLength(P);if(0===O)break;if(O&gt;b&amp;&amp;n.scale(P,P,x/Math.sqrt(O)),n.add(P,P,M),S=t.getVelocity(P),n.squaredDistance(E,P)-b&gt;-1e-4*b){A.push(P),E=P,T.push(S);L=t.getDivergence(P,S);(I=n.length(L))&gt;w&amp;&amp;!isNaN(I)&amp;&amp;isFinite(I)&amp;&amp;(w=I),C.push(I)}M=P}}for(k=0;k&lt;C.length;k++){var I=C[k];!isNaN(I)&amp;&amp;isFinite(I)||(C[k]=w)}var D=a(u,t.colormap,w,_);return c?D.tubeScale=c:(0===w&amp;&amp;(w=1),D.tubeScale=.5*l*_/w),D},e.exports.createTubeMesh=t(&quot;./lib/tubemesh&quot;)},{&quot;./lib/tubemesh&quot;:298,&quot;gl-vec3&quot;:327,&quot;gl-vec4&quot;:363}],300:[function(t,e,r){var n=t(&quot;gl-shader&quot;),i=t(&quot;glslify&quot;),a=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  worldCoordinate = vec3(uv.zw, f.x);\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n  vec4 clipPosition = projection * view * worldPosition;\n  gl_Position = clipPosition;\n  kill = f.y;\n  value = f.z;\n  planeCoordinate = uv.xy;\n\n  vColor = texture2D(colormap, vec2(value, value));\n\n  //Lighting geometry parameters\n  vec4 cameraCoordinate = view * worldPosition;\n  cameraCoordinate.xyz /= cameraCoordinate.w;\n  lightDirection = lightPosition - cameraCoordinate.xyz;\n  eyeDirection   = eyePosition - cameraCoordinate.xyz;\n  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n&quot;]),o=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness) {\n  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  if (kill &gt; 0.0 ||\n    any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n    discard;\n  }\n\n  vec3 N = normalize(surfaceNormal);\n  vec3 V = normalize(eyeDirection);\n  vec3 L = normalize(lightDirection);\n\n  if(gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  //decide how to interpolate color \u2014 in vertex or in fragment\n  vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\n\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n&quot;]),s=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n  vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\n\n  vec4 clipPosition = projection * view * worldPosition;\n  clipPosition.z = clipPosition.z + zOffset;\n\n  gl_Position = clipPosition;\n  value = f;\n  kill = -1.0;\n  worldCoordinate = dataCoordinate;\n  planeCoordinate = uv.zw;\n\n  vColor = texture2D(colormap, vec2(value, value));\n\n  //Don't do lighting for contours\n  surfaceNormal   = vec3(1,0,0);\n  eyeDirection    = vec3(0,1,0);\n  lightDirection  = vec3(0,0,1);\n}\n&quot;]),l=i([&quot;precision mediump float;\n#define GLSLIFY 1\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n  float vh = 255.0 * v;\n  float upper = floor(vh);\n  float lower = fract(vh);\n  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n  if(kill &gt; 0.0 ||\n    any(lessThan(worldCoordinate, clipBounds[0])) || any(greaterThan(worldCoordinate, clipBounds[1]))) {\n    discard;\n  }\n  vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n  vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n&quot;]);r.createShader=function(t){var e=n(t,a,o,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;vec3&quot;},{name:&quot;normal&quot;,type:&quot;vec3&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;float&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:&quot;uv&quot;,type:&quot;vec4&quot;},{name:&quot;f&quot;,type:&quot;float&quot;}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{&quot;gl-shader&quot;:286,glslify:390}],301:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var m=new E(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,f,h,p,d),v={levels:[[],[],[]]};for(var k in t)v[k]=t[k];return v.colormap=v.colormap||&quot;jet&quot;,m.update(v),m};var n=t(&quot;bit-twiddle&quot;),i=t(&quot;gl-buffer&quot;),a=t(&quot;gl-vao&quot;),o=t(&quot;gl-texture2d&quot;),s=t(&quot;typedarray-pool&quot;),l=t(&quot;colormap&quot;),c=t(&quot;ndarray-ops&quot;),u=t(&quot;ndarray-pack&quot;),f=t(&quot;ndarray&quot;),h=t(&quot;surface-nets&quot;),p=t(&quot;gl-mat4/multiply&quot;),d=t(&quot;gl-mat4/invert&quot;),g=t(&quot;binary-search-bounds&quot;),m=t(&quot;ndarray-gradient&quot;),v=t(&quot;./lib/shaders&quot;),y=v.createShader,x=v.createContourShader,b=v.createPickShader,_=v.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],M=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[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]];function T(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t&lt;3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function E(t,e,r,n,i,a,o,l,c,u,h,p,d,g){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.isTransparent=function(){return this.opacity&lt;1},C.isOpaque=function(){if(this.opacity&gt;=1)return!0;for(var t=0;t&lt;3;++t)if(this._contourCounts[t].length&gt;0||this._dynamicCounts[t]&gt;0)return!0;return!1},C.pickSlots=1,C.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(t,e){var r,n,i,a=e.axes&amp;&amp;e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r&lt;3;++r)for(o=o||e.surfaceProject[r],n=0;n&lt;3;++n)s=s||e.contourProject[r][n];for(r=0;r&lt;3;++r){var l=z.projections[r];for(n=0;n&lt;16;++n)l[n]=0;for(n=0;n&lt;4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]&gt;0)][r],p(l,t.model,l);var c=z.clipBounds[r];for(i=0;i&lt;2;++i)for(n=0;n&lt;3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var O={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=O;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i&lt;2;++i)for(var a=n.clipBounds[i],o=0;o&lt;3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=I;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i&lt;3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i&lt;3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i&lt;3;++i){var c=s[12+i];for(o=0;o&lt;3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=P(n,this);if(u.showSurface&amp;&amp;e===this.opacity&lt;1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&amp;&amp;this._vertexCount&amp;&amp;this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i&lt;3;++i)this.surfaceProject[i]&amp;&amp;this.vertexCount&amp;&amp;(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&amp;&amp;!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i&lt;3;++i)for(f.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]),o=0;o&lt;this.contourLevels[i].length;++o)o===this.highlightLevel[i]?(f.uniforms.contourColor=this.highlightColor[i],f.uniforms.contourTint=this.highlightTint[i]):0!==o&amp;&amp;o-1!==this.highlightLevel[i]||(f.uniforms.contourColor=this.contourColor[i],f.uniforms.contourTint=this.contourTint[i]),this._contourCounts[i][o]&amp;&amp;(f.uniforms.height=this.contourLevels[i][o],h.draw(r.LINES,this._contourCounts[i][o],this._contourOffsets[i][o]));for(i=0;i&lt;3;++i)for(f.uniforms.model=u.projections[i],f.uniforms.clipBounds=u.clipBounds[i],o=0;o&lt;3;++o)if(this.contourProject[i][o]){f.uniforms.permutation=A[o],r.lineWidth(this.contourWidth[o]);for(var g=0;g&lt;this.contourLevels[o].length;++g)g===this.highlightLevel[o]?(f.uniforms.contourColor=this.highlightColor[o],f.uniforms.contourTint=this.highlightTint[o]):0!==g&amp;&amp;g-1!==this.highlightLevel[o]||(f.uniforms.contourColor=this.contourColor[o],f.uniforms.contourTint=this.contourTint[o]),f.uniforms.height=this.contourLevels[o][g],h.draw(r.LINES,this._contourCounts[o][g],this._contourOffsets[o][g])}for(h.unbind(),(h=this._dynamicVAO).bind(),i=0;i&lt;3;++i)if(0!==this._dynamicCounts[i])for(f.uniforms.model=n.model,f.uniforms.clipBounds=n.clipBounds,f.uniforms.permutation=A[i],r.lineWidth(this.dynamicWidth[i]),f.uniforms.contourColor=this.dynamicColor[i],f.uniforms.contourTint=this.dynamicTint[i],f.uniforms.height=this.dynamicLevel[i],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]),o=0;o&lt;3;++o)this.contourProject[o][i]&amp;&amp;(f.uniforms.model=u.projections[o],f.uniforms.clipBounds=u.clipBounds[o],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]));h.unbind()}}C.draw=function(t){return R.call(this,t,!1)},C.drawTransparent=function(t){return R.call(this,t,!0)};var B={model:k,view:k,projection:k,inverseModel:k,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function F(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))}function N(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function j(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function V(t){if(Array.isArray(t)){if(Array.isArray(t))return[j(t[0]),j(t[1]),j(t[2])];var e=j(t);return[e.slice(),e.slice(),e.slice()]}}C.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=B;r.model=t.model||k,r.view=t.view||k,r.projection=t.projection||k,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=D;for(var n=0;n&lt;2;++n)for(var i=r.clipBounds[n],a=0;a&lt;3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var o=P(r,this);if(o.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n&lt;3;++n)this.surfaceProject[n]&amp;&amp;(this._pickShader.uniforms.model=o.projections[n],this._pickShader.uniforms.clipBounds=o.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(o.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=r;var l=this._contourVAO;for(l.bind(),a=0;a&lt;3;++a)for(e.lineWidth(this.contourWidth[a]),s.uniforms.permutation=A[a],n=0;n&lt;this.contourLevels[a].length;++n)this._contourCounts[a][n]&amp;&amp;(s.uniforms.height=this.contourLevels[a][n],l.draw(e.LINES,this._contourCounts[a][n],this._contourOffsets[a][n]));for(n=0;n&lt;3;++n)for(s.uniforms.model=o.projections[n],s.uniforms.clipBounds=o.clipBounds[n],a=0;a&lt;3;++a)if(this.contourProject[n][a]){s.uniforms.permutation=A[a],e.lineWidth(this.contourWidth[a]);for(var c=0;c&lt;this.contourLevels[a].length;++c)this._contourCounts[a][c]&amp;&amp;(s.uniforms.height=this.contourLevels[a][c],l.draw(e.LINES,this._contourCounts[a][c],this._contourOffsets[a][c]))}l.unbind()}},C.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]&gt;&gt;4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&amp;t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u&lt;2;++u)for(var f=u?a:1-a,h=0;h&lt;2;++h)for(var p=i+u,d=s+h,m=f*(h?l:1-l),v=0;v&lt;3;++v)c[v]+=this._field[v].get(p,d)*m;for(var y=this._pickResult.level,x=0;x&lt;3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]&lt;0)this.contourLevels[x].length&gt;0&amp;&amp;(y[x]=0);else if(y[x]&lt;this.contourLevels[x].length-1){var b=this.contourLevels[x][y[x]],_=this.contourLevels[x][y[x]+1];Math.abs(b-c[x])&gt;Math.abs(_-c[x])&amp;&amp;(y[x]+=1)}for(r.index[0]=a&lt;.5?i:i+1,r.index[1]=l&lt;.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v&lt;3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},C.update=function(t){t=t||{},this.dirty=!0,&quot;contourWidth&quot;in t&amp;&amp;(this.contourWidth=N(t.contourWidth,Number)),&quot;showContour&quot;in t&amp;&amp;(this.showContour=N(t.showContour,Boolean)),&quot;showSurface&quot;in t&amp;&amp;(this.showSurface=!!t.showSurface),&quot;contourTint&quot;in t&amp;&amp;(this.contourTint=N(t.contourTint,Boolean)),&quot;contourColor&quot;in t&amp;&amp;(this.contourColor=V(t.contourColor)),&quot;contourProject&quot;in t&amp;&amp;(this.contourProject=N(t.contourProject,function(t){return N(t,Boolean)})),&quot;surfaceProject&quot;in t&amp;&amp;(this.surfaceProject=t.surfaceProject),&quot;dynamicColor&quot;in t&amp;&amp;(this.dynamicColor=V(t.dynamicColor)),&quot;dynamicTint&quot;in t&amp;&amp;(this.dynamicTint=N(t.dynamicTint,Number)),&quot;dynamicWidth&quot;in t&amp;&amp;(this.dynamicWidth=N(t.dynamicWidth,Number)),&quot;opacity&quot;in t&amp;&amp;(this.opacity=t.opacity),&quot;colorBounds&quot;in t&amp;&amp;(this.colorBounds=t.colorBounds),&quot;vertexColor&quot;in t&amp;&amp;(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&amp;&amp;t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),&quot;field&quot;in t||&quot;coords&quot;in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i&gt;this._field[2].data.length&amp;&amp;(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),F(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o&lt;2;++o)this._field[2].size&gt;this._field[o].data.length&amp;&amp;(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error(&quot;gl-surface: invalid coordinates for x/y&quot;);for(o=0;o&lt;2;++o){var d=p[o];for(b=0;b&lt;2;++b)if(d.shape[b]!==a[b])throw new Error(&quot;gl-surface: coords have incorrect shape&quot;);F(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error(&quot;gl-surface: invalid ticks&quot;);for(o=0;o&lt;2;++o){var v=g[o];if((Array.isArray(v)||v.length)&amp;&amp;(v=f(v)),v.shape[0]!==a[o])throw new Error(&quot;gl-surface: invalid tick length&quot;);var y=f(v.data,a);y.stride[o]=v.stride[0],y.stride[1^o]=0,F(this._field[o],y)}}else{for(o=0;o&lt;2;++o){var x=[0,0];x[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b&lt;a[0];++b)this._field[0].set(b+1,0,b);for(this._field[0].set(a[0]+1,0,a[0]-1),this._field[1].set(0,0,0),b=0;b&lt;a[1];++b)this._field[1].set(0,b+1,b);this._field[1].set(0,a[1]+1,a[1]-1)}var _=this._field,w=f(s.mallocFloat(3*_[2].size*2),[3,a[0]+2,a[1]+2,2]);for(o=0;o&lt;3;++o)m(w.pick(o),_[o],&quot;mirror&quot;);var k=f(s.mallocFloat(3*_[2].size),[a[0]+2,a[1]+2,3]);for(o=0;o&lt;a[0]+2;++o)for(b=0;b&lt;a[1]+2;++b){var A=w.get(0,o,b,0),T=w.get(0,o,b,1),E=w.get(1,o,b,0),C=w.get(1,o,b,1),L=w.get(2,o,b,0),z=w.get(2,o,b,1),P=E*z-C*L,O=L*T-z*A,I=A*C-T*E,D=Math.sqrt(P*P+O*O+I*I);D&lt;1e-8?(D=Math.max(Math.abs(P),Math.abs(O),Math.abs(I)))&lt;1e-8?(I=1,O=P=0,D=1):D=1/D:D=1/Math.sqrt(D),k.set(o,b,0,P*D),k.set(o,b,1,O*D),k.set(o,b,2,I*D)}s.free(w.data);var R=[1/0,1/0,1/0],B=[-1/0,-1/0,-1/0],j=1/0,U=-1/0,q=(a[0]-1)*(a[1]-1)*6,H=s.mallocFloat(n.nextPow2(10*q)),G=0,W=0;for(o=0;o&lt;a[0]-1;++o)t:for(b=0;b&lt;a[1]-1;++b){for(var Y=0;Y&lt;2;++Y)for(var X=0;X&lt;2;++X)for(var Z=0;Z&lt;3;++Z){var $=this._field[Z].get(1+o+Y,1+b+X);if(isNaN($)||!isFinite($))continue t}for(Z=0;Z&lt;6;++Z){var J=o+M[Z][0],K=b+M[Z][1],Q=this._field[0].get(J+1,K+1),tt=this._field[1].get(J+1,K+1),et=$=this._field[2].get(J+1,K+1);P=k.get(J+1,K+1,0),O=k.get(J+1,K+1,1),I=k.get(J+1,K+1,2),t.intensity&amp;&amp;(et=t.intensity.get(J,K)),H[G++]=J,H[G++]=K,H[G++]=Q,H[G++]=tt,H[G++]=$,H[G++]=0,H[G++]=et,H[G++]=P,H[G++]=O,H[G++]=I,R[0]=Math.min(R[0],Q),R[1]=Math.min(R[1],tt),R[2]=Math.min(R[2],$),j=Math.min(j,et),B[0]=Math.max(B[0],Q),B[1]=Math.max(B[1],tt),B[2]=Math.max(B[2],$),U=Math.max(U,et),W+=1}}for(t.intensityBounds&amp;&amp;(j=+t.intensityBounds[0],U=+t.intensityBounds[1]),o=6;o&lt;G;o+=10)H[o]=(H[o]-j)/(U-j);this._vertexCount=W,this._coordinateBuffer.update(H.subarray(0,G)),s.freeFloat(H),s.free(k.data),this.bounds=[R,B],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===j&amp;&amp;this.intensityBounds[1]===U||(r=!0),this.intensityBounds=[j,U]}if(&quot;levels&quot;in t){var rt=t.levels;for(rt=Array.isArray(rt[0])?rt.slice():[[],[],rt],o=0;o&lt;3;++o)rt[o]=rt[o].slice(),rt.sort(function(t,e){return t-e});t:for(o=0;o&lt;3;++o){if(rt[o].length!==this.contourLevels[o].length){r=!0;break}for(b=0;b&lt;rt[o].length;++b)if(rt[o][b]!==this.contourLevels[o][b]){r=!0;break t}}this.contourLevels=rt}if(r){_=this._field,a=this.shape;for(var nt=[],it=0;it&lt;3;++it){rt=this.contourLevels[it];var at=[],ot=[],st=[0,0,0];for(o=0;o&lt;rt.length;++o){var lt=h(this._field[it],rt[o]);at.push(nt.length/5|0),W=0;t:for(b=0;b&lt;lt.cells.length;++b){var ct=lt.cells[b];for(Z=0;Z&lt;2;++Z){var ut=lt.positions[ct[Z]],ft=ut[0],ht=0|Math.floor(ft),pt=ft-ht,dt=ut[1],gt=0|Math.floor(dt),mt=dt-gt,vt=!1;e:for(var yt=0;yt&lt;3;++yt){st[yt]=0;var xt=(it+yt+1)%3;for(Y=0;Y&lt;2;++Y){var bt=Y?pt:1-pt;for(J=0|Math.min(Math.max(ht+Y,0),a[0]),X=0;X&lt;2;++X){var _t=X?mt:1-mt;if(K=0|Math.min(Math.max(gt+X,0),a[1]),$=yt&lt;2?this._field[xt].get(J,K):(this.intensity.get(J,K)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite($)||isNaN($)){vt=!0;break e}var wt=bt*_t;st[yt]+=wt*$}}}if(vt){if(Z&gt;0){for(var kt=0;kt&lt;5;++kt)nt.pop();W-=1}continue t}nt.push(st[0],st[1],ut[0],ut[1],st[2]),W+=1}}ot.push(W)}this._contourOffsets[it]=at,this._contourCounts[it]=ot}var Mt=s.mallocFloat(nt.length);for(o=0;o&lt;nt.length;++o)Mt[o]=nt[o];this._contourBuffer.update(Mt),s.freeFloat(Mt)}t.colormap&amp;&amp;this._colorMap.setPixels(function(t){var e=u([l({colormap:t,nshades:S,format:&quot;rgba&quot;}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return c.divseq(e,255),e}(t.colormap))},C.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t&lt;3;++t)s.freeFloat(this._field[t].data)},C.highlight=function(t){if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(var e=0;e&lt;3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;var r;if(r=this.snapToData?t.dataCoordinate:t.position,this.enableDynamic[0]&amp;&amp;r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&amp;&amp;r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&amp;&amp;r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o&lt;3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,c=(o+2)%3,u=this._field[o],f=this._field[l],p=this._field[c],d=(this.intensity,h(u,r[o])),g=d.cells,m=d.positions;for(this._dynamicOffsets[o]=n,e=0;e&lt;g.length;++e)for(var v=g[e],y=0;y&lt;2;++y){var x=m[v[y]],b=+x[0],_=0|b,w=0|Math.min(_+1,i[0]),k=b-_,M=1-k,A=+x[1],T=0|A,S=0|Math.min(T+1,i[1]),E=A-T,C=1-E,L=M*C,z=M*E,P=k*C,O=k*E,I=L*f.get(_,T)+z*f.get(_,S)+P*f.get(w,T)+O*f.get(w,S),D=L*p.get(_,T)+z*p.get(_,S)+P*p.get(w,T)+O*p.get(w,S);if(isNaN(I)||isNaN(D)){y&amp;&amp;(n-=1);break}a[2*n+0]=I,a[2*n+1]=D,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),s.freeFloat(a)}}},{&quot;./lib/shaders&quot;:300,&quot;binary-search-bounds&quot;:78,&quot;bit-twiddle&quot;:79,colormap:113,&quot;gl-buffer&quot;:229,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/multiply&quot;:255,&quot;gl-texture2d&quot;:303,&quot;gl-vao&quot;:308,ndarray:430,&quot;ndarray-gradient&quot;:421,&quot;ndarray-ops&quot;:424,&quot;ndarray-pack&quot;:425,&quot;surface-nets&quot;:505,&quot;typedarray-pool&quot;:519}],302:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;css-font&quot;),i=t(&quot;pick-by-alias&quot;),a=t(&quot;regl&quot;),o=t(&quot;gl-util/context&quot;),s=t(&quot;es6-weak-map&quot;),l=t(&quot;color-normalize&quot;),c=t(&quot;font-atlas&quot;),u=t(&quot;typedarray-pool&quot;),f=t(&quot;parse-rect&quot;),h=t(&quot;is-plain-obj&quot;),p=t(&quot;parse-unit&quot;),d=t(&quot;to-px&quot;),g=t(&quot;detect-kerning&quot;),m=t(&quot;object-assign&quot;),v=t(&quot;font-measure&quot;),y=t(&quot;flatten-vertex-data&quot;),x=t(&quot;bit-twiddle&quot;).nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement(&quot;div&quot;));w.style.font=&quot;italic small-caps bold condensed 16px/2 cursive&quot;,getComputedStyle(w).fontStretch&amp;&amp;(_=!0),document.body.removeChild(w)}var k=function(t){!function(t){return&quot;function&quot;==typeof t&amp;&amp;t._gl&amp;&amp;t.prop&amp;&amp;t.texture&amp;&amp;t.buffer}(t)?this.gl=o(t):(t={regl:t},this.gl=t.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:&quot;uint8&quot;,usage:&quot;stream&quot;}),this.sizeBuffer=this.regl.buffer({type:&quot;float&quot;,usage:&quot;stream&quot;}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},stencil:{enable:!1},depth:{enable:!1},count:t.prop(&quot;count&quot;),offset:t.prop(&quot;offset&quot;),attributes:{charOffset:{offset:4,stride:8,buffer:t.this(&quot;sizeBuffer&quot;)},width:{offset:0,stride:8,buffer:t.this(&quot;sizeBuffer&quot;)},char:t.this(&quot;charBuffer&quot;),position:t.this(&quot;position&quot;)},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop(&quot;color&quot;),opacity:t.prop(&quot;opacity&quot;),viewport:t.this(&quot;viewportArray&quot;),scale:t.this(&quot;scale&quot;),align:t.prop(&quot;align&quot;),baseline:t.prop(&quot;baseline&quot;),translate:t.this(&quot;translate&quot;),positionOffset:t.prop(&quot;positionOffset&quot;)},primitive:&quot;points&quot;,viewport:t.this(&quot;viewport&quot;),vert:&quot;\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\t&quot;+(k.normalViewport?&quot;&quot;:&quot;vec2 positionOffset = vec2(positionOffset.x,- positionOffset.y);&quot;)+&quot;\n\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ positionOffset))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\t&quot;+(k.normalViewport?&quot;position.y = 1. - position.y;&quot;:&quot;&quot;)+&quot;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}&quot;,frag:&quot;\n\t\t\tprecision highp float;\n\t\t\tuniform sampler2D atlas;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) &gt; halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) &lt; halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}&quot;});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if(&quot;string&quot;==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:&quot;position positions coord coords coordinates&quot;,font:&quot;font fontFace fontface typeface cssFont css-font family fontFamily&quot;,fontSize:&quot;fontSize fontsize size font-size&quot;,text:&quot;text texts chars characters value values symbols&quot;,align:&quot;align alignment textAlign textbaseline&quot;,baseline:&quot;baseline textBaseline textbaseline&quot;,direction:&quot;dir direction textDirection&quot;,color:&quot;color colour fill fill-color fillColor textColor textcolor&quot;,kerning:&quot;kerning kern&quot;,range:&quot;range dataBox&quot;,viewport:&quot;vp viewport viewBox viewbox viewPort&quot;,opacity:&quot;opacity alpha transparency visible visibility opaque&quot;,offset:&quot;offset positionOffset padding shift indent indentation&quot;},!0)).opacity&amp;&amp;(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(t){return parseFloat(t)}):this.opacity=parseFloat(t.opacity)),null!=t.viewport&amp;&amp;(this.viewport=f(t.viewport),k.normalViewport&amp;&amp;(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&amp;&amp;(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&amp;&amp;(this.kerning=t.kerning),null!=t.offset&amp;&amp;(&quot;number&quot;==typeof t.offset&amp;&amp;(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&amp;&amp;(this.direction=t.direction),t.range&amp;&amp;(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&amp;&amp;(this.scale=t.scale),t.translate&amp;&amp;(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+&quot;px sans-serif&quot;);var r,a=!1,o=!1;if(t.font&amp;&amp;(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if(&quot;string&quot;==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+&quot;px &quot;+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&amp;&amp;(o=!0,e.fontSize[r]=l),!(e.font[r]&amp;&amp;i==e.font[r].baseString||(a=!0,e.font[r]=k.fonts[i],e.font[r]))){var c=t.family.join(&quot;, &quot;),u=[t.style];t.style!=t.variant&amp;&amp;u.push(t.variant),t.variant!=t.weight&amp;&amp;u.push(t.weight),_&amp;&amp;t.weight!=t.stretch&amp;&amp;u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(c,{origin:&quot;top&quot;,fontSize:k.baseFontSize,fontStyle:u.join(&quot; &quot;)})},k.fonts[i]=e.font[r]}}),(a||o)&amp;&amp;this.font.forEach(function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&amp;&amp;(t.text=e.text)}),&quot;string&quot;==typeof t.text&amp;&amp;t.position&amp;&amp;t.position.length&gt;2){for(var s=Array(.5*t.position.length),h=0;h&lt;s.length;h++)s[h]=t.text;t.text=s}if(null!=t.text||a){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var b=1;b&lt;t.text.length;b++)e.textOffsets[b]=e.textOffsets[b-1]+t.text[b-1].length,e.count+=t.text[b].length,e.counts.push(t.text[b].length);this.text=t.text.join(&quot;&quot;)}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];r=[],this.font.forEach(function(t,n){k.atlasContext.font=t.baseString;for(var i=e.fontAtlas[n],a=0;a&lt;e.text.length;a++){var o=e.text.charAt(a);if(null==i.ids[o]&amp;&amp;(i.ids[o]=i.chars.length,i.chars.push(o),r.push(o)),null==t.width[o]&amp;&amp;(t.width[o]=k.atlasContext.measureText(o).width/k.baseFontSize,e.kerning)){var s=[];for(var l in t.width)s.push(l+o,o+l);m(t.kerning,g(t.family,{pairs:s}))}}})}if(t.position)if(t.position.length&gt;2){for(var w=!t.position[0].length,M=u.mallocFloat(2*this.count),A=0,T=0;A&lt;this.counts.length;A++){var S=e.counts[A];if(w)for(var E=0;E&lt;S;E++)M[T++]=t.position[2*A],M[T++]=t.position[2*A+1];else for(var C=0;C&lt;S;C++)M[T++]=t.position[A][0],M[T++]=t.position[A][1]}this.position.call?this.position({type:&quot;float&quot;,data:M}):this.position=this.regl.buffer({type:&quot;float&quot;,data:M}),u.freeFloat(M)}else this.position.destroy&amp;&amp;this.position.destroy(),this.position={constant:t.position};if(t.text||a){var L=u.mallocUint8(this.count),z=u.mallocFloat(2*this.count);this.textWidth=[];for(var P=0,O=0;P&lt;this.counts.length;P++){for(var I=e.counts[P],D=e.font[P]||e.font[0],R=e.fontAtlas[P]||e.fontAtlas[0],B=0;B&lt;I;B++){var F=e.text.charAt(O),N=e.text.charAt(O-1);if(L[O]=R.ids[F],z[2*O]=D.width[F],B){var j=z[2*O-2],V=z[2*O],U=z[2*O-1]+.5*j+.5*V;if(e.kerning){var q=D.kerning[N+F];q&amp;&amp;(U+=.001*q)}z[2*O+1]=U}else z[2*O+1]=.5*z[2*O];O++}e.textWidth.push(z.length?.5*z[2*O-2]+z[2*O-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:L,type:&quot;uint8&quot;,usage:&quot;stream&quot;}),this.sizeBuffer({data:z,type:&quot;float&quot;,usage:&quot;stream&quot;}),u.freeUint8(L),u.freeFloat(z),r.length&amp;&amp;this.font.forEach(function(t,r){var n=e.fontAtlas[r],i=n.step,a=Math.floor(k.maxAtlasSize/i),o=Math.min(a,n.chars.length),s=Math.ceil(n.chars.length/o),l=x(o*i),u=x(s*i);n.width=l,n.height=u,n.rows=s,n.cols=o,n.em&amp;&amp;n.texture({data:c({canvas:k.atlasCanvas,font:n.fontString,chars:n.chars,shape:[l,u],step:[i,i]})})})}if(t.align&amp;&amp;(this.align=t.align,this.alignOffset=this.textWidth.map(function(t,r){var n=Array.isArray(e.align)?e.align.length&gt;1?e.align[r]:e.align[0]:e.align;if(&quot;number&quot;==typeof n)return n;switch(n){case&quot;right&quot;:case&quot;end&quot;:return-t;case&quot;center&quot;:case&quot;centre&quot;:case&quot;middle&quot;:return.5*-t}return 0})),null==this.baseline&amp;&amp;null==t.baseline&amp;&amp;(t.baseline=0),null!=t.baseline&amp;&amp;(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,i+=&quot;number&quot;==typeof t?t-n.baseline:-n[t],k.normalViewport||(i*=-1),i})),null!=t.color)if(t.color||(t.color=&quot;transparent&quot;),&quot;string&quot;!=typeof t.color&amp;&amp;isNaN(t.color)){var H;if(&quot;number&quot;==typeof t.color[0]&amp;&amp;t.color.length&gt;this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var W=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y&lt;G;Y+=4)H.set(l(W(Y,Y+4),&quot;uint8&quot;),Y)}else{var X=t.color.length;H=u.mallocUint8(4*X);for(var Z=0;Z&lt;X;Z++)H.set(l(t.color[Z]||0,&quot;uint8&quot;),4*Z)}this.color=H}else this.color=l(t.color,&quot;uint8&quot;);if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity)if(this.color.length&gt;4||this.baselineOffset.length&gt;1||this.align&amp;&amp;this.align.length&gt;1||this.fontAtlas.length&gt;1||this.positionOffset.length&gt;2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var J=0;J&lt;this.batch.length;J++)e.batch[J]={count:e.counts.length&gt;1?e.counts[J]:e.counts[0],offset:e.textOffsets.length&gt;1?e.textOffsets[J]:e.textOffsets[0],color:e.color?e.color.length&lt;=4?e.color:e.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(e.opacity)?e.opacity[J]:e.opacity,baseline:null!=e.baselineOffset[J]?e.baselineOffset[J]:e.baselineOffset[0],align:e.align?null!=e.alignOffset[J]?e.alignOffset[J]:e.alignOffset[0]:0,atlas:e.fontAtlas[J]||e.fontAtlas[0],positionOffset:e.positionOffset.length&gt;2?e.positionOffset.subarray(2*J,2*J+2):e.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text=&quot;&quot;,k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement(&quot;canvas&quot;),k.atlasContext=k.atlasCanvas.getContext(&quot;2d&quot;,{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{&quot;bit-twiddle&quot;:79,&quot;color-normalize&quot;:107,&quot;css-font&quot;:126,&quot;detect-kerning&quot;:150,&quot;es6-weak-map&quot;:208,&quot;flatten-vertex-data&quot;:215,&quot;font-atlas&quot;:216,&quot;font-measure&quot;:217,&quot;gl-util/context&quot;:304,&quot;is-plain-obj&quot;:403,&quot;object-assign&quot;:434,&quot;parse-rect&quot;:439,&quot;parse-unit&quot;:441,&quot;pick-by-alias&quot;:445,regl:475,&quot;to-px&quot;:513,&quot;typedarray-pool&quot;:519}],303:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray&quot;),i=t(&quot;ndarray-ops&quot;),a=t(&quot;typedarray-pool&quot;);e.exports=function(t){if(arguments.length&lt;=1)throw new Error(&quot;gl-texture2d: Missing arguments for texture2d constructor&quot;);o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if(&quot;number&quot;==typeof arguments[1])return m(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return m(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(&quot;object&quot;==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new h(t,o,r,n,i,a)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&amp;&amp;e.data&amp;&amp;e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]&lt;0||o[0]&gt;s||o[1]&lt;0||o[1]&gt;s)throw new Error(&quot;gl-texture2d: Invalid texture size&quot;);var l=d(o,e.stride.slice()),c=0;&quot;float32&quot;===r?c=t.FLOAT:&quot;float64&quot;===r?(c=t.FLOAT,l=!1,r=&quot;float32&quot;):&quot;uint8&quot;===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r=&quot;uint8&quot;);var f,p,m=0;if(2===o.length)m=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error(&quot;gl-texture2d: Invalid shape for texture&quot;);if(1===o[2])m=t.ALPHA;else if(2===o[2])m=t.LUMINANCE_ALPHA;else if(3===o[2])m=t.RGB;else{if(4!==o[2])throw new Error(&quot;gl-texture2d: Invalid shape for pixel coords&quot;);m=t.RGBA}}c!==t.FLOAT||t.getExtension(&quot;OES_texture_float&quot;)||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)f=0===e.offset&amp;&amp;e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var y=[o[2],o[2]*o[0],1];p=a.malloc(v,r);var x=n(p,o,y,0);&quot;float32&quot;!==r&amp;&amp;&quot;float64&quot;!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):u(x,e),f=p.subarray(0,v)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,m,o[0],o[1],0,m,c,f),l||a.free(p);return new h(t,b,o[0],o[1],m,c)}(t,e)}throw new Error(&quot;gl-texture2d: Invalid arguments for texture2d constructor&quot;)};var o=null,s=null,l=null;function c(t){return&quot;undefined&quot;!=typeof HTMLCanvasElement&amp;&amp;t instanceof HTMLCanvasElement||&quot;undefined&quot;!=typeof HTMLImageElement&amp;&amp;t instanceof HTMLImageElement||&quot;undefined&quot;!=typeof HTMLVideoElement&amp;&amp;t instanceof HTMLVideoElement||&quot;undefined&quot;!=typeof ImageData&amp;&amp;t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function f(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e&lt;0||e&gt;i||r&lt;0||r&gt;i)throw new Error(&quot;gl-texture2d: Invalid texture size&quot;);return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=h.prototype;function d(t,e){return 3===t.length?1===e[2]&amp;&amp;e[1]===t[0]*t[2]&amp;&amp;e[0]===t[2]:1===e[0]&amp;&amp;e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function m(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e&lt;0||e&gt;a||r&lt;0||r&gt;a)throw new Error(&quot;gl-texture2d: Invalid texture shape&quot;);if(i===t.FLOAT&amp;&amp;!t.getExtension(&quot;OES_texture_float&quot;))throw new Error(&quot;gl-texture2d: Floating point textures not supported on this platform&quot;);var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,o,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&amp;&amp;o.indexOf(t)&gt;=0&amp;&amp;(e.getExtension(&quot;OES_texture_float_linear&quot;)||(t=e.NEAREST)),s.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown filter mode &quot;+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&amp;&amp;o.indexOf(t)&gt;=0&amp;&amp;(e.getExtension(&quot;OES_texture_float_linear&quot;)||(t=e.NEAREST)),s.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown filter mode &quot;+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension(&quot;EXT_texture_filter_anisotropic&quot;);r&amp;&amp;this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown wrap mode &quot;+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)&lt;0)throw new Error(&quot;gl-texture2d: Unknown wrap mode &quot;+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error(&quot;gl-texture2d: Must specify wrap mode for rows and columns&quot;);for(var e=0;e&lt;2;++e)if(l.indexOf(t[e])&lt;0)throw new Error(&quot;gl-texture2d: Unknown wrap mode &quot;+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error(&quot;gl-texture2d: Invalid texture shape&quot;)}else t=[0|t,0|t];return f(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return f(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,f(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&amp;&amp;e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t&gt;0;++e,t&gt;&gt;&gt;=1)this._mipLevels.indexOf(e)&lt;0&amp;&amp;this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)&lt;0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&amp;&amp;t.stride&amp;&amp;t.data))throw new Error(&quot;gl-texture2d: Unsupported data type&quot;);if(t.shape.length&lt;2||e+t.shape[1]&gt;this._shape[1]&gt;&gt;&gt;o||r+t.shape[0]&gt;this._shape[0]&gt;&gt;&gt;o||e&lt;0||r&lt;0)throw new Error(&quot;gl-texture2d: Texture dimensions are out of bounds&quot;);!function(t,e,r,o,s,l,c,f){var h=f.dtype,p=f.shape.slice();if(p.length&lt;2||p.length&gt;3)throw new Error(&quot;gl-texture2d: Invalid ndarray, must be 2d or 3d&quot;);var g=0,m=0,v=d(p,f.stride.slice());&quot;float32&quot;===h?g=t.FLOAT:&quot;float64&quot;===h?(g=t.FLOAT,v=!1,h=&quot;float32&quot;):&quot;uint8&quot;===h?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,v=!1,h=&quot;uint8&quot;);if(2===p.length)m=t.LUMINANCE,p=[p[0],p[1],1],f=n(f.data,p,[f.stride[0],f.stride[1],1],f.offset);else{if(3!==p.length)throw new Error(&quot;gl-texture2d: Invalid shape for texture&quot;);if(1===p[2])m=t.ALPHA;else if(2===p[2])m=t.LUMINANCE_ALPHA;else if(3===p[2])m=t.RGB;else{if(4!==p[2])throw new Error(&quot;gl-texture2d: Invalid shape for pixel coords&quot;);m=t.RGBA}p[2]}m!==t.LUMINANCE&amp;&amp;m!==t.ALPHA||s!==t.LUMINANCE&amp;&amp;s!==t.ALPHA||(m=s);if(m!==s)throw new Error(&quot;gl-texture2d: Incompatible texture format for setPixels&quot;);var y=f.size,x=c.indexOf(o)&lt;0;x&amp;&amp;c.push(o);if(g===l&amp;&amp;v)0===f.offset&amp;&amp;f.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data.subarray(f.offset,f.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data.subarray(f.offset,f.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&amp;&amp;l===t.UNSIGNED_BYTE?u(_,f):i.assign(_,f),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:430,&quot;ndarray-ops&quot;:424,&quot;typedarray-pool&quot;:519}],304:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;pick-by-alias&quot;);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return&quot;function&quot;==typeof t.getContext&amp;&amp;&quot;width&quot;in t&amp;&amp;&quot;height&quot;in t}e.exports=function(t){var e;if(t?&quot;string&quot;==typeof t&amp;&amp;(t={container:t}):t={},a(t)?t={container:t}:t=&quot;string&quot;==typeof(e=t).nodeName&amp;&amp;&quot;function&quot;==typeof e.appendChild&amp;&amp;&quot;function&quot;==typeof e.getBoundingClientRect?{container:t}:function(t){return&quot;function&quot;==typeof t.drawArrays||&quot;function&quot;==typeof t.drawElements}(t)?{gl:t}:n(t,{container:&quot;container target element el canvas holder parent parentNode wrapper use ref root node&quot;,gl:&quot;gl context webgl glContext&quot;,attrs:&quot;attributes attrs contextAttributes&quot;,pixelRatio:&quot;pixelRatio pxRatio px ratio pxratio pixelratio&quot;},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&amp;&amp;(t.container=t.canvas.parentNode),t.container){if(&quot;string&quot;==typeof t.container){var r=document.querySelector(t.container);if(!r)throw Error(&quot;Element &quot;+t.container+&quot; is not found&quot;);t.container=r}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=document.createElement(&quot;canvas&quot;),t.container.appendChild(t.canvas),i(t))}else t.canvas||(t.container=document.body||document.documentElement,t.canvas=document.createElement(&quot;canvas&quot;),t.canvas.style.position=&quot;absolute&quot;,t.canvas.style.top=0,t.canvas.style.left=0,t.container.appendChild(t.canvas),i(t));if(!t.gl)try{t.gl=t.canvas.getContext(&quot;webgl&quot;,t.attrs)}catch(e){try{t.gl=t.canvas.getContext(&quot;experimental-webgl&quot;,t.attrs)}catch(e){t.gl=t.canvas.getContext(&quot;webgl-experimental&quot;,t.attrs)}}return t.gl}},{&quot;pick-by-alias&quot;:445}],305:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length&gt;n)throw new Error(&quot;gl-vao: Too many vertex attributes&quot;);for(var i=0;i&lt;r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,c=!!a.normalized,u=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,c,u,f)}else{if(&quot;number&quot;==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error(&quot;gl-vao: Invalid vertex attribute&quot;);t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i&lt;n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i&lt;n;++i)t.disableVertexAttribArray(i)}},{}],306:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./do-bind.js&quot;);function i(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},i.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t){return new i(t)}},{&quot;./do-bind.js&quot;:305}],307:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./do-bind.js&quot;);function i(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function a(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},a.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t&lt;this._attribs.length;++t)this._attribs[t].bind(this.gl)},a.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},a.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},a.prototype.update=function(t,e,r){if(this.bind(),n(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var a=0;a&lt;t.length;++a){var o=t[a];&quot;number&quot;==typeof o?this._attribs.push(new i(a,1,o)):Array.isArray(o)&amp;&amp;this._attribs.push(new i(a,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},a.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t,e){return new a(t,e,e.createVertexArrayOES())}},{&quot;./do-bind.js&quot;:305}],308:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/vao-native.js&quot;),i=t(&quot;./lib/vao-emulated.js&quot;);function a(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}e.exports=function(t,e,r,o){var s,l=t.createVertexArray?new a(t):t.getExtension(&quot;OES_vertex_array_object&quot;);return(s=l?n(t,l):i(t)).update(e,r,o),s}},{&quot;./lib/vao-emulated.js&quot;:306,&quot;./lib/vao-native.js&quot;:307}],309:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}},{}],310:[function(t,e,r){e.exports=function(t,e){var r=n(t[0],t[1],t[2]),o=n(e[0],e[1],e[2]);i(r,r),i(o,o);var s=a(r,o);return s&gt;1?0:Math.acos(s)};var n=t(&quot;./fromValues&quot;),i=t(&quot;./normalize&quot;),a=t(&quot;./dot&quot;)},{&quot;./dot&quot;:320,&quot;./fromValues&quot;:326,&quot;./normalize&quot;:337}],311:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],312:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],313:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],314:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],315:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],316:[function(t,e,r){e.exports=t(&quot;./distance&quot;)},{&quot;./distance&quot;:317}],317:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],318:[function(t,e,r){e.exports=t(&quot;./divide&quot;)},{&quot;./divide&quot;:319}],319:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],320:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],321:[function(t,e,r){e.exports=1e-6},{}],322:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)&lt;=n*Math.max(1,Math.abs(r),Math.abs(o))&amp;&amp;Math.abs(i-s)&lt;=n*Math.max(1,Math.abs(i),Math.abs(s))&amp;&amp;Math.abs(a-l)&lt;=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t(&quot;./epsilon&quot;)},{&quot;./epsilon&quot;:321}],323:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]}},{}],324:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],325:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s&lt;l;s+=e)n[0]=t[s],n[1]=t[s+1],n[2]=t[s+2],a(n,n,o),t[s]=n[0],t[s+1]=n[1],t[s+2]=n[2];return t};var n=t(&quot;./create&quot;)()},{&quot;./create&quot;:314}],326:[function(t,e,r){e.exports=function(t,e,r){var n=new Float32Array(3);return n[0]=t,n[1]=e,n[2]=r,n}},{}],327:[function(t,e,r){e.exports={EPSILON:t(&quot;./epsilon&quot;),create:t(&quot;./create&quot;),clone:t(&quot;./clone&quot;),angle:t(&quot;./angle&quot;),fromValues:t(&quot;./fromValues&quot;),copy:t(&quot;./copy&quot;),set:t(&quot;./set&quot;),equals:t(&quot;./equals&quot;),exactEquals:t(&quot;./exactEquals&quot;),add:t(&quot;./add&quot;),subtract:t(&quot;./subtract&quot;),sub:t(&quot;./sub&quot;),multiply:t(&quot;./multiply&quot;),mul:t(&quot;./mul&quot;),divide:t(&quot;./divide&quot;),div:t(&quot;./div&quot;),min:t(&quot;./min&quot;),max:t(&quot;./max&quot;),floor:t(&quot;./floor&quot;),ceil:t(&quot;./ceil&quot;),round:t(&quot;./round&quot;),scale:t(&quot;./scale&quot;),scaleAndAdd:t(&quot;./scaleAndAdd&quot;),distance:t(&quot;./distance&quot;),dist:t(&quot;./dist&quot;),squaredDistance:t(&quot;./squaredDistance&quot;),sqrDist:t(&quot;./sqrDist&quot;),length:t(&quot;./length&quot;),len:t(&quot;./len&quot;),squaredLength:t(&quot;./squaredLength&quot;),sqrLen:t(&quot;./sqrLen&quot;),negate:t(&quot;./negate&quot;),inverse:t(&quot;./inverse&quot;),normalize:t(&quot;./normalize&quot;),dot:t(&quot;./dot&quot;),cross:t(&quot;./cross&quot;),lerp:t(&quot;./lerp&quot;),random:t(&quot;./random&quot;),transformMat4:t(&quot;./transformMat4&quot;),transformMat3:t(&quot;./transformMat3&quot;),transformQuat:t(&quot;./transformQuat&quot;),rotateX:t(&quot;./rotateX&quot;),rotateY:t(&quot;./rotateY&quot;),rotateZ:t(&quot;./rotateZ&quot;),forEach:t(&quot;./forEach&quot;)}},{&quot;./add&quot;:309,&quot;./angle&quot;:310,&quot;./ceil&quot;:311,&quot;./clone&quot;:312,&quot;./copy&quot;:313,&quot;./create&quot;:314,&quot;./cross&quot;:315,&quot;./dist&quot;:316,&quot;./distance&quot;:317,&quot;./div&quot;:318,&quot;./divide&quot;:319,&quot;./dot&quot;:320,&quot;./epsilon&quot;:321,&quot;./equals&quot;:322,&quot;./exactEquals&quot;:323,&quot;./floor&quot;:324,&quot;./forEach&quot;:325,&quot;./fromValues&quot;:326,&quot;./inverse&quot;:328,&quot;./len&quot;:329,&quot;./length&quot;:330,&quot;./lerp&quot;:331,&quot;./max&quot;:332,&quot;./min&quot;:333,&quot;./mul&quot;:334,&quot;./multiply&quot;:335,&quot;./negate&quot;:336,&quot;./normalize&quot;:337,&quot;./random&quot;:338,&quot;./rotateX&quot;:339,&quot;./rotateY&quot;:340,&quot;./rotateZ&quot;:341,&quot;./round&quot;:342,&quot;./scale&quot;:343,&quot;./scaleAndAdd&quot;:344,&quot;./set&quot;:345,&quot;./sqrDist&quot;:346,&quot;./sqrLen&quot;:347,&quot;./squaredDistance&quot;:348,&quot;./squaredLength&quot;:349,&quot;./sub&quot;:350,&quot;./subtract&quot;:351,&quot;./transformMat3&quot;:352,&quot;./transformMat4&quot;:353,&quot;./transformQuat&quot;:354}],328:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},{}],329:[function(t,e,r){e.exports=t(&quot;./length&quot;)},{&quot;./length&quot;:330}],330:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},{}],331:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t}},{}],332:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}},{}],333:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}},{}],334:[function(t,e,r){e.exports=t(&quot;./multiply&quot;)},{&quot;./multiply&quot;:335}],335:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}},{}],336:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},{}],337:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;a&gt;0&amp;&amp;(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],338:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],339:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],340:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],341:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],342:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],343:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],344:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],345:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],346:[function(t,e,r){e.exports=t(&quot;./squaredDistance&quot;)},{&quot;./squaredDistance&quot;:348}],347:[function(t,e,r){e.exports=t(&quot;./squaredLength&quot;)},{&quot;./squaredLength&quot;:349}],348:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],349:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],350:[function(t,e,r){e.exports=t(&quot;./subtract&quot;)},{&quot;./subtract&quot;:351}],351:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],352:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],353:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],354:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t}},{}],355:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],356:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],357:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],358:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],359:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],360:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],361:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],362:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],363:[function(t,e,r){e.exports={create:t(&quot;./create&quot;),clone:t(&quot;./clone&quot;),fromValues:t(&quot;./fromValues&quot;),copy:t(&quot;./copy&quot;),set:t(&quot;./set&quot;),add:t(&quot;./add&quot;),subtract:t(&quot;./subtract&quot;),multiply:t(&quot;./multiply&quot;),divide:t(&quot;./divide&quot;),min:t(&quot;./min&quot;),max:t(&quot;./max&quot;),scale:t(&quot;./scale&quot;),scaleAndAdd:t(&quot;./scaleAndAdd&quot;),distance:t(&quot;./distance&quot;),squaredDistance:t(&quot;./squaredDistance&quot;),length:t(&quot;./length&quot;),squaredLength:t(&quot;./squaredLength&quot;),negate:t(&quot;./negate&quot;),inverse:t(&quot;./inverse&quot;),normalize:t(&quot;./normalize&quot;),dot:t(&quot;./dot&quot;),lerp:t(&quot;./lerp&quot;),random:t(&quot;./random&quot;),transformMat4:t(&quot;./transformMat4&quot;),transformQuat:t(&quot;./transformQuat&quot;)}},{&quot;./add&quot;:355,&quot;./clone&quot;:356,&quot;./copy&quot;:357,&quot;./create&quot;:358,&quot;./distance&quot;:359,&quot;./divide&quot;:360,&quot;./dot&quot;:361,&quot;./fromValues&quot;:362,&quot;./inverse&quot;:364,&quot;./length&quot;:365,&quot;./lerp&quot;:366,&quot;./max&quot;:367,&quot;./min&quot;:368,&quot;./multiply&quot;:369,&quot;./negate&quot;:370,&quot;./normalize&quot;:371,&quot;./random&quot;:372,&quot;./scale&quot;:373,&quot;./scaleAndAdd&quot;:374,&quot;./set&quot;:375,&quot;./squaredDistance&quot;:376,&quot;./squaredLength&quot;:377,&quot;./subtract&quot;:378,&quot;./transformMat4&quot;:379,&quot;./transformQuat&quot;:380}],364:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],365:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],366:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],367:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],368:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],369:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],370:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],371:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o&gt;0&amp;&amp;(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],372:[function(t,e,r){var n=t(&quot;./normalize&quot;),i=t(&quot;./scale&quot;);e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{&quot;./normalize&quot;:371,&quot;./scale&quot;:373}],373:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],374:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],375:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],376:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],377:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],378:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],379:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],380:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t[3]=e[3],t}},{}],381:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],382:[function(t,e,r){var n=t(&quot;glsl-tokenizer&quot;),i=t(&quot;atob-lite&quot;);e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r&lt;e.length;r++){var a=e[r];if(&quot;preprocessor&quot;===a.type){var o=a.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(o&amp;&amp;o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},{&quot;atob-lite&quot;:59,&quot;glsl-tokenizer&quot;:389}],383:[function(t,e,r){e.exports=function(t){var e,r,k,M=0,A=0,T=l,S=[],E=[],C=1,L=0,z=0,P=!1,O=!1,I=&quot;&quot;,D=a,R=n;&quot;300 es&quot;===(t=t||{}).version&amp;&amp;(D=s,R=o);return function(t){return E=[],null!==t?function(t){var r;M=0,k=(I+=t).length;for(;e=I[M],M&lt;k;){switch(r=M,T){case u:M=V();break;case f:case h:M=j();break;case p:M=U();break;case d:M=G();break;case _:M=H();break;case g:M=W();break;case c:M=Y();break;case x:M=N();break;case l:M=F()}if(r!==M)switch(I[r]){case&quot;\n&quot;:L=0,++C;break;default:++L}}return A+=M,I=I.slice(M),E}(t.replace?t.replace(/\r\n/g,&quot;\n&quot;):t):function(t){S.length&amp;&amp;B(S.join(&quot;&quot;));return T=b,B(&quot;(eof)&quot;),E}()};function B(t){t.length&amp;&amp;E.push({type:w[T],data:t,position:z,line:C,column:L})}function F(){return S=S.length?[]:S,&quot;/&quot;===r&amp;&amp;&quot;*&quot;===e?(z=A+M-1,T=u,r=e,M+1):&quot;/&quot;===r&amp;&amp;&quot;/&quot;===e?(z=A+M-1,T=f,r=e,M+1):&quot;#&quot;===e?(T=h,z=A+M,M):/\s/.test(e)?(T=x,z=A+M,M):(P=/\d/.test(e),O=/[^\w_]/.test(e),z=A+M,T=P?d:O?p:c,M)}function N(){return/[^\s]/g.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function j(){return&quot;\r&quot;!==e&amp;&amp;&quot;\n&quot;!==e||&quot;\\&quot;===r?(S.push(e),r=e,M+1):(B(S.join(&quot;&quot;)),T=l,M)}function V(){return&quot;/&quot;===e&amp;&amp;&quot;*&quot;===r?(S.push(e),B(S.join(&quot;&quot;)),T=l,M+1):(S.push(e),r=e,M+1)}function U(){if(&quot;.&quot;===r&amp;&amp;/\d/.test(e))return T=g,M;if(&quot;/&quot;===r&amp;&amp;&quot;*&quot;===e)return T=u,M;if(&quot;/&quot;===r&amp;&amp;&quot;/&quot;===e)return T=f,M;if(&quot;.&quot;===e&amp;&amp;S.length){for(;q(S););return T=g,M}if(&quot;;&quot;===e||&quot;)&quot;===e||&quot;(&quot;===e){if(S.length)for(;q(S););return B(e),T=l,M+1}var t=2===S.length&amp;&amp;&quot;=&quot;!==e;if(/[\w_\d\s]/.test(e)||t){for(;q(S););return T=l,M}return S.push(e),r=e,M+1}function q(t){for(var e,r,n=0;;){if(e=i.indexOf(t.slice(0,t.length+n).join(&quot;&quot;)),r=i[e],-1===e){if(n--+t.length&gt;0)continue;r=t.slice(0,1).join(&quot;&quot;)}return B(r),z+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function G(){return&quot;.&quot;===e?(S.push(e),T=g,r=e,M+1):/[eE]/.test(e)?(S.push(e),T=g,r=e,M+1):&quot;x&quot;===e&amp;&amp;1===S.length&amp;&amp;&quot;0&quot;===S[0]?(T=_,S.push(e),r=e,M+1):/[^\d]/.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function W(){return&quot;f&quot;===e&amp;&amp;(S.push(e),r=e,M+=1),/[eE]/.test(e)?(S.push(e),r=e,M+1):&quot;-&quot;===e&amp;&amp;/[eE]/.test(r)?(S.push(e),r=e,M+1):/[^\d]/.test(e)?(B(S.join(&quot;&quot;)),T=l,M):(S.push(e),r=e,M+1)}function Y(){if(/[^\d\w_]/.test(e)){var t=S.join(&quot;&quot;);return T=R.indexOf(t)&gt;-1?y:D.indexOf(t)&gt;-1?v:m,B(S.join(&quot;&quot;)),T=l,M}return S.push(e),r=e,M+1}};var n=t(&quot;./lib/literals&quot;),i=t(&quot;./lib/operators&quot;),a=t(&quot;./lib/builtins&quot;),o=t(&quot;./lib/literals-300es&quot;),s=t(&quot;./lib/builtins-300es&quot;),l=999,c=9999,u=0,f=1,h=2,p=3,d=4,g=5,m=6,v=7,y=8,x=9,b=10,_=11,w=[&quot;block-comment&quot;,&quot;line-comment&quot;,&quot;preprocessor&quot;,&quot;operator&quot;,&quot;integer&quot;,&quot;float&quot;,&quot;ident&quot;,&quot;builtin&quot;,&quot;keyword&quot;,&quot;whitespace&quot;,&quot;eof&quot;,&quot;integer&quot;]},{&quot;./lib/builtins&quot;:385,&quot;./lib/builtins-300es&quot;:384,&quot;./lib/literals&quot;:387,&quot;./lib/literals-300es&quot;:386,&quot;./lib/operators&quot;:388}],384:[function(t,e,r){var n=t(&quot;./builtins&quot;);n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat([&quot;gl_VertexID&quot;,&quot;gl_InstanceID&quot;,&quot;gl_Position&quot;,&quot;gl_PointSize&quot;,&quot;gl_FragCoord&quot;,&quot;gl_FrontFacing&quot;,&quot;gl_FragDepth&quot;,&quot;gl_PointCoord&quot;,&quot;gl_MaxVertexAttribs&quot;,&quot;gl_MaxVertexUniformVectors&quot;,&quot;gl_MaxVertexOutputVectors&quot;,&quot;gl_MaxFragmentInputVectors&quot;,&quot;gl_MaxVertexTextureImageUnits&quot;,&quot;gl_MaxCombinedTextureImageUnits&quot;,&quot;gl_MaxTextureImageUnits&quot;,&quot;gl_MaxFragmentUniformVectors&quot;,&quot;gl_MaxDrawBuffers&quot;,&quot;gl_MinProgramTexelOffset&quot;,&quot;gl_MaxProgramTexelOffset&quot;,&quot;gl_DepthRangeParameters&quot;,&quot;gl_DepthRange&quot;,&quot;trunc&quot;,&quot;round&quot;,&quot;roundEven&quot;,&quot;isnan&quot;,&quot;isinf&quot;,&quot;floatBitsToInt&quot;,&quot;floatBitsToUint&quot;,&quot;intBitsToFloat&quot;,&quot;uintBitsToFloat&quot;,&quot;packSnorm2x16&quot;,&quot;unpackSnorm2x16&quot;,&quot;packUnorm2x16&quot;,&quot;unpackUnorm2x16&quot;,&quot;packHalf2x16&quot;,&quot;unpackHalf2x16&quot;,&quot;outerProduct&quot;,&quot;transpose&quot;,&quot;determinant&quot;,&quot;inverse&quot;,&quot;texture&quot;,&quot;textureSize&quot;,&quot;textureProj&quot;,&quot;textureLod&quot;,&quot;textureOffset&quot;,&quot;texelFetch&quot;,&quot;texelFetchOffset&quot;,&quot;textureProjOffset&quot;,&quot;textureLodOffset&quot;,&quot;textureProjLod&quot;,&quot;textureProjLodOffset&quot;,&quot;textureGrad&quot;,&quot;textureGradOffset&quot;,&quot;textureProjGrad&quot;,&quot;textureProjGradOffset&quot;])},{&quot;./builtins&quot;:385}],385:[function(t,e,r){e.exports=[&quot;abs&quot;,&quot;acos&quot;,&quot;all&quot;,&quot;any&quot;,&quot;asin&quot;,&quot;atan&quot;,&quot;ceil&quot;,&quot;clamp&quot;,&quot;cos&quot;,&quot;cross&quot;,&quot;dFdx&quot;,&quot;dFdy&quot;,&quot;degrees&quot;,&quot;distance&quot;,&quot;dot&quot;,&quot;equal&quot;,&quot;exp&quot;,&quot;exp2&quot;,&quot;faceforward&quot;,&quot;floor&quot;,&quot;fract&quot;,&quot;gl_BackColor&quot;,&quot;gl_BackLightModelProduct&quot;,&quot;gl_BackLightProduct&quot;,&quot;gl_BackMaterial&quot;,&quot;gl_BackSecondaryColor&quot;,&quot;gl_ClipPlane&quot;,&quot;gl_ClipVertex&quot;,&quot;gl_Color&quot;,&quot;gl_DepthRange&quot;,&quot;gl_DepthRangeParameters&quot;,&quot;gl_EyePlaneQ&quot;,&quot;gl_EyePlaneR&quot;,&quot;gl_EyePlaneS&quot;,&quot;gl_EyePlaneT&quot;,&quot;gl_Fog&quot;,&quot;gl_FogCoord&quot;,&quot;gl_FogFragCoord&quot;,&quot;gl_FogParameters&quot;,&quot;gl_FragColor&quot;,&quot;gl_FragCoord&quot;,&quot;gl_FragData&quot;,&quot;gl_FragDepth&quot;,&quot;gl_FragDepthEXT&quot;,&quot;gl_FrontColor&quot;,&quot;gl_FrontFacing&quot;,&quot;gl_FrontLightModelProduct&quot;,&quot;gl_FrontLightProduct&quot;,&quot;gl_FrontMaterial&quot;,&quot;gl_FrontSecondaryColor&quot;,&quot;gl_LightModel&quot;,&quot;gl_LightModelParameters&quot;,&quot;gl_LightModelProducts&quot;,&quot;gl_LightProducts&quot;,&quot;gl_LightSource&quot;,&quot;gl_LightSourceParameters&quot;,&quot;gl_MaterialParameters&quot;,&quot;gl_MaxClipPlanes&quot;,&quot;gl_MaxCombinedTextureImageUnits&quot;,&quot;gl_MaxDrawBuffers&quot;,&quot;gl_MaxFragmentUniformComponents&quot;,&quot;gl_MaxLights&quot;,&quot;gl_MaxTextureCoords&quot;,&quot;gl_MaxTextureImageUnits&quot;,&quot;gl_MaxTextureUnits&quot;,&quot;gl_MaxVaryingFloats&quot;,&quot;gl_MaxVertexAttribs&quot;,&quot;gl_MaxVertexTextureImageUnits&quot;,&quot;gl_MaxVertexUniformComponents&quot;,&quot;gl_ModelViewMatrix&quot;,&quot;gl_ModelViewMatrixInverse&quot;,&quot;gl_ModelViewMatrixInverseTranspose&quot;,&quot;gl_ModelViewMatrixTranspose&quot;,&quot;gl_ModelViewProjectionMatrix&quot;,&quot;gl_ModelViewProjectionMatrixInverse&quot;,&quot;gl_ModelViewProjectionMatrixInverseTranspose&quot;,&quot;gl_ModelViewProjectionMatrixTranspose&quot;,&quot;gl_MultiTexCoord0&quot;,&quot;gl_MultiTexCoord1&quot;,&quot;gl_MultiTexCoord2&quot;,&quot;gl_MultiTexCoord3&quot;,&quot;gl_MultiTexCoord4&quot;,&quot;gl_MultiTexCoord5&quot;,&quot;gl_MultiTexCoord6&quot;,&quot;gl_MultiTexCoord7&quot;,&quot;gl_Normal&quot;,&quot;gl_NormalMatrix&quot;,&quot;gl_NormalScale&quot;,&quot;gl_ObjectPlaneQ&quot;,&quot;gl_ObjectPlaneR&quot;,&quot;gl_ObjectPlaneS&quot;,&quot;gl_ObjectPlaneT&quot;,&quot;gl_Point&quot;,&quot;gl_PointCoord&quot;,&quot;gl_PointParameters&quot;,&quot;gl_PointSize&quot;,&quot;gl_Position&quot;,&quot;gl_ProjectionMatrix&quot;,&quot;gl_ProjectionMatrixInverse&quot;,&quot;gl_ProjectionMatrixInverseTranspose&quot;,&quot;gl_ProjectionMatrixTranspose&quot;,&quot;gl_SecondaryColor&quot;,&quot;gl_TexCoord&quot;,&quot;gl_TextureEnvColor&quot;,&quot;gl_TextureMatrix&quot;,&quot;gl_TextureMatrixInverse&quot;,&quot;gl_TextureMatrixInverseTranspose&quot;,&quot;gl_TextureMatrixTranspose&quot;,&quot;gl_Vertex&quot;,&quot;greaterThan&quot;,&quot;greaterThanEqual&quot;,&quot;inversesqrt&quot;,&quot;length&quot;,&quot;lessThan&quot;,&quot;lessThanEqual&quot;,&quot;log&quot;,&quot;log2&quot;,&quot;matrixCompMult&quot;,&quot;max&quot;,&quot;min&quot;,&quot;mix&quot;,&quot;mod&quot;,&quot;normalize&quot;,&quot;not&quot;,&quot;notEqual&quot;,&quot;pow&quot;,&quot;radians&quot;,&quot;reflect&quot;,&quot;refract&quot;,&quot;sign&quot;,&quot;sin&quot;,&quot;smoothstep&quot;,&quot;sqrt&quot;,&quot;step&quot;,&quot;tan&quot;,&quot;texture2D&quot;,&quot;texture2DLod&quot;,&quot;texture2DProj&quot;,&quot;texture2DProjLod&quot;,&quot;textureCube&quot;,&quot;textureCubeLod&quot;,&quot;texture2DLodEXT&quot;,&quot;texture2DProjLodEXT&quot;,&quot;textureCubeLodEXT&quot;,&quot;texture2DGradEXT&quot;,&quot;texture2DProjGradEXT&quot;,&quot;textureCubeGradEXT&quot;]},{}],386:[function(t,e,r){var n=t(&quot;./literals&quot;);e.exports=n.slice().concat([&quot;layout&quot;,&quot;centroid&quot;,&quot;smooth&quot;,&quot;case&quot;,&quot;mat2x2&quot;,&quot;mat2x3&quot;,&quot;mat2x4&quot;,&quot;mat3x2&quot;,&quot;mat3x3&quot;,&quot;mat3x4&quot;,&quot;mat4x2&quot;,&quot;mat4x3&quot;,&quot;mat4x4&quot;,&quot;uint&quot;,&quot;uvec2&quot;,&quot;uvec3&quot;,&quot;uvec4&quot;,&quot;samplerCubeShadow&quot;,&quot;sampler2DArray&quot;,&quot;sampler2DArrayShadow&quot;,&quot;isampler2D&quot;,&quot;isampler3D&quot;,&quot;isamplerCube&quot;,&quot;isampler2DArray&quot;,&quot;usampler2D&quot;,&quot;usampler3D&quot;,&quot;usamplerCube&quot;,&quot;usampler2DArray&quot;,&quot;coherent&quot;,&quot;restrict&quot;,&quot;readonly&quot;,&quot;writeonly&quot;,&quot;resource&quot;,&quot;atomic_uint&quot;,&quot;noperspective&quot;,&quot;patch&quot;,&quot;sample&quot;,&quot;subroutine&quot;,&quot;common&quot;,&quot;partition&quot;,&quot;active&quot;,&quot;filter&quot;,&quot;image1D&quot;,&quot;image2D&quot;,&quot;image3D&quot;,&quot;imageCube&quot;,&quot;iimage1D&quot;,&quot;iimage2D&quot;,&quot;iimage3D&quot;,&quot;iimageCube&quot;,&quot;uimage1D&quot;,&quot;uimage2D&quot;,&quot;uimage3D&quot;,&quot;uimageCube&quot;,&quot;image1DArray&quot;,&quot;image2DArray&quot;,&quot;iimage1DArray&quot;,&quot;iimage2DArray&quot;,&quot;uimage1DArray&quot;,&quot;uimage2DArray&quot;,&quot;image1DShadow&quot;,&quot;image2DShadow&quot;,&quot;image1DArrayShadow&quot;,&quot;image2DArrayShadow&quot;,&quot;imageBuffer&quot;,&quot;iimageBuffer&quot;,&quot;uimageBuffer&quot;,&quot;sampler1DArray&quot;,&quot;sampler1DArrayShadow&quot;,&quot;isampler1D&quot;,&quot;isampler1DArray&quot;,&quot;usampler1D&quot;,&quot;usampler1DArray&quot;,&quot;isampler2DRect&quot;,&quot;usampler2DRect&quot;,&quot;samplerBuffer&quot;,&quot;isamplerBuffer&quot;,&quot;usamplerBuffer&quot;,&quot;sampler2DMS&quot;,&quot;isampler2DMS&quot;,&quot;usampler2DMS&quot;,&quot;sampler2DMSArray&quot;,&quot;isampler2DMSArray&quot;,&quot;usampler2DMSArray&quot;])},{&quot;./literals&quot;:387}],387:[function(t,e,r){e.exports=[&quot;precision&quot;,&quot;highp&quot;,&quot;mediump&quot;,&quot;lowp&quot;,&quot;attribute&quot;,&quot;const&quot;,&quot;uniform&quot;,&quot;varying&quot;,&quot;break&quot;,&quot;continue&quot;,&quot;do&quot;,&quot;for&quot;,&quot;while&quot;,&quot;if&quot;,&quot;else&quot;,&quot;in&quot;,&quot;out&quot;,&quot;inout&quot;,&quot;float&quot;,&quot;int&quot;,&quot;void&quot;,&quot;bool&quot;,&quot;true&quot;,&quot;false&quot;,&quot;discard&quot;,&quot;return&quot;,&quot;mat2&quot;,&quot;mat3&quot;,&quot;mat4&quot;,&quot;vec2&quot;,&quot;vec3&quot;,&quot;vec4&quot;,&quot;ivec2&quot;,&quot;ivec3&quot;,&quot;ivec4&quot;,&quot;bvec2&quot;,&quot;bvec3&quot;,&quot;bvec4&quot;,&quot;sampler1D&quot;,&quot;sampler2D&quot;,&quot;sampler3D&quot;,&quot;samplerCube&quot;,&quot;sampler1DShadow&quot;,&quot;sampler2DShadow&quot;,&quot;struct&quot;,&quot;asm&quot;,&quot;class&quot;,&quot;union&quot;,&quot;enum&quot;,&quot;typedef&quot;,&quot;template&quot;,&quot;this&quot;,&quot;packed&quot;,&quot;goto&quot;,&quot;switch&quot;,&quot;default&quot;,&quot;inline&quot;,&quot;noinline&quot;,&quot;volatile&quot;,&quot;public&quot;,&quot;static&quot;,&quot;extern&quot;,&quot;external&quot;,&quot;interface&quot;,&quot;long&quot;,&quot;short&quot;,&quot;double&quot;,&quot;half&quot;,&quot;fixed&quot;,&quot;unsigned&quot;,&quot;input&quot;,&quot;output&quot;,&quot;hvec2&quot;,&quot;hvec3&quot;,&quot;hvec4&quot;,&quot;dvec2&quot;,&quot;dvec3&quot;,&quot;dvec4&quot;,&quot;fvec2&quot;,&quot;fvec3&quot;,&quot;fvec4&quot;,&quot;sampler2DRect&quot;,&quot;sampler3DRect&quot;,&quot;sampler2DRectShadow&quot;,&quot;sizeof&quot;,&quot;cast&quot;,&quot;namespace&quot;,&quot;using&quot;]},{}],388:[function(t,e,r){e.exports=[&quot;&lt;&lt;=&quot;,&quot;&gt;&gt;=&quot;,&quot;++&quot;,&quot;--&quot;,&quot;&lt;&lt;&quot;,&quot;&gt;&gt;&quot;,&quot;&lt;=&quot;,&quot;&gt;=&quot;,&quot;==&quot;,&quot;!=&quot;,&quot;&amp;&amp;&quot;,&quot;||&quot;,&quot;+=&quot;,&quot;-=&quot;,&quot;*=&quot;,&quot;/=&quot;,&quot;%=&quot;,&quot;&amp;=&quot;,&quot;^^&quot;,&quot;^=&quot;,&quot;|=&quot;,&quot;(&quot;,&quot;)&quot;,&quot;[&quot;,&quot;]&quot;,&quot;.&quot;,&quot;!&quot;,&quot;~&quot;,&quot;*&quot;,&quot;/&quot;,&quot;%&quot;,&quot;+&quot;,&quot;-&quot;,&quot;&lt;&quot;,&quot;&gt;&quot;,&quot;&amp;&quot;,&quot;^&quot;,&quot;|&quot;,&quot;?&quot;,&quot;:&quot;,&quot;=&quot;,&quot;,&quot;,&quot;;&quot;,&quot;{&quot;,&quot;}&quot;]},{}],389:[function(t,e,r){var n=t(&quot;./index&quot;);e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{&quot;./index&quot;:383}],390:[function(t,e,r){e.exports=function(t){&quot;string&quot;==typeof t&amp;&amp;(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n&lt;t.length-1;n++)r.push(t[n],e[n]||&quot;&quot;);return r.push(t[n]),r.join(&quot;&quot;)}},{}],391:[function(t,e,r){(function(r){&quot;use strict&quot;;var n,i=t(&quot;is-browser&quot;);n=&quot;function&quot;==typeof r.matchMedia?!r.matchMedia(&quot;(hover: none)&quot;).matches:i,e.exports=n}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;is-browser&quot;:398}],392:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;is-browser&quot;);e.exports=n&amp;&amp;function(){var t=!1;try{var e=Object.defineProperty({},&quot;passive&quot;,{get:function(){t=!0}});window.addEventListener(&quot;test&quot;,null,e),window.removeEventListener(&quot;test&quot;,null,e)}catch(e){t=!1}return t}()},{&quot;is-browser&quot;:398}],393:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1&lt;&lt;s)-1,c=l&gt;&gt;1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&amp;(1&lt;&lt;-u)-1,p&gt;&gt;=-u,u+=s;u&gt;0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&amp;(1&lt;&lt;-u)-1,a&gt;&gt;=-u,u+=n;u&gt;0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1&lt;&lt;c)-1,f=u&gt;&gt;1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e&lt;0||0===e&amp;&amp;1/e&lt;0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))&lt;1&amp;&amp;(o--,l*=2),(e+=o+f&gt;=1?h/l:h*Math.pow(2,1-f))*l&gt;=2&amp;&amp;(o++,l/=2),o+f&gt;=u?(s=0,o=u):o+f&gt;=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i&gt;=8;t[r+p]=255&amp;s,p+=d,s/=256,i-=8);for(o=o&lt;&lt;i|s,c+=i;c&gt;0;t[r+p]=255&amp;o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],394:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=t.length;if(0===r)throw new Error(&quot;Must have at least d+1 points&quot;);var i=t[0].length;if(r&lt;=i)throw new Error(&quot;Must input at least d+1 points&quot;);var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error(&quot;Input not in general position&quot;);for(var l=new Array(i+1),u=0;u&lt;=i;++u)l[u]=u;s&lt;0&amp;&amp;(l[0]=1,l[1]=0);for(var f=new a(l,new Array(i+1),!1),h=f.adjacent,p=new Array(i+2),u=0;u&lt;=i;++u){for(var d=l.slice(),g=0;g&lt;=i;++g)g===u&amp;&amp;(d[g]=-1);var m=d[0];d[0]=d[1],d[1]=m;var v=new a(d,new Array(i+1),!0);h[u]=v,p[u]=v}p[i+1]=f;for(var u=0;u&lt;=i;++u)for(var d=h[u].vertices,y=h[u].adjacent,g=0;g&lt;=i;++g){var x=d[g];if(x&lt;0)y[g]=f;else for(var b=0;b&lt;=i;++b)h[b].vertices.indexOf(x)&lt;0&amp;&amp;(y[g]=h[b])}for(var _=new c(i,o,p),w=!!e,u=i+1;u&lt;r;++u)_.insert(t[u],w);return _.boundary()};var n=t(&quot;robust-orientation&quot;),i=t(&quot;simplicial-complex&quot;).compareCells;function a(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function o(t,e,r){this.vertices=t,this.cell=e,this.index=r}function s(t,e){return i(t.vertices,e.vertices)}a.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var l=[];function c(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var i=0;i&lt;=t;++i)this.tuple[i]=this.vertices[i];var a=l[t];a||(a=l[t]=function(t){for(var e=[&quot;function orient(){var tuple=this.tuple;return test(&quot;],r=0;r&lt;=t;++r)r&gt;0&amp;&amp;e.push(&quot;,&quot;),e.push(&quot;tuple[&quot;,r,&quot;]&quot;);e.push(&quot;)}return orient&quot;);var i=new Function(&quot;test&quot;,e.join(&quot;&quot;)),a=n[t+1];return a||(a=n),i(a)}(t)),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length&gt;0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l&lt;=r;++l){var c=s[l];if(c.boundary&amp;&amp;!(c.lastVisited&lt;=-n)){for(var u=c.vertices,f=0;f&lt;=r;++f){var h=u[f];i[f]=h&lt;0?e:a[h]}var p=this.orient();if(p&gt;0)return c;c.lastVisited=-n,0===p&amp;&amp;o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u&lt;=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u&lt;=n;++u){var f=c[u];if(!(f.lastVisited&gt;=r)){var h=a[u];a[u]=t;var p=this.orient();if(a[u]=h,p&lt;0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length&gt;0;){var p=(e=f.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g&lt;0))for(var m=0;m&lt;=n;++m)if(m!==g){var v=d[m];if(v.boundary&amp;&amp;!(v.lastVisited&gt;=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var x=0,b=0;b&lt;=n;++b)y[b]&lt;0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()&gt;0){y[x]=r,v.boundary=!1,c.push(v),f.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=p.slice(),k=d.slice(),M=new a(w,k,!0);u.push(M);var A=_.indexOf(e);if(!(A&lt;0)){_[A]=M,k[g]=v,w[m]=-1,k[m]=e,d[m]=M,M.flip();for(b=0;b&lt;=n;++b){var T=w[b];if(!(T&lt;0||T===r)){for(var S=new Array(n-1),E=0,C=0;C&lt;=n;++C){var L=w[C];L&lt;0||C===b||(S[E++]=L)}h.push(new o(S,M,b))}}}}}}h.sort(s);for(m=0;m+1&lt;h.length;m+=2){var z=h[m],P=h[m+1],O=z.index,I=P.index;O&lt;0||I&lt;0||(z.cell.adjacent[z.index]=P.cell,P.cell.adjacent[P.index]=z.cell)}},u.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o&lt;=i;++o){var s=n.vertices[o];a[o]=s&lt;0?t:r[s]}var l=this.orient(a);l&lt;0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&amp;&amp;this.addPeaks(t,n)}},u.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i&lt;n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,c=0,u=0;u&lt;=t;++u)s[u]&gt;=0?o[l++]=s[u]:c=1&amp;u;if(c===(1&amp;t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{&quot;robust-orientation&quot;:483,&quot;simplicial-complex&quot;:493}],395:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=0,a=1;function o(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function f(t,e){var r=t.intervals([]),n=r.indexOf(e);return n&lt;0?i:(r.splice(n,1),c(t,r),a)}function h(t,e,r){for(var n=0;n&lt;t.length&amp;&amp;t[n][0]&lt;=e;++n){var i=r(t[n]);if(i)return i}}function p(t,e,r){for(var n=t.length-1;n&gt;=0&amp;&amp;t[n][1]&gt;=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r&lt;t.length;++r){var n=e(t[r]);if(n)return n}}function g(t,e){return t-e}function m(t,e){var r=t[0]-e[0];return r||t[1]-e[1]}function v(t,e){var r=t[1]-e[1];return r||t[0]-e[0]}function y(t){if(0===t.length)return null;for(var e=[],r=0;r&lt;t.length;++r)e.push(t[r][0],t[r][1]);e.sort(g);var n=e[e.length&gt;&gt;1],i=[],a=[],s=[];for(r=0;r&lt;t.length;++r){var l=t[r];l[1]&lt;n?i.push(l):n&lt;l[0]?a.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(m),u.sort(v),new o(n,y(i),y(a),c,u)}function x(t){this.root=t}s.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&amp;&amp;this.left.intervals(t),this.right&amp;&amp;this.right.intervals(t),t},s.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]&lt;this.mid)this.left?4*(this.left.count+1)&gt;3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]&gt;this.mid)this.right?4*(this.right.count+1)&gt;3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,m),i=n.ge(this.rightPoints,t,v);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]&lt;this.mid)return this.left?4*(this.right?this.right.count:0)&gt;3*(e-1)?f(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,a):(c===a&amp;&amp;(this.count-=1),c):i;if(t[0]&gt;this.mid)return this.right?4*(this.left?this.left.count:0)&gt;3*(e-1)?f(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,a):(c===a&amp;&amp;(this.count-=1),c):i;if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&amp;&amp;this.leftPoints[0]===t){if(this.left&amp;&amp;this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return a}for(s=n.ge(this.leftPoints,t,m);s&lt;this.leftPoints.length&amp;&amp;this.leftPoints[s][0]===t[0];++s)if(this.leftPoints[s]===t){this.count-=1,this.leftPoints.splice(s,1);for(c=n.ge(this.rightPoints,t,v);c&lt;this.rightPoints.length&amp;&amp;this.rightPoints[c][1]===t[1];++c)if(this.rightPoints[c]===t)return this.rightPoints.splice(c,1),a}return i},s.queryPoint=function(t,e){if(t&lt;this.mid){if(this.left)if(r=this.left.queryPoint(t,e))return r;return h(this.leftPoints,t,e)}if(t&gt;this.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(t&lt;this.mid&amp;&amp;this.left&amp;&amp;(n=this.left.queryInterval(t,e,r)))return n;if(e&gt;this.mid&amp;&amp;this.right&amp;&amp;(n=this.right.queryInterval(t,e,r)))return n;return e&lt;this.mid?h(this.leftPoints,e,r):t&gt;this.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&amp;&amp;(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t&lt;=e&amp;&amp;this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,&quot;count&quot;,{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,&quot;intervals&quot;,{get:function(){return this.root?this.root.intervals([]):[]}})},{&quot;binary-search-bounds&quot;:78}],396:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r&lt;t.length;++r)e[t[r]]=r;return e}},{}],397:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=new Array(t),r=0;r&lt;t;++r)e[r]=r;return e}},{}],398:[function(t,e,r){e.exports=!0},{}],399:[function(t,e,r){function n(t){return!!t.constructor&amp;&amp;&quot;function&quot;==typeof t.constructor.isBuffer&amp;&amp;t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&amp;&amp;(n(t)||function(t){return&quot;function&quot;==typeof t.readFloatLE&amp;&amp;&quot;function&quot;==typeof t.slice&amp;&amp;n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],400:[function(t,e,r){&quot;use strict&quot;;e.exports=&quot;undefined&quot;!=typeof navigator&amp;&amp;(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],401:[function(t,e,r){e.exports=function(t){t||&quot;undefined&quot;==typeof navigator||(t=navigator.userAgent);t&amp;&amp;t.headers&amp;&amp;&quot;string&quot;==typeof t.headers[&quot;user-agent&quot;]&amp;&amp;(t=t.headers[&quot;user-agent&quot;]);return&quot;string&quot;==typeof t&amp;&amp;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))}},{}],402:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=typeof t;return null!==t&amp;&amp;(&quot;object&quot;===e||&quot;function&quot;===e)}},{}],403:[function(t,e,r){&quot;use strict&quot;;var n=Object.prototype.toString;e.exports=function(t){var e;return&quot;[object Object]&quot;===n.call(t)&amp;&amp;(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],404:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return&quot;string&quot;==typeof t&amp;&amp;(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&amp;&amp;/[\dz]$/i.test(t)&amp;&amp;t.length&gt;4))}},{}],405:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],406:[function(t,e,r){(function(t){!function(t,n){&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?e.exports=n():t.mapboxgl=n()}(this,function(){&quot;use strict&quot;;var e,r,n;function i(t,i){if(e)if(r){var a=&quot;var sharedChunk = {}; (&quot;+e+&quot;)(sharedChunk); (&quot;+r+&quot;)(sharedChunk);&quot;,o={};e(o),(n=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:&quot;text/javascript&quot;}))}else r=i;else e=i}return i(0,function(e){var r=&quot;undefined&quot;!=typeof window?window:&quot;undefined&quot;!=typeof t?t:&quot;undefined&quot;!=typeof self?self:{};function n(t){return t&amp;&amp;t.__esModule&amp;&amp;Object.prototype.hasOwnProperty.call(t,&quot;default&quot;)?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a=o;function o(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}o.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},o.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},o.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},o.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&amp;&amp;(e=1e-6),i=t,o=0;o&lt;8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)&lt;e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)&lt;1e-6)break;i-=a/s}if((i=t)&lt;(r=0))return r;if(i&gt;(n=1))return n;for(;r&lt;n;){if(a=this.sampleCurveX(i),Math.abs(a-t)&lt;e)return i;t&gt;a?r=i:n=i,i=.5*(n-r)+r}return i},o.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var s=function(t,e,r){this.column=t,this.row=e,this.zoom=r};s.prototype.clone=function(){return new s(this.column,this.row,this.zoom)},s.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},s.prototype.sub=function(t){return this.clone()._sub(t)},s.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},s.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var l=c;function c(t,e){this.x=t,this.y=e}function u(t,e,r,n){var i=new a(t,e,r,n);return function(t){return i.solve(t)}}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&amp;&amp;this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(t){return t instanceof c?t:Array.isArray(t)?new c(t[0],t[1]):t};var f=u(.25,.1,.25,1);function h(t,e,r){return Math.min(r,Math.max(e,t))}function p(t){for(var e=[],r=arguments.length-1;r-- &gt;0;)e[r]=arguments[r+1];for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}var d=1;function g(t,e){t.forEach(function(t){e[t]&amp;&amp;(e[t]=e[t].bind(e))})}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function y(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&amp;&amp;(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):&quot;object&quot;==typeof t&amp;&amp;t?v(t,x):t}var b={};function _(t){b[t]||(&quot;undefined&quot;!=typeof console&amp;&amp;console.warn(t),b[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)&gt;(e.y-t.y)*(r.x-t.x)}function k(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r&lt;n;i=r++)a=t[r],e+=((o=t[i]).x-a.x)*(a.y+o.y);return e}var M={Unknown:&quot;Unknown&quot;,Style:&quot;Style&quot;,Source:&quot;Source&quot;,Tile:&quot;Tile&quot;,Glyphs:&quot;Glyphs&quot;,SpriteImage:&quot;SpriteImage&quot;,SpriteJSON:&quot;SpriteJSON&quot;,Image:&quot;Image&quot;};&quot;function&quot;==typeof Object.freeze&amp;&amp;Object.freeze(M);var A=function(t){function e(e,r,n){t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+&quot;: &quot;+this.message+&quot; (&quot;+this.status+&quot;): &quot;+this.url},e}(Error);function T(t){var e=new self.XMLHttpRequest;for(var r in e.open(&quot;GET&quot;,t.url,!0),t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials=&quot;include&quot;===t.credentials,e}var S=function(t,e){var r=T(t);return r.responseType=&quot;arraybuffer&quot;,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var n=r.response;if(0===n.byteLength&amp;&amp;200===r.status)return e(new Error(&quot;http status 200 returned without content.&quot;));r.status&gt;=200&amp;&amp;r.status&lt;300&amp;&amp;r.response?e(null,{data:n,cacheControl:r.getResponseHeader(&quot;Cache-Control&quot;),expires:r.getResponseHeader(&quot;Expires&quot;)}):e(new A(r.statusText,r.status,t.url))},r.send(),r};function E(t,e,r){r[t]=r[t]||[],r[t].push(e)}function C(t,e,r){if(r&amp;&amp;r[t]){var n=r[t].indexOf(e);-1!==n&amp;&amp;r[t].splice(n,1)}}var L=function(t,e){void 0===e&amp;&amp;(e={}),p(this,e),this.type=t},z=function(t){function e(e,r){void 0===r&amp;&amp;(r={}),t.call(this,&quot;error&quot;,p({error:e},r))}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(L),P=function(){};P.prototype.on=function(t,e){return this._listeners=this._listeners||{},E(t,e,this._listeners),this},P.prototype.off=function(t,e){return C(t,e,this._listeners),C(t,e,this._oneTimeListeners),this},P.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},E(t,e,this._oneTimeListeners),this},P.prototype.fire=function(t){&quot;string&quot;==typeof t&amp;&amp;(t=new L(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var r=0,n=this._listeners&amp;&amp;this._listeners[e]?this._listeners[e].slice():[];r&lt;n.length;r+=1)n[r].call(this,t);for(var i=0,a=this._oneTimeListeners&amp;&amp;this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];i&lt;a.length;i+=1){var o=a[i];C(e,o,this._oneTimeListeners),o.call(this,t)}var s=this._eventedParent;s&amp;&amp;(p(t,&quot;function&quot;==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),s.fire(t))}else m(e,&quot;error&quot;)?console.error(t&amp;&amp;t.error||t||&quot;Empty error event&quot;):m(e,&quot;warning&quot;)&amp;&amp;console.warn(t&amp;&amp;t.warning||t||&quot;Empty warning event&quot;);return this},P.prototype.listens=function(t){return this._listeners&amp;&amp;this._listeners[t]&amp;&amp;this._listeners[t].length&gt;0||this._oneTimeListeners&amp;&amp;this._oneTimeListeners[t]&amp;&amp;this._oneTimeListeners[t].length&gt;0||this._eventedParent&amp;&amp;this._eventedParent.listens(t)},P.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var O={$version:8,$root:{version:{required:!0,type:&quot;enum&quot;,values:[8]},name:{type:&quot;string&quot;},metadata:{type:&quot;*&quot;},center:{type:&quot;array&quot;,value:&quot;number&quot;},zoom:{type:&quot;number&quot;},bearing:{type:&quot;number&quot;,default:0,period:360,units:&quot;degrees&quot;},pitch:{type:&quot;number&quot;,default:0,units:&quot;degrees&quot;},light:{type:&quot;light&quot;},sources:{required:!0,type:&quot;sources&quot;},sprite:{type:&quot;string&quot;},glyphs:{type:&quot;string&quot;},transition:{type:&quot;transition&quot;},layers:{required:!0,type:&quot;array&quot;,value:&quot;layer&quot;}},sources:{&quot;*&quot;:{type:&quot;source&quot;}},source:[&quot;source_vector&quot;,&quot;source_raster&quot;,&quot;source_raster_dem&quot;,&quot;source_geojson&quot;,&quot;source_video&quot;,&quot;source_image&quot;],source_vector:{type:{required:!0,type:&quot;enum&quot;,values:{vector:{}}},url:{type:&quot;string&quot;},tiles:{type:&quot;array&quot;,value:&quot;string&quot;},bounds:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:&quot;number&quot;,default:0},maxzoom:{type:&quot;number&quot;,default:22},attribution:{type:&quot;string&quot;},&quot;*&quot;:{type:&quot;*&quot;}},source_raster:{type:{required:!0,type:&quot;enum&quot;,values:{raster:{}}},url:{type:&quot;string&quot;},tiles:{type:&quot;array&quot;,value:&quot;string&quot;},bounds:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:&quot;number&quot;,default:0},maxzoom:{type:&quot;number&quot;,default:22},tileSize:{type:&quot;number&quot;,default:512,units:&quot;pixels&quot;},scheme:{type:&quot;enum&quot;,values:{xyz:{},tms:{}},default:&quot;xyz&quot;},attribution:{type:&quot;string&quot;},&quot;*&quot;:{type:&quot;*&quot;}},source_raster_dem:{type:{required:!0,type:&quot;enum&quot;,values:{&quot;raster-dem&quot;:{}}},url:{type:&quot;string&quot;},tiles:{type:&quot;array&quot;,value:&quot;string&quot;},bounds:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:&quot;number&quot;,default:0},maxzoom:{type:&quot;number&quot;,default:22},tileSize:{type:&quot;number&quot;,default:512,units:&quot;pixels&quot;},attribution:{type:&quot;string&quot;},encoding:{type:&quot;enum&quot;,values:{terrarium:{},mapbox:{}},default:&quot;mapbox&quot;},&quot;*&quot;:{type:&quot;*&quot;}},source_geojson:{type:{required:!0,type:&quot;enum&quot;,values:{geojson:{}}},data:{type:&quot;*&quot;},maxzoom:{type:&quot;number&quot;,default:18},buffer:{type:&quot;number&quot;,default:128,maximum:512,minimum:0},tolerance:{type:&quot;number&quot;,default:.375},cluster:{type:&quot;boolean&quot;,default:!1},clusterRadius:{type:&quot;number&quot;,default:50,minimum:0},clusterMaxZoom:{type:&quot;number&quot;},lineMetrics:{type:&quot;boolean&quot;,default:!1}},source_video:{type:{required:!0,type:&quot;enum&quot;,values:{video:{}}},urls:{required:!0,type:&quot;array&quot;,value:&quot;string&quot;},coordinates:{required:!0,type:&quot;array&quot;,length:4,value:{type:&quot;array&quot;,length:2,value:&quot;number&quot;}}},source_image:{type:{required:!0,type:&quot;enum&quot;,values:{image:{}}},url:{required:!0,type:&quot;string&quot;},coordinates:{required:!0,type:&quot;array&quot;,length:4,value:{type:&quot;array&quot;,length:2,value:&quot;number&quot;}}},layer:{id:{type:&quot;string&quot;,required:!0},type:{type:&quot;enum&quot;,values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},&quot;fill-extrusion&quot;:{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:&quot;*&quot;},source:{type:&quot;string&quot;},&quot;source-layer&quot;:{type:&quot;string&quot;},minzoom:{type:&quot;number&quot;,minimum:0,maximum:24},maxzoom:{type:&quot;number&quot;,minimum:0,maximum:24},filter:{type:&quot;filter&quot;},layout:{type:&quot;layout&quot;},paint:{type:&quot;paint&quot;}},layout:[&quot;layout_fill&quot;,&quot;layout_line&quot;,&quot;layout_circle&quot;,&quot;layout_heatmap&quot;,&quot;layout_fill-extrusion&quot;,&quot;layout_symbol&quot;,&quot;layout_raster&quot;,&quot;layout_hillshade&quot;,&quot;layout_background&quot;],layout_background:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_fill:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_circle:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_heatmap:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_line:{&quot;line-cap&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{butt:{},round:{},square:{}},default:&quot;butt&quot;},&quot;line-join&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{bevel:{},round:{},miter:{}},default:&quot;miter&quot;},&quot;line-miter-limit&quot;:{type:&quot;number&quot;,default:2,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[{&quot;line-join&quot;:&quot;miter&quot;}]},&quot;line-round-limit&quot;:{type:&quot;number&quot;,default:1.05,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[{&quot;line-join&quot;:&quot;round&quot;}]},visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_symbol:{&quot;symbol-placement&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{point:{},line:{}},default:&quot;point&quot;},&quot;symbol-spacing&quot;:{type:&quot;number&quot;,default:250,minimum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,units:&quot;pixels&quot;,requires:[{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;symbol-avoid-edges&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1},&quot;icon-allow-overlap&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;]},&quot;icon-ignore-placement&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;]},&quot;icon-optional&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;,&quot;text-field&quot;]},&quot;icon-rotation-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-size&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,units:&quot;factor of the original icon size&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-text-fit&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{none:{},width:{},height:{},both:{}},default:&quot;none&quot;,requires:[&quot;icon-image&quot;,&quot;text-field&quot;]},&quot;icon-text-fit-padding&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:4,default:[0,0,0,0],units:&quot;pixels&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;icon-image&quot;,&quot;text-field&quot;,{&quot;icon-text-fit&quot;:[&quot;both&quot;,&quot;width&quot;,&quot;height&quot;]}]},&quot;icon-image&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,tokens:!0},&quot;icon-rotate&quot;:{type:&quot;number&quot;,default:0,period:360,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,units:&quot;degrees&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-padding&quot;:{type:&quot;number&quot;,default:2,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-keep-upright&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;icon-image&quot;,{&quot;icon-rotation-alignment&quot;:&quot;map&quot;},{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;icon-offset&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;icon-image&quot;]},&quot;icon-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{center:{},left:{},right:{},top:{},bottom:{},&quot;top-left&quot;:{},&quot;top-right&quot;:{},&quot;bottom-left&quot;:{},&quot;bottom-right&quot;:{}},default:&quot;center&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-pitch-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;icon-image&quot;]},&quot;text-pitch-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;text-field&quot;]},&quot;text-rotation-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{},auto:{}},default:&quot;auto&quot;,requires:[&quot;text-field&quot;]},&quot;text-field&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:&quot;&quot;,tokens:!0},&quot;text-font&quot;:{type:&quot;array&quot;,value:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:[&quot;Open Sans Regular&quot;,&quot;Arial Unicode MS Regular&quot;],requires:[&quot;text-field&quot;]},&quot;text-size&quot;:{type:&quot;number&quot;,default:16,minimum:0,units:&quot;pixels&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-max-width&quot;:{type:&quot;number&quot;,default:10,minimum:0,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-line-height&quot;:{type:&quot;number&quot;,default:1.2,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-letter-spacing&quot;:{type:&quot;number&quot;,default:0,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-justify&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{left:{},center:{},right:{}},default:&quot;center&quot;,requires:[&quot;text-field&quot;]},&quot;text-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{center:{},left:{},right:{},top:{},bottom:{},&quot;top-left&quot;:{},&quot;top-right&quot;:{},&quot;bottom-left&quot;:{},&quot;bottom-right&quot;:{}},default:&quot;center&quot;,requires:[&quot;text-field&quot;]},&quot;text-max-angle&quot;:{type:&quot;number&quot;,default:45,units:&quot;degrees&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;text-field&quot;,{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;text-rotate&quot;:{type:&quot;number&quot;,default:0,period:360,units:&quot;degrees&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-padding&quot;:{type:&quot;number&quot;,default:2,minimum:0,units:&quot;pixels&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,requires:[&quot;text-field&quot;]},&quot;text-keep-upright&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!0,requires:[&quot;text-field&quot;,{&quot;text-rotation-alignment&quot;:&quot;map&quot;},{&quot;symbol-placement&quot;:&quot;line&quot;}]},&quot;text-transform&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,values:{none:{},uppercase:{},lowercase:{}},default:&quot;none&quot;,requires:[&quot;text-field&quot;]},&quot;text-offset&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,units:&quot;ems&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,length:2,default:[0,0],requires:[&quot;text-field&quot;]},&quot;text-allow-overlap&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;text-field&quot;]},&quot;text-ignore-placement&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;text-field&quot;]},&quot;text-optional&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!1,requires:[&quot;text-field&quot;,&quot;icon-image&quot;]},visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_raster:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},layout_hillshade:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},filter:{type:&quot;array&quot;,value:&quot;*&quot;},filter_operator:{type:&quot;enum&quot;,values:{&quot;==&quot;:{},&quot;!=&quot;:{},&quot;&gt;&quot;:{},&quot;&gt;=&quot;:{},&quot;&lt;&quot;:{},&quot;&lt;=&quot;:{},in:{},&quot;!in&quot;:{},all:{},any:{},none:{},has:{},&quot;!has&quot;:{}}},geometry_type:{type:&quot;enum&quot;,values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:&quot;array&quot;,minimum:0,maximum:22,value:[&quot;number&quot;,&quot;color&quot;],length:2},expression:{type:&quot;array&quot;,value:&quot;*&quot;,minimum:1},expression_name:{type:&quot;enum&quot;,values:{let:{group:&quot;Variable binding&quot;},var:{group:&quot;Variable binding&quot;},literal:{group:&quot;Types&quot;},array:{group:&quot;Types&quot;},at:{group:&quot;Lookup&quot;},case:{group:&quot;Decision&quot;},match:{group:&quot;Decision&quot;},coalesce:{group:&quot;Decision&quot;},step:{group:&quot;Ramps, scales, curves&quot;},interpolate:{group:&quot;Ramps, scales, curves&quot;},ln2:{group:&quot;Math&quot;},pi:{group:&quot;Math&quot;},e:{group:&quot;Math&quot;},typeof:{group:&quot;Types&quot;},string:{group:&quot;Types&quot;},number:{group:&quot;Types&quot;},boolean:{group:&quot;Types&quot;},object:{group:&quot;Types&quot;},collator:{group:&quot;Types&quot;},&quot;to-string&quot;:{group:&quot;Types&quot;},&quot;to-number&quot;:{group:&quot;Types&quot;},&quot;to-boolean&quot;:{group:&quot;Types&quot;},&quot;to-rgba&quot;:{group:&quot;Color&quot;},&quot;to-color&quot;:{group:&quot;Types&quot;},rgb:{group:&quot;Color&quot;},rgba:{group:&quot;Color&quot;},get:{group:&quot;Lookup&quot;},has:{group:&quot;Lookup&quot;},length:{group:&quot;Lookup&quot;},properties:{group:&quot;Feature data&quot;},&quot;geometry-type&quot;:{group:&quot;Feature data&quot;},id:{group:&quot;Feature data&quot;},zoom:{group:&quot;Zoom&quot;},&quot;heatmap-density&quot;:{group:&quot;Heatmap&quot;},&quot;line-progress&quot;:{group:&quot;Heatmap&quot;},&quot;+&quot;:{group:&quot;Math&quot;},&quot;*&quot;:{group:&quot;Math&quot;},&quot;-&quot;:{group:&quot;Math&quot;},&quot;/&quot;:{group:&quot;Math&quot;},&quot;%&quot;:{group:&quot;Math&quot;},&quot;^&quot;:{group:&quot;Math&quot;},sqrt:{group:&quot;Math&quot;},log10:{group:&quot;Math&quot;},ln:{group:&quot;Math&quot;},log2:{group:&quot;Math&quot;},sin:{group:&quot;Math&quot;},cos:{group:&quot;Math&quot;},tan:{group:&quot;Math&quot;},asin:{group:&quot;Math&quot;},acos:{group:&quot;Math&quot;},atan:{group:&quot;Math&quot;},min:{group:&quot;Math&quot;},max:{group:&quot;Math&quot;},round:{group:&quot;Math&quot;},abs:{group:&quot;Math&quot;},ceil:{group:&quot;Math&quot;},floor:{group:&quot;Math&quot;},&quot;==&quot;:{group:&quot;Decision&quot;},&quot;!=&quot;:{group:&quot;Decision&quot;},&quot;&gt;&quot;:{group:&quot;Decision&quot;},&quot;&lt;&quot;:{group:&quot;Decision&quot;},&quot;&gt;=&quot;:{group:&quot;Decision&quot;},&quot;&lt;=&quot;:{group:&quot;Decision&quot;},all:{group:&quot;Decision&quot;},any:{group:&quot;Decision&quot;},&quot;!&quot;:{group:&quot;Decision&quot;},&quot;is-supported-script&quot;:{group:&quot;String&quot;},upcase:{group:&quot;String&quot;},downcase:{group:&quot;String&quot;},concat:{group:&quot;String&quot;},&quot;resolved-locale&quot;:{group:&quot;String&quot;}}},light:{anchor:{type:&quot;enum&quot;,default:&quot;viewport&quot;,values:{map:{},viewport:{}},transition:!1,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,function:&quot;piecewise-constant&quot;},position:{type:&quot;array&quot;,default:[1.15,210,30],length:3,value:&quot;number&quot;,transition:!0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1},color:{type:&quot;color&quot;,default:&quot;#ffffff&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0},intensity:{type:&quot;number&quot;,default:.5,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0}},paint:[&quot;paint_fill&quot;,&quot;paint_line&quot;,&quot;paint_circle&quot;,&quot;paint_heatmap&quot;,&quot;paint_fill-extrusion&quot;,&quot;paint_symbol&quot;,&quot;paint_raster&quot;,&quot;paint_hillshade&quot;,&quot;paint_background&quot;],paint_fill:{&quot;fill-antialias&quot;:{type:&quot;boolean&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,default:!0},&quot;fill-opacity&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:1,minimum:0,maximum:1,transition:!0},&quot;fill-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;fill-pattern&quot;}]},&quot;fill-outline-color&quot;:{type:&quot;color&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;fill-pattern&quot;},{&quot;fill-antialias&quot;:!0}]},&quot;fill-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;fill-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;fill-translate&quot;]},&quot;fill-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0}},paint_line:{&quot;line-opacity&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:1,minimum:0,maximum:1,transition:!0},&quot;line-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;line-pattern&quot;}]},&quot;line-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;line-translate&quot;]},&quot;line-width&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-gap-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-offset&quot;:{type:&quot;number&quot;,default:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-blur&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;line-dasharray&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,minimum:0,transition:!0,units:&quot;line widths&quot;,requires:[{&quot;!&quot;:&quot;line-pattern&quot;}]},&quot;line-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;line-gradient&quot;:{type:&quot;color&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!1,&quot;property-function&quot;:!1,transition:!1,requires:[{&quot;!&quot;:&quot;line-dasharray&quot;},{&quot;!&quot;:&quot;line-pattern&quot;},{source:&quot;geojson&quot;,has:{lineMetrics:!0}}]}},paint_circle:{&quot;circle-radius&quot;:{type:&quot;number&quot;,default:5,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;circle-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-blur&quot;:{type:&quot;number&quot;,default:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;circle-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;circle-translate&quot;]},&quot;circle-pitch-scale&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;},&quot;circle-pitch-alignment&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;viewport&quot;},&quot;circle-stroke-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;circle-stroke-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0},&quot;circle-stroke-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0}},paint_heatmap:{&quot;heatmap-radius&quot;:{type:&quot;number&quot;,default:30,minimum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;heatmap-weight&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!1},&quot;heatmap-intensity&quot;:{type:&quot;number&quot;,default:1,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0},&quot;heatmap-color&quot;:{type:&quot;color&quot;,default:[&quot;interpolate&quot;,[&quot;linear&quot;],[&quot;heatmap-density&quot;],0,&quot;rgba(0, 0, 255, 0)&quot;,.1,&quot;royalblue&quot;,.3,&quot;cyan&quot;,.5,&quot;lime&quot;,.7,&quot;yellow&quot;,1,&quot;red&quot;],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!1,&quot;property-function&quot;:!1,transition:!1},&quot;heatmap-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,transition:!0}},paint_symbol:{&quot;icon-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;icon-image&quot;]},&quot;icon-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;icon-image&quot;]},&quot;icon-halo-color&quot;:{type:&quot;color&quot;,default:&quot;rgba(0, 0, 0, 0)&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;icon-image&quot;]},&quot;icon-halo-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-halo-blur&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;icon-image&quot;]},&quot;icon-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;icon-image&quot;,&quot;icon-translate&quot;]},&quot;text-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;text-field&quot;]},&quot;text-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;text-field&quot;]},&quot;text-halo-color&quot;:{type:&quot;color&quot;,default:&quot;rgba(0, 0, 0, 0)&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[&quot;text-field&quot;]},&quot;text-halo-width&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;text-field&quot;]},&quot;text-halo-blur&quot;:{type:&quot;number&quot;,default:0,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;text-field&quot;]},&quot;text-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;,requires:[&quot;text-field&quot;]},&quot;text-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;text-field&quot;,&quot;text-translate&quot;]}},paint_raster:{&quot;raster-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;raster-hue-rotate&quot;:{type:&quot;number&quot;,default:0,period:360,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;degrees&quot;},&quot;raster-brightness-min&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,default:0,minimum:0,maximum:1,transition:!0},&quot;raster-brightness-max&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,default:1,minimum:0,maximum:1,transition:!0},&quot;raster-saturation&quot;:{type:&quot;number&quot;,default:0,minimum:-1,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;raster-contrast&quot;:{type:&quot;number&quot;,default:0,minimum:-1,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;raster-fade-duration&quot;:{type:&quot;number&quot;,default:300,minimum:0,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!1,units:&quot;milliseconds&quot;}},paint_hillshade:{&quot;hillshade-illumination-direction&quot;:{type:&quot;number&quot;,default:335,minimum:0,maximum:359,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!1},&quot;hillshade-illumination-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;viewport&quot;},&quot;hillshade-exaggeration&quot;:{type:&quot;number&quot;,default:.5,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;hillshade-shadow-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;hillshade-highlight-color&quot;:{type:&quot;color&quot;,default:&quot;#FFFFFF&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;hillshade-accent-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0}},paint_background:{&quot;background-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;background-pattern&quot;}]},&quot;background-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;background-opacity&quot;:{type:&quot;number&quot;,default:1,minimum:0,maximum:1,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0}},transition:{duration:{type:&quot;number&quot;,default:300,minimum:0,units:&quot;milliseconds&quot;},delay:{type:&quot;number&quot;,default:0,minimum:0,units:&quot;milliseconds&quot;}},&quot;layout_fill-extrusion&quot;:{visibility:{type:&quot;enum&quot;,values:{visible:{},none:{}},default:&quot;visible&quot;}},function:{expression:{type:&quot;expression&quot;},stops:{type:&quot;array&quot;,value:&quot;function_stop&quot;},base:{type:&quot;number&quot;,default:1,minimum:0},property:{type:&quot;string&quot;,default:&quot;$zoom&quot;},type:{type:&quot;enum&quot;,values:{identity:{},exponential:{},interval:{},categorical:{}},default:&quot;exponential&quot;},colorSpace:{type:&quot;enum&quot;,values:{rgb:{},lab:{},hcl:{}},default:&quot;rgb&quot;},default:{type:&quot;*&quot;,required:!1}},&quot;paint_fill-extrusion&quot;:{&quot;fill-extrusion-opacity&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!1,default:1,minimum:0,maximum:1,transition:!0},&quot;fill-extrusion-color&quot;:{type:&quot;color&quot;,default:&quot;#000000&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,transition:!0,requires:[{&quot;!&quot;:&quot;fill-extrusion-pattern&quot;}]},&quot;fill-extrusion-translate&quot;:{type:&quot;array&quot;,value:&quot;number&quot;,length:2,default:[0,0],function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,transition:!0,units:&quot;pixels&quot;},&quot;fill-extrusion-translate-anchor&quot;:{type:&quot;enum&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,values:{map:{},viewport:{}},default:&quot;map&quot;,requires:[&quot;fill-extrusion-translate&quot;]},&quot;fill-extrusion-pattern&quot;:{type:&quot;string&quot;,function:&quot;piecewise-constant&quot;,&quot;zoom-function&quot;:!0,transition:!0},&quot;fill-extrusion-height&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:0,minimum:0,units:&quot;meters&quot;,transition:!0},&quot;fill-extrusion-base&quot;:{type:&quot;number&quot;,function:&quot;interpolated&quot;,&quot;zoom-function&quot;:!0,&quot;property-function&quot;:!0,default:0,minimum:0,units:&quot;meters&quot;,transition:!0,requires:[&quot;fill-extrusion-height&quot;]}}},I=function(t,e,r,n){this.message=(t?t+&quot;: &quot;:&quot;&quot;)+r,n&amp;&amp;(this.identifier=n),null!=e&amp;&amp;e.__line__&amp;&amp;(this.line=e.__line__)};function D(t){var e=t.key,r=t.value;return r?[new I(e,r,&quot;constants have been deprecated as of v8&quot;)]:[]}function R(t){for(var e=[],r=arguments.length-1;r-- &gt;0;)e[r]=arguments[r+1];for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}function B(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function F(t){return Array.isArray(t)?t.map(F):B(t)}var N=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Error),j=function(t,e){void 0===e&amp;&amp;(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r&lt;n.length;r+=1){var i=n[r],a=i[0],o=i[1];this.bindings[a]=o}};j.prototype.concat=function(t){return new j(this,t)},j.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+&quot; not found in scope.&quot;)},j.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&amp;&amp;this.parent.has(t)};var V={kind:&quot;null&quot;},U={kind:&quot;number&quot;},q={kind:&quot;string&quot;},H={kind:&quot;boolean&quot;},G={kind:&quot;color&quot;},W={kind:&quot;object&quot;},Y={kind:&quot;value&quot;},X={kind:&quot;collator&quot;};function Z(t,e){return{kind:&quot;array&quot;,itemType:t,N:e}}function $(t){if(&quot;array&quot;===t.kind){var e=$(t.itemType);return&quot;number&quot;==typeof t.N?&quot;array&lt;&quot;+e+&quot;, &quot;+t.N+&quot;&gt;&quot;:&quot;value&quot;===t.itemType.kind?&quot;array&quot;:&quot;array&lt;&quot;+e+&quot;&gt;&quot;}return t.kind}var J=[V,U,q,H,G,W,Z(Y)];function K(t,e){if(&quot;error&quot;===e.kind)return null;if(&quot;array&quot;===t.kind){if(&quot;array&quot;===e.kind&amp;&amp;!K(t.itemType,e.itemType)&amp;&amp;(&quot;number&quot;!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(&quot;value&quot;===t.kind)for(var r=0,n=J;r&lt;n.length;r+=1)if(!K(n[r],e))return null}return&quot;Expected &quot;+$(t)+&quot; but found &quot;+$(e)+&quot; instead.&quot;}var Q=i(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))&lt;0?0:t&gt;255?255:t}function i(t){return t&lt;0?0:t&gt;1?1:t}function a(t){return&quot;%&quot;===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return&quot;%&quot;===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r&lt;0?r+=1:r&gt;1&amp;&amp;(r-=1),6*r&lt;1?t+(e-t)*r*6:2*r&lt;1?e:3*r&lt;2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,&quot;&quot;).toLowerCase();if(i in r)return r[i].slice();if(&quot;#&quot;===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))&gt;=0&amp;&amp;e&lt;=4095?[(3840&amp;e)&gt;&gt;4|(3840&amp;e)&gt;&gt;8,240&amp;e|(240&amp;e)&gt;&gt;4,15&amp;e|(15&amp;e)&lt;&lt;4,1]:null:7===i.length&amp;&amp;(e=parseInt(i.substr(1),16))&gt;=0&amp;&amp;e&lt;=16777215?[(16711680&amp;e)&gt;&gt;16,(65280&amp;e)&gt;&gt;8,255&amp;e,1]:null;var l=i.indexOf(&quot;(&quot;),c=i.indexOf(&quot;)&quot;);if(-1!==l&amp;&amp;c+1===i.length){var u=i.substr(0,l),f=i.substr(l+1,c-(l+1)).split(&quot;,&quot;),h=1;switch(u){case&quot;rgba&quot;:if(4!==f.length)return null;h=o(f.pop());case&quot;rgb&quot;:return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case&quot;hsla&quot;:if(4!==f.length)return null;h=o(f.pop());case&quot;hsl&quot;:if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),g=o(f[2]),m=g&lt;=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,tt=function(t,e,r,n){void 0===n&amp;&amp;(n=1),this.r=t,this.g=e,this.b=r,this.a=n};tt.parse=function(t){if(t){if(t instanceof tt)return t;if(&quot;string&quot;==typeof t){var e=Q(t);if(e)return new tt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},tt.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return&quot;rgba(&quot;+Math.round(e)+&quot;,&quot;+Math.round(r)+&quot;,&quot;+Math.round(n)+&quot;,&quot;+i+&quot;)&quot;},tt.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},tt.black=new tt(0,0,0,1),tt.white=new tt(1,1,1,1),tt.transparent=new tt(0,0,0,0);var et=function(t,e,r){this.sensitivity=t?e?&quot;variant&quot;:&quot;case&quot;:e?&quot;accent&quot;:&quot;base&quot;,this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:&quot;search&quot;})};et.prototype.compare=function(t,e){return this.collator.compare(t,e)},et.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var rt=function(t,e,r){this.type=X,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function nt(t,e,r,n){return&quot;number&quot;==typeof t&amp;&amp;t&gt;=0&amp;&amp;t&lt;=255&amp;&amp;&quot;number&quot;==typeof e&amp;&amp;e&gt;=0&amp;&amp;e&lt;=255&amp;&amp;&quot;number&quot;==typeof r&amp;&amp;r&gt;=0&amp;&amp;r&lt;=255?void 0===n||&quot;number&quot;==typeof n&amp;&amp;n&gt;=0&amp;&amp;n&lt;=1?null:&quot;Invalid rgba value [&quot;+[t,e,r,n].join(&quot;, &quot;)+&quot;]: 'a' must be between 0 and 1.&quot;:&quot;Invalid rgba value [&quot;+(&quot;number&quot;==typeof n?[t,e,r,n]:[t,e,r]).join(&quot;, &quot;)+&quot;]: 'r', 'g', and 'b' must be between 0 and 255.&quot;}function it(t){if(null===t)return V;if(&quot;string&quot;==typeof t)return q;if(&quot;boolean&quot;==typeof t)return H;if(&quot;number&quot;==typeof t)return U;if(t instanceof tt)return G;if(t instanceof et)return X;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n&lt;i.length;n+=1){var a=it(i[n]);if(e){if(e===a)continue;e=Y;break}e=a}return Z(e||Y,r)}return W}rt.parse=function(t,e){if(2!==t.length)return e.error(&quot;Expected one argument.&quot;);var r=t[1];if(&quot;object&quot;!=typeof r||Array.isArray(r))return e.error(&quot;Collator options argument must be an object.&quot;);var n=e.parse(void 0!==r[&quot;case-sensitive&quot;]&amp;&amp;r[&quot;case-sensitive&quot;],1,H);if(!n)return null;var i=e.parse(void 0!==r[&quot;diacritic-sensitive&quot;]&amp;&amp;r[&quot;diacritic-sensitive&quot;],1,H);if(!i)return null;var a=null;return r.locale&amp;&amp;!(a=e.parse(r.locale,1,q))?null:new rt(n,i,a)},rt.prototype.evaluate=function(t){return new et(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},rt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&amp;&amp;t(this.locale)},rt.prototype.possibleOutputs=function(){return[void 0]},rt.prototype.serialize=function(){var t={};return t[&quot;case-sensitive&quot;]=this.caseSensitive.serialize(),t[&quot;diacritic-sensitive&quot;]=this.diacriticSensitive.serialize(),this.locale&amp;&amp;(t.locale=this.locale.serialize()),[&quot;collator&quot;,t]};var at=function(t,e){this.type=t,this.value=e};at.parse=function(t,e){if(2!==t.length)return e.error(&quot;'literal' expression requires exactly one argument, but found &quot;+(t.length-1)+&quot; instead.&quot;);if(!function t(e){if(null===e)return!0;if(&quot;string&quot;==typeof e)return!0;if(&quot;boolean&quot;==typeof e)return!0;if(&quot;number&quot;==typeof e)return!0;if(e instanceof tt)return!0;if(e instanceof et)return!0;if(Array.isArray(e)){for(var r=0,n=e;r&lt;n.length;r+=1)if(!t(n[r]))return!1;return!0}if(&quot;object&quot;==typeof e){for(var i in e)if(!t(e[i]))return!1;return!0}return!1}(t[1]))return e.error(&quot;invalid value&quot;);var r=t[1],n=it(r),i=e.expectedType;return&quot;array&quot;!==n.kind||0!==n.N||!i||&quot;array&quot;!==i.kind||&quot;number&quot;==typeof i.N&amp;&amp;0!==i.N||(n=i),new at(n,r)},at.prototype.evaluate=function(){return this.value},at.prototype.eachChild=function(){},at.prototype.possibleOutputs=function(){return[this.value]},at.prototype.serialize=function(){return&quot;array&quot;===this.type.kind||&quot;object&quot;===this.type.kind?[&quot;literal&quot;,this.value]:this.value instanceof tt?[&quot;rgba&quot;].concat(this.value.toArray()):this.value};var ot=function(t){this.name=&quot;ExpressionEvaluationError&quot;,this.message=t};ot.prototype.toJSON=function(){return this.message};var st={string:q,number:U,boolean:H,object:W},lt=function(t,e){this.type=t,this.args=e};lt.parse=function(t,e){if(t.length&lt;2)return e.error(&quot;Expected at least one argument.&quot;);for(var r=t[0],n=st[r],i=[],a=1;a&lt;t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new lt(n,i)},lt.prototype.evaluate=function(t){for(var e=0;e&lt;this.args.length;e++){var r=this.args[e].evaluate(t);if(!K(this.type,it(r)))return r;if(e===this.args.length-1)throw new ot(&quot;Expected value to be of type &quot;+$(this.type)+&quot;, but found &quot;+$(it(r))+&quot; instead.&quot;)}return null},lt.prototype.eachChild=function(t){this.args.forEach(t)},lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},lt.prototype.serialize=function(){return[this.type.kind].concat(this.args.map(function(t){return t.serialize()}))};var ct={string:q,number:U,boolean:H},ut=function(t,e){this.type=t,this.input=e};ut.parse=function(t,e){if(t.length&lt;2||t.length&gt;4)return e.error(&quot;Expected 1, 2, or 3 arguments, but found &quot;+(t.length-1)+&quot; instead.&quot;);var r,n;if(t.length&gt;2){var i=t[1];if(&quot;string&quot;!=typeof i||!(i in ct))return e.error('The item type argument of &quot;array&quot; must be one of string, number, boolean',1);r=ct[i]}else r=Y;if(t.length&gt;3){if(&quot;number&quot;!=typeof t[2]||t[2]&lt;0||t[2]!==Math.floor(t[2]))return e.error('The length argument to &quot;array&quot; must be a positive integer literal',2);n=t[2]}var a=Z(r,n),o=e.parse(t[t.length-1],t.length-1,Y);return o?new ut(a,o):null},ut.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(K(this.type,it(e)))throw new ot(&quot;Expected value to be of type &quot;+$(this.type)+&quot;, but found &quot;+$(it(e))+&quot; instead.&quot;);return e},ut.prototype.eachChild=function(t){t(this.input)},ut.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},ut.prototype.serialize=function(){var t=[&quot;array&quot;],e=this.type.itemType;if(&quot;string&quot;===e.kind||&quot;number&quot;===e.kind||&quot;boolean&quot;===e.kind){t.push(e.kind);var r=this.type.N;&quot;number&quot;==typeof r&amp;&amp;t.push(r)}return t.push(this.input.serialize()),t};var ft={&quot;to-number&quot;:U,&quot;to-color&quot;:G},ht=function(t,e){this.type=t,this.args=e};ht.parse=function(t,e){if(t.length&lt;2)return e.error(&quot;Expected at least one argument.&quot;);for(var r=t[0],n=ft[r],i=[],a=1;a&lt;t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new ht(n,i)},ht.prototype.evaluate=function(t){if(&quot;color&quot;===this.type.kind){for(var e,r,n=0,i=this.args;n&lt;i.length;n+=1)if(r=null,&quot;string&quot;==typeof(e=i[n].evaluate(t))){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&amp;&amp;!(r=e.length&lt;3||e.length&gt;4?&quot;Invalid rbga value &quot;+JSON.stringify(e)+&quot;: expected an array containing either three or four numeric values.&quot;:nt(e[0],e[1],e[2],e[3])))return new tt(e[0]/255,e[1]/255,e[2]/255,e[3]);throw new ot(r||&quot;Could not parse color from value '&quot;+(&quot;string&quot;==typeof e?e:JSON.stringify(e))+&quot;'&quot;)}for(var o=null,s=0,l=this.args;s&lt;l.length;s+=1)if(null!==(o=l[s].evaluate(t))){var c=Number(o);if(!isNaN(c))return c}throw new ot(&quot;Could not convert &quot;+JSON.stringify(o)+&quot; to number.&quot;)},ht.prototype.eachChild=function(t){this.args.forEach(t)},ht.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},ht.prototype.serialize=function(){var t=[&quot;to-&quot;+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var pt=[&quot;Unknown&quot;,&quot;Point&quot;,&quot;LineString&quot;,&quot;Polygon&quot;],dt=function(){this._parseColorCache={}};dt.prototype.id=function(){return this.feature&amp;&amp;&quot;id&quot;in this.feature?this.feature.id:null},dt.prototype.geometryType=function(){return this.feature?&quot;number&quot;==typeof this.feature.type?pt[this.feature.type]:this.feature.type:null},dt.prototype.properties=function(){return this.feature&amp;&amp;this.feature.properties||{}},dt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=tt.parse(t)),e};var gt=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};function mt(t){if(t instanceof gt){if(&quot;get&quot;===t.name&amp;&amp;1===t.args.length)return!1;if(&quot;has&quot;===t.name&amp;&amp;1===t.args.length)return!1;if(&quot;properties&quot;===t.name||&quot;geometry-type&quot;===t.name||&quot;id&quot;===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&amp;&amp;!mt(t)&amp;&amp;(e=!1)}),e}function vt(t,e){if(t instanceof gt&amp;&amp;e.indexOf(t.name)&gt;=0)return!1;var r=!0;return t.eachChild(function(t){r&amp;&amp;!vt(t,e)&amp;&amp;(r=!1)}),r}gt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},gt.prototype.eachChild=function(t){this.args.forEach(t)},gt.prototype.possibleOutputs=function(){return[void 0]},gt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},gt.parse=function(t,e){var r=t[0],n=gt.definitions[r];if(!n)return e.error('Unknown expression &quot;'+r+'&quot;. If you wanted a literal array, use [&quot;literal&quot;, [...]].',0);for(var i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),s=[],l=1;l&lt;t.length;l++){var c=t[l],u=void 0;if(1===o.length){var f=o[0][0];u=Array.isArray(f)?f[l-1]:f.type}var h=e.parse(c,1+s.length,u);if(!h)return null;s.push(h)}for(var p=null,d=0,g=o;d&lt;g.length;d+=1){var m=g[d],v=m[0],y=m[1];if(p=new xt(e.registry,e.path,null,e.scope),Array.isArray(v)&amp;&amp;v.length!==s.length)p.error(&quot;Expected &quot;+v.length+&quot; arguments, but found &quot;+s.length+&quot; instead.&quot;);else{for(var x=0;x&lt;s.length;x++){var b=Array.isArray(v)?v[x]:v.type,_=s[x];p.concat(x+1).checkSubtype(b,_.type)}if(0===p.errors.length)return new gt(r,i,y,s)}}if(1===o.length)e.errors.push.apply(e.errors,p.errors);else{var w=(o.length?o:a).map(function(t){var e;return e=t[0],Array.isArray(e)?&quot;(&quot;+e.map($).join(&quot;, &quot;)+&quot;)&quot;:&quot;(&quot;+$(e.type)+&quot;...)&quot;}).join(&quot; | &quot;),k=s.map(function(t){return $(t.type)}).join(&quot;, &quot;);e.error(&quot;Expected arguments of type &quot;+w+&quot;, but found (&quot;+k+&quot;) instead.&quot;)}return null},gt.register=function(t,e){for(var r in gt.definitions=e,e)t[r]=gt};var yt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};yt.parse=function(t,e){if(2!==t.length||&quot;string&quot;!=typeof t[1])return e.error(&quot;'var' expression requires exactly one string literal argument.&quot;);var r=t[1];return e.scope.has(r)?new yt(r,e.scope.get(r)):e.error('Unknown variable &quot;'+r+'&quot;. Make sure &quot;'+r+'&quot; has been bound in an enclosing &quot;let&quot; expression before using it.',1)},yt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},yt.prototype.eachChild=function(){},yt.prototype.possibleOutputs=function(){return[void 0]},yt.prototype.serialize=function(){return[&quot;var&quot;,this.name]};var xt=function(t,e,r,n,i){void 0===e&amp;&amp;(e=[]),void 0===n&amp;&amp;(n=new j),void 0===i&amp;&amp;(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return&quot;[&quot;+t+&quot;]&quot;}).join(&quot;&quot;),this.scope=n,this.errors=i,this.expectedType=r};function bt(t,e){for(var r,n,i=0,a=t.length-1,o=0;i&lt;=a;){if(r=t[o=Math.floor((i+a)/2)],n=t[o+1],e===r||e&gt;r&amp;&amp;e&lt;n)return o;if(r&lt;e)i=o+1;else{if(!(r&gt;e))throw new ot(&quot;Input is not a number.&quot;);a=o-1}}return Math.max(o-1,0)}xt.prototype.parse=function(t,e,r,n,i){return void 0===i&amp;&amp;(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},xt.prototype._parse=function(t,e){if(null!==t&amp;&amp;&quot;string&quot;!=typeof t&amp;&amp;&quot;boolean&quot;!=typeof t&amp;&amp;&quot;number&quot;!=typeof t||(t=[&quot;literal&quot;,t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use [&quot;literal&quot;, []].');var r=t[0];if(&quot;string&quot;!=typeof r)return this.error(&quot;Expression name must be a string, but found &quot;+typeof r+' instead. If you wanted a literal array, use [&quot;literal&quot;, [...]].',0),null;var n=this.registry[r];if(n){var i=n.parse(t,this);if(!i)return null;if(this.expectedType){var a=this.expectedType,o=i.type;if(&quot;string&quot;!==a.kind&amp;&amp;&quot;number&quot;!==a.kind&amp;&amp;&quot;boolean&quot;!==a.kind&amp;&amp;&quot;object&quot;!==a.kind||&quot;value&quot;!==o.kind)if(&quot;array&quot;===a.kind&amp;&amp;&quot;value&quot;===o.kind)e.omitTypeAnnotations||(i=new ut(a,i));else if(&quot;color&quot;!==a.kind||&quot;value&quot;!==o.kind&amp;&amp;&quot;string&quot;!==o.kind){if(this.checkSubtype(this.expectedType,i.type))return null}else e.omitTypeAnnotations||(i=new ht(a,[i]));else e.omitTypeAnnotations||(i=new lt(a,[i]))}if(!(i instanceof at)&amp;&amp;function t(e){if(e instanceof yt)return t(e.boundExpression);if(e instanceof gt&amp;&amp;&quot;error&quot;===e.name)return!1;if(e instanceof rt)return!1;var r=e instanceof ht||e instanceof lt||e instanceof ut,n=!0;return e.eachChild(function(e){n=r?n&amp;&amp;t(e):n&amp;&amp;e instanceof at}),!!n&amp;&amp;(mt(e)&amp;&amp;vt(e,[&quot;zoom&quot;,&quot;heatmap-density&quot;,&quot;line-progress&quot;,&quot;is-supported-script&quot;]))}(i)){var s=new dt;try{i=new at(i.type,i.evaluate(s))}catch(t){return this.error(t.message),null}}return i}return this.error('Unknown expression &quot;'+r+'&quot;. If you wanted a literal array, use [&quot;literal&quot;, [...]].',0)}return void 0===t?this.error(&quot;'undefined' value invalid. Use null instead.&quot;):&quot;object&quot;==typeof t?this.error('Bare objects invalid. Use [&quot;literal&quot;, {...}] instead.'):this.error(&quot;Expected an array, but found &quot;+typeof t+&quot; instead.&quot;)},xt.prototype.concat=function(t,e,r){var n=&quot;number&quot;==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new xt(this.registry,n,e||null,i,this.errors)},xt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- &gt;0;)e[r]=arguments[r+1];var n=&quot;&quot;+this.key+e.map(function(t){return&quot;[&quot;+t+&quot;]&quot;}).join(&quot;&quot;);this.errors.push(new N(n,t))},xt.prototype.checkSubtype=function(t,e){var r=K(t,e);return r&amp;&amp;this.error(r),r};var _t=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n&lt;i.length;n+=1){var a=i[n],o=a[0],s=a[1];this.labels.push(o),this.outputs.push(s)}};function wt(t,e,r){return t*(1-r)+e*r}_t.parse=function(t,e){var r=t[1],n=t.slice(2);if(t.length-1&lt;4)return e.error(&quot;Expected at least 4 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if((t.length-1)%2!=0)return e.error(&quot;Expected an even number of arguments.&quot;);if(!(r=e.parse(r,1,U)))return null;var i=[],a=null;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(a=e.expectedType),n.unshift(-1/0);for(var o=0;o&lt;n.length;o+=2){var s=n[o],l=n[o+1],c=o+1,u=o+2;if(&quot;number&quot;!=typeof s)return e.error('Input/output pairs for &quot;step&quot; expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(i.length&amp;&amp;i[i.length-1][0]&gt;=s)return e.error('Input/output pairs for &quot;step&quot; expressions must be arranged with input values in strictly ascending order.',c);var f=e.parse(l,u,a);if(!f)return null;a=a||f.type,i.push([s,f])}return new _t(a,r,i)},_t.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n&lt;=e[0])return r[0].evaluate(t);var i=e.length;return n&gt;=e[i-1]?r[i-1].evaluate(t):r[bt(e,n)].evaluate(t)},_t.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e&lt;r.length;e+=1)t(r[e])},_t.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},_t.prototype.serialize=function(){for(var t=[&quot;step&quot;,this.input.serialize()],e=0;e&lt;this.labels.length;e++)e&gt;0&amp;&amp;t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var kt=Object.freeze({number:wt,color:function(t,e,r){return new tt(wt(t.r,e.r,r),wt(t.g,e.g,r),wt(t.b,e.b,r),wt(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return wt(t,e[n],r)})}}),Mt=function(t,e,r,n){this.type=t,this.interpolation=e,this.input=r,this.labels=[],this.outputs=[];for(var i=0,a=n;i&lt;a.length;i+=1){var o=a[i],s=o[0],l=o[1];this.labels.push(s),this.outputs.push(l)}};function At(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}Mt.interpolationFactor=function(t,e,r,n){var i=0;if(&quot;exponential&quot;===t.name)i=At(e,t.base,r,n);else if(&quot;linear&quot;===t.name)i=At(e,1,r,n);else if(&quot;cubic-bezier&quot;===t.name){var o=t.controlPoints;i=new a(o[0],o[1],o[2],o[3]).solve(At(e,1,r,n))}return i},Mt.parse=function(t,e){var r=t[1],n=t[2],i=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error(&quot;Expected an interpolation type expression.&quot;,1);if(&quot;linear&quot;===r[0])r={name:&quot;linear&quot;};else if(&quot;exponential&quot;===r[0]){var a=r[1];if(&quot;number&quot;!=typeof a)return e.error(&quot;Exponential interpolation requires a numeric base.&quot;,1,1);r={name:&quot;exponential&quot;,base:a}}else{if(&quot;cubic-bezier&quot;!==r[0])return e.error(&quot;Unknown interpolation type &quot;+String(r[0]),1,0);var o=r.slice(1);if(4!==o.length||o.some(function(t){return&quot;number&quot;!=typeof t||t&lt;0||t&gt;1}))return e.error(&quot;Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.&quot;,1);r={name:&quot;cubic-bezier&quot;,controlPoints:o}}if(t.length-1&lt;4)return e.error(&quot;Expected at least 4 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if((t.length-1)%2!=0)return e.error(&quot;Expected an even number of arguments.&quot;);if(!(n=e.parse(n,2,U)))return null;var s=[],l=null;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(l=e.expectedType);for(var c=0;c&lt;i.length;c+=2){var u=i[c],f=i[c+1],h=c+3,p=c+4;if(&quot;number&quot;!=typeof u)return e.error('Input/output pairs for &quot;interpolate&quot; expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(s.length&amp;&amp;s[s.length-1][0]&gt;=u)return e.error('Input/output pairs for &quot;interpolate&quot; expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(f,p,l);if(!d)return null;l=l||d.type,s.push([u,d])}return&quot;number&quot;===l.kind||&quot;color&quot;===l.kind||&quot;array&quot;===l.kind&amp;&amp;&quot;number&quot;===l.itemType.kind&amp;&amp;&quot;number&quot;==typeof l.N?new Mt(l,r,n,s):e.error(&quot;Type &quot;+$(l)+&quot; is not interpolatable.&quot;)},Mt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n&lt;=e[0])return r[0].evaluate(t);var i=e.length;if(n&gt;=e[i-1])return r[i-1].evaluate(t);var a=bt(e,n),o=e[a],s=e[a+1],l=Mt.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return kt[this.type.kind.toLowerCase()](c,u,l)},Mt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e&lt;r.length;e+=1)t(r[e])},Mt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},Mt.prototype.serialize=function(){for(var t=[&quot;interpolate&quot;,&quot;linear&quot;===this.interpolation.name?[&quot;linear&quot;]:&quot;exponential&quot;===this.interpolation.name?1===this.interpolation.base?[&quot;linear&quot;]:[&quot;exponential&quot;,this.interpolation.base]:[&quot;cubic-bezier&quot;].concat(this.interpolation.controlPoints),this.input.serialize()],e=0;e&lt;this.labels.length;e++)t.push(this.labels[e],this.outputs[e].serialize());return t};var Tt=function(t,e){this.type=t,this.args=e};Tt.parse=function(t,e){if(t.length&lt;2)return e.error(&quot;Expectected at least one argument.&quot;);var r=null,n=e.expectedType;n&amp;&amp;&quot;value&quot;!==n.kind&amp;&amp;(r=n);for(var i=[],a=0,o=t.slice(1);a&lt;o.length;a+=1){var s=o[a],l=e.parse(s,1+i.length,r,void 0,{omitTypeAnnotations:!0});if(!l)return null;r=r||l.type,i.push(l)}var c=n&amp;&amp;i.some(function(t){return K(n,t.type)});return new Tt(c?Y:r,i)},Tt.prototype.evaluate=function(t){for(var e=null,r=0,n=this.args;r&lt;n.length&amp;&amp;null===(e=n[r].evaluate(t));r+=1);return e},Tt.prototype.eachChild=function(t){this.args.forEach(t)},Tt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},Tt.prototype.serialize=function(){var t=[&quot;coalesce&quot;];return this.eachChild(function(e){t.push(e.serialize())}),t};var St=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};St.prototype.evaluate=function(t){return this.result.evaluate(t)},St.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e&lt;r.length;e+=1)t(r[e][1]);t(this.result)},St.parse=function(t,e){if(t.length&lt;4)return e.error(&quot;Expected at least 3 arguments, but found &quot;+(t.length-1)+&quot; instead.&quot;);for(var r=[],n=1;n&lt;t.length-1;n+=2){var i=t[n];if(&quot;string&quot;!=typeof i)return e.error(&quot;Expected string, but found &quot;+typeof i+&quot; instead.&quot;,n);if(/[^a-zA-Z0-9_]/.test(i))return e.error(&quot;Variable names must contain only alphanumeric characters or '_'.&quot;,n);var a=e.parse(t[n+1],n+1);if(!a)return null;r.push([i,a])}var o=e.parse(t[t.length-1],t.length-1,void 0,r);return o?new St(r,o):null},St.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},St.prototype.serialize=function(){for(var t=[&quot;let&quot;],e=0,r=this.bindings;e&lt;r.length;e+=1){var n=r[e],i=n[0],a=n[1];t.push(i,a.serialize())}return t.push(this.result.serialize()),t};var Et=function(t,e,r){this.type=t,this.index=e,this.input=r};Et.parse=function(t,e){if(3!==t.length)return e.error(&quot;Expected 2 arguments, but found &quot;+(t.length-1)+&quot; instead.&quot;);var r=e.parse(t[1],1,U),n=e.parse(t[2],2,Z(e.expectedType||Y));if(!r||!n)return null;var i=n.type;return new Et(i.itemType,r,n)},Et.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e&lt;0)throw new ot(&quot;Array index out of bounds: &quot;+e+&quot; &lt; 0.&quot;);if(e&gt;=r.length)throw new ot(&quot;Array index out of bounds: &quot;+e+&quot; &gt; &quot;+(r.length-1)+&quot;.&quot;);if(e!==Math.floor(e))throw new ot(&quot;Array index must be an integer, but found &quot;+e+&quot; instead.&quot;);return r[e]},Et.prototype.eachChild=function(t){t(this.index),t(this.input)},Et.prototype.possibleOutputs=function(){return[void 0]},Et.prototype.serialize=function(){return[&quot;at&quot;,this.index.serialize(),this.input.serialize()]};var Ct=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Ct.parse=function(t,e){if(t.length&lt;5)return e.error(&quot;Expected at least 4 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if(t.length%2!=1)return e.error(&quot;Expected an even number of arguments.&quot;);var r,n;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(n=e.expectedType);for(var i={},a=[],o=2;o&lt;t.length-1;o+=2){var s=t[o],l=t[o+1];Array.isArray(s)||(s=[s]);var c=e.concat(o);if(0===s.length)return c.error(&quot;Expected at least one branch label.&quot;);for(var u=0,f=s;u&lt;f.length;u+=1){var h=f[u];if(&quot;number&quot;!=typeof h&amp;&amp;&quot;string&quot;!=typeof h)return c.error(&quot;Branch labels must be numbers or strings.&quot;);if(&quot;number&quot;==typeof h&amp;&amp;Math.abs(h)&gt;Number.MAX_SAFE_INTEGER)return c.error(&quot;Branch labels must be integers no larger than &quot;+Number.MAX_SAFE_INTEGER+&quot;.&quot;);if(&quot;number&quot;==typeof h&amp;&amp;Math.floor(h)!==h)return c.error(&quot;Numeric branch labels must be integer values.&quot;);if(r){if(c.checkSubtype(r,it(h)))return null}else r=it(h);if(void 0!==i[String(h)])return c.error(&quot;Branch labels must be unique.&quot;);i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,r);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?new Ct(r,n,d,i,a,g):null},Ct.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Ct.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Ct.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Ct.prototype.serialize=function(){for(var t=this,e=[&quot;match&quot;,this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i&lt;a.length;i+=1){var o=a[i],s=n[t.cases[o]];void 0===s?(n[t.cases[o]]=r.length,r.push([t.cases[o],[o]])):r[s][1].push(o)}for(var l=function(e){return&quot;number&quot;===t.input.type.kind?Number(e):e},c=0,u=r;c&lt;u.length;c+=1){var f=u[c],h=f[0],p=f[1];1===p.length?e.push(l(p[0])):e.push(p.map(l)),e.push(t.outputs[h].serialize())}return e.push(this.otherwise.serialize()),e};var Lt=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function zt(t){return&quot;string&quot;===t.kind||&quot;number&quot;===t.kind||&quot;boolean&quot;===t.kind||&quot;null&quot;===t.kind}function Pt(t,e){return function(){function r(t,e,r){this.type=H,this.lhs=t,this.rhs=e,this.collator=r}return r.parse=function(t,e){if(3!==t.length&amp;&amp;4!==t.length)return e.error(&quot;Expected two or three arguments.&quot;);var n=e.parse(t[1],1,Y);if(!n)return null;var i=e.parse(t[2],2,Y);if(!i)return null;if(!zt(n.type)&amp;&amp;!zt(i.type))return e.error(&quot;Expected at least one argument to be a string, number, boolean, or null, but found (&quot;+$(n.type)+&quot;, &quot;+$(i.type)+&quot;) instead.&quot;);if(n.type.kind!==i.type.kind&amp;&amp;&quot;value&quot;!==n.type.kind&amp;&amp;&quot;value&quot;!==i.type.kind)return e.error(&quot;Cannot compare &quot;+$(n.type)+&quot; and &quot;+$(i.type)+&quot;.&quot;);var a=null;if(4===t.length){if(&quot;string&quot;!==n.type.kind&amp;&amp;&quot;string&quot;!==i.type.kind)return e.error(&quot;Cannot use collator to compare non-string types.&quot;);if(!(a=e.parse(t[3],3,X)))return null}return new r(n,i,a)},r.prototype.evaluate=function(t){var r=this.collator?0===this.collator.evaluate(t).compare(this.lhs.evaluate(t),this.rhs.evaluate(t)):this.lhs.evaluate(t)===this.rhs.evaluate(t);return e?!r:r},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&amp;&amp;t(this.collator)},r.prototype.possibleOutputs=function(){return[!0,!1]},r.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},r}()}Lt.parse=function(t,e){if(t.length&lt;4)return e.error(&quot;Expected at least 3 arguments, but found only &quot;+(t.length-1)+&quot;.&quot;);if(t.length%2!=0)return e.error(&quot;Expected an odd number of arguments.&quot;);var r;e.expectedType&amp;&amp;&quot;value&quot;!==e.expectedType.kind&amp;&amp;(r=e.expectedType);for(var n=[],i=1;i&lt;t.length-1;i+=2){var a=e.parse(t[i],i,H);if(!a)return null;var o=e.parse(t[i+1],i+1,r);if(!o)return null;n.push([a,o]),r=r||o.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Lt(r,n,s):null},Lt.prototype.evaluate=function(t){for(var e=0,r=this.branches;e&lt;r.length;e+=1){var n=r[e],i=n[0],a=n[1];if(i.evaluate(t))return a.evaluate(t)}return this.otherwise.evaluate(t)},Lt.prototype.eachChild=function(t){for(var e=0,r=this.branches;e&lt;r.length;e+=1){var n=r[e],i=n[0],a=n[1];t(i),t(a)}t(this.otherwise)},Lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Lt.prototype.serialize=function(){var t=[&quot;case&quot;];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ot=Pt(&quot;==&quot;,!1),It=Pt(&quot;!=&quot;,!0),Dt=function(t){this.type=U,this.input=t};Dt.parse=function(t,e){if(2!==t.length)return e.error(&quot;Expected 1 argument, but found &quot;+(t.length-1)+&quot; instead.&quot;);var r=e.parse(t[1],1);return r?&quot;array&quot;!==r.type.kind&amp;&amp;&quot;string&quot;!==r.type.kind&amp;&amp;&quot;value&quot;!==r.type.kind?e.error(&quot;Expected argument of type string or array, but found &quot;+$(r.type)+&quot; instead.&quot;):new Dt(r):null},Dt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(&quot;string&quot;==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ot(&quot;Expected value to be of type string or array, but found &quot;+$(it(e))+&quot; instead.&quot;)},Dt.prototype.eachChild=function(t){t(this.input)},Dt.prototype.possibleOutputs=function(){return[void 0]},Dt.prototype.serialize=function(){var t=[&quot;length&quot;];return this.eachChild(function(e){t.push(e.serialize())}),t};var Rt={&quot;==&quot;:Ot,&quot;!=&quot;:It,array:ut,at:Et,boolean:lt,case:Lt,coalesce:Tt,collator:rt,interpolate:Mt,length:Dt,let:St,literal:at,match:Ct,number:lt,object:lt,step:_t,string:lt,&quot;to-color&quot;:ht,&quot;to-number&quot;:ht,var:yt};function Bt(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=nt(r,n,i,o);if(s)throw new ot(s);return new tt(r/255*o,n/255*o,i/255*o,o)}function Ft(t,e){return t in e}function Nt(t,e){var r=e[t];return void 0===r?null:r}function jt(t,e){var r=e[0],n=e[1];return r.evaluate(t)&lt;n.evaluate(t)}function Vt(t,e){var r=e[0],n=e[1];return r.evaluate(t)&gt;n.evaluate(t)}function Ut(t,e){var r=e[0],n=e[1];return r.evaluate(t)&lt;=n.evaluate(t)}function qt(t,e){var r=e[0],n=e[1];return r.evaluate(t)&gt;=n.evaluate(t)}function Ht(t){return{type:t}}function Gt(t){return{result:&quot;success&quot;,value:t}}function Wt(t){return{result:&quot;error&quot;,value:t}}gt.register(Rt,{error:[{kind:&quot;error&quot;},[q],function(t,e){var r=e[0];throw new ot(r.evaluate(t))}],typeof:[q,[Y],function(t,e){return $(it(e[0].evaluate(t)))}],&quot;to-string&quot;:[q,[Y],function(t,e){var r=e[0],n=typeof(r=r.evaluate(t));return null===r?&quot;&quot;:&quot;string&quot;===n||&quot;number&quot;===n||&quot;boolean&quot;===n?String(r):r instanceof tt?r.toString():JSON.stringify(r)}],&quot;to-boolean&quot;:[H,[Y],function(t,e){var r=e[0];return Boolean(r.evaluate(t))}],&quot;to-rgba&quot;:[Z(U,4),[G],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[G,[U,U,U],Bt],rgba:[G,[U,U,U,U],Bt],has:{type:H,overloads:[[[q],function(t,e){return Ft(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Ft(r.evaluate(t),n.evaluate(t))}]]},get:{type:Y,overloads:[[[q],function(t,e){return Nt(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Nt(r.evaluate(t),n.evaluate(t))}]]},properties:[W,[],function(t){return t.properties()}],&quot;geometry-type&quot;:[q,[],function(t){return t.geometryType()}],id:[Y,[],function(t){return t.id()}],zoom:[U,[],function(t){return t.globals.zoom}],&quot;heatmap-density&quot;:[U,[],function(t){return t.globals.heatmapDensity||0}],&quot;line-progress&quot;:[U,[],function(t){return t.globals.lineProgress||0}],&quot;+&quot;:[U,Ht(U),function(t,e){for(var r=0,n=0,i=e;n&lt;i.length;n+=1)r+=i[n].evaluate(t);return r}],&quot;*&quot;:[U,Ht(U),function(t,e){for(var r=1,n=0,i=e;n&lt;i.length;n+=1)r*=i[n].evaluate(t);return r}],&quot;-&quot;:{type:U,overloads:[[[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[U],function(t,e){return-e[0].evaluate(t)}]]},&quot;/&quot;:[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],&quot;%&quot;:[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[U,[],function(){return Math.LN2}],pi:[U,[],function(){return Math.PI}],e:[U,[],function(){return Math.E}],&quot;^&quot;:[U,[U,U],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[U,[U],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[U,[U],function(t,e){var r=e[0];return Math.log10(r.evaluate(t))}],ln:[U,[U],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[U,[U],function(t,e){var r=e[0];return Math.log2(r.evaluate(t))}],sin:[U,[U],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[U,[U],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[U,[U],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[U,[U],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[U,[U],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[U,[U],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[U,Ht(U),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[U,Ht(U),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[U,[U],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[U,[U],function(t,e){var r=e[0].evaluate(t);return r&lt;0?-Math.round(-r):Math.round(r)}],floor:[U,[U],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[U,[U],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],&quot;filter-==&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],&quot;filter-id-==&quot;:[H,[Y],function(t,e){var r=e[0];return t.id()===r.value}],&quot;filter-type-==&quot;:[H,[q],function(t,e){var r=e[0];return t.geometryType()===r.value}],&quot;filter-&lt;&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&lt;a}],&quot;filter-id-&lt;&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&lt;i}],&quot;filter-&gt;&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&gt;a}],&quot;filter-id-&gt;&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&gt;i}],&quot;filter-&lt;=&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&lt;=a}],&quot;filter-id-&lt;=&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&lt;=i}],&quot;filter-&gt;=&quot;:[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&amp;&amp;i&gt;=a}],&quot;filter-id-&gt;=&quot;:[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&amp;&amp;n&gt;=i}],&quot;filter-has&quot;:[H,[Y],function(t,e){return e[0].value in t.properties()}],&quot;filter-has-id&quot;:[H,[],function(t){return null!==t.id()}],&quot;filter-type-in&quot;:[H,[Z(q)],function(t,e){return e[0].value.indexOf(t.geometryType())&gt;=0}],&quot;filter-id-in&quot;:[H,[Z(Y)],function(t,e){return e[0].value.indexOf(t.id())&gt;=0}],&quot;filter-in-small&quot;:[H,[q,Z(Y)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])&gt;=0}],&quot;filter-in-large&quot;:[H,[q,Z(Y)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r&lt;=n;){var i=r+n&gt;&gt;1;if(e[i]===t)return!0;e[i]&gt;t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],&quot;&gt;&quot;:{type:H,overloads:[[[U,U],Vt],[[q,q],Vt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&gt;0}]]},&quot;&lt;&quot;:{type:H,overloads:[[[U,U],jt],[[q,q],jt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&lt;0}]]},&quot;&gt;=&quot;:{type:H,overloads:[[[U,U],qt],[[q,q],qt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&gt;=0}]]},&quot;&lt;=&quot;:{type:H,overloads:[[[U,U],Ut],[[q,q],Ut],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))&lt;=0}]]},all:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&amp;&amp;n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r&lt;n.length;r+=1)if(!n[r].evaluate(t))return!1;return!0}]]},any:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r&lt;n.length;r+=1)if(n[r].evaluate(t))return!0;return!1}]]},&quot;!&quot;:[H,[H],function(t,e){return!e[0].evaluate(t)}],&quot;is-supported-script&quot;:[H,[q],function(t,e){var r=e[0],n=t.globals&amp;&amp;t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[q,[q],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[q,[q],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[q,Ht(q),function(t,e){return e.map(function(e){return e.evaluate(t)}).join(&quot;&quot;)}],&quot;resolved-locale&quot;:[q,[X],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Yt=.95047,Xt=1,Zt=1.08883,$t=4/29,Jt=6/29,Kt=3*Jt*Jt,Qt=Jt*Jt*Jt,te=Math.PI/180,ee=180/Math.PI;function re(t){return t&gt;Qt?Math.pow(t,1/3):t/Kt+$t}function ne(t){return t&gt;Jt?t*t*t:Kt*(t-$t)}function ie(t){return 255*(t&lt;=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ae(t){return(t/=255)&lt;=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oe(t){var e=ae(t.r),r=ae(t.g),n=ae(t.b),i=re((.4124564*e+.3575761*r+.1804375*n)/Yt),a=re((.2126729*e+.7151522*r+.072175*n)/Xt);return{l:116*a-16,a:500*(i-a),b:200*(a-re((.0193339*e+.119192*r+.9503041*n)/Zt)),alpha:t.a}}function se(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Xt*ne(e),r=Yt*ne(r),n=Zt*ne(n),new tt(ie(3.2404542*r-1.5371385*e-.4985314*n),ie(-.969266*r+1.8760108*e+.041556*n),ie(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var le={forward:oe,reverse:se,interpolate:function(t,e,r){return{l:wt(t.l,e.l,r),a:wt(t.a,e.a,r),b:wt(t.b,e.b,r),alpha:wt(t.alpha,e.alpha,r)}}},ce={forward:function(t){var e=oe(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*ee;return{h:a&lt;0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*te,r=t.c;return se({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n&gt;180||n&lt;-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:wt(t.c,e.c,r),l:wt(t.l,e.l,r),alpha:wt(t.alpha,e.alpha,r)}}},ue=Object.freeze({lab:le,hcl:ce});function fe(t){return t instanceof Number?&quot;number&quot;:t instanceof String?&quot;string&quot;:t instanceof Boolean?&quot;boolean&quot;:Array.isArray(t)?&quot;array&quot;:null===t?&quot;null&quot;:typeof t}function he(t){return&quot;object&quot;==typeof t&amp;&amp;null!==t&amp;&amp;!Array.isArray(t)}function pe(t){return t}function de(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function ge(t,e,r,n,i){return de(typeof r===i?n[r]:void 0,t.default,e.default)}function me(t,e,r){if(&quot;number&quot;!==fe(r))return de(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r&lt;=t.stops[0][0])return t.stops[0][1];if(r&gt;=t.stops[n-1][0])return t.stops[n-1][1];var i=xe(t.stops,r);return t.stops[i][1]}function ve(t,e,r){var n=void 0!==t.base?t.base:1;if(&quot;number&quot;!==fe(r))return de(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r&lt;=t.stops[0][0])return t.stops[0][1];if(r&gt;=t.stops[i-1][0])return t.stops[i-1][1];var a=xe(t.stops,r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],c=kt[e.type]||pe;if(t.colorSpace&amp;&amp;&quot;rgb&quot;!==t.colorSpace){var u=ue[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),o))}}return&quot;function&quot;==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&amp;&amp;void 0!==n)return c(r,n,o)}}:c(s,l,o)}function ye(t,e,r){return&quot;color&quot;===e.type?r=tt.parse(r):fe(r)===e.type||&quot;enum&quot;===e.type&amp;&amp;e.values[r]||(r=void 0),de(r,t.default,e.default)}function xe(t,e){for(var r,n,i=0,a=t.length-1,o=0;i&lt;=a;){if(r=t[o=Math.floor((i+a)/2)][0],n=t[o+1][0],e===r||e&gt;r&amp;&amp;e&lt;n)return o;r&lt;e?i=o+1:r&gt;e&amp;&amp;(a=o-1)}return Math.max(o-1,0)}var be=function(t,e){var r;this.expression=t,this._warningHistory={},this._defaultValue=&quot;color&quot;===(r=e).type&amp;&amp;he(r.default)?new tt(0,0,0,0):&quot;color&quot;===r.type?tt.parse(r.default)||null:void 0===r.default?null:r.default,&quot;enum&quot;===e.type&amp;&amp;(this._enumValues=e.values)};function _e(t){return Array.isArray(t)&amp;&amp;t.length&gt;0&amp;&amp;&quot;string&quot;==typeof t[0]&amp;&amp;t[0]in Rt}function we(t,e){var r=new xt(Rt,[],function(t){var e={color:G,string:q,number:U,enum:q,boolean:H};return&quot;array&quot;===t.type?Z(e[t.value]||Y,t.length):e[t.type]||null}(e)),n=r.parse(t);return n?Gt(new be(n,e)):Wt(r.errors)}be.prototype.evaluateWithoutErrorHandling=function(t,e){return this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)},be.prototype.evaluate=function(t,e){this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e;try{var r=this.expression.evaluate(this._evaluator);if(null==r)return this._defaultValue;if(this._enumValues&amp;&amp;!(r in this._enumValues))throw new ot(&quot;Expected value to be one of &quot;+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(&quot;, &quot;)+&quot;, but found &quot;+JSON.stringify(r)+&quot; instead.&quot;);return r}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,&quot;undefined&quot;!=typeof console&amp;&amp;console.warn(t.message)),this._defaultValue}};var ke=function(t,e){this.kind=t,this._styleExpression=e};ke.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},ke.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)};var Me=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,r instanceof Mt&amp;&amp;(this._interpolationType=r.interpolation)};function Ae(t,e){if(&quot;error&quot;===(t=we(t,e)).result)return t;var r=t.value.expression,n=mt(r);if(!n&amp;&amp;!e[&quot;property-function&quot;])return Wt([new N(&quot;&quot;,&quot;property expressions not supported&quot;)]);var i=vt(r,[&quot;zoom&quot;]);if(!i&amp;&amp;!1===e[&quot;zoom-function&quot;])return Wt([new N(&quot;&quot;,&quot;zoom expressions not supported&quot;)]);var a=function t(e){var r=null;if(e instanceof St)r=t(e.result);else if(e instanceof Tt)for(var n=0,i=e.args;n&lt;i.length;n+=1){var a=i[n];if(r=t(a))break}else(e instanceof _t||e instanceof Mt)&amp;&amp;e.input instanceof gt&amp;&amp;&quot;zoom&quot;===e.input.name&amp;&amp;(r=e);return r instanceof N?r:(e.eachChild(function(e){var n=t(e);n instanceof N?r=n:!r&amp;&amp;n?r=new N(&quot;&quot;,'&quot;zoom&quot; expression may only be used as input to a top-level &quot;step&quot; or &quot;interpolate&quot; expression.'):r&amp;&amp;n&amp;&amp;r!==n&amp;&amp;(r=new N(&quot;&quot;,'Only one zoom-based &quot;step&quot; or &quot;interpolate&quot; subexpression may be used in an expression.'))}),r)}(r);return a||i?a instanceof N?Wt([a]):a instanceof Mt&amp;&amp;&quot;piecewise-constant&quot;===e.function?Wt([new N(&quot;&quot;,'&quot;interpolate&quot; expressions cannot be used with this property')]):Gt(a?new Me(n?&quot;camera&quot;:&quot;composite&quot;,t.value,a):new ke(n?&quot;constant&quot;:&quot;source&quot;,t.value)):Wt([new N(&quot;&quot;,'&quot;zoom&quot; expression may only be used as input to a top-level &quot;step&quot; or &quot;interpolate&quot; expression.')])}Me.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Me.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)},Me.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?Mt.interpolationFactor(this._interpolationType,t,e,r):0};var Te=function(t,e){this._parameters=t,this._specification=e,R(this,function t(e,r){var n,i,a,o=&quot;color&quot;===r.type,s=e.stops&amp;&amp;&quot;object&quot;==typeof e.stops[0][0],l=s||void 0!==e.property,c=s||!l,u=e.type||(&quot;interpolated&quot;===r.function?&quot;exponential&quot;:&quot;interval&quot;);if(o&amp;&amp;((e=R({},e)).stops&amp;&amp;(e.stops=e.stops.map(function(t){return[t[0],tt.parse(t[1])]})),e.default?e.default=tt.parse(e.default):e.default=tt.parse(r.default)),e.colorSpace&amp;&amp;&quot;rgb&quot;!==e.colorSpace&amp;&amp;!ue[e.colorSpace])throw new Error(&quot;Unknown color space: &quot;+e.colorSpace);if(&quot;exponential&quot;===u)n=ve;else if(&quot;interval&quot;===u)n=me;else if(&quot;categorical&quot;===u){n=ge,i=Object.create(null);for(var f=0,h=e.stops;f&lt;h.length;f+=1){var p=h[f];i[p[0]]=p[1]}a=typeof e.stops[0][0]}else{if(&quot;identity&quot;!==u)throw new Error('Unknown function type &quot;'+u+'&quot;');n=ye}if(s){for(var d={},g=[],m=0;m&lt;e.stops.length;m++){var v=e.stops[m],y=v[0].zoom;void 0===d[y]&amp;&amp;(d[y]={zoom:y,type:e.type,property:e.property,default:e.default,stops:[]},g.push(y)),d[y].stops.push([v[0].value,v[1]])}for(var x=[],b=0,_=g;b&lt;_.length;b+=1){var w=_[b];x.push([d[w].zoom,t(d[w],r)])}return{kind:&quot;composite&quot;,interpolationFactor:Mt.interpolationFactor.bind(void 0,{name:&quot;linear&quot;}),zoomStops:x.map(function(t){return t[0]}),evaluate:function(t,n){var i=t.zoom;return ve({stops:x,base:e.base},r,i).evaluate(i,n)}}}return c?{kind:&quot;camera&quot;,interpolationFactor:&quot;exponential&quot;===u?Mt.interpolationFactor.bind(void 0,{name:&quot;exponential&quot;,base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var o=t.zoom;return n(e,r,o,i,a)}}:{kind:&quot;source&quot;,evaluate:function(t,o){var s=o&amp;&amp;o.properties?o.properties[e.property]:void 0;return void 0===s?de(e.default,r.default):n(e,r,s,i,a)}}}(this._parameters,this._specification))};function Se(t,e){if(he(t))return new Te(t,e);if(_e(t)){var r=Ae(t,e);if(&quot;error&quot;===r.result)throw new Error(r.value.map(function(t){return t.key+&quot;: &quot;+t.message}).join(&quot;, &quot;));return r.value}var n=t;return&quot;string&quot;==typeof t&amp;&amp;&quot;color&quot;===e.type&amp;&amp;(n=tt.parse(t)),{kind:&quot;constant&quot;,evaluate:function(){return n}}}function Ee(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},a=t.style,o=t.styleSpec,s=[],l=fe(r);if(&quot;object&quot;!==l)return[new I(e,r,&quot;object expected, &quot;+l+&quot; found&quot;)];for(var c in r){var u=c.split(&quot;.&quot;)[0],f=n[u]||n[&quot;*&quot;],h=void 0;if(i[u])h=i[u];else if(n[u])h=Ke;else if(i[&quot;*&quot;])h=i[&quot;*&quot;];else{if(!n[&quot;*&quot;]){s.push(new I(e,r[c],'unknown property &quot;'+c+'&quot;'));continue}h=Ke}s=s.concat(h({key:(e?e+&quot;.&quot;:e)+c,value:r[c],valueSpec:f,style:a,styleSpec:o,object:r,objectKey:c},r))}for(var p in n)i[p]||n[p].required&amp;&amp;void 0===n[p].default&amp;&amp;void 0===r[p]&amp;&amp;s.push(new I(e,r,'missing required property &quot;'+p+'&quot;'));return s}function Ce(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,a=t.key,o=t.arrayElementValidator||Ke;if(&quot;array&quot;!==fe(e))return[new I(a,e,&quot;array expected, &quot;+fe(e)+&quot; found&quot;)];if(r.length&amp;&amp;e.length!==r.length)return[new I(a,e,&quot;array length &quot;+r.length+&quot; expected, length &quot;+e.length+&quot; found&quot;)];if(r[&quot;min-length&quot;]&amp;&amp;e.length&lt;r[&quot;min-length&quot;])return[new I(a,e,&quot;array length at least &quot;+r[&quot;min-length&quot;]+&quot; expected, length &quot;+e.length+&quot; found&quot;)];var s={type:r.value};i.$version&lt;7&amp;&amp;(s.function=r.function),&quot;object&quot;===fe(r.value)&amp;&amp;(s=r.value);for(var l=[],c=0;c&lt;e.length;c++)l=l.concat(o({array:e,arrayIndex:c,value:e[c],valueSpec:s,style:n,styleSpec:i,key:a+&quot;[&quot;+c+&quot;]&quot;}));return l}function Le(t){var e=t.key,r=t.value,n=t.valueSpec,i=fe(r);return&quot;number&quot;!==i?[new I(e,r,&quot;number expected, &quot;+i+&quot; found&quot;)]:&quot;minimum&quot;in n&amp;&amp;r&lt;n.minimum?[new I(e,r,r+&quot; is less than the minimum value &quot;+n.minimum)]:&quot;maximum&quot;in n&amp;&amp;r&gt;n.maximum?[new I(e,r,r+&quot; is greater than the maximum value &quot;+n.maximum)]:[]}function ze(t){var e,r,n,i=t.valueSpec,a=B(t.value.type),o={},s=&quot;categorical&quot;!==a&amp;&amp;void 0===t.value.property,l=!s,c=&quot;array&quot;===fe(t.value.stops)&amp;&amp;&quot;array&quot;===fe(t.value.stops[0])&amp;&amp;&quot;object&quot;===fe(t.value.stops[0][0]),u=Ee({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if(&quot;identity&quot;===a)return[new I(t.key,t.value,'identity function may not have a &quot;stops&quot; property')];var e=[],r=t.value;return e=e.concat(Ce({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),&quot;array&quot;===fe(r)&amp;&amp;0===r.length&amp;&amp;e.push(new I(t.key,r,&quot;array must have at least one stop&quot;)),e},default:function(t){return Ke({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return&quot;identity&quot;===a&amp;&amp;s&amp;&amp;u.push(new I(t.key,t.value,'missing required property &quot;property&quot;')),&quot;identity&quot;===a||t.value.stops||u.push(new I(t.key,t.value,'missing required property &quot;stops&quot;')),&quot;exponential&quot;===a&amp;&amp;&quot;piecewise-constant&quot;===t.valueSpec.function&amp;&amp;u.push(new I(t.key,t.value,&quot;exponential functions not supported&quot;)),t.styleSpec.$version&gt;=8&amp;&amp;(l&amp;&amp;!t.valueSpec[&quot;property-function&quot;]?u.push(new I(t.key,t.value,&quot;property functions not supported&quot;)):s&amp;&amp;!t.valueSpec[&quot;zoom-function&quot;]&amp;&amp;&quot;heatmap-color&quot;!==t.objectKey&amp;&amp;&quot;line-gradient&quot;!==t.objectKey&amp;&amp;u.push(new I(t.key,t.value,&quot;zoom functions not supported&quot;))),&quot;categorical&quot;!==a&amp;&amp;!c||void 0!==t.value.property||u.push(new I(t.key,t.value,'&quot;property&quot; property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(&quot;array&quot;!==fe(a))return[new I(s,a,&quot;array expected, &quot;+fe(a)+&quot; found&quot;)];if(2!==a.length)return[new I(s,a,&quot;array length 2 expected, length &quot;+a.length+&quot; found&quot;)];if(c){if(&quot;object&quot;!==fe(a[0]))return[new I(s,a,&quot;object expected, &quot;+fe(a[0])+&quot; found&quot;)];if(void 0===a[0].zoom)return[new I(s,a,&quot;object stop key must have zoom&quot;)];if(void 0===a[0].value)return[new I(s,a,&quot;object stop key must have value&quot;)];if(n&amp;&amp;n&gt;B(a[0].zoom))return[new I(s,a[0].zoom,&quot;stop zoom values must appear in ascending order&quot;)];B(a[0].zoom)!==n&amp;&amp;(n=B(a[0].zoom),r=void 0,o={}),e=e.concat(Ee({key:s+&quot;[0]&quot;,value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Le,value:h}}))}else e=e.concat(h({key:s+&quot;[0]&quot;,value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return e.concat(Ke({key:s+&quot;[1]&quot;,value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=fe(t.value),l=B(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new I(t.key,c,s+&quot; stop domain type must match previous stop domain type &quot;+e)]}else e=s;if(&quot;number&quot;!==s&amp;&amp;&quot;string&quot;!==s&amp;&amp;&quot;boolean&quot;!==s)return[new I(t.key,c,&quot;stop domain value must be a number, string, or boolean&quot;)];if(&quot;number&quot;!==s&amp;&amp;&quot;categorical&quot;!==a){var u=&quot;number expected, &quot;+s+&quot; found&quot;;return i[&quot;property-function&quot;]&amp;&amp;void 0===a&amp;&amp;(u+='\nIf you intended to use a categorical function, specify `&quot;type&quot;: &quot;categorical&quot;`.'),[new I(t.key,c,u)]}return&quot;categorical&quot;!==a||&quot;number&quot;!==s||isFinite(l)&amp;&amp;Math.floor(l)===l?&quot;categorical&quot;!==a&amp;&amp;&quot;number&quot;===s&amp;&amp;void 0!==r&amp;&amp;l&lt;r?[new I(t.key,c,&quot;stop domain values must appear in ascending order&quot;)]:(r=l,&quot;categorical&quot;===a&amp;&amp;l in o?[new I(t.key,c,&quot;stop domain values must be unique&quot;)]:(o[l]=!0,[])):[new I(t.key,c,&quot;integer expected, found &quot;+l)]}}function Pe(t){var e=(&quot;property&quot;===t.expressionContext?Ae:we)(F(t.value),t.valueSpec);return&quot;error&quot;===e.result?e.value.map(function(e){return new I(&quot;&quot;+t.key+e.key,t.value,e.message)}):&quot;property&quot;===t.expressionContext&amp;&amp;&quot;text-font&quot;===t.propertyKey&amp;&amp;-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new I(t.key,t.value,'Invalid data expression for &quot;text-font&quot;. Output values must be contained as literals within the expression.')]:[]}function Oe(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(B(r))&amp;&amp;i.push(new I(e,r,&quot;expected one of [&quot;+n.values.join(&quot;, &quot;)+&quot;], &quot;+JSON.stringify(r)+&quot; found&quot;)):-1===Object.keys(n.values).indexOf(B(r))&amp;&amp;i.push(new I(e,r,&quot;expected one of [&quot;+Object.keys(n.values).join(&quot;, &quot;)+&quot;], &quot;+JSON.stringify(r)+&quot; found&quot;)),i}function Ie(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case&quot;has&quot;:return t.length&gt;=2&amp;&amp;&quot;$id&quot;!==t[1]&amp;&amp;&quot;$type&quot;!==t[1];case&quot;in&quot;:case&quot;!in&quot;:case&quot;!has&quot;:case&quot;none&quot;:return!1;case&quot;==&quot;:case&quot;!=&quot;:case&quot;&gt;&quot;:case&quot;&gt;=&quot;:case&quot;&lt;&quot;:case&quot;&lt;=&quot;:return 3===t.length&amp;&amp;(Array.isArray(t[1])||Array.isArray(t[2]));case&quot;any&quot;:case&quot;all&quot;:for(var e=0,r=t.slice(1);e&lt;r.length;e+=1){var n=r[e];if(!Ie(n)&amp;&amp;&quot;boolean&quot;!=typeof n)return!1}return!0;default:return!0}}Te.deserialize=function(t){return new Te(t._parameters,t._specification)},Te.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var De={type:&quot;boolean&quot;,default:!1,function:!0,&quot;property-function&quot;:!0,&quot;zoom-function&quot;:!0};function Re(t){if(!t)return function(){return!0};Ie(t)||(t=Fe(t));var e=we(t,De);if(&quot;error&quot;===e.result)throw new Error(e.value.map(function(t){return t.key+&quot;: &quot;+t.message}).join(&quot;, &quot;));return function(t,r){return e.value.evaluate(t,r)}}function Be(t,e){return t&lt;e?-1:t&gt;e?1:0}function Fe(t){if(!t)return!0;var e,r=t[0];return t.length&lt;=1?&quot;any&quot;!==r:&quot;==&quot;===r?Ne(t[1],t[2],&quot;==&quot;):&quot;!=&quot;===r?Ue(Ne(t[1],t[2],&quot;==&quot;)):&quot;&lt;&quot;===r||&quot;&gt;&quot;===r||&quot;&lt;=&quot;===r||&quot;&gt;=&quot;===r?Ne(t[1],t[2],r):&quot;any&quot;===r?(e=t.slice(1),[&quot;any&quot;].concat(e.map(Fe))):&quot;all&quot;===r?[&quot;all&quot;].concat(t.slice(1).map(Fe)):&quot;none&quot;===r?[&quot;all&quot;].concat(t.slice(1).map(Fe).map(Ue)):&quot;in&quot;===r?je(t[1],t.slice(2)):&quot;!in&quot;===r?Ue(je(t[1],t.slice(2))):&quot;has&quot;===r?Ve(t[1]):&quot;!has&quot;!==r||Ue(Ve(t[1]))}function Ne(t,e,r){switch(t){case&quot;$type&quot;:return[&quot;filter-type-&quot;+r,e];case&quot;$id&quot;:return[&quot;filter-id-&quot;+r,e];default:return[&quot;filter-&quot;+r,t,e]}}function je(t,e){if(0===e.length)return!1;switch(t){case&quot;$type&quot;:return[&quot;filter-type-in&quot;,[&quot;literal&quot;,e]];case&quot;$id&quot;:return[&quot;filter-id-in&quot;,[&quot;literal&quot;,e]];default:return e.length&gt;200&amp;&amp;!e.some(function(t){return typeof t!=typeof e[0]})?[&quot;filter-in-large&quot;,t,[&quot;literal&quot;,e.sort(Be)]]:[&quot;filter-in-small&quot;,t,[&quot;literal&quot;,e]]}}function Ve(t){switch(t){case&quot;$type&quot;:return!0;case&quot;$id&quot;:return[&quot;filter-has-id&quot;];default:return[&quot;filter-has&quot;,t]}}function Ue(t){return[&quot;!&quot;,t]}function qe(t){return Ie(F(t.value))?Pe(R({},t,{expressionContext:&quot;filter&quot;,valueSpec:{value:&quot;boolean&quot;}})):function t(e){var r=e.value,n=e.key;if(&quot;array&quot;!==fe(r))return[new I(n,r,&quot;array expected, &quot;+fe(r)+&quot; found&quot;)];var i,a=e.styleSpec,o=[];if(r.length&lt;1)return[new I(n,r,&quot;filter array must have at least 1 element&quot;)];switch(o=o.concat(Oe({key:n+&quot;[0]&quot;,value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),B(r[0])){case&quot;&lt;&quot;:case&quot;&lt;=&quot;:case&quot;&gt;&quot;:case&quot;&gt;=&quot;:r.length&gt;=2&amp;&amp;&quot;$type&quot;===B(r[1])&amp;&amp;o.push(new I(n,r,'&quot;$type&quot; cannot be use with operator &quot;'+r[0]+'&quot;'));case&quot;==&quot;:case&quot;!=&quot;:3!==r.length&amp;&amp;o.push(new I(n,r,'filter array for operator &quot;'+r[0]+'&quot; must have 3 elements'));case&quot;in&quot;:case&quot;!in&quot;:r.length&gt;=2&amp;&amp;&quot;string&quot;!==(i=fe(r[1]))&amp;&amp;o.push(new I(n+&quot;[1]&quot;,r[1],&quot;string expected, &quot;+i+&quot; found&quot;));for(var s=2;s&lt;r.length;s++)i=fe(r[s]),&quot;$type&quot;===B(r[1])?o=o.concat(Oe({key:n+&quot;[&quot;+s+&quot;]&quot;,value:r[s],valueSpec:a.geometry_type,style:e.style,styleSpec:e.styleSpec})):&quot;string&quot;!==i&amp;&amp;&quot;number&quot;!==i&amp;&amp;&quot;boolean&quot;!==i&amp;&amp;o.push(new I(n+&quot;[&quot;+s+&quot;]&quot;,r[s],&quot;string, number, or boolean expected, &quot;+i+&quot; found&quot;));break;case&quot;any&quot;:case&quot;all&quot;:case&quot;none&quot;:for(var l=1;l&lt;r.length;l++)o=o.concat(t({key:n+&quot;[&quot;+l+&quot;]&quot;,value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case&quot;has&quot;:case&quot;!has&quot;:i=fe(r[1]),2!==r.length?o.push(new I(n,r,'filter array for &quot;'+r[0]+'&quot; operator must have 2 elements')):&quot;string&quot;!==i&amp;&amp;o.push(new I(n+&quot;[1]&quot;,r[1],&quot;string expected, &quot;+i+&quot; found&quot;))}return o}(t)}function He(t,e){var r=t.key,n=t.style,i=t.styleSpec,a=t.value,o=t.objectKey,s=i[e+&quot;_&quot;+t.layerType];if(!s)return[];var l=o.match(/^(.*)-transition$/);if(&quot;paint&quot;===e&amp;&amp;l&amp;&amp;s[l[1]]&amp;&amp;s[l[1]].transition)return Ke({key:r,value:a,valueSpec:i.transition,style:n,styleSpec:i});var c,u=t.valueSpec||s[o];if(!u)return[new I(r,a,'unknown property &quot;'+o+'&quot;')];if(&quot;string&quot;===fe(a)&amp;&amp;u[&quot;property-function&quot;]&amp;&amp;!u.tokens&amp;&amp;(c=/^{([^}]+)}$/.exec(a)))return[new I(r,a,'&quot;'+o+'&quot; does not support interpolation syntax\nUse an identity property function instead: `{ &quot;type&quot;: &quot;identity&quot;, &quot;property&quot;: '+JSON.stringify(c[1])+&quot; }`.&quot;)];var f=[];return&quot;symbol&quot;===t.layerType&amp;&amp;(&quot;text-field&quot;===o&amp;&amp;n&amp;&amp;!n.glyphs&amp;&amp;f.push(new I(r,a,'use of &quot;text-field&quot; requires a style &quot;glyphs&quot; property')),&quot;text-font&quot;===o&amp;&amp;he(F(a))&amp;&amp;&quot;identity&quot;===B(a.type)&amp;&amp;f.push(new I(r,a,'&quot;text-font&quot; does not support identity functions'))),f.concat(Ke({key:t.key,value:a,valueSpec:u,style:n,styleSpec:i,expressionContext:&quot;property&quot;,propertyKey:o}))}function Ge(t){return He(t,&quot;paint&quot;)}function We(t){return He(t,&quot;layout&quot;)}function Ye(t){var e=[],r=t.value,n=t.key,i=t.style,a=t.styleSpec;r.type||r.ref||e.push(new I(n,r,'either &quot;type&quot; or &quot;ref&quot; is required'));var o,s=B(r.type),l=B(r.ref);if(r.id)for(var c=B(r.id),u=0;u&lt;t.arrayIndex;u++){var f=i.layers[u];B(f.id)===c&amp;&amp;e.push(new I(n,r.id,'duplicate layer id &quot;'+r.id+'&quot;, previously used at line '+f.id.__line__))}if(&quot;ref&quot;in r)[&quot;type&quot;,&quot;source&quot;,&quot;source-layer&quot;,&quot;filter&quot;,&quot;layout&quot;].forEach(function(t){t in r&amp;&amp;e.push(new I(n,r[t],'&quot;'+t+'&quot; is prohibited for ref layers'))}),i.layers.forEach(function(t){B(t.id)===l&amp;&amp;(o=t)}),o?o.ref?e.push(new I(n,r.ref,&quot;ref cannot reference another ref layer&quot;)):s=B(o.type):e.push(new I(n,r.ref,'ref layer &quot;'+l+'&quot; not found'));else if(&quot;background&quot;!==s)if(r.source){var h=i.sources&amp;&amp;i.sources[r.source],p=h&amp;&amp;B(h.type);h?&quot;vector&quot;===p&amp;&amp;&quot;raster&quot;===s?e.push(new I(n,r.source,'layer &quot;'+r.id+'&quot; requires a raster source')):&quot;raster&quot;===p&amp;&amp;&quot;raster&quot;!==s?e.push(new I(n,r.source,'layer &quot;'+r.id+'&quot; requires a vector source')):&quot;vector&quot;!==p||r[&quot;source-layer&quot;]?&quot;raster-dem&quot;===p&amp;&amp;&quot;hillshade&quot;!==s?e.push(new I(n,r.source,&quot;raster-dem source can only be used with layer type 'hillshade'.&quot;)):&quot;line&quot;!==s||!r.paint||!r.paint[&quot;line-gradient&quot;]||&quot;geojson&quot;===p&amp;&amp;h.lineMetrics||e.push(new I(n,r,'layer &quot;'+r.id+'&quot; specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new I(n,r,'layer &quot;'+r.id+'&quot; must specify a &quot;source-layer&quot;')):e.push(new I(n,r.source,'source &quot;'+r.source+'&quot; not found'))}else e.push(new I(n,r,'missing required property &quot;source&quot;'));return e=e.concat(Ee({key:n,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{&quot;*&quot;:function(){return[]},type:function(){return Ke({key:n+&quot;.type&quot;,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:&quot;type&quot;})},filter:qe,layout:function(t){return Ee({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{&quot;*&quot;:function(t){return We(R({layerType:s},t))}}})},paint:function(t){return Ee({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{&quot;*&quot;:function(t){return Ge(R({layerType:s},t))}}})}}}))}function Xe(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new I(r,e,'&quot;type&quot; is required')];var a=B(e.type),o=[];switch(a){case&quot;vector&quot;:case&quot;raster&quot;:case&quot;raster-dem&quot;:if(o=o.concat(Ee({key:r,value:e,valueSpec:n[&quot;source_&quot;+a.replace(&quot;-&quot;,&quot;_&quot;)],style:t.style,styleSpec:n})),&quot;url&quot;in e)for(var s in e)[&quot;type&quot;,&quot;url&quot;,&quot;tileSize&quot;].indexOf(s)&lt;0&amp;&amp;o.push(new I(r+&quot;.&quot;+s,e[s],'a source with a &quot;url&quot; property may not include a &quot;'+s+'&quot; property'));return o;case&quot;geojson&quot;:return Ee({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n});case&quot;video&quot;:return Ee({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case&quot;image&quot;:return Ee({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case&quot;canvas&quot;:return o.push(new I(r,null,&quot;Please use runtime APIs to add canvas sources, rather than including them in stylesheets.&quot;,&quot;source.canvas&quot;)),o;default:return Oe({key:r+&quot;.type&quot;,value:e.type,valueSpec:{values:[&quot;vector&quot;,&quot;raster&quot;,&quot;raster-dem&quot;,&quot;geojson&quot;,&quot;video&quot;,&quot;image&quot;]},style:i,styleSpec:n})}}function Ze(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,a=[],o=fe(e);if(void 0===e)return a;if(&quot;object&quot;!==o)return a.concat([new I(&quot;light&quot;,e,&quot;object expected, &quot;+o+&quot; found&quot;)]);for(var s in e){var l=s.match(/^(.*)-transition$/);a=l&amp;&amp;n[l[1]]&amp;&amp;n[l[1]].transition?a.concat(Ke({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?a.concat(Ke({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):a.concat([new I(s,e[s],'unknown property &quot;'+s+'&quot;')])}return a}function $e(t){var e=t.value,r=t.key,n=fe(e);return&quot;string&quot;!==n?[new I(r,e,&quot;string expected, &quot;+n+&quot; found&quot;)]:[]}var Je={&quot;*&quot;:function(){return[]},array:Ce,boolean:function(t){var e=t.value,r=t.key,n=fe(e);return&quot;boolean&quot;!==n?[new I(r,e,&quot;boolean expected, &quot;+n+&quot; found&quot;)]:[]},number:Le,color:function(t){var e=t.key,r=t.value,n=fe(r);return&quot;string&quot;!==n?[new I(e,r,&quot;color expected, &quot;+n+&quot; found&quot;)]:null===Q(r)?[new I(e,r,'color expected, &quot;'+r+'&quot; found')]:[]},constants:D,enum:Oe,filter:qe,function:ze,layer:Ye,object:Ee,source:Xe,light:Ze,string:$e};function Ke(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.function&amp;&amp;he(B(e))?ze(t):r.function&amp;&amp;_e(F(e))?Pe(t):r.type&amp;&amp;Je[r.type]?Je[r.type](t):Ee(R({},t,{valueSpec:r.type?n[r.type]:r}))}function Qe(t){var e=t.value,r=t.key,n=$e(t);return n.length?n:(-1===e.indexOf(&quot;{fontstack}&quot;)&amp;&amp;n.push(new I(r,e,'&quot;glyphs&quot; url must include a &quot;{fontstack}&quot; token')),-1===e.indexOf(&quot;{range}&quot;)&amp;&amp;n.push(new I(r,e,'&quot;glyphs&quot; url must include a &quot;{range}&quot; token')),n)}function tr(t,e){e=e||O;var r=[];return r=r.concat(Ke({key:&quot;&quot;,value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Qe,&quot;*&quot;:function(){return[]}}})),t.constants&amp;&amp;(r=r.concat(D({key:&quot;constants&quot;,value:t.constants,style:t,styleSpec:e}))),er(r)}function er(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function rr(t){return function(){return er(t.apply(this,arguments))}}tr.source=rr(Xe),tr.light=rr(Ze),tr.layer=rr(Ye),tr.filter=rr(qe),tr.paintProperty=rr(Ge),tr.layoutProperty=rr(We);var nr=tr,ir=tr.light,ar=tr.paintProperty,or=tr.layoutProperty;function sr(t,e){var r=!1;if(e&amp;&amp;e.length)for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n];t.fire(new z(new Error(a.message))),r=!0}return r}var lr=ur,cr=3;function ur(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var a=0;a&lt;this.d*this.d;a++){var o=i[cr+a],s=i[cr+a+1];n.push(o===s?null:i.subarray(o,s))}var l=i[cr+n.length],c=i[cr+n.length+1];this.keys=i.subarray(l,c),this.bboxes=i.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var u=0;u&lt;this.d*this.d;u++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var f=r/e*t;this.min=-f,this.max=t+f}ur.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ur.prototype._insertReadonly=function(){throw&quot;Cannot insert into a GridIndex created from an ArrayBuffer.&quot;},ur.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},ur.prototype.query=function(t,e,r,n){var i=this.min,a=this.max;if(t&lt;=i&amp;&amp;e&lt;=i&amp;&amp;a&lt;=r&amp;&amp;a&lt;=n)return Array.prototype.slice.call(this.keys);var o=[];return this._forEachCell(t,e,r,n,this._queryCell,o,{}),o},ur.prototype._queryCell=function(t,e,r,n,i,a,o){var s=this.cells[i];if(null!==s)for(var l=this.keys,c=this.bboxes,u=0;u&lt;s.length;u++){var f=s[u];if(void 0===o[f]){var h=4*f;t&lt;=c[h+2]&amp;&amp;e&lt;=c[h+3]&amp;&amp;r&gt;=c[h+0]&amp;&amp;n&gt;=c[h+1]?(o[f]=!0,a.push(l[f])):o[f]=!1}}},ur.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(r),u=this._convertToCellCoord(n),f=s;f&lt;=c;f++)for(var h=l;h&lt;=u;h++){var p=this.d*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ur.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ur.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=cr+this.cells.length+1+1,r=0,n=0;n&lt;this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var a=e,o=0;o&lt;t.length;o++){var s=t[o];i[cr+o]=a,i.set(s,a),a+=s.length}return i[cr+t.length]=a,i.set(this.keys,a),a+=this.keys.length,i[cr+t.length+1]=a,i.set(this.bboxes,a),a+=this.bboxes.length,i.buffer};var fr=self.ImageData,hr={};function pr(t,e,r){void 0===r&amp;&amp;(r={}),Object.defineProperty(e,&quot;_classRegistryKey&quot;,{value:t,writeable:!1}),hr[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var dr in pr(&quot;Object&quot;,Object),lr.serialize=function(t,e){var r=t.toArrayBuffer();return e&amp;&amp;e.push(r),r},lr.deserialize=function(t){return new lr(t)},pr(&quot;Grid&quot;,lr),pr(&quot;Color&quot;,tt),pr(&quot;Error&quot;,Error),pr(&quot;StylePropertyFunction&quot;,Te),pr(&quot;StyleExpression&quot;,be,{omit:[&quot;_evaluator&quot;]}),pr(&quot;ZoomDependentExpression&quot;,Me),pr(&quot;ZoomConstantExpression&quot;,ke),pr(&quot;CompoundExpression&quot;,gt,{omit:[&quot;_evaluate&quot;]}),Rt)Rt[dr]._classRegistryKey||pr(&quot;Expression_&quot;+dr,Rt[dr]);function gr(t,e){if(null==t||&quot;boolean&quot;==typeof t||&quot;number&quot;==typeof t||&quot;string&quot;==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&amp;&amp;e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&amp;&amp;e.push(r.buffer),r}if(t instanceof fr)return e&amp;&amp;e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,a=t;i&lt;a.length;i+=1){var o=a[i];n.push(gr(o,e))}return n}if(&quot;object&quot;==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error(&quot;can't serialize object of unregistered class&quot;);var c={};if(s.serialize)c._serialized=s.serialize(t,e);else{for(var u in t)if(t.hasOwnProperty(u)&amp;&amp;!(hr[l].omit.indexOf(u)&gt;=0)){var f=t[u];c[u]=hr[l].shallow.indexOf(u)&gt;=0?f:gr(f,e)}t instanceof Error&amp;&amp;(c.message=t.message)}return{name:l,properties:c}}throw new Error(&quot;can't serialize object of type &quot;+typeof t)}function mr(t){if(null==t||&quot;boolean&quot;==typeof t||&quot;number&quot;==typeof t||&quot;string&quot;==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof fr)return t;if(Array.isArray(t))return t.map(function(t){return mr(t)});if(&quot;object&quot;==typeof t){var e=t,r=e.name,n=e.properties;if(!r)throw new Error(&quot;can't deserialize object of anonymous class&quot;);var i=hr[r].klass;if(!i)throw new Error(&quot;can't deserialize unregistered class &quot;+r);if(i.deserialize)return i.deserialize(n._serialized);for(var a=Object.create(i.prototype),o=0,s=Object.keys(n);o&lt;s.length;o+=1){var l=s[o];a[l]=hr[r].shallow.indexOf(l)&gt;=0?n[l]:mr(n[l])}return a}throw new Error(&quot;can't deserialize object of type &quot;+typeof t)}var vr=function(){this.first=!0};vr.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom&gt;r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom&lt;r&amp;&amp;(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&amp;&amp;(this.lastZoom=t,this.lastFloorZoom=r,!0))};var yr={&quot;Latin-1 Supplement&quot;:function(t){return t&gt;=128&amp;&amp;t&lt;=255},Arabic:function(t){return t&gt;=1536&amp;&amp;t&lt;=1791},&quot;Arabic Supplement&quot;:function(t){return t&gt;=1872&amp;&amp;t&lt;=1919},&quot;Arabic Extended-A&quot;:function(t){return t&gt;=2208&amp;&amp;t&lt;=2303},&quot;Hangul Jamo&quot;:function(t){return t&gt;=4352&amp;&amp;t&lt;=4607},&quot;Unified Canadian Aboriginal Syllabics&quot;:function(t){return t&gt;=5120&amp;&amp;t&lt;=5759},Khmer:function(t){return t&gt;=6016&amp;&amp;t&lt;=6143},&quot;Unified Canadian Aboriginal Syllabics Extended&quot;:function(t){return t&gt;=6320&amp;&amp;t&lt;=6399},&quot;General Punctuation&quot;:function(t){return t&gt;=8192&amp;&amp;t&lt;=8303},&quot;Letterlike Symbols&quot;:function(t){return t&gt;=8448&amp;&amp;t&lt;=8527},&quot;Number Forms&quot;:function(t){return t&gt;=8528&amp;&amp;t&lt;=8591},&quot;Miscellaneous Technical&quot;:function(t){return t&gt;=8960&amp;&amp;t&lt;=9215},&quot;Control Pictures&quot;:function(t){return t&gt;=9216&amp;&amp;t&lt;=9279},&quot;Optical Character Recognition&quot;:function(t){return t&gt;=9280&amp;&amp;t&lt;=9311},&quot;Enclosed Alphanumerics&quot;:function(t){return t&gt;=9312&amp;&amp;t&lt;=9471},&quot;Geometric Shapes&quot;:function(t){return t&gt;=9632&amp;&amp;t&lt;=9727},&quot;Miscellaneous Symbols&quot;:function(t){return t&gt;=9728&amp;&amp;t&lt;=9983},&quot;Miscellaneous Symbols and Arrows&quot;:function(t){return t&gt;=11008&amp;&amp;t&lt;=11263},&quot;CJK Radicals Supplement&quot;:function(t){return t&gt;=11904&amp;&amp;t&lt;=12031},&quot;Kangxi Radicals&quot;:function(t){return t&gt;=12032&amp;&amp;t&lt;=12255},&quot;Ideographic Description Characters&quot;:function(t){return t&gt;=12272&amp;&amp;t&lt;=12287},&quot;CJK Symbols and Punctuation&quot;:function(t){return t&gt;=12288&amp;&amp;t&lt;=12351},Hiragana:function(t){return t&gt;=12352&amp;&amp;t&lt;=12447},Katakana:function(t){return t&gt;=12448&amp;&amp;t&lt;=12543},Bopomofo:function(t){return t&gt;=12544&amp;&amp;t&lt;=12591},&quot;Hangul Compatibility Jamo&quot;:function(t){return t&gt;=12592&amp;&amp;t&lt;=12687},Kanbun:function(t){return t&gt;=12688&amp;&amp;t&lt;=12703},&quot;Bopomofo Extended&quot;:function(t){return t&gt;=12704&amp;&amp;t&lt;=12735},&quot;CJK Strokes&quot;:function(t){return t&gt;=12736&amp;&amp;t&lt;=12783},&quot;Katakana Phonetic Extensions&quot;:function(t){return t&gt;=12784&amp;&amp;t&lt;=12799},&quot;Enclosed CJK Letters and Months&quot;:function(t){return t&gt;=12800&amp;&amp;t&lt;=13055},&quot;CJK Compatibility&quot;:function(t){return t&gt;=13056&amp;&amp;t&lt;=13311},&quot;CJK Unified Ideographs Extension A&quot;:function(t){return t&gt;=13312&amp;&amp;t&lt;=19903},&quot;Yijing Hexagram Symbols&quot;:function(t){return t&gt;=19904&amp;&amp;t&lt;=19967},&quot;CJK Unified Ideographs&quot;:function(t){return t&gt;=19968&amp;&amp;t&lt;=40959},&quot;Yi Syllables&quot;:function(t){return t&gt;=40960&amp;&amp;t&lt;=42127},&quot;Yi Radicals&quot;:function(t){return t&gt;=42128&amp;&amp;t&lt;=42191},&quot;Hangul Jamo Extended-A&quot;:function(t){return t&gt;=43360&amp;&amp;t&lt;=43391},&quot;Hangul Syllables&quot;:function(t){return t&gt;=44032&amp;&amp;t&lt;=55215},&quot;Hangul Jamo Extended-B&quot;:function(t){return t&gt;=55216&amp;&amp;t&lt;=55295},&quot;Private Use Area&quot;:function(t){return t&gt;=57344&amp;&amp;t&lt;=63743},&quot;CJK Compatibility Ideographs&quot;:function(t){return t&gt;=63744&amp;&amp;t&lt;=64255},&quot;Arabic Presentation Forms-A&quot;:function(t){return t&gt;=64336&amp;&amp;t&lt;=65023},&quot;Vertical Forms&quot;:function(t){return t&gt;=65040&amp;&amp;t&lt;=65055},&quot;CJK Compatibility Forms&quot;:function(t){return t&gt;=65072&amp;&amp;t&lt;=65103},&quot;Small Form Variants&quot;:function(t){return t&gt;=65104&amp;&amp;t&lt;=65135},&quot;Arabic Presentation Forms-B&quot;:function(t){return t&gt;=65136&amp;&amp;t&lt;=65279},&quot;Halfwidth and Fullwidth Forms&quot;:function(t){return t&gt;=65280&amp;&amp;t&lt;=65519}};function xr(t){for(var e=0,r=t;e&lt;r.length;e+=1)if(_r(r[e].charCodeAt(0)))return!0;return!1}function br(t){return!(yr.Arabic(t)||yr[&quot;Arabic Supplement&quot;](t)||yr[&quot;Arabic Extended-A&quot;](t)||yr[&quot;Arabic Presentation Forms-A&quot;](t)||yr[&quot;Arabic Presentation Forms-B&quot;](t))}function _r(t){return!!(746===t||747===t||!(t&lt;4352)&amp;&amp;(yr[&quot;Bopomofo Extended&quot;](t)||yr.Bopomofo(t)||yr[&quot;CJK Compatibility Forms&quot;](t)&amp;&amp;!(t&gt;=65097&amp;&amp;t&lt;=65103)||yr[&quot;CJK Compatibility Ideographs&quot;](t)||yr[&quot;CJK Compatibility&quot;](t)||yr[&quot;CJK Radicals Supplement&quot;](t)||yr[&quot;CJK Strokes&quot;](t)||!(!yr[&quot;CJK Symbols and Punctuation&quot;](t)||t&gt;=12296&amp;&amp;t&lt;=12305||t&gt;=12308&amp;&amp;t&lt;=12319||12336===t)||yr[&quot;CJK Unified Ideographs Extension A&quot;](t)||yr[&quot;CJK Unified Ideographs&quot;](t)||yr[&quot;Enclosed CJK Letters and Months&quot;](t)||yr[&quot;Hangul Compatibility Jamo&quot;](t)||yr[&quot;Hangul Jamo Extended-A&quot;](t)||yr[&quot;Hangul Jamo Extended-B&quot;](t)||yr[&quot;Hangul Jamo&quot;](t)||yr[&quot;Hangul Syllables&quot;](t)||yr.Hiragana(t)||yr[&quot;Ideographic Description Characters&quot;](t)||yr.Kanbun(t)||yr[&quot;Kangxi Radicals&quot;](t)||yr[&quot;Katakana Phonetic Extensions&quot;](t)||yr.Katakana(t)&amp;&amp;12540!==t||!(!yr[&quot;Halfwidth and Fullwidth Forms&quot;](t)||65288===t||65289===t||65293===t||t&gt;=65306&amp;&amp;t&lt;=65310||65339===t||65341===t||65343===t||t&gt;=65371&amp;&amp;t&lt;=65503||65507===t||t&gt;=65512&amp;&amp;t&lt;=65519)||!(!yr[&quot;Small Form Variants&quot;](t)||t&gt;=65112&amp;&amp;t&lt;=65118||t&gt;=65123&amp;&amp;t&lt;=65126)||yr[&quot;Unified Canadian Aboriginal Syllabics&quot;](t)||yr[&quot;Unified Canadian Aboriginal Syllabics Extended&quot;](t)||yr[&quot;Vertical Forms&quot;](t)||yr[&quot;Yijing Hexagram Symbols&quot;](t)||yr[&quot;Yi Syllables&quot;](t)||yr[&quot;Yi Radicals&quot;](t)))}function wr(t){return!(_r(t)||function(t){return!!(yr[&quot;Latin-1 Supplement&quot;](t)&amp;&amp;(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||yr[&quot;General Punctuation&quot;](t)&amp;&amp;(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||yr[&quot;Letterlike Symbols&quot;](t)||yr[&quot;Number Forms&quot;](t)||yr[&quot;Miscellaneous Technical&quot;](t)&amp;&amp;(t&gt;=8960&amp;&amp;t&lt;=8967||t&gt;=8972&amp;&amp;t&lt;=8991||t&gt;=8996&amp;&amp;t&lt;=9e3||9003===t||t&gt;=9085&amp;&amp;t&lt;=9114||t&gt;=9150&amp;&amp;t&lt;=9165||9167===t||t&gt;=9169&amp;&amp;t&lt;=9179||t&gt;=9186&amp;&amp;t&lt;=9215)||yr[&quot;Control Pictures&quot;](t)&amp;&amp;9251!==t||yr[&quot;Optical Character Recognition&quot;](t)||yr[&quot;Enclosed Alphanumerics&quot;](t)||yr[&quot;Geometric Shapes&quot;](t)||yr[&quot;Miscellaneous Symbols&quot;](t)&amp;&amp;!(t&gt;=9754&amp;&amp;t&lt;=9759)||yr[&quot;Miscellaneous Symbols and Arrows&quot;](t)&amp;&amp;(t&gt;=11026&amp;&amp;t&lt;=11055||t&gt;=11088&amp;&amp;t&lt;=11097||t&gt;=11192&amp;&amp;t&lt;=11243)||yr[&quot;CJK Symbols and Punctuation&quot;](t)||yr.Katakana(t)||yr[&quot;Private Use Area&quot;](t)||yr[&quot;CJK Compatibility Forms&quot;](t)||yr[&quot;Small Form Variants&quot;](t)||yr[&quot;Halfwidth and Fullwidth Forms&quot;](t)||8734===t||8756===t||8757===t||t&gt;=9984&amp;&amp;t&lt;=10087||t&gt;=10102&amp;&amp;t&lt;=10131||65532===t||65533===t)}(t))}function kr(t,e){return!(!e&amp;&amp;(t&gt;=1424&amp;&amp;t&lt;=2303||yr[&quot;Arabic Presentation Forms-A&quot;](t)||yr[&quot;Arabic Presentation Forms-B&quot;](t))||t&gt;=2304&amp;&amp;t&lt;=3583||t&gt;=3840&amp;&amp;t&lt;=4255||yr.Khmer(t))}var Mr,Ar=!1,Tr=null,Sr=!1,Er=new P,Cr={applyArabicShaping:null,processBidirectionalText:null,isLoaded:function(){return Sr||null!=Cr.applyArabicShaping}},Lr=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new vr,this.transition={})};Lr.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1)if(!kr(n[r].charCodeAt(0),e))return!1;return!0}(t,Cr.isLoaded())},Lr.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};var zr=function(t,e){this.property=t,this.value=e,this.expression=Se(void 0===e?t.specification.default:e,t.specification)};zr.prototype.isDataDriven=function(){return&quot;source&quot;===this.expression.kind||&quot;composite&quot;===this.expression.kind},zr.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Pr=function(t){this.property=t,this.value=new zr(t,void 0)};Pr.prototype.transitioned=function(t,e){return new Ir(this.property,this.value,e,p({},t.transition,this.transition),t.now)},Pr.prototype.untransitioned=function(){return new Ir(this.property,this.value,null,{},0)};var Or=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Or.prototype.getValue=function(t){return x(this._values[t].value.value)},Or.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Pr(this._values[t].property)),this._values[t].value=new zr(this._values[t].property,null===e?void 0:x(e))},Or.prototype.getTransition=function(t){return x(this._values[t].transition)},Or.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Pr(this._values[t].property)),this._values[t].transition=x(e)||void 0},Or.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e&lt;r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&amp;&amp;(t[n]=i);var a=this.getTransition(n);void 0!==a&amp;&amp;(t[n+&quot;-transition&quot;]=a)}return t},Or.prototype.transitioned=function(t,e){for(var r=new Dr(this._properties),n=0,i=Object.keys(this._values);n&lt;i.length;n+=1){var a=i[n];r._values[a]=this._values[a].transitioned(t,e._values[a])}return r},Or.prototype.untransitioned=function(){for(var t=new Dr(this._properties),e=0,r=Object.keys(this._values);e&lt;r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var Ir=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&amp;&amp;(n.delay||n.duration)&amp;&amp;(this.prior=r)};Ir.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),n=this.prior;if(n){if(e&gt;this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e&lt;this.begin)return n.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t),r,function(t){if(i&lt;=0)return 0;if(i&gt;=1)return 1;var e=i*i,r=e*i;return 4*(i&lt;.5?r:3*(i-e)+r-.75)}())}return r};var Dr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Dr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r&lt;n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e},Dr.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t&lt;e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Rr=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Rr.prototype.getValue=function(t){return x(this._values[t].value)},Rr.prototype.setValue=function(t,e){this._values[t]=new zr(this._values[t].property,null===e?void 0:x(e))},Rr.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e&lt;r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&amp;&amp;(t[n]=i)}return t},Rr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r&lt;n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e};var Br=function(t,e,r){this.property=t,this.value=e,this.globals=r};Br.prototype.isConstant=function(){return&quot;constant&quot;===this.value.kind},Br.prototype.constantOr=function(t){return&quot;constant&quot;===this.value.kind?this.value.value:t},Br.prototype.evaluate=function(t){return this.property.evaluate(this.value,this.globals,t)};var Fr=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Fr.prototype.get=function(t){return this._values[t]};var Nr=function(t){this.specification=t};Nr.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Nr.prototype.interpolate=function(t,e,r){var n=kt[this.specification.type];return n?n(t,e,r):t};var jr=function(t){this.specification=t};jr.prototype.possiblyEvaluate=function(t,e){return&quot;constant&quot;===t.expression.kind||&quot;camera&quot;===t.expression.kind?new Br(this,{kind:&quot;constant&quot;,value:t.expression.evaluate(e)},e):new Br(this,t.expression,e)},jr.prototype.interpolate=function(t,e,r){if(&quot;constant&quot;!==t.value.kind||&quot;constant&quot;!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Br(this,{kind:&quot;constant&quot;,value:void 0},t.globals);var n=kt[this.specification.type];return n?new Br(this,{kind:&quot;constant&quot;,value:n(t.value.value,e.value.value,r)},t.globals):t},jr.prototype.evaluate=function(t,e,r){return&quot;constant&quot;===t.kind?t.value:t.evaluate(e,r)};var Vr=function(t){this.specification=t};Vr.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if(&quot;constant&quot;===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Lr(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom+1),e)),e)}},Vr.prototype._calculate=function(t,e,r,n){var i=n.zoom,a=i-Math.floor(i),o=n.crossFadingFactor();return i&gt;n.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:a+(1-a)*o}:{from:r,to:e,fromScale:.5,toScale:1,t:1-(1-o)*a}},Vr.prototype.interpolate=function(t){return t};var Ur=function(t){this.specification=t};Ur.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Ur.prototype.interpolate=function(){return!1};var qr=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new zr(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Pr(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};pr(&quot;DataDrivenProperty&quot;,jr),pr(&quot;DataConstantProperty&quot;,Nr),pr(&quot;CrossFadedProperty&quot;,Vr),pr(&quot;ColorRampProperty&quot;,Ur);var Hr=function(t){function e(e,r){for(var n in t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility=&quot;visible&quot;,&quot;background&quot;!==e.type&amp;&amp;(this.source=e.source,this.sourceLayer=e[&quot;source-layer&quot;],this.filter=e.filter),this._featureFilter=function(){return!0},r.layout&amp;&amp;(this._unevaluatedLayout=new Rr(r.layout)),this._transitionablePaint=new Or(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return&quot;visibility&quot;===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(null!=e){var n=&quot;layers.&quot;+this.id+&quot;.layout.&quot;+t;if(this._validate(or,n,t,e,r))return}&quot;visibility&quot;!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=&quot;none&quot;===e?e:&quot;visible&quot;},e.prototype.getPaintProperty=function(t){return m(t,&quot;-transition&quot;)?this._transitionablePaint.getTransition(t.slice(0,-&quot;-transition&quot;.length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(null!=e){var n=&quot;layers.&quot;+this.id+&quot;.paint.&quot;+t;if(this._validate(ar,n,t,e,r))return}m(t,&quot;-transition&quot;)?this._transitionablePaint.setTransition(t.slice(0,-&quot;-transition&quot;.length),e||void 0):this._transitionablePaint.setValue(t,e)},e.prototype.isHidden=function(t){return!!(this.minzoom&amp;&amp;t&lt;this.minzoom)||!!(this.maxzoom&amp;&amp;t&gt;=this.maxzoom)||&quot;none&quot;===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&amp;&amp;(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,&quot;source-layer&quot;:this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&amp;&amp;this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&amp;&amp;this._transitionablePaint.serialize()};return&quot;none&quot;===this.visibility&amp;&amp;(t.layout=t.layout||{},t.layout.visibility=&quot;none&quot;),y(t,function(t,e){return!(void 0===t||&quot;layout&quot;===e&amp;&amp;!Object.keys(t).length||&quot;paint&quot;===e&amp;&amp;!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,n,i){return(!i||!1!==i.validate)&amp;&amp;sr(this,t.call(nr,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:O,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e}(P),Gr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Wr=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Yr=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Xr(t,e){void 0===e&amp;&amp;(e=1);var r=0,n=0;return{members:t.map(function(t){var i,a=(i=t.type,Gr[i].BYTES_PER_ELEMENT),o=r=Zr(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}}),size:Zr(r,Math.max(n,e)),alignment:e}}function Zr(t,e){return Math.ceil(t/e)*e}Yr.serialize=function(t,e){return t._trim(),e&amp;&amp;(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Yr.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Yr.prototype._trim=function(){this.length!==this.capacity&amp;&amp;(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Yr.prototype.clear=function(){this.length=0},Yr.prototype.resize=function(t){this.reserve(t),this.length=t},Yr.prototype.reserve=function(t){if(t&gt;this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&amp;&amp;this.uint8.set(e)}},Yr.prototype._refreshViews=function(){throw new Error(&quot;_refreshViews() must be implemented by each concrete StructArray layout&quot;)};var $r=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.int16[n+0]=t,this.int16[n+1]=e,r},e}(Yr);$r.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout2i4&quot;,$r);var Jr=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.int16[a+0]=t,this.int16[a+1]=e,this.int16[a+2]=r,this.int16[a+3]=n,i},e}(Yr);Jr.prototype.bytesPerElement=8,pr(&quot;StructArrayLayout4i8&quot;,Jr);var Kr=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);Kr.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout2i4i12&quot;,Kr);var Qr=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=6*l,u=12*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint8[u+8]=i,this.uint8[u+9]=a,this.uint8[u+10]=o,this.uint8[u+11]=s,l},e}(Yr);Qr.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout4i4ub12&quot;,Qr);var tn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=8*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint16[c+4]=i,this.uint16[c+5]=a,this.uint16[c+6]=o,this.uint16[c+7]=s,l},e}(Yr);tn.prototype.bytesPerElement=16,pr(&quot;StructArrayLayout4i4ui16&quot;,tn);var en=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=r,n},e}(Yr);en.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout3f12&quot;,en);var rn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.uint32[r+0]=t,e},e}(Yr);rn.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout1ul4&quot;,rn);var nn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u){var f=this.length;this.resize(f+1);var h=12*f,p=6*f;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=r,this.int16[h+3]=n,this.int16[h+4]=i,this.int16[h+5]=a,this.uint32[p+3]=o,this.uint16[h+8]=s,this.uint16[h+9]=l,this.int16[h+10]=c,this.int16[h+11]=u,f},e}(Yr);nn.prototype.bytesPerElement=24,pr(&quot;StructArrayLayout6i1ul2ui2i24&quot;,nn);var an=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);an.prototype.bytesPerElement=12,pr(&quot;StructArrayLayout2i2i2i12&quot;,an);var on=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=4*r;return this.uint8[n+0]=t,this.uint8[n+1]=e,r},e}(Yr);on.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout2ub4&quot;,on);var sn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p){var d=this.length;this.resize(d+1);var g=20*d,m=10*d,v=40*d;return this.int16[g+0]=t,this.int16[g+1]=e,this.uint16[g+2]=r,this.uint16[g+3]=n,this.uint32[m+2]=i,this.uint32[m+3]=a,this.uint32[m+4]=o,this.uint16[g+10]=s,this.uint16[g+11]=l,this.uint16[g+12]=c,this.float32[m+7]=u,this.float32[m+8]=f,this.uint8[v+36]=h,this.uint8[v+37]=p,d},e}(Yr);sn.prototype.bytesPerElement=40,pr(&quot;StructArrayLayout2i2ui3ul3ui2f2ub40&quot;,sn);var ln=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.float32[r+0]=t,e},e}(Yr);ln.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout1f4&quot;,ln);var cn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=r,n},e}(Yr);cn.prototype.bytesPerElement=6,pr(&quot;StructArrayLayout3i6&quot;,cn);var un=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=2*n,a=4*n;return this.uint32[i+0]=t,this.uint16[a+2]=e,this.uint16[a+3]=r,n},e}(Yr);un.prototype.bytesPerElement=8,pr(&quot;StructArrayLayout1ul2ui8&quot;,un);var fn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=r,n},e}(Yr);fn.prototype.bytesPerElement=6,pr(&quot;StructArrayLayout3ui6&quot;,fn);var hn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.uint16[n+0]=t,this.uint16[n+1]=e,r},e}(Yr);hn.prototype.bytesPerElement=4,pr(&quot;StructArrayLayout2ui4&quot;,hn);var pn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.float32[n+0]=t,this.float32[n+1]=e,r},e}(Yr);pn.prototype.bytesPerElement=8,pr(&quot;StructArrayLayout2f8&quot;,pn);var dn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.float32[a+0]=t,this.float32[a+1]=e,this.float32[a+2]=r,this.float32[a+3]=n,i},e}(Yr);dn.prototype.bytesPerElement=16,pr(&quot;StructArrayLayout4f16&quot;,dn);var gn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new l(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Wr);gn.prototype.size=24;var mn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new gn(this,t)},e}(nn);pr(&quot;CollisionBoxArray&quot;,mn);var vn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,r),e}(Wr);vn.prototype.size=40;var yn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new vn(this,t)},e}(sn);pr(&quot;PlacedSymbolArray&quot;,yn);var xn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Wr);xn.prototype.size=4;var bn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new xn(this,t)},e}(ln);pr(&quot;GlyphOffsetArray&quot;,bn);var _n=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Wr);_n.prototype.size=6;var wn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new _n(this,t)},e}(cn);pr(&quot;SymbolLineVertexArray&quot;,wn);var kn=function(t){function e(){t.apply(this,arguments)}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Wr);kn.prototype.size=8;var Mn=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new kn(this,t)},e}(un);pr(&quot;FeatureIndexArray&quot;,Mn);var An=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;}],4).members,Tn=function(t){void 0===t&amp;&amp;(t=[]),this.segments=t};Tn.prototype.prepareSegment=function(t,e,r){var n=this.segments[this.segments.length-1];return t&gt;Tn.MAX_VERTEX_ARRAY_LENGTH&amp;&amp;_(&quot;Max vertices per segment is &quot;+Tn.MAX_VERTEX_ARRAY_LENGTH+&quot;: bucket requested &quot;+t),(!n||n.vertexLength+t&gt;Tn.MAX_VERTEX_ARRAY_LENGTH)&amp;&amp;(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(n)),n},Tn.prototype.get=function(){return this.segments},Tn.prototype.destroy=function(){for(var t=0,e=this.segments;t&lt;e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy()}},Tn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,pr(&quot;SegmentVector&quot;,Tn);var Sn=function(t,e){return 256*(t=h(Math.floor(t),0,255))+h(Math.floor(e),0,255)};function En(t){return[Sn(255*t.r,255*t.g),Sn(255*t.b,255*t.a)]}var Cn=function(t,e,r){this.value=t,this.name=e,this.type=r,this.statistics={max:-1/0}};Cn.prototype.defines=function(){return[&quot;#define HAS_UNIFORM_u_&quot;+this.name]},Cn.prototype.populatePaintArray=function(){},Cn.prototype.upload=function(){},Cn.prototype.destroy=function(){},Cn.prototype.setUniforms=function(t,e,r,n){var i=n.constantOr(this.value),a=t.gl;&quot;color&quot;===this.type?a.uniform4f(e.uniforms[&quot;u_&quot;+this.name],i.r,i.g,i.b,i.a):a.uniform1f(e.uniforms[&quot;u_&quot;+this.name],i)};var Ln=function(t,e,r){this.expression=t,this.name=e,this.type=r,this.statistics={max:-1/0};var n=&quot;color&quot;===r?pn:ln;this.paintVertexAttributes=[{name:&quot;a_&quot;+e,type:&quot;Float32&quot;,components:&quot;color&quot;===r?2:1,offset:0}],this.paintVertexArray=new n};Ln.prototype.defines=function(){return[]},Ln.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(0),e);if(&quot;color&quot;===this.type)for(var a=En(i),o=n;o&lt;t;o++)r.emplaceBack(a[0],a[1]);else{for(var s=n;s&lt;t;s++)r.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}},Ln.prototype.upload=function(t){this.paintVertexArray&amp;&amp;(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},Ln.prototype.destroy=function(){this.paintVertexBuffer&amp;&amp;this.paintVertexBuffer.destroy()},Ln.prototype.setUniforms=function(t,e){t.gl.uniform1f(e.uniforms[&quot;a_&quot;+this.name+&quot;_t&quot;],0)};var zn=function(t,e,r,n,i){this.expression=t,this.name=e,this.type=r,this.useIntegerZoom=n,this.zoom=i,this.statistics={max:-1/0};var a=&quot;color&quot;===r?dn:pn;this.paintVertexAttributes=[{name:&quot;a_&quot;+e,type:&quot;Float32&quot;,components:&quot;color&quot;===r?4:2,offset:0}],this.paintVertexArray=new a};zn.prototype.defines=function(){return[]},zn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(this.zoom),e),a=this.expression.evaluate(new Lr(this.zoom+1),e);if(&quot;color&quot;===this.type)for(var o=En(i),s=En(a),l=n;l&lt;t;l++)r.emplaceBack(o[0],o[1],s[0],s[1]);else{for(var c=n;c&lt;t;c++)r.emplaceBack(i,a);this.statistics.max=Math.max(this.statistics.max,i,a)}},zn.prototype.upload=function(t){this.paintVertexArray&amp;&amp;(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},zn.prototype.destroy=function(){this.paintVertexBuffer&amp;&amp;this.paintVertexBuffer.destroy()},zn.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},zn.prototype.setUniforms=function(t,e,r){t.gl.uniform1f(e.uniforms[&quot;a_&quot;+this.name+&quot;_t&quot;],this.interpolationFactor(r.zoom))};var Pn=function(){this.binders={},this.cacheKey=&quot;&quot;,this._buffers=[]};Pn.createDynamic=function(t,e,r){var n=new Pn,i=[];for(var a in t.paint._values)if(r(a)){var o=t.paint.get(a);if(o instanceof Br&amp;&amp;o.property.specification[&quot;property-function&quot;]){var s=In(a,t.type),l=o.property.specification.type,c=o.property.useIntegerZoom;&quot;constant&quot;===o.value.kind?(n.binders[a]=new Cn(o.value,s,l),i.push(&quot;/u_&quot;+s)):&quot;source&quot;===o.value.kind?(n.binders[a]=new Ln(o.value,s,l),i.push(&quot;/a_&quot;+s)):(n.binders[a]=new zn(o.value,s,l,c,e),i.push(&quot;/z_&quot;+s))}}return n.cacheKey=i.sort().join(&quot;&quot;),n},Pn.prototype.populatePaintArrays=function(t,e){for(var r in this.binders)this.binders[r].populatePaintArray(t,e)},Pn.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},Pn.prototype.setUniforms=function(t,e,r,n){for(var i in this.binders)this.binders[i].setUniforms(t,e,n,r.get(i))},Pn.prototype.getPaintVertexBuffers=function(){return this._buffers},Pn.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var n in this.binders){var i=this.binders[n];(i instanceof Ln||i instanceof zn)&amp;&amp;i.paintVertexBuffer&amp;&amp;r.push(i.paintVertexBuffer)}this._buffers=r},Pn.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var On=function(t,e,r,n){void 0===n&amp;&amp;(n=function(){return!0}),this.programConfigurations={};for(var i=0,a=e;i&lt;a.length;i+=1){var o=a[i];this.programConfigurations[o.id]=Pn.createDynamic(o,r,n),this.programConfigurations[o.id].layoutAttributes=t}};function In(t,e){return{&quot;text-opacity&quot;:&quot;opacity&quot;,&quot;icon-opacity&quot;:&quot;opacity&quot;,&quot;text-color&quot;:&quot;fill_color&quot;,&quot;icon-color&quot;:&quot;fill_color&quot;,&quot;text-halo-color&quot;:&quot;halo_color&quot;,&quot;icon-halo-color&quot;:&quot;halo_color&quot;,&quot;text-halo-blur&quot;:&quot;halo_blur&quot;,&quot;icon-halo-blur&quot;:&quot;halo_blur&quot;,&quot;text-halo-width&quot;:&quot;halo_width&quot;,&quot;icon-halo-width&quot;:&quot;halo_width&quot;,&quot;line-gap-width&quot;:&quot;gapwidth&quot;}[t]||t.replace(e+&quot;-&quot;,&quot;&quot;).replace(/-/g,&quot;_&quot;)}On.prototype.populatePaintArrays=function(t,e){for(var r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e)},On.prototype.get=function(t){return this.programConfigurations[t]},On.prototype.upload=function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)},On.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},pr(&quot;ConstantBinder&quot;,Cn),pr(&quot;SourceExpressionBinder&quot;,Ln),pr(&quot;CompositeExpressionBinder&quot;,zn),pr(&quot;ProgramConfiguration&quot;,Pn,{omit:[&quot;_buffers&quot;]}),pr(&quot;ProgramConfigurationSet&quot;,On);var Dn=8192,Rn=(16,{min:-1*Math.pow(2,15),max:Math.pow(2,15)-1});function Bn(t){for(var e=Dn/t.extent,r=t.loadGeometry(),n=0;n&lt;r.length;n++)for(var i=r[n],a=0;a&lt;i.length;a++){var o=i[a];o.x=Math.round(o.x*e),o.y=Math.round(o.y*e),(o.x&lt;Rn.min||o.x&gt;Rn.max||o.y&lt;Rn.min||o.y&gt;Rn.max)&amp;&amp;_(&quot;Geometry exceeds allowed extent, reduce your vector tile buffer size&quot;)}return r}function Fn(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Nn=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.segments=new Tn,this.programConfigurations=new On(An,t.layers,t.zoom)};function jn(t,e,r){for(var n=0;n&lt;t.length;n++){var i=t[n];if(Zn(i,e))return!0;if(Wn(e,i,r))return!0}return!1}function Vn(t,e){if(1===t.length&amp;&amp;1===t[0].length)return Xn(e,t[0][0]);for(var r=0;r&lt;e.length;r++)for(var n=e[r],i=0;i&lt;n.length;i++)if(Xn(t,n[i]))return!0;for(var a=0;a&lt;t.length;a++){for(var o=t[a],s=0;s&lt;o.length;s++)if(Xn(e,o[s]))return!0;for(var l=0;l&lt;e.length;l++)if(Hn(o,e[l]))return!0}return!1}function Un(t,e,r){for(var n=0;n&lt;e.length;n++)for(var i=e[n],a=0;a&lt;t.length;a++){var o=t[a];if(o.length&gt;=3)for(var s=0;s&lt;i.length;s++)if(Zn(o,i[s]))return!0;if(qn(o,i,r))return!0}return!1}function qn(t,e,r){if(t.length&gt;1){if(Hn(t,e))return!0;for(var n=0;n&lt;e.length;n++)if(Wn(e[n],t,r))return!0}for(var i=0;i&lt;t.length;i++)if(Wn(t[i],e,r))return!0;return!1}function Hn(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r&lt;t.length-1;r++)for(var n=t[r],i=t[r+1],a=0;a&lt;e.length-1;a++)if(Gn(n,i,e[a],e[a+1]))return!0;return!1}function Gn(t,e,r,n){return w(t,r,n)!==w(e,r,n)&amp;&amp;w(t,e,r)!==w(t,e,n)}function Wn(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])&lt;n;for(var i=1;i&lt;e.length;i++)if(Yn(t,e[i-1],e[i])&lt;n)return!0;return!1}function Yn(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i&lt;0?t.distSqr(e):i&gt;1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Xn(t,e){for(var r,n,i,a=!1,o=0;o&lt;t.length;o++)for(var s=0,l=(r=t[o]).length-1;s&lt;r.length;l=s++)n=r[s],i=r[l],n.y&gt;e.y!=i.y&gt;e.y&amp;&amp;e.x&lt;(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&amp;&amp;(a=!a);return a}function Zn(t,e){for(var r=!1,n=0,i=t.length-1;n&lt;t.length;i=n++){var a=t[n],o=t[i];a.y&gt;e.y!=o.y&gt;e.y&amp;&amp;e.x&lt;(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&amp;&amp;(r=!r)}return r}function $n(t,e,r){var n=e.paint.get(t).value;return&quot;constant&quot;===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].statistics.max}function Jn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Kn(t,e,r,n,i){if(!e[0]&amp;&amp;!e[1])return t;var a=l.convert(e);&quot;viewport&quot;===r&amp;&amp;a._rotate(-n);for(var o=[],s=0;s&lt;t.length;s++){for(var c=t[s],u=[],f=0;f&lt;c.length;f++)u.push(c[f].sub(a._mult(i)));o.push(u)}return o}Nn.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Nn.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Nn.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,An),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},Nn.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Nn.prototype.addFeature=function(t,e){for(var r=0,n=e;r&lt;n.length;r+=1)for(var i=0,a=n[r];i&lt;a.length;i+=1){var o=a[i],s=o.x,l=o.y;if(!(s&lt;0||s&gt;=Dn||l&lt;0||l&gt;=Dn)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),u=c.vertexLength;Fn(this.layoutVertexArray,s,l,-1,-1),Fn(this.layoutVertexArray,s,l,1,-1),Fn(this.layoutVertexArray,s,l,1,1),Fn(this.layoutVertexArray,s,l,-1,1),this.indexArray.emplaceBack(u,u+1,u+2),this.indexArray.emplaceBack(u,u+3,u+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(&quot;CircleBucket&quot;,Nn,{omit:[&quot;layers&quot;]});var Qn={paint:new qr({&quot;circle-radius&quot;:new jr(O.paint_circle[&quot;circle-radius&quot;]),&quot;circle-color&quot;:new jr(O.paint_circle[&quot;circle-color&quot;]),&quot;circle-blur&quot;:new jr(O.paint_circle[&quot;circle-blur&quot;]),&quot;circle-opacity&quot;:new jr(O.paint_circle[&quot;circle-opacity&quot;]),&quot;circle-translate&quot;:new Nr(O.paint_circle[&quot;circle-translate&quot;]),&quot;circle-translate-anchor&quot;:new Nr(O.paint_circle[&quot;circle-translate-anchor&quot;]),&quot;circle-pitch-scale&quot;:new Nr(O.paint_circle[&quot;circle-pitch-scale&quot;]),&quot;circle-pitch-alignment&quot;:new Nr(O.paint_circle[&quot;circle-pitch-alignment&quot;]),&quot;circle-stroke-width&quot;:new jr(O.paint_circle[&quot;circle-stroke-width&quot;]),&quot;circle-stroke-color&quot;:new jr(O.paint_circle[&quot;circle-stroke-color&quot;]),&quot;circle-stroke-opacity&quot;:new jr(O.paint_circle[&quot;circle-stroke-opacity&quot;])})},ti=i(function(t,e){var r;t.exports=((r=new Float32Array(3))[0]=0,r[1]=0,r[2]=0,function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}(),{vec3:{transformMat3:function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},vec4:{transformMat4:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},mat2:{create:function(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},rotate:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+a*s,t[1]=i*l+o*s,t[2]=n*-s+a*l,t[3]=i*-s+o*l,t},scale:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1];return t[0]=n*s,t[1]=i*s,t[2]=a*l,t[3]=o*l,t}},mat3:{create:function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromRotation:function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},mat4:{create:function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},translate:function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],m=r[1],v=r[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*m+f*v+e[12],t[13]=i*g+l*m+h*v+e[13],t[14]=a*g+c*m+p*v+e[14],t[15]=o*g+u*m+d*v+e[15]),t},scale:function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},multiply:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],m=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*m,t[2]=x*a+b*c+_*p+w*v,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*m,t[6]=x*a+b*c+_*p+w*v,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*m,t[10]=x*a+b*c+_*p+w*v,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t},perspective:function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},rotateX:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&amp;&amp;(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t},rotateZ:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&amp;&amp;(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t},invert:function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],m=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*m-h*d,T=u*v-p*d,S=f*m-h*g,E=f*v-p*g,C=h*v-p*m,L=y*C-x*E+b*S+_*T-w*A+k*M;return L?(L=1/L,t[0]=(s*C-l*E+c*S)*L,t[1]=(i*E-n*C-a*S)*L,t[2]=(g*k-m*w+v*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*C-c*A)*L,t[5]=(r*C-i*T+a*A)*L,t[6]=(m*b-d*k-v*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*E-s*T+c*M)*L,t[9]=(n*T-r*E-a*M)*L,t[10]=(d*w-g*b+v*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-m*y)*L,t[15]=(u*_-f*x+h*y)*L,t):null},ortho:function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t}}})}),ei=(ti.vec3,ti.vec4),ri=(ti.mat2,ti.mat3,ti.mat4),ni=function(t){function e(e){t.call(this,e,Qn)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Nn(t)},e.prototype.queryRadius=function(t){var e=t;return $n(&quot;circle-radius&quot;,this,e)+$n(&quot;circle-stroke-width&quot;,this,e)+Jn(this.paint.get(&quot;circle-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){for(var s=Kn(t,this.paint.get(&quot;circle-translate&quot;),this.paint.get(&quot;circle-translate-anchor&quot;),i.angle,a),l=this.paint.get(&quot;circle-radius&quot;).evaluate(e)+this.paint.get(&quot;circle-stroke-width&quot;).evaluate(e),c=&quot;map&quot;===this.paint.get(&quot;circle-pitch-alignment&quot;),u=c?s:function(t,e,r){return s.map(function(t){return t.map(function(t){return ii(t,e,r)})})}(0,o,i),f=c?l*a:l,h=0,p=r;h&lt;p.length;h+=1)for(var d=0,g=p[h];d&lt;g.length;d+=1){var m=g[d],v=c?m:ii(m,o,i),y=f,x=ei.transformMat4([],[m.x,m.y,0,1],o);if(&quot;viewport&quot;===this.paint.get(&quot;circle-pitch-scale&quot;)&amp;&amp;&quot;map&quot;===this.paint.get(&quot;circle-pitch-alignment&quot;)?y*=x[3]/i.cameraToCenterDistance:&quot;map&quot;===this.paint.get(&quot;circle-pitch-scale&quot;)&amp;&amp;&quot;viewport&quot;===this.paint.get(&quot;circle-pitch-alignment&quot;)&amp;&amp;(y*=i.cameraToCenterDistance/x[3]),jn(u,v,y))return!0}return!1},e}(Hr);function ii(t,e,r){var n=ei.transformMat4([],[t.x,t.y,0,1],e);return new l((n[0]/n[3]+1)*r.width*.5,(n[1]/n[3]+1)*r.height*.5)}var ai=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Nn);function oi(t,e,r,n){var i=e.width,a=e.height;if(n){if(n.length!==i*a*r)throw new RangeError(&quot;mismatched image size&quot;)}else n=new Uint8Array(i*a*r);return t.width=i,t.height=a,t.data=n,t}function si(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var a=oi({},{width:n,height:i},r);li(t,a,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=a.data}}function li(t,e,r,n,i,a){if(0===i.width||0===i.height)return e;if(i.width&gt;t.width||i.height&gt;t.height||r.x&gt;t.width-i.width||r.y&gt;t.height-i.height)throw new RangeError(&quot;out of range source coordinates for image copy&quot;);if(i.width&gt;e.width||i.height&gt;e.height||n.x&gt;e.width-i.width||n.y&gt;e.height-i.height)throw new RangeError(&quot;out of range destination coordinates for image copy&quot;);for(var o=t.data,s=e.data,l=0;l&lt;i.height;l++)for(var c=((r.y+l)*t.width+r.x)*a,u=((n.y+l)*e.width+n.x)*a,f=0;f&lt;i.width*a;f++)s[u+f]=o[c+f];return e}pr(&quot;HeatmapBucket&quot;,ai,{omit:[&quot;layers&quot;]});var ci=function(t,e){oi(this,t,1,e)};ci.prototype.resize=function(t){si(this,t,1)},ci.prototype.clone=function(){return new ci({width:this.width,height:this.height},new Uint8Array(this.data))},ci.copy=function(t,e,r,n,i){li(t,e,r,n,i,1)};var ui=function(t,e){oi(this,t,4,e)};ui.prototype.resize=function(t){si(this,t,4)},ui.prototype.clone=function(){return new ui({width:this.width,height:this.height},new Uint8Array(this.data))},ui.copy=function(t,e,r,n,i){li(t,e,r,n,i,4)},pr(&quot;AlphaImage&quot;,ci),pr(&quot;RGBAImage&quot;,ui);var fi={paint:new qr({&quot;heatmap-radius&quot;:new jr(O.paint_heatmap[&quot;heatmap-radius&quot;]),&quot;heatmap-weight&quot;:new jr(O.paint_heatmap[&quot;heatmap-weight&quot;]),&quot;heatmap-intensity&quot;:new Nr(O.paint_heatmap[&quot;heatmap-intensity&quot;]),&quot;heatmap-color&quot;:new Ur(O.paint_heatmap[&quot;heatmap-color&quot;]),&quot;heatmap-opacity&quot;:new Nr(O.paint_heatmap[&quot;heatmap-opacity&quot;])})};function hi(t,e){for(var r=new Uint8Array(1024),n={},i=0,a=0;i&lt;256;i++,a+=4){n[e]=i/255;var o=t.evaluate(n);r[a+0]=Math.floor(255*o.r/o.a),r[a+1]=Math.floor(255*o.g/o.a),r[a+2]=Math.floor(255*o.b/o.a),r[a+3]=Math.floor(255*o.a)}return new ui({width:256,height:1},r)}var pi=function(t){function e(e){t.call(this,e,fi),this._updateColorRamp()}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ai(t)},e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),&quot;heatmap-color&quot;===e&amp;&amp;this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values[&quot;heatmap-color&quot;].value.expression;this.colorRamp=hi(t,&quot;heatmapDensity&quot;),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&amp;&amp;(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(&quot;heatmap-opacity&quot;)&amp;&amp;&quot;none&quot;!==this.visibility},e}(Hr),di={paint:new qr({&quot;hillshade-illumination-direction&quot;:new Nr(O.paint_hillshade[&quot;hillshade-illumination-direction&quot;]),&quot;hillshade-illumination-anchor&quot;:new Nr(O.paint_hillshade[&quot;hillshade-illumination-anchor&quot;]),&quot;hillshade-exaggeration&quot;:new Nr(O.paint_hillshade[&quot;hillshade-exaggeration&quot;]),&quot;hillshade-shadow-color&quot;:new Nr(O.paint_hillshade[&quot;hillshade-shadow-color&quot;]),&quot;hillshade-highlight-color&quot;:new Nr(O.paint_hillshade[&quot;hillshade-highlight-color&quot;]),&quot;hillshade-accent-color&quot;:new Nr(O.paint_hillshade[&quot;hillshade-accent-color&quot;])})},gi=function(t){function e(e){t.call(this,e,di)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(&quot;hillshade-exaggeration&quot;)&amp;&amp;&quot;none&quot;!==this.visibility},e}(Hr),mi=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;}],4).members,vi=xi,yi=xi;function xi(t,e,r){r=r||2;var n,i,a,o,s,l,c,u=e&amp;&amp;e.length,f=u?e[0]*r:t.length,h=bi(t,0,f,r,!0),p=[];if(!h)return p;if(u&amp;&amp;(h=function(t,e,r,n){var i,a,o,s=[];for(i=0,a=e.length;i&lt;a;i++)(o=bi(t,e[i]*n,i&lt;a-1?e[i+1]*n:t.length,n,!1))===o.next&amp;&amp;(o.steiner=!0),s.push(Li(o));for(s.sort(Si),i=0;i&lt;s.length;i++)Ei(s[i],r),r=_i(r,r.next);return r}(t,e,h,r)),t.length&gt;80*r){n=a=t[0],i=o=t[1];for(var d=r;d&lt;f;d+=r)(s=t[d])&lt;n&amp;&amp;(n=s),(l=t[d+1])&lt;i&amp;&amp;(i=l),s&gt;a&amp;&amp;(a=s),l&gt;o&amp;&amp;(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return wi(h,p,r,n,i,c),p}function bi(t,e,r,n,i){var a,o;if(i===Vi(t,e,r,n)&gt;0)for(a=e;a&lt;r;a+=n)o=Fi(a,t[a],t[a+1],o);else for(a=r-n;a&gt;=e;a-=n)o=Fi(a,t[a],t[a+1],o);return o&amp;&amp;Ii(o,o.next)&amp;&amp;(Ni(o),o=o.next),o}function _i(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Ii(n,n.next)&amp;&amp;0!==Oi(n.prev,n,n.next))n=n.next;else{if(Ni(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function wi(t,e,r,n,i,a,o){if(t){!o&amp;&amp;a&amp;&amp;function(t,e,r,n){var i=t;do{null===i.z&amp;&amp;(i.z=Ci(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e&lt;c&amp;&amp;(s++,n=n.nextZ);e++);for(l=c;s&gt;0||l&gt;0&amp;&amp;n;)0!==s&amp;&amp;(0===l||!n||r.z&lt;=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o&gt;1)}(i)}(t,n,i,a);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?Mi(t,n,i,a):ki(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Ni(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?wi(t=Ai(t,e,r),e,r,n,i,a,2):2===o&amp;&amp;Ti(t,e,r,n,i,a):wi(_i(t),e,r,n,i,a,1);break}}}function ki(t){var e=t.prev,r=t,n=t.next;if(Oi(e,r,n)&gt;=0)return!1;for(var i=t.next.next;i!==t.prev;){if(zi(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&amp;&amp;Oi(i.prev,i,i.next)&gt;=0)return!1;i=i.next}return!0}function Mi(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Oi(i,a,o)&gt;=0)return!1;for(var s=i.x&lt;a.x?i.x&lt;o.x?i.x:o.x:a.x&lt;o.x?a.x:o.x,l=i.y&lt;a.y?i.y&lt;o.y?i.y:o.y:a.y&lt;o.y?a.y:o.y,c=i.x&gt;a.x?i.x&gt;o.x?i.x:o.x:a.x&gt;o.x?a.x:o.x,u=i.y&gt;a.y?i.y&gt;o.y?i.y:o.y:a.y&gt;o.y?a.y:o.y,f=Ci(s,l,e,r,n),h=Ci(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&amp;&amp;p.z&gt;=f&amp;&amp;d&amp;&amp;d.z&lt;=h;){if(p!==t.prev&amp;&amp;p!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&amp;&amp;Oi(p.prev,p,p.next)&gt;=0)return!1;if(p=p.prevZ,d!==t.prev&amp;&amp;d!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;Oi(d.prev,d,d.next)&gt;=0)return!1;d=d.nextZ}for(;p&amp;&amp;p.z&gt;=f;){if(p!==t.prev&amp;&amp;p!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&amp;&amp;Oi(p.prev,p,p.next)&gt;=0)return!1;p=p.prevZ}for(;d&amp;&amp;d.z&lt;=h;){if(d!==t.prev&amp;&amp;d!==t.next&amp;&amp;zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&amp;&amp;Oi(d.prev,d,d.next)&gt;=0)return!1;d=d.nextZ}return!0}function Ai(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Ii(i,a)&amp;&amp;Di(i,n,n.next,a)&amp;&amp;Ri(i,a)&amp;&amp;Ri(a,i)&amp;&amp;(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),Ni(n),Ni(n.next),n=t=a),n=n.next}while(n!==t);return n}function Ti(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&amp;&amp;Pi(o,s)){var l=Bi(o,s);return o=_i(o,o.next),l=_i(l,l.next),wi(o,e,r,n,i,a),void wi(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Si(t,e){return t.x-e.x}function Ei(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a&lt;=n.y&amp;&amp;a&gt;=n.next.y&amp;&amp;n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s&lt;=i&amp;&amp;s&gt;o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x&lt;n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;for(n=r.next;n!==c;)i&gt;=n.x&amp;&amp;n.x&gt;=u&amp;&amp;i!==n.x&amp;&amp;zi(a&lt;f?i:o,a,u,f,a&lt;f?o:i,a,n.x,n.y)&amp;&amp;((l=Math.abs(a-n.y)/(i-n.x))&lt;h||l===h&amp;&amp;n.x&gt;r.x)&amp;&amp;Ri(n,t)&amp;&amp;(r=n,h=l),n=n.next;return r}(t,e)){var r=Bi(e,t);_i(r,r.next)}}function Ci(t,e,r,n,i){return(t=1431655765&amp;((t=858993459&amp;((t=252645135&amp;((t=16711935&amp;((t=32767*(t-r)*i)|t&lt;&lt;8))|t&lt;&lt;4))|t&lt;&lt;2))|t&lt;&lt;1))|(e=1431655765&amp;((e=858993459&amp;((e=252645135&amp;((e=16711935&amp;((e=32767*(e-n)*i)|e&lt;&lt;8))|e&lt;&lt;4))|e&lt;&lt;2))|e&lt;&lt;1))&lt;&lt;1}function Li(t){var e=t,r=t;do{e.x&lt;r.x&amp;&amp;(r=e),e=e.next}while(e!==t);return r}function zi(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)&gt;=0&amp;&amp;(t-o)*(n-s)-(r-o)*(e-s)&gt;=0&amp;&amp;(r-o)*(a-s)-(i-o)*(n-s)&gt;=0}function Pi(t,e){return t.next.i!==e.i&amp;&amp;t.prev.i!==e.i&amp;&amp;!function(t,e){var r=t;do{if(r.i!==t.i&amp;&amp;r.next.i!==t.i&amp;&amp;r.i!==e.i&amp;&amp;r.next.i!==e.i&amp;&amp;Di(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&amp;&amp;Ri(t,e)&amp;&amp;Ri(e,t)&amp;&amp;function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y&gt;a!=r.next.y&gt;a&amp;&amp;r.next.y!==r.y&amp;&amp;i&lt;(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&amp;&amp;(n=!n),r=r.next}while(r!==t);return n}(t,e)}function Oi(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Ii(t,e){return t.x===e.x&amp;&amp;t.y===e.y}function Di(t,e,r,n){return!!(Ii(t,e)&amp;&amp;Ii(r,n)||Ii(t,n)&amp;&amp;Ii(r,e))||Oi(t,e,r)&gt;0!=Oi(t,e,n)&gt;0&amp;&amp;Oi(r,n,t)&gt;0!=Oi(r,n,e)&gt;0}function Ri(t,e){return Oi(t.prev,t,t.next)&lt;0?Oi(t,e,t.next)&gt;=0&amp;&amp;Oi(t,t.prev,e)&gt;=0:Oi(t,e,t.prev)&lt;0||Oi(t,t.next,e)&lt;0}function Bi(t,e){var r=new ji(t.i,t.x,t.y),n=new ji(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Fi(t,e,r,n){var i=new ji(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ni(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&amp;&amp;(t.prevZ.nextZ=t.nextZ),t.nextZ&amp;&amp;(t.nextZ.prevZ=t.prevZ)}function ji(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Vi(t,e,r,n){for(var i=0,a=e,o=r-n;a&lt;r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}xi.deviation=function(t,e,r,n){var i=e&amp;&amp;e.length,a=i?e[0]*r:t.length,o=Math.abs(Vi(t,0,a,r));if(i)for(var s=0,l=e.length;s&lt;l;s++){var c=e[s]*r,u=s&lt;l-1?e[s+1]*r:t.length;o-=Math.abs(Vi(t,c,u,r))}var f=0;for(s=0;s&lt;n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&amp;&amp;0===f?0:Math.abs((f-o)/o)},xi.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i&lt;t.length;i++){for(var a=0;a&lt;t[i].length;a++)for(var o=0;o&lt;e;o++)r.vertices.push(t[i][a][o]);i&gt;0&amp;&amp;(n+=t[i-1].length,r.holes.push(n))}return r},vi.default=yi;var Ui=Hi,qi=Hi;function Hi(t,e,r,n,i){!function t(e,r,n,i,a){for(;i&gt;n;){if(i-n&gt;600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2&lt;0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var f=e[r],h=n,p=i;for(Gi(e,n,r),a(e[i],f)&gt;0&amp;&amp;Gi(e,n,i);h&lt;p;){for(Gi(e,h,p),h++,p--;a(e[h],f)&lt;0;)h++;for(;a(e[p],f)&gt;0;)p--}0===a(e[n],f)?Gi(e,n,p):Gi(e,++p,i),p&lt;=r&amp;&amp;(n=p+1),r&lt;=p&amp;&amp;(i=p-1)}}(t,e,r||0,n||t.length-1,i||Wi)}function Gi(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Wi(t,e){return t&lt;e?-1:t&gt;e?1:0}function Yi(t,e){var r=t.length;if(r&lt;=1)return[t];for(var n,i,a=[],o=0;o&lt;r;o++){var s=k(t[o]);0!==s&amp;&amp;(t[o].area=Math.abs(s),void 0===i&amp;&amp;(i=s&lt;0),i===s&lt;0?(n&amp;&amp;a.push(n),n=[t[o]]):n.push(t[o]))}if(n&amp;&amp;a.push(n),e&gt;1)for(var l=0;l&lt;a.length;l++)a[l].length&lt;=e||(Ui(a[l],e,1,a[l].length-1,Xi),a[l]=a[l].slice(0,e));return a}function Xi(t,e){return e.area-t.area}Ui.default=qi;var Zi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.indexArray2=new hn,this.programConfigurations=new On(mi,t.layers,t.zoom),this.segments=new Tn,this.segments2=new Tn};Zi.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Zi.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Zi.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,mi),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)},Zi.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Zi.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r&lt;n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o&lt;s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray),c=l.vertexLength,u=[],f=[],h=0,p=i;h&lt;p.length;h+=1){var d=p[h];if(0!==d.length){d!==i[0]&amp;&amp;f.push(u.length/2);var g=this.segments2.prepareSegment(d.length,this.layoutVertexArray,this.indexArray2),m=g.vertexLength;this.layoutVertexArray.emplaceBack(d[0].x,d[0].y),this.indexArray2.emplaceBack(m+d.length-1,m),u.push(d[0].x),u.push(d[0].y);for(var v=1;v&lt;d.length;v++)this.layoutVertexArray.emplaceBack(d[v].x,d[v].y),this.indexArray2.emplaceBack(m+v-1,m+v),u.push(d[v].x),u.push(d[v].y);g.vertexLength+=d.length,g.primitiveLength+=d.length}}for(var y=vi(u,f),x=0;x&lt;y.length;x+=3)this.indexArray.emplaceBack(c+y[x],c+y[x+1],c+y[x+2]);l.vertexLength+=a,l.primitiveLength+=y.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(&quot;FillBucket&quot;,Zi,{omit:[&quot;layers&quot;]});var $i={paint:new qr({&quot;fill-antialias&quot;:new Nr(O.paint_fill[&quot;fill-antialias&quot;]),&quot;fill-opacity&quot;:new jr(O.paint_fill[&quot;fill-opacity&quot;]),&quot;fill-color&quot;:new jr(O.paint_fill[&quot;fill-color&quot;]),&quot;fill-outline-color&quot;:new jr(O.paint_fill[&quot;fill-outline-color&quot;]),&quot;fill-translate&quot;:new Nr(O.paint_fill[&quot;fill-translate&quot;]),&quot;fill-translate-anchor&quot;:new Nr(O.paint_fill[&quot;fill-translate-anchor&quot;]),&quot;fill-pattern&quot;:new Vr(O.paint_fill[&quot;fill-pattern&quot;])})},Ji=function(t){function e(e){t.call(this,e,$i)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t);var e=this.paint._values[&quot;fill-outline-color&quot;];&quot;constant&quot;===e.value.kind&amp;&amp;void 0===e.value.value&amp;&amp;(this.paint._values[&quot;fill-outline-color&quot;]=this.paint._values[&quot;fill-color&quot;])},e.prototype.createBucket=function(t){return new Zi(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(&quot;fill-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(&quot;fill-translate&quot;),this.paint.get(&quot;fill-translate-anchor&quot;),i.angle,a),r)},e}(Hr),Ki=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_normal_ed&quot;,components:4,type:&quot;Int16&quot;}],4).members,Qi=Math.pow(2,13);function ta(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Qi)+o,i*Qi*2,a*Qi*2,Math.round(s))}var ea=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Kr,this.indexArray=new fn,this.programConfigurations=new On(Ki,t.layers,t.zoom),this.segments=new Tn};function ra(t,e){return t.x===e.x&amp;&amp;(t.x&lt;0||t.x&gt;Dn)||t.y===e.y&amp;&amp;(t.y&lt;0||t.y&gt;Dn)}function na(t){return t.every(function(t){return t.x&lt;0})||t.every(function(t){return t.x&gt;Dn})||t.every(function(t){return t.y&lt;0})||t.every(function(t){return t.y&gt;Dn})}ea.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},ea.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ea.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ki),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},ea.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ea.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r&lt;n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o&lt;s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=0,u=i;c&lt;u.length;c+=1){var f=u[c];if(0!==f.length&amp;&amp;!na(f))for(var h=0,p=0;p&lt;f.length;p++){var d=f[p];if(p&gt;=1){var g=f[p-1];if(!ra(d,g)){l.vertexLength+4&gt;Tn.MAX_VERTEX_ARRAY_LENGTH&amp;&amp;(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var m=d.sub(g)._perp()._unit(),v=g.dist(d);h+v&gt;32768&amp;&amp;(h=0),ta(this.layoutVertexArray,d.x,d.y,m.x,m.y,0,0,h),ta(this.layoutVertexArray,d.x,d.y,m.x,m.y,0,1,h),h+=v,ta(this.layoutVertexArray,g.x,g.y,m.x,m.y,0,0,h),ta(this.layoutVertexArray,g.x,g.y,m.x,m.y,0,1,h);var y=l.vertexLength;this.indexArray.emplaceBack(y,y+1,y+2),this.indexArray.emplaceBack(y+1,y+2,y+3),l.vertexLength+=4,l.primitiveLength+=2}}}}l.vertexLength+a&gt;Tn.MAX_VERTEX_ARRAY_LENGTH&amp;&amp;(l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray));for(var x=[],b=[],_=l.vertexLength,w=0,k=i;w&lt;k.length;w+=1){var M=k[w];if(0!==M.length){M!==i[0]&amp;&amp;b.push(x.length/2);for(var A=0;A&lt;M.length;A++){var T=M[A];ta(this.layoutVertexArray,T.x,T.y,0,0,1,1,0),x.push(T.x),x.push(T.y)}}}for(var S=vi(x,b),E=0;E&lt;S.length;E+=3)this.indexArray.emplaceBack(_+S[E],_+S[E+1],_+S[E+2]);l.primitiveLength+=S.length/3,l.vertexLength+=a}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(&quot;FillExtrusionBucket&quot;,ea,{omit:[&quot;layers&quot;]});var ia={paint:new qr({&quot;fill-extrusion-opacity&quot;:new Nr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-opacity&quot;]),&quot;fill-extrusion-color&quot;:new jr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-color&quot;]),&quot;fill-extrusion-translate&quot;:new Nr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-translate&quot;]),&quot;fill-extrusion-translate-anchor&quot;:new Nr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-translate-anchor&quot;]),&quot;fill-extrusion-pattern&quot;:new Vr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-pattern&quot;]),&quot;fill-extrusion-height&quot;:new jr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-height&quot;]),&quot;fill-extrusion-base&quot;:new jr(O[&quot;paint_fill-extrusion&quot;][&quot;fill-extrusion-base&quot;])})},aa=function(t){function e(e){t.call(this,e,ia)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ea(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(&quot;fill-extrusion-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(&quot;fill-extrusion-translate&quot;),this.paint.get(&quot;fill-extrusion-translate-anchor&quot;),i.angle,a),r)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(&quot;fill-extrusion-opacity&quot;)&amp;&amp;&quot;none&quot;!==this.visibility},e.prototype.resize=function(){this.viewportFrame&amp;&amp;(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(Hr),oa=Xr([{name:&quot;a_pos_normal&quot;,components:4,type:&quot;Int16&quot;},{name:&quot;a_data&quot;,components:4,type:&quot;Uint8&quot;}],4).members,sa=la;function la(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(ca,this,e)}function ca(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos&lt;r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&amp;&amp;(e._geometry=r.pos)}function ua(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i&lt;a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}la.types=[&quot;Unknown&quot;,&quot;Point&quot;,&quot;LineString&quot;,&quot;Polygon&quot;],la.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,a=0,o=0,s=[];t.pos&lt;r;){if(i&lt;=0){var c=t.readVarint();n=7&amp;c,i=c&gt;&gt;3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&amp;&amp;(e&amp;&amp;s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error(&quot;unknown command &quot;+n);e&amp;&amp;e.push(e[0].clone())}}return e&amp;&amp;s.push(e),s},la.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos&lt;e;){if(n&lt;=0){var u=t.readVarint();r=7&amp;u,n=u&gt;&gt;3}if(n--,1===r||2===r)(i+=t.readSVarint())&lt;o&amp;&amp;(o=i),i&gt;s&amp;&amp;(s=i),(a+=t.readSVarint())&lt;l&amp;&amp;(l=a),a&gt;c&amp;&amp;(c=a);else if(7!==r)throw new Error(&quot;unknown command &quot;+r)}return[o,l,s,c]},la.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=la.types[this.type];function u(t){for(var e=0;e&lt;t.length;e++){var r=t[e],n=180-360*(r.y+s)/a;t[e]=[360*(r.x+o)/a-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(n=0;n&lt;l.length;n++)f[n]=l[n][0];u(l=f);break;case 2:for(n=0;n&lt;l.length;n++)u(l[n]);break;case 3:for(l=function(t){var e=t.length;if(e&lt;=1)return[t];for(var r,n,i=[],a=0;a&lt;e;a++){var o=ua(t[a]);0!==o&amp;&amp;(void 0===n&amp;&amp;(n=o&lt;0),n===o&lt;0?(r&amp;&amp;i.push(r),r=[t[a]]):r.push(t[a]))}return r&amp;&amp;i.push(r),i}(l),n=0;n&lt;l.length;n++)for(i=0;i&lt;l[n].length;i++)u(l[n][i])}1===l.length?l=l[0]:c=&quot;Multi&quot;+c;var h={type:&quot;Feature&quot;,geometry:{type:c,coordinates:l},properties:this.properties};return&quot;id&quot;in this&amp;&amp;(h.id=this.id),h};var fa=ha;function ha(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(pa,this,e),this.length=this._features.length}function pa(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&amp;&amp;e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos&lt;r;){var n=t.readVarint()&gt;&gt;3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function da(t,e,r){if(3===t){var n=new fa(r,r.readVarint()+r.pos);n.length&amp;&amp;(e[n.name]=n)}}ha.prototype.feature=function(t){if(t&lt;0||t&gt;=this._features.length)throw new Error(&quot;feature index out of bounds&quot;);this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new sa(this._pbf,e,this.extent,this._keys,this._values)};var ga={VectorTile:function(t,e){this.layers=t.readFields(da,{},e)},VectorTileFeature:sa,VectorTileLayer:fa},ma=ga.VectorTileFeature.types,va=63,ya=Math.cos(Math.PI/180*37.5),xa=.5,ba=Math.pow(2,14)/xa;function _a(t,e,r,n,i,a,o){t.emplaceBack(e.x,e.y,n?1:0,i?1:-1,Math.round(va*r.x)+128,Math.round(va*r.y)+128,1+(0===a?0:a&lt;0?-1:1)|(o*xa&amp;63)&lt;&lt;2,o*xa&gt;&gt;6)}var wa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Qr,this.indexArray=new fn,this.programConfigurations=new On(oa,t.layers,t.zoom),this.segments=new Tn};function ka(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(ba-1)}wa.prototype.populate=function(t,e){for(var r=0,n=t;r&lt;n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},wa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},wa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,oa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},wa.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wa.prototype.addFeature=function(t,e){for(var r=this.layers[0].layout,n=r.get(&quot;line-join&quot;).evaluate(t),i=r.get(&quot;line-cap&quot;),a=r.get(&quot;line-miter-limit&quot;),o=r.get(&quot;line-round-limit&quot;),s=0,l=e;s&lt;l.length;s+=1){var c=l[s];this.addLine(c,t,n,i,a,o)}},wa.prototype.addLine=function(t,e,r,n,i,a){var o=null;e.properties&amp;&amp;e.properties.hasOwnProperty(&quot;mapbox_clip_start&quot;)&amp;&amp;e.properties.hasOwnProperty(&quot;mapbox_clip_end&quot;)&amp;&amp;(o={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var s=&quot;Polygon&quot;===ma[e.type],l=t.length;l&gt;=2&amp;&amp;t[l-1].equals(t[l-2]);)l--;for(var c=0;c&lt;l-1&amp;&amp;t[c].equals(t[c+1]);)c++;if(!(l&lt;(s?3:2))){o&amp;&amp;(o.tileTotal=function(t,e,r){for(var n,i,a=0,o=c;o&lt;r-1;o++)n=t[o],i=t[o+1],a+=n.dist(i);return a}(t,0,l)),&quot;bevel&quot;===r&amp;&amp;(i=1.05);var u=Dn/(512*this.overscaling)*15,f=t[c],h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray);this.distance=0;var p,d,g,m=n,v=s?&quot;butt&quot;:n,y=!0,x=void 0,b=void 0,_=void 0,w=void 0;this.e1=this.e2=this.e3=-1,s&amp;&amp;(p=t[l-2],w=f.sub(p)._unit()._perp());for(var k=c;k&lt;l;k++)if(!(b=s&amp;&amp;k===l-1?t[c+1]:t[k+1])||!t[k].equals(b)){w&amp;&amp;(_=w),p&amp;&amp;(x=p),p=t[k],w=b?b.sub(p)._unit()._perp():_;var M=(_=_||w).add(w);0===M.x&amp;&amp;0===M.y||M._unit();var A=M.x*w.x+M.y*w.y,T=0!==A?1/A:1/0,S=A&lt;ya&amp;&amp;x&amp;&amp;b;if(S&amp;&amp;k&gt;c){var E=p.dist(x);if(E&gt;2*u){var C=p.sub(p.sub(x)._mult(u/E)._round());this.distance+=C.dist(x),this.addCurrentVertex(C,this.distance,_.mult(1),0,0,!1,h,o),x=C}}var L=x&amp;&amp;b,z=L?r:b?m:v;if(L&amp;&amp;&quot;round&quot;===z&amp;&amp;(T&lt;a?z=&quot;miter&quot;:T&lt;=2&amp;&amp;(z=&quot;fakeround&quot;)),&quot;miter&quot;===z&amp;&amp;T&gt;i&amp;&amp;(z=&quot;bevel&quot;),&quot;bevel&quot;===z&amp;&amp;(T&gt;2&amp;&amp;(z=&quot;flipbevel&quot;),T&lt;i&amp;&amp;(z=&quot;miter&quot;)),x&amp;&amp;(this.distance+=p.dist(x)),&quot;miter&quot;===z)M._mult(T),this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o);else if(&quot;flipbevel&quot;===z){if(T&gt;100)M=w.clone().mult(-1);else{var P=_.x*w.y-_.y*w.x&gt;0?-1:1,O=T*_.add(w).mag()/_.sub(w).mag();M._perp()._mult(O*P)}this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,M.mult(-1),0,0,!1,h,o)}else if(&quot;bevel&quot;===z||&quot;fakeround&quot;===z){var I=_.x*w.y-_.y*w.x&gt;0,D=-Math.sqrt(T*T-1);if(I?(g=0,d=D):(d=0,g=D),y||this.addCurrentVertex(p,this.distance,_,d,g,!1,h,o),&quot;fakeround&quot;===z){for(var R=Math.floor(8*(.5-(A-.5))),B=void 0,F=0;F&lt;R;F++)B=w.mult((F+1)/(R+1))._add(_)._unit(),this.addPieSliceVertex(p,this.distance,B,I,h,o);this.addPieSliceVertex(p,this.distance,M,I,h,o);for(var N=R-1;N&gt;=0;N--)B=_.mult((N+1)/(R+1))._add(w)._unit(),this.addPieSliceVertex(p,this.distance,B,I,h,o)}b&amp;&amp;this.addCurrentVertex(p,this.distance,w,-d,-g,!1,h,o)}else&quot;butt&quot;===z?(y||this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),b&amp;&amp;this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)):&quot;square&quot;===z?(y||(this.addCurrentVertex(p,this.distance,_,1,1,!1,h,o),this.e1=this.e2=-1),b&amp;&amp;this.addCurrentVertex(p,this.distance,w,-1,-1,!1,h,o)):&quot;round&quot;===z&amp;&amp;(y||(this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,_,1,1,!0,h,o),this.e1=this.e2=-1),b&amp;&amp;(this.addCurrentVertex(p,this.distance,w,-1,-1,!0,h,o),this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)));if(S&amp;&amp;k&lt;l-1){var j=p.dist(b);if(j&gt;2*u){var V=p.add(b.sub(p)._mult(u/j)._round());this.distance+=V.dist(p),this.addCurrentVertex(V,this.distance,w.mult(1),0,0,!1,h,o),p=V}}y=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}},wa.prototype.addCurrentVertex=function(t,e,r,n,i,a,o,s){var l,c=this.layoutVertexArray,u=this.indexArray;s&amp;&amp;(e=ka(e,s)),l=r.clone(),n&amp;&amp;l._sub(r.perp()._mult(n)),_a(c,t,l,a,!1,n,e),this.e3=o.vertexLength++,this.e1&gt;=0&amp;&amp;this.e2&gt;=0&amp;&amp;(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),i&amp;&amp;l._sub(r.perp()._mult(i)),_a(c,t,l,a,!0,-i,e),this.e3=o.vertexLength++,this.e1&gt;=0&amp;&amp;this.e2&gt;=0&amp;&amp;(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e&gt;ba/2&amp;&amp;!s&amp;&amp;(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a,o))},wa.prototype.addPieSliceVertex=function(t,e,r,n,i,a){r=r.mult(n?-1:1);var o=this.layoutVertexArray,s=this.indexArray;a&amp;&amp;(e=ka(e,a)),_a(o,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1&gt;=0&amp;&amp;this.e2&gt;=0&amp;&amp;(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},pr(&quot;LineBucket&quot;,wa,{omit:[&quot;layers&quot;]});var Ma=new qr({&quot;line-cap&quot;:new Nr(O.layout_line[&quot;line-cap&quot;]),&quot;line-join&quot;:new jr(O.layout_line[&quot;line-join&quot;]),&quot;line-miter-limit&quot;:new Nr(O.layout_line[&quot;line-miter-limit&quot;]),&quot;line-round-limit&quot;:new Nr(O.layout_line[&quot;line-round-limit&quot;])}),Aa={paint:new qr({&quot;line-opacity&quot;:new jr(O.paint_line[&quot;line-opacity&quot;]),&quot;line-color&quot;:new jr(O.paint_line[&quot;line-color&quot;]),&quot;line-translate&quot;:new Nr(O.paint_line[&quot;line-translate&quot;]),&quot;line-translate-anchor&quot;:new Nr(O.paint_line[&quot;line-translate-anchor&quot;]),&quot;line-width&quot;:new jr(O.paint_line[&quot;line-width&quot;]),&quot;line-gap-width&quot;:new jr(O.paint_line[&quot;line-gap-width&quot;]),&quot;line-offset&quot;:new jr(O.paint_line[&quot;line-offset&quot;]),&quot;line-blur&quot;:new jr(O.paint_line[&quot;line-blur&quot;]),&quot;line-dasharray&quot;:new Vr(O.paint_line[&quot;line-dasharray&quot;]),&quot;line-pattern&quot;:new Vr(O.paint_line[&quot;line-pattern&quot;]),&quot;line-gradient&quot;:new Ur(O.paint_line[&quot;line-gradient&quot;])}),layout:Ma},Ta=new(function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Lr(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n){return r=p({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n)},e}(jr))(Aa.paint.properties[&quot;line-width&quot;].specification);Ta.useIntegerZoom=!0;var Sa=function(t){function e(e){t.call(this,e,Aa)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),&quot;line-gradient&quot;===e&amp;&amp;this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[&quot;line-gradient&quot;].value.expression;this.gradient=hi(t,&quot;lineProgress&quot;),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values[&quot;line-floorwidth&quot;]=Ta.possiblyEvaluate(this._transitioningPaint._values[&quot;line-width&quot;].value,e)},e.prototype.createBucket=function(t){return new wa(t)},e.prototype.queryRadius=function(t){var e=t,r=Ea($n(&quot;line-width&quot;,this,e),$n(&quot;line-gap-width&quot;,this,e)),n=$n(&quot;line-offset&quot;,this,e);return r/2+Math.abs(n)+Jn(this.paint.get(&quot;line-translate&quot;))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){var o=Kn(t,this.paint.get(&quot;line-translate&quot;),this.paint.get(&quot;line-translate-anchor&quot;),i.angle,a),s=a/2*Ea(this.paint.get(&quot;line-width&quot;).evaluate(e),this.paint.get(&quot;line-gap-width&quot;).evaluate(e)),c=this.paint.get(&quot;line-offset&quot;).evaluate(e);return c&amp;&amp;(r=function(t,e){for(var r=[],n=new l(0,0),i=0;i&lt;t.length;i++){for(var a=t[i],o=[],s=0;s&lt;a.length;s++){var c=a[s-1],u=a[s],f=a[s+1],h=0===s?n:u.sub(c)._unit()._perp(),p=s===a.length-1?n:f.sub(u)._unit()._perp(),d=h._add(p)._unit(),g=d.x*p.x+d.y*p.y;d._mult(1/g),o.push(d._mult(e)._add(u))}r.push(o)}return r}(r,c*a)),Un(o,r,s)},e}(Hr);function Ea(t,e){return e&gt;0?e+2*t:t}var Ca=Xr([{name:&quot;a_pos_offset&quot;,components:4,type:&quot;Int16&quot;},{name:&quot;a_data&quot;,components:4,type:&quot;Uint16&quot;}]),La=Xr([{name:&quot;a_projected_pos&quot;,components:3,type:&quot;Float32&quot;}],4),za=(Xr([{name:&quot;a_fade_opacity&quot;,components:1,type:&quot;Uint32&quot;}],4),Xr([{name:&quot;a_placed&quot;,components:2,type:&quot;Uint8&quot;}],4)),Pa=(Xr([{type:&quot;Int16&quot;,name:&quot;anchorPointX&quot;},{type:&quot;Int16&quot;,name:&quot;anchorPointY&quot;},{type:&quot;Int16&quot;,name:&quot;x1&quot;},{type:&quot;Int16&quot;,name:&quot;y1&quot;},{type:&quot;Int16&quot;,name:&quot;x2&quot;},{type:&quot;Int16&quot;,name:&quot;y2&quot;},{type:&quot;Uint32&quot;,name:&quot;featureIndex&quot;},{type:&quot;Uint16&quot;,name:&quot;sourceLayerIndex&quot;},{type:&quot;Uint16&quot;,name:&quot;bucketIndex&quot;},{type:&quot;Int16&quot;,name:&quot;radius&quot;},{type:&quot;Int16&quot;,name:&quot;signedDistanceFromAnchor&quot;}]),Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_anchor_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_extrude&quot;,components:2,type:&quot;Int16&quot;}],4)),Oa=Xr([{name:&quot;a_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_anchor_pos&quot;,components:2,type:&quot;Int16&quot;},{name:&quot;a_extrude&quot;,components:2,type:&quot;Int16&quot;}],4);function Ia(t,e,r){var n=e.layout.get(&quot;text-transform&quot;).evaluate(r);return&quot;uppercase&quot;===n?t=t.toLocaleUpperCase():&quot;lowercase&quot;===n&amp;&amp;(t=t.toLocaleLowerCase()),Cr.applyArabicShaping&amp;&amp;(t=Cr.applyArabicShaping(t)),t}Xr([{type:&quot;Int16&quot;,name:&quot;anchorX&quot;},{type:&quot;Int16&quot;,name:&quot;anchorY&quot;},{type:&quot;Uint16&quot;,name:&quot;glyphStartIndex&quot;},{type:&quot;Uint16&quot;,name:&quot;numGlyphs&quot;},{type:&quot;Uint32&quot;,name:&quot;vertexStartIndex&quot;},{type:&quot;Uint32&quot;,name:&quot;lineStartIndex&quot;},{type:&quot;Uint32&quot;,name:&quot;lineLength&quot;},{type:&quot;Uint16&quot;,name:&quot;segment&quot;},{type:&quot;Uint16&quot;,name:&quot;lowerSize&quot;},{type:&quot;Uint16&quot;,name:&quot;upperSize&quot;},{type:&quot;Float32&quot;,name:&quot;lineOffsetX&quot;},{type:&quot;Float32&quot;,name:&quot;lineOffsetY&quot;},{type:&quot;Uint8&quot;,name:&quot;writingMode&quot;},{type:&quot;Uint8&quot;,name:&quot;hidden&quot;}]),Xr([{type:&quot;Float32&quot;,name:&quot;offsetX&quot;}]),Xr([{type:&quot;Int16&quot;,name:&quot;x&quot;},{type:&quot;Int16&quot;,name:&quot;y&quot;},{type:&quot;Int16&quot;,name:&quot;tileUnitDistanceFromAnchor&quot;}]);var Da={&quot;!&quot;:&quot;\ufe15&quot;,&quot;#&quot;:&quot;\uff03&quot;,$:&quot;\uff04&quot;,&quot;%&quot;:&quot;\uff05&quot;,&quot;&amp;&quot;:&quot;\uff06&quot;,&quot;(&quot;:&quot;\ufe35&quot;,&quot;)&quot;:&quot;\ufe36&quot;,&quot;*&quot;:&quot;\uff0a&quot;,&quot;+&quot;:&quot;\uff0b&quot;,&quot;,&quot;:&quot;\ufe10&quot;,&quot;-&quot;:&quot;\ufe32&quot;,&quot;.&quot;:&quot;\u30fb&quot;,&quot;/&quot;:&quot;\uff0f&quot;,&quot;:&quot;:&quot;\ufe13&quot;,&quot;;&quot;:&quot;\ufe14&quot;,&quot;&lt;&quot;:&quot;\ufe3f&quot;,&quot;=&quot;:&quot;\uff1d&quot;,&quot;&gt;&quot;:&quot;\ufe40&quot;,&quot;?&quot;:&quot;\ufe16&quot;,&quot;@&quot;:&quot;\uff20&quot;,&quot;[&quot;:&quot;\ufe47&quot;,&quot;\\&quot;:&quot;\uff3c&quot;,&quot;]&quot;:&quot;\ufe48&quot;,&quot;^&quot;:&quot;\uff3e&quot;,_:&quot;\ufe33&quot;,&quot;`&quot;:&quot;\uff40&quot;,&quot;{&quot;:&quot;\ufe37&quot;,&quot;|&quot;:&quot;\u2015&quot;,&quot;}&quot;:&quot;\ufe38&quot;,&quot;~&quot;:&quot;\uff5e&quot;,&quot;\xa2&quot;:&quot;\uffe0&quot;,&quot;\xa3&quot;:&quot;\uffe1&quot;,&quot;\xa5&quot;:&quot;\uffe5&quot;,&quot;\xa6&quot;:&quot;\uffe4&quot;,&quot;\xac&quot;:&quot;\uffe2&quot;,&quot;\xaf&quot;:&quot;\uffe3&quot;,&quot;\u2013&quot;:&quot;\ufe32&quot;,&quot;\u2014&quot;:&quot;\ufe31&quot;,&quot;\u2018&quot;:&quot;\ufe43&quot;,&quot;\u2019&quot;:&quot;\ufe44&quot;,&quot;\u201c&quot;:&quot;\ufe41&quot;,&quot;\u201d&quot;:&quot;\ufe42&quot;,&quot;\u2026&quot;:&quot;\ufe19&quot;,&quot;\u2027&quot;:&quot;\u30fb&quot;,&quot;\u20a9&quot;:&quot;\uffe6&quot;,&quot;\u3001&quot;:&quot;\ufe11&quot;,&quot;\u3002&quot;:&quot;\ufe12&quot;,&quot;\u3008&quot;:&quot;\ufe3f&quot;,&quot;\u3009&quot;:&quot;\ufe40&quot;,&quot;\u300a&quot;:&quot;\ufe3d&quot;,&quot;\u300b&quot;:&quot;\ufe3e&quot;,&quot;\u300c&quot;:&quot;\ufe41&quot;,&quot;\u300d&quot;:&quot;\ufe42&quot;,&quot;\u300e&quot;:&quot;\ufe43&quot;,&quot;\u300f&quot;:&quot;\ufe44&quot;,&quot;\u3010&quot;:&quot;\ufe3b&quot;,&quot;\u3011&quot;:&quot;\ufe3c&quot;,&quot;\u3014&quot;:&quot;\ufe39&quot;,&quot;\u3015&quot;:&quot;\ufe3a&quot;,&quot;\u3016&quot;:&quot;\ufe17&quot;,&quot;\u3017&quot;:&quot;\ufe18&quot;,&quot;\uff01&quot;:&quot;\ufe15&quot;,&quot;\uff08&quot;:&quot;\ufe35&quot;,&quot;\uff09&quot;:&quot;\ufe36&quot;,&quot;\uff0c&quot;:&quot;\ufe10&quot;,&quot;\uff0d&quot;:&quot;\ufe32&quot;,&quot;\uff0e&quot;:&quot;\u30fb&quot;,&quot;\uff1a&quot;:&quot;\ufe13&quot;,&quot;\uff1b&quot;:&quot;\ufe14&quot;,&quot;\uff1c&quot;:&quot;\ufe3f&quot;,&quot;\uff1e&quot;:&quot;\ufe40&quot;,&quot;\uff1f&quot;:&quot;\ufe16&quot;,&quot;\uff3b&quot;:&quot;\ufe47&quot;,&quot;\uff3d&quot;:&quot;\ufe48&quot;,&quot;\uff3f&quot;:&quot;\ufe33&quot;,&quot;\uff5b&quot;:&quot;\ufe37&quot;,&quot;\uff5c&quot;:&quot;\u2015&quot;,&quot;\uff5d&quot;:&quot;\ufe38&quot;,&quot;\uff5f&quot;:&quot;\ufe35&quot;,&quot;\uff60&quot;:&quot;\ufe36&quot;,&quot;\uff61&quot;:&quot;\ufe12&quot;,&quot;\uff62&quot;:&quot;\ufe41&quot;,&quot;\uff63&quot;:&quot;\ufe42&quot;},Ra=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&amp;&amp;(this.segment=i)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(l);function Ba(t,e){var r=e.expression;if(&quot;constant&quot;===r.kind)return{functionType:&quot;constant&quot;,layoutSize:r.evaluate(new Lr(t+1))};if(&quot;source&quot;===r.kind)return{functionType:&quot;source&quot;};for(var n=r.zoomStops,i=0;i&lt;n.length&amp;&amp;n[i]&lt;=t;)i++;for(var a=i=Math.max(0,i-1);a&lt;n.length&amp;&amp;n[a]&lt;t+1;)a++;a=Math.min(n.length-1,a);var o={min:n[i],max:n[a]};return&quot;composite&quot;===r.kind?{functionType:&quot;composite&quot;,zoomRange:o,propertyValue:e.value}:{functionType:&quot;camera&quot;,layoutSize:r.evaluate(new Lr(t+1)),zoomRange:o,sizeRange:{min:r.evaluate(new Lr(o.min)),max:r.evaluate(new Lr(o.max))},propertyValue:e.value}}pr(&quot;Anchor&quot;,Ra);var Fa=ga.VectorTileFeature.types,Na=[{name:&quot;a_fade_opacity&quot;,components:1,type:&quot;Uint8&quot;,offset:0}];function ja(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),a,o,s?s[0]:0,s?s[1]:0)}function Va(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var Ua=function(t){this.layoutVertexArray=new tn,this.indexArray=new fn,this.programConfigurations=t,this.segments=new Tn,this.dynamicLayoutVertexArray=new en,this.opacityVertexArray=new rn,this.placedSymbolArray=new yn};Ua.prototype.upload=function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ca.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,La.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Na,!0),this.opacityVertexBuffer.itemSize=1},Ua.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},pr(&quot;SymbolBuffers&quot;,Ua);var qa=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Tn,this.collisionVertexArray=new on};qa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,za.members,!0)},qa.prototype.destroy=function(){this.layoutVertexBuffer&amp;&amp;(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},pr(&quot;CollisionBuffers&quot;,qa);var Ha=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ba(this.zoom,e[&quot;text-size&quot;]),this.iconSizeData=Ba(this.zoom,e[&quot;icon-size&quot;]);var r=this.layers[0].layout;this.sortFeaturesByY=r.get(&quot;text-allow-overlap&quot;)||r.get(&quot;icon-allow-overlap&quot;)||r.get(&quot;text-ignore-placement&quot;)||r.get(&quot;icon-ignore-placement&quot;)};Ha.prototype.createArrays=function(){this.text=new Ua(new On(Ca.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new Ua(new On(Ca.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new qa(an,Pa.members,hn),this.collisionCircle=new qa(an,Oa.members,fn),this.glyphOffsetArray=new bn,this.lineVertexArray=new wn},Ha.prototype.populate=function(t,e){var r=this.layers[0],n=r.layout,i=n.get(&quot;text-font&quot;),a=n.get(&quot;text-field&quot;),o=n.get(&quot;icon-image&quot;),s=(&quot;constant&quot;!==a.value.kind||a.value.value.length&gt;0)&amp;&amp;(&quot;constant&quot;!==i.value.kind||i.value.value.length&gt;0),l=&quot;constant&quot;!==o.value.kind||o.value.value&amp;&amp;o.value.value.length&gt;0;if(this.features=[],s||l){for(var c=e.iconDependencies,u=e.glyphDependencies,f=new Lr(this.zoom),h=0,p=t;h&lt;p.length;h+=1){var d=p[h],g=d.feature,m=d.index,v=d.sourceLayerIndex;if(r._featureFilter(f,g)){var y=void 0;s&amp;&amp;(y=Ia(y=r.getValueAndResolveTokens(&quot;text-field&quot;,g),r,g));var x=void 0;if(l&amp;&amp;(x=r.getValueAndResolveTokens(&quot;icon-image&quot;,g)),y||x){var b={text:y,icon:x,index:m,sourceLayerIndex:v,geometry:Bn(g),properties:g.properties,type:Fa[g.type]};if(void 0!==g.id&amp;&amp;(b.id=g.id),this.features.push(b),x&amp;&amp;(c[x]=!0),y)for(var _=i.evaluate(g).join(&quot;,&quot;),w=u[_]=u[_]||{},k=&quot;map&quot;===n.get(&quot;text-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===n.get(&quot;symbol-placement&quot;),M=xr(y),A=0;A&lt;y.length;A++)if(w[y.charCodeAt(A)]=!0,k&amp;&amp;M){var T=Da[y.charAt(A)];T&amp;&amp;(w[T.charCodeAt(0)]=!0)}}}}&quot;line&quot;===n.get(&quot;symbol-placement&quot;)&amp;&amp;(this.features=function(t){var e={},r={},n=[],i=0;function a(e){n.push(t[e]),i++}function o(t,e,i){var a=r[t];return delete r[t],r[e]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(t,r,i){var a=e[r];return delete e[r],e[t]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+&quot;:&quot;+n.x+&quot;:&quot;+n.y}for(var c=0;c&lt;t.length;c++){var u=t[c],f=u.geometry,h=u.text;if(h){var p=l(h,f),d=l(h,f,!0);if(p in r&amp;&amp;d in e&amp;&amp;r[p]!==e[d]){var g=s(p,d,f),m=o(p,d,n[g].geometry);delete e[p],delete r[d],r[l(h,n[m].geometry,!0)]=m,n[g].geometry=null}else p in r?o(p,d,f):d in e?s(p,d,f):(a(c),e[p]=i-1,r[d]=i-1)}else a(c)}return n.filter(function(t){return t.geometry})}(this.features))}},Ha.prototype.isEmpty=function(){return 0===this.symbolInstances.length},Ha.prototype.upload=function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)},Ha.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},Ha.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),a={},o=t.segment+1;o&lt;e.length;o++)a[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:n},o&lt;e.length-1&amp;&amp;(n+=e[o+1].dist(e[o]));for(var s=t.segment||0;s&gt;=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s&gt;0&amp;&amp;(i+=e[s-1].dist(e[s]));for(var l=0;l&lt;e.length;l++){var c=a[l];this.lineVertexArray.emplaceBack(c.x,c.y,c.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Ha.prototype.addSymbols=function(t,e,r,n,i,a,o,s,l,c){for(var u=t.indexArray,f=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,p=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,g=p.vertexLength,m=0,v=e;m&lt;v.length;m+=1){var y=v[m],x=y.tl,b=y.tr,_=y.bl,w=y.br,k=y.tex,M=p.vertexLength,A=y.glyphOffset[1];ja(f,s.x,s.y,x.x,A+x.y,k.x,k.y,r),ja(f,s.x,s.y,b.x,A+b.y,k.x+k.w,k.y,r),ja(f,s.x,s.y,_.x,A+_.y,k.x,k.y+k.h,r),ja(f,s.x,s.y,w.x,A+w.y,k.x+k.w,k.y+k.h,r),Va(h,s,0),u.emplaceBack(M,M+1,M+2),u.emplaceBack(M+1,M+2,M+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(y.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,g,l,c,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,a)},Ha.prototype._addCollisionDebugVertex=function(t,e,r,n,i){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n.x,n.y,Math.round(i.x),Math.round(i.y))},Ha.prototype.addCollisionDebugVertices=function(t,e,r,n,i,a,o,s){var c=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=c.vertexLength,f=i.layoutVertexArray,h=i.collisionVertexArray;if(this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,n)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,n)),c.vertexLength+=4,s){var p=i.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),c.primitiveLength+=2}else{var d=i.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),c.primitiveLength+=4}},Ha.prototype.generateCollisionDebugBuffers=function(){for(var t=0,e=this.symbolInstances;t&lt;e.length;t+=1){var r=e[t];r.textCollisionFeature={boxStartIndex:r.textBoxStartIndex,boxEndIndex:r.textBoxEndIndex},r.iconCollisionFeature={boxStartIndex:r.iconBoxStartIndex,boxEndIndex:r.iconBoxEndIndex};for(var n=0;n&lt;2;n++){var i=r[0===n?&quot;textCollisionFeature&quot;:&quot;iconCollisionFeature&quot;];if(i)for(var a=i.boxStartIndex;a&lt;i.boxEndIndex;a++){var o=this.collisionBoxArray.get(a),s=o.x1,l=o.y1,c=o.x2,u=o.y2,f=o.radius&gt;0;this.addCollisionDebugVertices(s,l,c,u,f?this.collisionCircle:this.collisionBox,o.anchorPoint,r,f)}}}},Ha.prototype.deserializeCollisionBoxes=function(t,e,r,n,i){for(var a={},o=e;o&lt;r;o++){var s=t.get(o);if(0===s.radius){a.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},a.textFeatureIndex=s.featureIndex;break}a.textCircles||(a.textCircles=[],a.textFeatureIndex=s.featureIndex),a.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=n;l&lt;i;l++){var c=t.get(l);if(0===c.radius){a.iconBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},a.iconFeatureIndex=c.featureIndex;break}}return a},Ha.prototype.hasTextData=function(){return this.text.segments.get().length&gt;0},Ha.prototype.hasIconData=function(){return this.icon.segments.get().length&gt;0},Ha.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length&gt;0},Ha.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length&gt;0},Ha.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&amp;&amp;this.sortedAngle!==t&amp;&amp;(this.sortedAngle=t,!(this.text.segments.get().length&gt;1||this.icon.segments.get().length&gt;1))){for(var r=[],n=0;n&lt;this.symbolInstances.length;n++)r.push(n);var i=Math.sin(t),a=Math.cos(t);r.sort(function(t,r){var n=e.symbolInstances[t],o=e.symbolInstances[r];return(i*n.anchor.x+a*n.anchor.y|0)-(i*o.anchor.x+a*o.anchor.y|0)||o.featureIndex-n.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var o=0,s=r;o&lt;s.length;o+=1){var l=s[o],c=e.symbolInstances[l];e.featureSortOrder.push(c.featureIndex);for(var u=0,f=c.placedTextSymbolIndices;u&lt;f.length;u+=1)for(var h=f[u],p=e.text.placedSymbolArray.get(h),d=p.vertexStartIndex+4*p.numGlyphs,g=p.vertexStartIndex;g&lt;d;g+=4)e.text.indexArray.emplaceBack(g,g+1,g+2),e.text.indexArray.emplaceBack(g+1,g+2,g+3);var m=e.icon.placedSymbolArray.get(l);if(m.numGlyphs){var v=m.vertexStartIndex;e.icon.indexArray.emplaceBack(v,v+1,v+2),e.icon.indexArray.emplaceBack(v+1,v+2,v+3)}}this.text.indexBuffer&amp;&amp;this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&amp;&amp;this.icon.indexBuffer.updateData(this.icon.indexArray)}},pr(&quot;SymbolBucket&quot;,Ha,{omit:[&quot;layers&quot;,&quot;collisionBoxArray&quot;,&quot;features&quot;,&quot;compareText&quot;],shallow:[&quot;symbolInstances&quot;]}),Ha.MAX_GLYPHS=65535,Ha.addDynamicAttributes=Va;var Ga=new qr({&quot;symbol-placement&quot;:new Nr(O.layout_symbol[&quot;symbol-placement&quot;]),&quot;symbol-spacing&quot;:new Nr(O.layout_symbol[&quot;symbol-spacing&quot;]),&quot;symbol-avoid-edges&quot;:new Nr(O.layout_symbol[&quot;symbol-avoid-edges&quot;]),&quot;icon-allow-overlap&quot;:new Nr(O.layout_symbol[&quot;icon-allow-overlap&quot;]),&quot;icon-ignore-placement&quot;:new Nr(O.layout_symbol[&quot;icon-ignore-placement&quot;]),&quot;icon-optional&quot;:new Nr(O.layout_symbol[&quot;icon-optional&quot;]),&quot;icon-rotation-alignment&quot;:new Nr(O.layout_symbol[&quot;icon-rotation-alignment&quot;]),&quot;icon-size&quot;:new jr(O.layout_symbol[&quot;icon-size&quot;]),&quot;icon-text-fit&quot;:new Nr(O.layout_symbol[&quot;icon-text-fit&quot;]),&quot;icon-text-fit-padding&quot;:new Nr(O.layout_symbol[&quot;icon-text-fit-padding&quot;]),&quot;icon-image&quot;:new jr(O.layout_symbol[&quot;icon-image&quot;]),&quot;icon-rotate&quot;:new jr(O.layout_symbol[&quot;icon-rotate&quot;]),&quot;icon-padding&quot;:new Nr(O.layout_symbol[&quot;icon-padding&quot;]),&quot;icon-keep-upright&quot;:new Nr(O.layout_symbol[&quot;icon-keep-upright&quot;]),&quot;icon-offset&quot;:new jr(O.layout_symbol[&quot;icon-offset&quot;]),&quot;icon-anchor&quot;:new jr(O.layout_symbol[&quot;icon-anchor&quot;]),&quot;icon-pitch-alignment&quot;:new Nr(O.layout_symbol[&quot;icon-pitch-alignment&quot;]),&quot;text-pitch-alignment&quot;:new Nr(O.layout_symbol[&quot;text-pitch-alignment&quot;]),&quot;text-rotation-alignment&quot;:new Nr(O.layout_symbol[&quot;text-rotation-alignment&quot;]),&quot;text-field&quot;:new jr(O.layout_symbol[&quot;text-field&quot;]),&quot;text-font&quot;:new jr(O.layout_symbol[&quot;text-font&quot;]),&quot;text-size&quot;:new jr(O.layout_symbol[&quot;text-size&quot;]),&quot;text-max-width&quot;:new jr(O.layout_symbol[&quot;text-max-width&quot;]),&quot;text-line-height&quot;:new Nr(O.layout_symbol[&quot;text-line-height&quot;]),&quot;text-letter-spacing&quot;:new jr(O.layout_symbol[&quot;text-letter-spacing&quot;]),&quot;text-justify&quot;:new jr(O.layout_symbol[&quot;text-justify&quot;]),&quot;text-anchor&quot;:new jr(O.layout_symbol[&quot;text-anchor&quot;]),&quot;text-max-angle&quot;:new Nr(O.layout_symbol[&quot;text-max-angle&quot;]),&quot;text-rotate&quot;:new jr(O.layout_symbol[&quot;text-rotate&quot;]),&quot;text-padding&quot;:new Nr(O.layout_symbol[&quot;text-padding&quot;]),&quot;text-keep-upright&quot;:new Nr(O.layout_symbol[&quot;text-keep-upright&quot;]),&quot;text-transform&quot;:new jr(O.layout_symbol[&quot;text-transform&quot;]),&quot;text-offset&quot;:new jr(O.layout_symbol[&quot;text-offset&quot;]),&quot;text-allow-overlap&quot;:new Nr(O.layout_symbol[&quot;text-allow-overlap&quot;]),&quot;text-ignore-placement&quot;:new Nr(O.layout_symbol[&quot;text-ignore-placement&quot;]),&quot;text-optional&quot;:new Nr(O.layout_symbol[&quot;text-optional&quot;])}),Wa={paint:new qr({&quot;icon-opacity&quot;:new jr(O.paint_symbol[&quot;icon-opacity&quot;]),&quot;icon-color&quot;:new jr(O.paint_symbol[&quot;icon-color&quot;]),&quot;icon-halo-color&quot;:new jr(O.paint_symbol[&quot;icon-halo-color&quot;]),&quot;icon-halo-width&quot;:new jr(O.paint_symbol[&quot;icon-halo-width&quot;]),&quot;icon-halo-blur&quot;:new jr(O.paint_symbol[&quot;icon-halo-blur&quot;]),&quot;icon-translate&quot;:new Nr(O.paint_symbol[&quot;icon-translate&quot;]),&quot;icon-translate-anchor&quot;:new Nr(O.paint_symbol[&quot;icon-translate-anchor&quot;]),&quot;text-opacity&quot;:new jr(O.paint_symbol[&quot;text-opacity&quot;]),&quot;text-color&quot;:new jr(O.paint_symbol[&quot;text-color&quot;]),&quot;text-halo-color&quot;:new jr(O.paint_symbol[&quot;text-halo-color&quot;]),&quot;text-halo-width&quot;:new jr(O.paint_symbol[&quot;text-halo-width&quot;]),&quot;text-halo-blur&quot;:new jr(O.paint_symbol[&quot;text-halo-blur&quot;]),&quot;text-translate&quot;:new Nr(O.paint_symbol[&quot;text-translate&quot;]),&quot;text-translate-anchor&quot;:new Nr(O.paint_symbol[&quot;text-translate-anchor&quot;])}),layout:Ga},Ya=function(t){function e(e){t.call(this,e,Wa)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),&quot;auto&quot;===this.layout.get(&quot;icon-rotation-alignment&quot;)&amp;&amp;(&quot;line&quot;===this.layout.get(&quot;symbol-placement&quot;)?this.layout._values[&quot;icon-rotation-alignment&quot;]=&quot;map&quot;:this.layout._values[&quot;icon-rotation-alignment&quot;]=&quot;viewport&quot;),&quot;auto&quot;===this.layout.get(&quot;text-rotation-alignment&quot;)&amp;&amp;(&quot;line&quot;===this.layout.get(&quot;symbol-placement&quot;)?this.layout._values[&quot;text-rotation-alignment&quot;]=&quot;map&quot;:this.layout._values[&quot;text-rotation-alignment&quot;]=&quot;viewport&quot;),&quot;auto&quot;===this.layout.get(&quot;text-pitch-alignment&quot;)&amp;&amp;(this.layout._values[&quot;text-pitch-alignment&quot;]=this.layout.get(&quot;text-rotation-alignment&quot;)),&quot;auto&quot;===this.layout.get(&quot;icon-pitch-alignment&quot;)&amp;&amp;(this.layout._values[&quot;icon-pitch-alignment&quot;]=this.layout.get(&quot;icon-rotation-alignment&quot;))},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||_e(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):&quot;&quot;}))},e.prototype.createBucket=function(t){return new Ha(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Hr),Xa={paint:new qr({&quot;background-color&quot;:new Nr(O.paint_background[&quot;background-color&quot;]),&quot;background-pattern&quot;:new Vr(O.paint_background[&quot;background-pattern&quot;]),&quot;background-opacity&quot;:new Nr(O.paint_background[&quot;background-opacity&quot;])})},Za=function(t){function e(e){t.call(this,e,Xa)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Hr),$a={paint:new qr({&quot;raster-opacity&quot;:new Nr(O.paint_raster[&quot;raster-opacity&quot;]),&quot;raster-hue-rotate&quot;:new Nr(O.paint_raster[&quot;raster-hue-rotate&quot;]),&quot;raster-brightness-min&quot;:new Nr(O.paint_raster[&quot;raster-brightness-min&quot;]),&quot;raster-brightness-max&quot;:new Nr(O.paint_raster[&quot;raster-brightness-max&quot;]),&quot;raster-saturation&quot;:new Nr(O.paint_raster[&quot;raster-saturation&quot;]),&quot;raster-contrast&quot;:new Nr(O.paint_raster[&quot;raster-contrast&quot;]),&quot;raster-fade-duration&quot;:new Nr(O.paint_raster[&quot;raster-fade-duration&quot;])})},Ja={circle:ni,heatmap:pi,hillshade:gi,fill:Ji,&quot;fill-extrusion&quot;:aa,line:Sa,symbol:Ya,background:Za,raster:function(t){function e(e){t.call(this,e,$a)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e}(Hr)},Ka=i(function(t,e){t.exports=function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,n,i,a,o=[],s=0;s&lt;t.length;s++)if(r=t[s].w||t[s].width,n=t[s].h||t[s].height,i=t[s].id,r&amp;&amp;n){if(!(a=this.packOne(r,n,i)))continue;e.inPlace&amp;&amp;(t[s].x=a.x,t[s].y=a.y,t[s].id=a.id),o.push(a)}return this.shrink(),o},t.prototype.packOne=function(t,r,n){var i,a,o,s,l,c,u,f,h={freebin:-1,shelf:-1,waste:1/0},p=0;if(&quot;string&quot;==typeof n||&quot;number&quot;==typeof n){if(i=this.getBin(n))return this.ref(i),i;&quot;number&quot;==typeof n&amp;&amp;(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s&lt;this.freebins.length;s++){if(r===(i=this.freebins[s]).maxh&amp;&amp;t===i.maxw)return this.allocFreebin(s,t,r,n);r&gt;i.maxh||t&gt;i.maxw||r&lt;=i.maxh&amp;&amp;t&lt;=i.maxw&amp;&amp;(o=i.maxw*i.maxh-t*r)&lt;h.waste&amp;&amp;(h.waste=o,h.freebin=s)}for(s=0;s&lt;this.shelves.length;s++)if(p+=(a=this.shelves[s]).h,!(t&gt;a.free)){if(r===a.h)return this.allocShelf(s,t,r,n);r&gt;a.h||r&lt;a.h&amp;&amp;(o=(a.h-r)*t)&lt;h.waste&amp;&amp;(h.freebin=-1,h.waste=o,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,r,n):-1!==h.shelf?this.allocShelf(h.shelf,t,r,n):r&lt;=this.h-p&amp;&amp;t&lt;=this.w?(a=new e(p,this.w,r),this.allocShelf(this.shelves.push(a)-1,t,r,n)):this.autoResize?(l=c=this.h,((u=f=this.w)&lt;=l||t&gt;u)&amp;&amp;(f=2*Math.max(t,u)),(l&lt;u||r&gt;l)&amp;&amp;(c=2*Math.max(r,l)),this.resize(f,c),this.packOne(t,r,n)):null},t.prototype.allocFreebin=function(t,e,r,n){var i=this.freebins.splice(t,1)[0];return i.id=n,i.w=e,i.h=r,i.refcount=0,this.bins[n]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,r,n){var i=this.shelves[t].alloc(e,r,n);return this.bins[n]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length&gt;0){for(var t=0,e=0,r=0;r&lt;this.shelves.length;r++){var n=this.shelves[r];e+=n.h,t=Math.max(n.w-n.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&amp;&amp;(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r&lt;this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t&gt;this.free||e&gt;this.h)return null;var n=this.x;return this.x+=t,this.free-=t,new function(t,e,r,n,i,a,o){this.id=t,this.x=e,this.y=r,this.w=n,this.h=i,this.maxw=a||n,this.maxh=o||i,this.refcount=0}(r,n,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()}),Qa=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r},to={tl:{configurable:!0},br:{configurable:!0},displaySize:{configurable:!0}};to.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},to.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},to.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Qa.prototype,to);var eo=function(t){var e=new ui({width:0,height:0}),r={},n=new Ka(0,0,{autoResize:!0});for(var i in t){var a=t[i],o=n.packOne(a.data.width+2,a.data.height+2);e.resize({width:n.w,height:n.h}),ui.copy(a.data,e,{x:0,y:0},{x:o.x+1,y:o.y+1},a.data),r[i]=new Qa(o,a)}n.shrink(),e.resize({width:n.w,height:n.h}),this.image=e,this.positions=r};pr(&quot;ImagePosition&quot;,Qa),pr(&quot;ImageAtlas&quot;,eo);var ro=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1&lt;&lt;s)-1,c=l&gt;&gt;1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&amp;(1&lt;&lt;-u)-1,p&gt;&gt;=-u,u+=s;u&gt;0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&amp;(1&lt;&lt;-u)-1,a&gt;&gt;=-u,u+=n;u&gt;0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},no=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1&lt;&lt;c)-1,f=u&gt;&gt;1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e&lt;0||0===e&amp;&amp;1/e&lt;0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))&lt;1&amp;&amp;(o--,l*=2),(e+=o+f&gt;=1?h/l:h*Math.pow(2,1-f))*l&gt;=2&amp;&amp;(o++,l/=2),o+f&gt;=u?(s=0,o=u):o+f&gt;=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i&gt;=8;t[r+p]=255&amp;s,p+=d,s/=256,i-=8);for(o=o&lt;&lt;i|s,c+=i;c&gt;0;t[r+p]=255&amp;o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},io=ao;function ao(t){this.buf=ArrayBuffer.isView&amp;&amp;ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function oo(t){return t.type===ao.Bytes?t.readVarint()+t.pos:t.pos+1}function so(t,e,r){return r?4294967296*e+(t&gt;&gt;&gt;0):4294967296*(e&gt;&gt;&gt;0)+(t&gt;&gt;&gt;0)}function lo(t,e,r){var n=e&lt;=16383?1:e&lt;=2097151?2:e&lt;=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i&gt;=t;i--)r.buf[i+n]=r.buf[i]}function co(t,e){for(var r=0;r&lt;t.length;r++)e.writeVarint(t[r])}function uo(t,e){for(var r=0;r&lt;t.length;r++)e.writeSVarint(t[r])}function fo(t,e){for(var r=0;r&lt;t.length;r++)e.writeFloat(t[r])}function ho(t,e){for(var r=0;r&lt;t.length;r++)e.writeDouble(t[r])}function po(t,e){for(var r=0;r&lt;t.length;r++)e.writeBoolean(t[r])}function go(t,e){for(var r=0;r&lt;t.length;r++)e.writeFixed32(t[r])}function mo(t,e){for(var r=0;r&lt;t.length;r++)e.writeSFixed32(t[r])}function vo(t,e){for(var r=0;r&lt;t.length;r++)e.writeFixed64(t[r])}function yo(t,e){for(var r=0;r&lt;t.length;r++)e.writeSFixed64(t[r])}function xo(t,e){return(t[e]|t[e+1]&lt;&lt;8|t[e+2]&lt;&lt;16)+16777216*t[e+3]}function bo(t,e,r){t[r]=e,t[r+1]=e&gt;&gt;&gt;8,t[r+2]=e&gt;&gt;&gt;16,t[r+3]=e&gt;&gt;&gt;24}function _o(t,e){return(t[e]|t[e+1]&lt;&lt;8|t[e+2]&lt;&lt;16)+(t[e+3]&lt;&lt;24)}ao.Varint=0,ao.Fixed64=1,ao.Bytes=2,ao.Fixed32=5,ao.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos&lt;r;){var n=this.readVarint(),i=n&gt;&gt;3,a=this.pos;this.type=7&amp;n,t(i,e,this),this.pos===a&amp;&amp;this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=xo(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_o(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*xo(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*_o(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=ro(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=ro(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&amp;(r=n[this.pos++]),r&lt;128?e:(e|=(127&amp;(r=n[this.pos++]))&lt;&lt;7,r&lt;128?e:(e|=(127&amp;(r=n[this.pos++]))&lt;&lt;14,r&lt;128?e:(e|=(127&amp;(r=n[this.pos++]))&lt;&lt;21,r&lt;128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&amp;(i=a[r.pos++]))&gt;&gt;4,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;3,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;10,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;17,i&lt;128)return so(t,n,e);if(n|=(127&amp;(i=a[r.pos++]))&lt;&lt;24,i&lt;128)return so(t,n,e);if(n|=(1&amp;(i=a[r.pos++]))&lt;&lt;31,i&lt;128)return so(t,n,e);throw new Error(&quot;Expected varint not more than 10 bytes&quot;)}(e|=(15&amp;(r=n[this.pos]))&lt;&lt;28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n=&quot;&quot;,i=e;i&lt;r;){var a,o,s,l=t[i],c=null,u=l&gt;239?4:l&gt;223?3:l&gt;191?2:1;if(i+u&gt;r)break;1===u?l&lt;128&amp;&amp;(c=l):2===u?128==(192&amp;(a=t[i+1]))&amp;&amp;(c=(31&amp;l)&lt;&lt;6|63&amp;a)&lt;=127&amp;&amp;(c=null):3===u?(a=t[i+1],o=t[i+2],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;((c=(15&amp;l)&lt;&lt;12|(63&amp;a)&lt;&lt;6|63&amp;o)&lt;=2047||c&gt;=55296&amp;&amp;c&lt;=57343)&amp;&amp;(c=null)):4===u&amp;&amp;(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&amp;a)&amp;&amp;128==(192&amp;o)&amp;&amp;128==(192&amp;s)&amp;&amp;((c=(15&amp;l)&lt;&lt;18|(63&amp;a)&lt;&lt;12|(63&amp;o)&lt;&lt;6|63&amp;s)&lt;=65535||c&gt;=1114112)&amp;&amp;(c=null)),null===c?(c=65533,u=1):c&gt;65535&amp;&amp;(c-=65536,n+=String.fromCharCode(c&gt;&gt;&gt;10&amp;1023|55296),c=56320|1023&amp;c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=oo(this);for(t=t||[];this.pos&lt;r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=oo(this);for(t=t||[];this.pos&lt;e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&amp;t;if(e===ao.Varint)for(;this.buf[this.pos++]&gt;127;);else if(e===ao.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ao.Fixed32)this.pos+=4;else{if(e!==ao.Fixed64)throw new Error(&quot;Unimplemented type: &quot;+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t&lt;&lt;3|e)},realloc:function(t){for(var e=this.length||16;e&lt;this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),bo(this.buf,-1&amp;t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),bo(this.buf,-1&amp;t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)&gt;268435455||t&lt;0?function(t,e){var r,n;if(t&gt;=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t&gt;=0x10000000000000000||t&lt;-0x10000000000000000)throw new Error(&quot;Given varint doesn't fit into 10 bytes&quot;);e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos++]=127&amp;t|128,t&gt;&gt;&gt;=7,r.buf[r.pos]=127&amp;t}(r,0,e),function(t,e){var r=(7&amp;t)&lt;&lt;4;e.buf[e.pos++]|=r|((t&gt;&gt;&gt;=3)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t|((t&gt;&gt;&gt;=7)?128:0),t&amp;&amp;(e.buf[e.pos++]=127&amp;t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&amp;t|(t&gt;127?128:0),t&lt;=127||(this.buf[this.pos++]=127&amp;(t&gt;&gt;&gt;=7)|(t&gt;127?128:0),t&lt;=127||(this.buf[this.pos++]=127&amp;(t&gt;&gt;&gt;=7)|(t&gt;127?128:0),t&lt;=127||(this.buf[this.pos++]=t&gt;&gt;&gt;7&amp;127))))},writeSVarint:function(t){this.writeVarint(t&lt;0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a&lt;e.length;a++){if((n=e.charCodeAt(a))&gt;55295&amp;&amp;n&lt;57344){if(!i){n&gt;56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n&lt;56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296&lt;&lt;10|n-56320|65536,i=null}else i&amp;&amp;(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n&lt;128?t[r++]=n:(n&lt;2048?t[r++]=n&gt;&gt;6|192:(n&lt;65536?t[r++]=n&gt;&gt;12|224:(t[r++]=n&gt;&gt;18|240,t[r++]=n&gt;&gt;12&amp;63|128),t[r++]=n&gt;&gt;6&amp;63|128),t[r++]=63&amp;n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r&gt;=128&amp;&amp;lo(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),no(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),no(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r&lt;e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n&gt;=128&amp;&amp;lo(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ao.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,co,e)},writePackedSVarint:function(t,e){this.writeMessage(t,uo,e)},writePackedBoolean:function(t,e){this.writeMessage(t,po,e)},writePackedFloat:function(t,e){this.writeMessage(t,fo,e)},writePackedDouble:function(t,e){this.writeMessage(t,ho,e)},writePackedFixed32:function(t,e){this.writeMessage(t,go,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,mo,e)},writePackedFixed64:function(t,e){this.writeMessage(t,vo,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,yo,e)},writeBytesField:function(t,e){this.writeTag(t,ao.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ao.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ao.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var wo=3;function ko(t,e,r){1===t&amp;&amp;r.readMessage(Mo,e)}function Mo(t,e,r){if(3===t){var n=r.readMessage(Ao,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;e.push({id:i,bitmap:new ci({width:o+2*wo,height:s+2*wo},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Ao(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&amp;&amp;(e.advance=r.readVarint())}var To=wo,So=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,g([&quot;receive&quot;],this),this.target.addEventListener(&quot;message&quot;,this.receive,!1)};So.prototype.send=function(t,e,r,n){var i=r?this.mapId+&quot;:&quot;+this.callbackID++:null;r&amp;&amp;(this.callbacks[i]=r);var a=[];this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(i),data:gr(e,a)},a)},So.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var a=function(t,e){var n=[];r.target.postMessage({sourceMapId:r.mapId,type:&quot;&lt;response&gt;&quot;,id:String(i),error:t?gr(t):null,data:gr(e,n)},n)};if(&quot;&lt;response&gt;&quot;===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&amp;&amp;n.error?e(mr(n.error)):e&amp;&amp;e(null,mr(n.data));else if(void 0!==n.id&amp;&amp;this.parent[n.type])this.parent[n.type](n.sourceMapId,mr(n.data),a);else if(void 0!==n.id&amp;&amp;this.parent.getWorkerSource){var o=n.type.split(&quot;.&quot;);this.parent.getWorkerSource(n.sourceMapId,o[0],o[1])[o[2]](mr(n.data),a)}else this.parent[n.type](mr(n.data))}},So.prototype.remove=function(){this.target.removeEventListener(&quot;message&quot;,this.receive,!1)};var Eo=n(i(function(t,e){!function(t){function e(t,e,n){var i=r(256*t,256*(e=Math.pow(2,n)-e-1),n),a=r(256*(t+1),256*(e+1),n);return i[0]+&quot;,&quot;+i[1]+&quot;,&quot;+a[0]+&quot;,&quot;+a[1]}function r(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=function(t,r,n,i,a,o){return o=o||{},t+&quot;?&quot;+[&quot;bbox=&quot;+e(n,i,a),&quot;format=&quot;+(o.format||&quot;image/png&quot;),&quot;service=&quot;+(o.service||&quot;WMS&quot;),&quot;version=&quot;+(o.version||&quot;1.1.1&quot;),&quot;request=&quot;+(o.request||&quot;GetMap&quot;),&quot;srs=&quot;+(o.srs||&quot;EPSG:3857&quot;),&quot;width=&quot;+(o.width||256),&quot;height=&quot;+(o.height||256),&quot;layers=&quot;+r].join(&quot;&amp;&quot;)},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(e)})),Co=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Po(0,t,e,r)};Co.prototype.equals=function(t){return this.z===t.z&amp;&amp;this.x===t.x&amp;&amp;this.y===t.y},Co.prototype.url=function(t,e){var r=Eo.getTileBBox(this.x,this.y,this.z),n=function(t,e,r){for(var n,i=&quot;&quot;,a=t;a&gt;0;a--)i+=(e&amp;(n=1&lt;&lt;a-1)?1:0)+(r&amp;n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(&quot;{prefix}&quot;,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(&quot;{z}&quot;,String(this.z)).replace(&quot;{x}&quot;,String(this.x)).replace(&quot;{y}&quot;,String(&quot;tms&quot;===e?Math.pow(2,this.z)-this.y-1:this.y)).replace(&quot;{quadkey}&quot;,n).replace(&quot;{bbox-epsg-3857}&quot;,r)};var Lo=function(t,e){this.wrap=t,this.canonical=e,this.key=Po(t,e.z,e.x,e.y)},zo=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Co(r,+n,+i),this.key=Po(e,t,n,i)};function Po(t,e,r,n){(t*=2)&lt;0&amp;&amp;(t=-1*t-1);var i=1&lt;&lt;e;return 32*(i*i*t+i*n+r)+e}zo.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&amp;&amp;this.wrap===t.wrap&amp;&amp;this.canonical.equals(t.canonical)},zo.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t&gt;this.canonical.z?new zo(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zo(t,this.wrap,t,this.canonical.x&gt;&gt;e,this.canonical.y&gt;&gt;e)},zo.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ&lt;this.overscaledZ&amp;&amp;t.canonical.x===this.canonical.x&gt;&gt;e&amp;&amp;t.canonical.y===this.canonical.y&gt;&gt;e},zo.prototype.children=function(t){if(this.overscaledZ&gt;=t)return[new zo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new zo(e,this.wrap,e,r,n),new zo(e,this.wrap,e,r+1,n),new zo(e,this.wrap,e,r,n+1),new zo(e,this.wrap,e,r+1,n+1)]},zo.prototype.isLessThan=function(t){return this.wrap&lt;t.wrap||!(this.wrap&gt;t.wrap)&amp;&amp;(this.overscaledZ&lt;t.overscaledZ||!(this.overscaledZ&gt;t.overscaledZ)&amp;&amp;(this.canonical.x&lt;t.canonical.x||!(this.canonical.x&gt;t.canonical.x)&amp;&amp;this.canonical.y&lt;t.canonical.y))},zo.prototype.wrapped=function(){return new zo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.unwrapTo=function(t){return new zo(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},zo.prototype.toUnwrapped=function(){return new Lo(this.wrap,this.canonical)},zo.prototype.toString=function(){return this.overscaledZ+&quot;/&quot;+this.canonical.x+&quot;/&quot;+this.canonical.y},zo.prototype.toCoordinate=function(){return new s(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},pr(&quot;CanonicalTileID&quot;,Co),pr(&quot;OverscaledTileID&quot;,zo,{omit:[&quot;posMatrix&quot;]});var Oo=function(t,e,r){if(t&lt;=0)throw new RangeError(&quot;Level must have positive dimension&quot;);this.dim=t,this.border=e,this.stride=this.dim+2*this.border,this.data=r||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))};Oo.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},Oo.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},Oo.prototype._idx=function(t,e){if(t&lt;-this.border||t&gt;=this.dim+this.border||e&lt;-this.border||e&gt;=this.dim+this.border)throw new RangeError(&quot;out of range source coordinates for DEM data&quot;);return(e+this.border)*this.stride+(t+this.border)},pr(&quot;Level&quot;,Oo);var Io=function(t,e,r){this.uid=t,this.scale=e||1,this.level=r||new Oo(256,512),this.loaded=!!r};Io.prototype.loadFromImage=function(t,e){if(t.height!==t.width)throw new RangeError(&quot;DEM tiles must be square&quot;);if(e&amp;&amp;&quot;mapbox&quot;!==e&amp;&amp;&quot;terrarium&quot;!==e)return _('&quot;'+e+'&quot; is not a valid encoding type. Valid types include &quot;mapbox&quot; and &quot;terrarium&quot;.');var r=this.level=new Oo(t.width,t.width/2),n=t.data;this._unpackData(r,n,e||&quot;mapbox&quot;);for(var i=0;i&lt;r.dim;i++)r.set(-1,i,r.get(0,i)),r.set(r.dim,i,r.get(r.dim-1,i)),r.set(i,-1,r.get(i,0)),r.set(i,r.dim,r.get(i,r.dim-1));r.set(-1,-1,r.get(0,0)),r.set(r.dim,-1,r.get(r.dim-1,0)),r.set(-1,r.dim,r.get(0,r.dim-1)),r.set(r.dim,r.dim,r.get(r.dim-1,r.dim-1)),this.loaded=!0},Io.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Io.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Io.prototype._unpackData=function(t,e,r){for(var n={mapbox:this._unpackMapbox,terrarium:this._unpackTerrarium}[r],i=0;i&lt;t.dim;i++)for(var a=0;a&lt;t.dim;a++){var o=4*(i*t.dim+a);t.set(a,i,this.scale*n(e[o],e[o+1],e[o+2]))}},Io.prototype.getPixels=function(){return new ui({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))},Io.prototype.backfillBorder=function(t,e,r){var n=this.level,i=t.level;if(n.dim!==i.dim)throw new Error(&quot;level mismatch (dem dimension)&quot;);var a=e*n.dim,o=e*n.dim+n.dim,s=r*n.dim,l=r*n.dim+n.dim;switch(e){case-1:a=o-1;break;case 1:o=a+1}switch(r){case-1:s=l-1;break;case 1:l=s+1}for(var c=h(a,-n.border,n.dim+n.border),u=h(o,-n.border,n.dim+n.border),f=h(s,-n.border,n.dim+n.border),p=h(l,-n.border,n.dim+n.border),d=-e*n.dim,g=-r*n.dim,m=f;m&lt;p;m++)for(var v=c;v&lt;u;v++)n.set(v,m,i.get(v+d,m+g))},pr(&quot;DEMData&quot;,Io);var Do=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e&lt;t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Do.prototype.encode=function(t){return this._stringToNumber[t]},Do.prototype.decode=function(t){return this._numberToString[t]};var Ro=function(t,e,r,n){this.type=&quot;Feature&quot;,this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&amp;&amp;(this.id=t.id)},Bo={geometry:{configurable:!0}};Bo.geometry.get=function(){return void 0===this._geometry&amp;&amp;(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Bo.geometry.set=function(t){this._geometry=t},Ro.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)&quot;_geometry&quot;!==e&amp;&amp;&quot;_vectorTileFeature&quot;!==e&amp;&amp;(t[e]=this[e]);return t},Object.defineProperties(Ro.prototype,Bo);var Fo=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new lr(Dn,16,0),this.featureIndexArray=r||new Mn};function No(t,e){return e-t}Fo.prototype.insert=function(t,e,r,n,i){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var o=0;o&lt;e.length;o++){for(var s=e[o],l=[1/0,1/0,-1/0,-1/0],c=0;c&lt;s.length;c++){var u=s[c];l[0]=Math.min(l[0],u.x),l[1]=Math.min(l[1],u.y),l[2]=Math.max(l[2],u.x),l[3]=Math.max(l[3],u.y)}l[0]&lt;Dn&amp;&amp;l[1]&lt;Dn&amp;&amp;l[2]&gt;=0&amp;&amp;l[3]&gt;=0&amp;&amp;this.grid.insert(a,l[0],l[1],l[2],l[3])}},Fo.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ga.VectorTile(new io(this.rawTileData)).layers,this.sourceLayerCoder=new Do(this.vtLayers?Object.keys(this.vtLayers).sort():[&quot;_geojsonTileLayer&quot;])),this.vtLayers},Fo.prototype.query=function(t,e){var r=this;this.loadVTLayers();for(var n=t.params||{},i=Dn/t.tileSize/t.scale,a=Re(n.filter),o=t.queryGeometry,s=t.queryPadding*i,l=1/0,c=1/0,u=-1/0,f=-1/0,h=0;h&lt;o.length;h++)for(var p=o[h],d=0;d&lt;p.length;d++){var g=p[d];l=Math.min(l,g.x),c=Math.min(c,g.y),u=Math.max(u,g.x),f=Math.max(f,g.y)}var m=this.grid.query(l-s,c-s,u+s,f+s);m.sort(No);for(var v,y={},x=function(s){var l=m[s];if(l!==v){v=l;var c=r.featureIndexArray.get(l),u=null;r.loadMatchingFeature(y,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,a,n.layers,e,function(e,n){return u||(u=Bn(e)),n.queryIntersectsFeature(o,e,u,r.z,t.transform,i,t.posMatrix)})}},b=0;b&lt;m.length;b++)x(b);return y},Fo.prototype.loadMatchingFeature=function(t,e,r,n,i,a,o,s){var l=this.bucketLayerIDs[e];if(!a||function(t,e){for(var r=0;r&lt;t.length;r++)if(e.indexOf(t[r])&gt;=0)return!0;return!1}(a,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(i(new Lr(this.tileID.overscaledZ),u))for(var f=0;f&lt;l.length;f++){var h=l[f];if(!(a&amp;&amp;a.indexOf(h)&lt;0)){var p=o[h];if(p&amp;&amp;(!s||s(u,p))){var d=new Ro(u,this.z,this.x,this.y);d.layer=p.serialize();var g=t[h];void 0===g&amp;&amp;(g=t[h]=[]),g.push({featureIndex:n,feature:d})}}}}},Fo.prototype.lookupSymbolFeatures=function(t,e,r,n,i,a){var o={};this.loadVTLayers();for(var s=Re(n),l=0,c=t;l&lt;c.length;l+=1){var u=c[l];this.loadMatchingFeature(o,e,r,u,s,i,a)}return o},Fo.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e&lt;r.length;e+=1)for(var n=0,i=r[e];n&lt;i.length;n+=1)if(t===i[n])return!0;return!1},pr(&quot;FeatureIndex&quot;,Fo,{omit:[&quot;rawTileData&quot;,&quot;sourceLayerCoder&quot;]});var jo={horizontal:1,vertical:2,horizontalOnly:3},Vo={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Uo={};function qo(t,e,r,n){var i=Math.pow(t-e,2);return n?t&lt;e?i/2:2*i:i+Math.abs(r)*r}function Ho(t,e){var r=0;return 10===t&amp;&amp;(r-=1e4),40!==t&amp;&amp;65288!==t||(r+=50),41!==e&amp;&amp;65289!==e||(r+=50),r}function Go(t,e,r,n,i,a){for(var o=null,s=qo(e,r,i,a),l=0,c=n;l&lt;c.length;l+=1){var u=c[l],f=qo(e-u.x,r,i,a)+u.badness;f&lt;=s&amp;&amp;(o=u,s=f)}return{index:t,x:e,priorBreak:o,badness:s}}function Wo(t,e,r,n){if(!r)return[];if(!t)return[];for(var i,a=[],o=function(t,e,r,n){for(var i=0,a=0;a&lt;t.length;a++){var o=n[t.charCodeAt(a)];o&amp;&amp;(i+=o.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/r))}(t,e,r,n),s=0,l=0;l&lt;t.length;l++){var c=t.charCodeAt(l),u=n[c];u&amp;&amp;!Vo[c]&amp;&amp;(s+=u.metrics.advance+e),l&lt;t.length-1&amp;&amp;(Uo[c]||!((i=c)&lt;11904)&amp;&amp;(yr[&quot;Bopomofo Extended&quot;](i)||yr.Bopomofo(i)||yr[&quot;CJK Compatibility Forms&quot;](i)||yr[&quot;CJK Compatibility Ideographs&quot;](i)||yr[&quot;CJK Compatibility&quot;](i)||yr[&quot;CJK Radicals Supplement&quot;](i)||yr[&quot;CJK Strokes&quot;](i)||yr[&quot;CJK Symbols and Punctuation&quot;](i)||yr[&quot;CJK Unified Ideographs Extension A&quot;](i)||yr[&quot;CJK Unified Ideographs&quot;](i)||yr[&quot;Enclosed CJK Letters and Months&quot;](i)||yr[&quot;Halfwidth and Fullwidth Forms&quot;](i)||yr.Hiragana(i)||yr[&quot;Ideographic Description Characters&quot;](i)||yr[&quot;Kangxi Radicals&quot;](i)||yr[&quot;Katakana Phonetic Extensions&quot;](i)||yr.Katakana(i)||yr[&quot;Vertical Forms&quot;](i)||yr[&quot;Yi Radicals&quot;](i)||yr[&quot;Yi Syllables&quot;](i)))&amp;&amp;a.push(Go(l+1,s,o,a,Ho(c,t.charCodeAt(l+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Go(t.length,s,o,a,0,!0))}function Yo(t){var e=.5,r=.5;switch(t){case&quot;right&quot;:case&quot;top-right&quot;:case&quot;bottom-right&quot;:e=1;break;case&quot;left&quot;:case&quot;top-left&quot;:case&quot;bottom-left&quot;:e=0}switch(t){case&quot;bottom&quot;:case&quot;bottom-right&quot;:case&quot;bottom-left&quot;:r=1;break;case&quot;top&quot;:case&quot;top-right&quot;:case&quot;top-left&quot;:r=0}return{horizontalAlign:e,verticalAlign:r}}function Xo(t,e,r,n,i){if(i){var a=e[t[n].glyph];if(a)for(var o=a.metrics.advance,s=(t[n].x+o)*i,l=r;l&lt;=n;l++)t[l].x-=s}}Uo[10]=!0,Uo[32]=!0,Uo[38]=!0,Uo[40]=!0,Uo[41]=!0,Uo[43]=!0,Uo[45]=!0,Uo[47]=!0,Uo[173]=!0,Uo[183]=!0,Uo[8203]=!0,Uo[8208]=!0,Uo[8211]=!0,Uo[8231]=!0,e.commonjsGlobal=r,e.unwrapExports=n,e.createCommonjsModule=i,e.default=self,e.default$1=l,e.getJSON=function(t,e){var r=T(t);return r.setRequestHeader(&quot;Accept&quot;,&quot;application/json&quot;),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status&gt;=200&amp;&amp;r.status&lt;300&amp;&amp;r.response){var n;try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n)}else 401===r.status&amp;&amp;t.url.match(/mapbox.com/)?e(new A(r.statusText+&quot;: you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens&quot;,r.status,t.url)):e(new A(r.statusText,r.status,t.url))},r.send(),r},e.getImage=function(t,e){return S(t,function(t,r){if(t)e(t);else if(r){var n=new self.Image,i=self.URL||self.webkitURL;n.onload=function(){e(null,n),i.revokeObjectURL(n.src)};var a=new self.Blob([new Uint8Array(r.data)],{type:&quot;image/png&quot;});n.cacheControl=r.cacheControl,n.expires=r.expires,n.src=r.data.byteLength?i.createObjectURL(a):&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=&quot;}})},e.ResourceType=M,e.RGBAImage=ui,e.default$2=Ka,e.ImagePosition=Qa,e.getArrayBuffer=S,e.default$3=function(t){return new io(t).readFields(ko,[])},e.default$4=yr,e.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach(function(t,o){e(t,function(t,e){t&amp;&amp;(a=t),i[o]=e,0==--n&amp;&amp;r(a,i)})})},e.AlphaImage=ci,e.default$5=O,e.endsWith=m,e.extend=p,e.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},e.Evented=P,e.validateStyle=nr,e.validateLight=ir,e.emitValidationErrors=sr,e.default$6=tt,e.number=wt,e.Properties=qr,e.Transitionable=Or,e.Transitioning=Dr,e.PossiblyEvaluated=Fr,e.DataConstantProperty=Nr,e.warnOnce=_,e.uniqueId=function(){return d++},e.default$7=So,e.pick=function(t,e){for(var r={},n=0;n&lt;e.length;n++){var i=e[n];i in t&amp;&amp;(r[i]=t[i])}return r},e.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},e.clamp=h,e.Event=L,e.ErrorEvent=z,e.OverscaledTileID=zo,e.default$8=Dn,e.createLayout=Xr,e.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a&lt;t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),n=Math.max(n,t[a].column),i=Math.max(i,t[a].row);var o=n-e,l=i-r,c=Math.max(o,l),u=Math.max(0,Math.floor(-Math.log(c)/Math.LN2));return new s((e+n)/2,(r+i)/2,0).zoomTo(u)},e.CanonicalTileID=Co,e.RasterBoundsArray=Jr,e.getVideo=function(t,e){var r,n,i=self.document.createElement(&quot;video&quot;);i.onloadstart=function(){e(null,i)};for(var a=0;a&lt;t.length;a++){var o=self.document.createElement(&quot;source&quot;);r=t[a],n=void 0,(n=self.document.createElement(&quot;a&quot;)).href=r,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&amp;&amp;(i.crossOrigin=&quot;Anonymous&quot;),o.src=t[a],i.appendChild(o)}return i},e.default$9=I,e.bindAll=g,e.default$10=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n&lt;e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if(&quot;object&quot;==typeof e&amp;&amp;null!==e&amp;&amp;null!==r){if(&quot;object&quot;!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},e.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)&lt;&gt;@\,;\:\\&quot;\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)&lt;&gt;@\,;\:\\&quot;\/\[\]\?\=\{\}\x7F]+)|(?:\&quot;((?:[^&quot;\\]|\\.)*)\&quot;)))?/g,function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),&quot;&quot;}),e[&quot;max-age&quot;]){var r=parseInt(e[&quot;max-age&quot;],10);isNaN(r)?delete e[&quot;max-age&quot;]:e[&quot;max-age&quot;]=r}return e},e.default$11=Fo,e.default$12=Ro,e.default$13=Re,e.default$14=Ha,e.CollisionBoxArray=mn,e.default$15=Tn,e.TriangleIndexArray=fn,e.default$16=Lr,e.default$17=s,e.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},e.default$18=[&quot;type&quot;,&quot;source&quot;,&quot;source-layer&quot;,&quot;minzoom&quot;,&quot;maxzoom&quot;,&quot;filter&quot;,&quot;layout&quot;],e.mat4=ri,e.vec4=ei,e.getSizeData=Ba,e.evaluateSizeForFeature=function(t,e,r){var n=e;return&quot;source&quot;===t.functionType?r.lowerSize/10:&quot;composite&quot;===t.functionType?wt(r.lowerSize/10,r.upperSize/10,n.uSizeT):n.uSize},e.evaluateSizeForZoom=function(t,e,r){if(&quot;constant&quot;===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if(&quot;source&quot;===t.functionType)return{uSizeT:0,uSize:0};if(&quot;camera&quot;===t.functionType){var n=t.propertyValue,i=t.zoomRange,a=t.sizeRange,o=h(Se(n,r.specification).interpolationFactor(e,i.min,i.max),0,1);return{uSizeT:0,uSize:a.min+o*(a.max-a.min)}}var s=t.propertyValue,l=t.zoomRange;return{uSizeT:h(Se(s,r.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},e.addDynamicAttributes=Va,e.default$19=Wa,e.WritingMode=jo,e.multiPolygonIntersectsBufferedPoint=jn,e.multiPolygonIntersectsMultiPolygon=Vn,e.multiPolygonIntersectsBufferedMultiLine=Un,e.polygonIntersectsPolygon=function(t,e){for(var r=0;r&lt;t.length;r++)if(Zn(e,t[r]))return!0;for(var n=0;n&lt;e.length;n++)if(Zn(t,e[n]))return!0;return!!Hn(t,e)},e.distToSegmentSquared=Yn,e.default$20=ti,e.default$21=Hr,e.default$22=function(t){return new Ja[t.type](t)},e.clone=x,e.filterObject=y,e.mapObject=v,e.registerForPluginAvailability=function(t){return Tr?t({pluginURL:Tr,completionCallback:Mr}):Er.once(&quot;pluginAvailable&quot;,t),t},e.evented=Er,e.default$23=vr,e.default$24=Pn,e.PosArray=$r,e.UnwrappedTileID=Lo,e.ease=f,e.bezier=u,e.setRTLTextPlugin=function(t,e){if(Ar)throw new Error(&quot;setRTLTextPlugin cannot be called multiple times.&quot;);Ar=!0,Tr=t,Mr=function(t){t?(Ar=!1,Tr=null,e&amp;&amp;e(t)):Sr=!0},Er.fire(new L(&quot;pluginAvailable&quot;,{pluginURL:Tr,completionCallback:Mr}))},e.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},e.default$25=Ra,e.register=pr,e.GLYPH_PBF_BORDER=To,e.shapeText=function(t,e,r,n,i,a,o,s,l,c){var u=t.trim();c===jo.vertical&amp;&amp;(u=function(t){for(var e=&quot;&quot;,r=0;r&lt;t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&amp;&amp;wr(n)&amp;&amp;!Da[t[r+1]]||i&amp;&amp;wr(i)&amp;&amp;!Da[t[r-1]]||!Da[t[r]]?e+=t[r]:e+=Da[t[r]]}return e}(u));var f=[],h={positionedGlyphs:f,text:u,top:s[1],bottom:s[1],left:s[0],right:s[0],writingMode:c},p=Cr.processBidirectionalText;return function(t,e,r,n,i,a,o,s,l){for(var c=0,u=-17,f=0,h=t.positionedGlyphs,p=&quot;right&quot;===a?1:&quot;left&quot;===a?0:.5,d=0,g=r;d&lt;g.length;d+=1){var m=g[d];if((m=m.trim()).length){for(var v=h.length,y=0;y&lt;m.length;y++){var x=m.charCodeAt(y),b=e[x];b&amp;&amp;(_r(x)&amp;&amp;o!==jo.horizontal?(h.push({glyph:x,x:c,y:0,vertical:!0}),c+=l+s):(h.push({glyph:x,x:c,y:u,vertical:!1}),c+=b.metrics.advance+s))}if(h.length!==v){var _=c-s;f=Math.max(_,f),Xo(h,e,v,h.length-1,p)}c=0,u+=n}else u+=n}var w=Yo(i),k=w.horizontalAlign,M=w.verticalAlign;!function(t,e,r,n,i,a,o){for(var s=(e-r)*i,l=(-n*o+.5)*a,c=0;c&lt;t.length;c++)t[c].x+=s,t[c].y+=l}(h,p,k,M,f,n,r.length);var A=r.length*n;t.top+=-M*A,t.bottom=t.top+A,t.left+=-k*f,t.right=t.left+f}(h,e,p?p(u,Wo(u,o,r,e)):function(t,e){for(var r=[],n=0,i=0,a=e;i&lt;a.length;i+=1){var o=a[i];r.push(t.substring(n,o)),n=o}return n&lt;t.length&amp;&amp;r.push(t.substring(n,t.length)),r}(u,Wo(u,o,r,e)),n,i,a,c,o,l),!!f.length&amp;&amp;h},e.shapeIcon=function(t,e,r){var n=Yo(r),i=n.horizontalAlign,a=n.verticalAlign,o=e[0],s=e[1],l=o-t.displaySize[0]*i,c=l+t.displaySize[0],u=s-t.displaySize[1]*a;return{image:t,top:u,bottom:u+t.displaySize[1],left:l,right:c}},e.allowsVerticalWritingMode=xr,e.allowsLetterSpacing=function(t){for(var e=0,r=t;e&lt;r.length;e+=1)if(!br(r[e].charCodeAt(0)))return!1;return!0},e.default$26=Yi,e.default$27=Do,e.default$28=eo,e.default$29=ga,e.default$30=io,e.default$31=Io,e.__moduleExports=ga,e.default$32=l,e.__moduleExports$1=io,e.plugin=Cr}),i(0,function(t){function e(t){var r=typeof t;if(&quot;number&quot;===r||&quot;boolean&quot;===r||&quot;string&quot;===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var n=&quot;[&quot;,i=0,a=t;i&lt;a.length;i+=1)n+=e(a[i])+&quot;,&quot;;return n+&quot;]&quot;}for(var o=Object.keys(t).sort(),s=&quot;{&quot;,l=0;l&lt;o.length;l++)s+=JSON.stringify(o[l])+&quot;:&quot;+e(t[o[l]])+&quot;,&quot;;return s+&quot;}&quot;}function r(r){for(var n=&quot;&quot;,i=0,a=t.default$18;i&lt;a.length;i+=1)n+=&quot;/&quot;+e(r[a[i]]);return n}var n=function(t){t&amp;&amp;this.replace(t)};function i(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s&gt;-r/2;){if(--o&lt;0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;s&lt;r/2;){var u=t[o-1],f=t[o],h=t[o+1];if(!h)return!1;var p=u.angleTo(f)-f.angleTo(h);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:p}),c+=p;s-l[0].distance&gt;n;)c-=l.shift().angleDelta;if(c&gt;i)return!1;o++,s+=f.dist(h)}return!0}function a(e,r,n,a,o,s,l,c,u){var f=a?.6*s*l:0,h=Math.max(a?a.right-a.left:0,o?o.right-o.left:0),p=0===e[0].x||e[0].x===u||0===e[0].y||e[0].y===u;return r-h*l&lt;r/4&amp;&amp;(r=h*l+r/4),function e(r,n,a,o,s,l,c,u,f){for(var h=l/2,p=0,d=0;d&lt;r.length-1;d++)p+=r[d].dist(r[d+1]);for(var g=0,m=n-a,v=[],y=0;y&lt;r.length-1;y++){for(var x=r[y],b=r[y+1],_=x.dist(b),w=b.angleTo(x);m+a&lt;g+_;){var k=((m+=a)-g)/_,M=t.number(x.x,b.x,k),A=t.number(x.y,b.y,k);if(M&gt;=0&amp;&amp;M&lt;f&amp;&amp;A&gt;=0&amp;&amp;A&lt;f&amp;&amp;m-h&gt;=0&amp;&amp;m+h&lt;=p){var T=new t.default$25(M,A,w,y);T._round(),o&amp;&amp;!i(r,T,l,o,s)||v.push(T)}}g+=_}return u||v.length||c||(v=e(r,g/2,a,o,s,l,c,!0,f)),v}(e,p?r/2*c%r:(h/2+2*s)*l*c%r,r,f,n,h*l,p,!1,u)}n.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},n.prototype.update=function(e,n){for(var i=this,a=0,o=e;a&lt;o.length;a+=1){var s=o[a];i._layerConfigs[s.id]=s;var l=i._layers[s.id]=t.default$22(s);l._featureFilter=t.default$13(l.filter)}for(var c=0,u=n;c&lt;u.length;c+=1){var f=u[c];delete i._layerConfigs[f],delete i._layers[f]}this.familiesBySource={};for(var h=0,p=function(t){for(var e={},n=0;n&lt;t.length;n++){var i=r(t[n]),a=e[i];a||(a=e[i]=[]),a.push(t[n])}var o=[];for(var s in e)o.push(e[s]);return o}(t.values(this._layerConfigs));h&lt;p.length;h+=1){var d=p[h].map(function(t){return i._layers[t.id]}),g=d[0];if(&quot;none&quot;!==g.visibility){var m=g.source||&quot;&quot;,v=i.familiesBySource[m];v||(v=i.familiesBySource[m]={});var y=g.sourceLayer||&quot;_geojsonTileLayer&quot;,x=v[y];x||(x=v[y]=[]),x.push(d)}}};var o=function(){this.opacity=0,this.targetOpacity=0,this.time=0};o.prototype.clone=function(){var t=new o;return t.opacity=this.opacity,t.targetOpacity=this.targetOpacity,t.time=this.time,t},t.register(&quot;OpacityState&quot;,o);var s=function(t,e,r,n,i,a,o,s,l,c,u){var f=o.top*s-l,h=o.bottom*s+l,p=o.left*s-l,d=o.right*s+l;if(this.boxStartIndex=t.length,c){var g=h-f,m=d-p;g&gt;0&amp;&amp;(g=Math.max(10*s,g),this._addLineCollisionCircles(t,e,r,r.segment,m,g,n,i,a,u))}else t.emplaceBack(r.x,r.y,p,f,d,h,n,i,a,0,0);this.boxEndIndex=t.length};s.prototype._addLineCollisionCircles=function(t,e,r,n,i,a,o,s,l,c){var u=a/2,f=Math.floor(i/u),h=1+.4*Math.log(c)/Math.LN2,p=Math.floor(f*h/2),d=-a/2,g=r,m=n+1,v=d,y=-i/2,x=y-i/4;do{if(--m&lt;0){if(v&gt;y)return;m=0;break}v-=e[m].dist(g),g=e[m]}while(v&gt;x);for(var b=e[m].dist(e[m+1]),_=-p;_&lt;f+p;_++){var w=_*u,k=y+w;if(w&lt;0&amp;&amp;(k+=w),w&gt;i&amp;&amp;(k+=w-i),!(k&lt;v)){for(;v+b&lt;k;){if(v+=b,++m+1&gt;=e.length)return;b=e[m].dist(e[m+1])}var M=k-v,A=e[m],T=e[m+1].sub(A)._unit()._mult(M)._add(A)._round(),S=Math.abs(k-d)&lt;u?0:.8*(k-d);t.emplaceBack(T.x,T.y,-a/2,-a/2,a/2,a/2,o,s,l,a/2,S)}}};var l=u,c=u;function u(t,e){if(!(this instanceof u))return new u(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||f,this.length&gt;0)for(var r=(this.length&gt;&gt;1)-1;r&gt;=0;r--)this._down(r)}function f(t,e){return t&lt;e?-1:t&gt;e?1:0}function h(e,r,n){void 0===r&amp;&amp;(r=1),void 0===n&amp;&amp;(n=!1);for(var i=1/0,a=1/0,o=-1/0,s=-1/0,c=e[0],u=0;u&lt;c.length;u++){var f=c[u];(!u||f.x&lt;i)&amp;&amp;(i=f.x),(!u||f.y&lt;a)&amp;&amp;(a=f.y),(!u||f.x&gt;o)&amp;&amp;(o=f.x),(!u||f.y&gt;s)&amp;&amp;(s=f.y)}var h=o-i,g=s-a,m=Math.min(h,g),v=m/2,y=new l(null,p);if(0===m)return new t.default$1(i,a);for(var x=i;x&lt;o;x+=m)for(var b=a;b&lt;s;b+=m)y.push(new d(x+v,b+v,v,e));for(var _=function(t){for(var e=0,r=0,n=0,i=t[0],a=0,o=i.length,s=o-1;a&lt;o;s=a++){var l=i[a],c=i[s],u=l.x*c.y-c.x*l.y;r+=(l.x+c.x)*u,n+=(l.y+c.y)*u,e+=3*u}return new d(r/e,n/e,0,t)}(e),w=y.length;y.length;){var k=y.pop();(k.d&gt;_.d||!_.d)&amp;&amp;(_=k,n&amp;&amp;console.log(&quot;found best %d after %d probes&quot;,Math.round(1e4*k.d)/1e4,w)),k.max-_.d&lt;=r||(v=k.h/2,y.push(new d(k.p.x-v,k.p.y-v,v,e)),y.push(new d(k.p.x+v,k.p.y-v,v,e)),y.push(new d(k.p.x-v,k.p.y+v,v,e)),y.push(new d(k.p.x+v,k.p.y+v,v,e)),w+=4)}return n&amp;&amp;(console.log(&quot;num probes: &quot;+w),console.log(&quot;best distance: &quot;+_.d)),_.p}function p(t,e){return e.max-t.max}function d(e,r,n,i){this.p=new t.default$1(e,r),this.h=n,this.d=function(e,r){for(var n=!1,i=1/0,a=0;a&lt;r.length;a++)for(var o=r[a],s=0,l=o.length,c=l-1;s&lt;l;c=s++){var u=o[s],f=o[c];u.y&gt;e.y!=f.y&gt;e.y&amp;&amp;e.x&lt;(f.x-u.x)*(e.y-u.y)/(f.y-u.y)+u.x&amp;&amp;(n=!n),i=Math.min(i,t.distToSegmentSquared(e,u,f))}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}function g(e,r,n,i,a,o){e.createArrays(),e.symbolInstances=[];var s=512*e.overscaling;e.tilePixelRatio=t.default$8/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if(&quot;composite&quot;===e.textSizeData.functionType){var f=e.textSizeData.zoomRange,h=f.min,p=f.max;u.compositeTextSizes=[c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(h)),c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(p))]}if(&quot;composite&quot;===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,g=d.min,v=d.max;u.compositeIconSizes=[c[&quot;icon-size&quot;].possiblyEvaluate(new t.default$16(g)),c[&quot;icon-size&quot;].possiblyEvaluate(new t.default$16(v))]}u.layoutTextSize=c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(e.zoom+1)),u.layoutIconSize=c[&quot;icon-size&quot;].possiblyEvaluate(new t.default$16(e.zoom+1)),u.textMaxSize=c[&quot;text-size&quot;].possiblyEvaluate(new t.default$16(18));for(var y=24*l.get(&quot;text-line-height&quot;),x=&quot;map&quot;===l.get(&quot;text-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===l.get(&quot;symbol-placement&quot;),b=l.get(&quot;text-keep-upright&quot;),_=0,w=e.features;_&lt;w.length;_+=1){var k=w[_],M=l.get(&quot;text-font&quot;).evaluate(k).join(&quot;,&quot;),A=r[M]||{},T=n[M]||{},S={},E=k.text;if(E){var C=l.get(&quot;text-offset&quot;).evaluate(k).map(function(t){return 24*t}),L=24*l.get(&quot;text-letter-spacing&quot;).evaluate(k),z=t.allowsLetterSpacing(E)?L:0,P=l.get(&quot;text-anchor&quot;).evaluate(k),O=l.get(&quot;text-justify&quot;).evaluate(k),I=&quot;line&quot;!==l.get(&quot;symbol-placement&quot;)?24*l.get(&quot;text-max-width&quot;).evaluate(k):0;S.horizontal=t.shapeText(E,A,I,y,P,O,z,C,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(E)&amp;&amp;x&amp;&amp;b&amp;&amp;(S.vertical=t.shapeText(E,A,I,y,P,O,z,C,24,t.WritingMode.vertical))}var D=void 0;if(k.icon){var R=i[k.icon];R&amp;&amp;(D=t.shapeIcon(a[k.icon],l.get(&quot;icon-offset&quot;).evaluate(k),l.get(&quot;icon-anchor&quot;).evaluate(k)),void 0===e.sdfIcons?e.sdfIcons=R.sdf:e.sdfIcons!==R.sdf&amp;&amp;t.warnOnce(&quot;Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer&quot;),R.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get(&quot;icon-rotate&quot;).constantOr(1)&amp;&amp;(e.iconsNeedLinear=!0))}(S.horizontal||D)&amp;&amp;m(e,k,S,D,T,u)}o&amp;&amp;e.generateCollisionDebugBuffers()}function m(e,r,n,i,l,c){var u=c.layoutTextSize.evaluate(r),f=c.layoutIconSize.evaluate(r),p=c.textMaxSize.evaluate(r);void 0===p&amp;&amp;(p=u);var d=e.layers[0].layout,g=d.get(&quot;text-offset&quot;).evaluate(r),m=d.get(&quot;icon-offset&quot;).evaluate(r),x=u/24,b=e.tilePixelRatio*x,_=e.tilePixelRatio*p/24,w=e.tilePixelRatio*f,k=e.tilePixelRatio*d.get(&quot;symbol-spacing&quot;),M=d.get(&quot;text-padding&quot;)*e.tilePixelRatio,A=d.get(&quot;icon-padding&quot;)*e.tilePixelRatio,T=d.get(&quot;text-max-angle&quot;)/180*Math.PI,S=&quot;map&quot;===d.get(&quot;text-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===d.get(&quot;symbol-placement&quot;),E=&quot;map&quot;===d.get(&quot;icon-rotation-alignment&quot;)&amp;&amp;&quot;line&quot;===d.get(&quot;symbol-placement&quot;),C=k/2,L=function(a,u){u.x&lt;0||u.x&gt;=t.default$8||u.y&lt;0||u.y&gt;=t.default$8||e.symbolInstances.push(function(e,r,n,i,a,l,c,u,f,h,p,d,g,m,y,x,b,_,w,k,M){var A,T,S=e.addToLineVertexArray(r,n),E=0,C=0,L=0,z=i.horizontal?i.horizontal.text:&quot;&quot;,P=[];i.horizontal&amp;&amp;(A=new s(c,n,r,u,f,h,i.horizontal,p,d,g,e.overscaling),C+=v(e,r,i.horizontal,l,g,w,m,S,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,P,k,M),i.vertical&amp;&amp;(L+=v(e,r,i.vertical,l,g,w,m,S,t.WritingMode.vertical,P,k,M)));var O=A?A.boxStartIndex:e.collisionBoxArray.length,I=A?A.boxEndIndex:e.collisionBoxArray.length;if(a){var D=function(e,r,n,i,a,o){var s,l,c,u,f=r.image,h=n.layout,p=r.top-1/f.pixelRatio,d=r.left-1/f.pixelRatio,g=r.bottom+1/f.pixelRatio,m=r.right+1/f.pixelRatio;if(&quot;none&quot;!==h.get(&quot;icon-text-fit&quot;)&amp;&amp;a){var v=m-d,y=g-p,x=h.get(&quot;text-size&quot;).evaluate(o)/24,b=a.left*x,_=a.right*x,w=a.top*x,k=_-b,M=a.bottom*x-w,A=h.get(&quot;icon-text-fit-padding&quot;)[0],T=h.get(&quot;icon-text-fit-padding&quot;)[1],S=h.get(&quot;icon-text-fit-padding&quot;)[2],E=h.get(&quot;icon-text-fit-padding&quot;)[3],C=&quot;width&quot;===h.get(&quot;icon-text-fit&quot;)?.5*(M-y):0,L=&quot;height&quot;===h.get(&quot;icon-text-fit&quot;)?.5*(k-v):0,z=&quot;width&quot;===h.get(&quot;icon-text-fit&quot;)||&quot;both&quot;===h.get(&quot;icon-text-fit&quot;)?k:v,P=&quot;height&quot;===h.get(&quot;icon-text-fit&quot;)||&quot;both&quot;===h.get(&quot;icon-text-fit&quot;)?M:y;s=new t.default$1(b+L-E,w+C-A),l=new t.default$1(b+L+T+z,w+C-A),c=new t.default$1(b+L+T+z,w+C+S+P),u=new t.default$1(b+L-E,w+C+S+P)}else s=new t.default$1(d,p),l=new t.default$1(m,p),c=new t.default$1(m,g),u=new t.default$1(d,g);var O=n.layout.get(&quot;icon-rotate&quot;).evaluate(o)*Math.PI/180;if(O){var I=Math.sin(O),D=Math.cos(O),R=[D,-I,I,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:f.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,a,l,0,i.horizontal,w);T=new s(c,n,r,u,f,h,a,y,x,!1,e.overscaling),E=4*D.length;var R=e.iconSizeData,B=null;&quot;source&quot;===R.functionType?B=[10*l.layout.get(&quot;icon-size&quot;).evaluate(w)]:&quot;composite&quot;===R.functionType&amp;&amp;(B=[10*M.compositeIconSizes[0].evaluate(w),10*M.compositeIconSizes[1].evaluate(w)]),e.addSymbols(e.icon,D,B,_,b,w,!1,r,S.lineStartIndex,S.lineLength)}var F=T?T.boxStartIndex:e.collisionBoxArray.length,N=T?T.boxEndIndex:e.collisionBoxArray.length;return e.glyphOffsetArray.length&gt;=t.default$14.MAX_GLYPHS&amp;&amp;t.warnOnce(&quot;Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907&quot;),{key:z,textBoxStartIndex:O,textBoxEndIndex:I,iconBoxStartIndex:F,iconBoxEndIndex:N,textOffset:m,iconOffset:_,anchor:r,line:n,featureIndex:u,feature:w,numGlyphVertices:C,numVerticalGlyphVertices:L,numIconVertices:E,textOpacityState:new o,iconOpacityState:new o,isDuplicate:!1,placedTextSymbolIndices:P,crossTileID:0}}(e,u,a,n,i,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,b,M,S,g,w,A,E,m,r,l,c))};if(&quot;line&quot;===d.get(&quot;symbol-placement&quot;))for(var z=0,P=function(e,r,n,i,a){for(var o=[],s=0;s&lt;e.length;s++)for(var l=e[s],c=void 0,u=0;u&lt;l.length-1;u++){var f=l[u],h=l[u+1];f.x&lt;0&amp;&amp;h.x&lt;0||(f.x&lt;0?f=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round():h.x&lt;0&amp;&amp;(h=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round()),f.y&lt;0&amp;&amp;h.y&lt;0||(f.y&lt;0?f=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round():h.y&lt;0&amp;&amp;(h=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round()),f.x&gt;=i&amp;&amp;h.x&gt;=i||(f.x&gt;=i?f=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x&gt;=i&amp;&amp;(h=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y&gt;=a&amp;&amp;h.y&gt;=a||(f.y&gt;=a?f=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y&gt;=a&amp;&amp;(h=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round()),c&amp;&amp;f.equals(c[c.length-1])||(c=[f],o.push(c)),c.push(h)))))}return o}(r.geometry,0,0,t.default$8,t.default$8);z&lt;P.length;z+=1)for(var O=P[z],I=0,D=a(O,k,T,n.vertical||n.horizontal,i,24,_,e.overscaling,t.default$8);I&lt;D.length;I+=1){var R=D[I],B=n.horizontal;B&amp;&amp;y(e,B.text,C,R)||L(O,R)}else if(&quot;Polygon&quot;===r.type)for(var F=0,N=t.default$26(r.geometry,0);F&lt;N.length;F+=1){var j=N[F],V=h(j,16);L(j[0],new t.default$25(V.x,V.y,0))}else if(&quot;LineString&quot;===r.type)for(var U=0,q=r.geometry;U&lt;q.length;U+=1){var H=q[U];L(H,new t.default$25(H[0].x,H[0].y,0))}else if(&quot;Point&quot;===r.type)for(var G=0,W=r.geometry;G&lt;W.length;G+=1)for(var Y=0,X=W[G];Y&lt;X.length;Y+=1){var Z=X[Y];L([Z],new t.default$25(Z.x,Z.y,0))}}function v(e,r,n,i,a,o,s,l,c,u,f,h){var p=function(e,r,n,i,a,o){for(var s=n.layout.get(&quot;text-rotate&quot;).evaluate(a)*Math.PI/180,l=n.layout.get(&quot;text-offset&quot;).evaluate(a).map(function(t){return 24*t}),c=r.positionedGlyphs,u=[],f=0;f&lt;c.length;f++){var h=c[f],p=o[h.glyph];if(p){var d=p.rect;if(d){var g=t.GLYPH_PBF_BORDER+1,m=p.metrics.advance/2,v=i?[h.x+m,h.y]:[0,0],y=i?[0,0]:[h.x+m+l[0],h.y+l[1]],x=p.metrics.left-g-m+y[0],b=-p.metrics.top-g+y[1],_=x+d.w,w=b+d.h,k=new t.default$1(x,b),M=new t.default$1(_,b),A=new t.default$1(x,w),T=new t.default$1(_,w);if(i&amp;&amp;h.vertical){var S=new t.default$1(-m,m),E=-Math.PI/2,C=new t.default$1(5,0);k._rotateAround(E,S)._add(C),M._rotateAround(E,S)._add(C),A._rotateAround(E,S)._add(C),T._rotateAround(E,S)._add(C)}if(s){var L=Math.sin(s),z=Math.cos(s),P=[z,-L,L,z];k._matMult(P),M._matMult(P),A._matMult(P),T._matMult(P)}u.push({tl:k,tr:M,bl:A,br:T,tex:d,writingMode:r.writingMode,glyphOffset:v})}}}return u}(0,n,i,a,o,f),d=e.textSizeData,g=null;return&quot;source&quot;===d.functionType?g=[10*i.layout.get(&quot;text-size&quot;).evaluate(o)]:&quot;composite&quot;===d.functionType&amp;&amp;(g=[10*h.compositeTextSizes[0].evaluate(o),10*h.compositeTextSizes[1].evaluate(o)]),e.addSymbols(e.text,p,g,s,a,o,c,r,l.lineStartIndex,l.lineLength),u.push(e.text.placedSymbolArray.length-1),4*p.length}function y(t,e,r,n){var i=t.compareText;if(e in i){for(var a=i[e],o=a.length-1;o&gt;=0;o--)if(n.dist(a[o])&lt;r)return!0}else i[e]=[];return i[e].push(n),!1}u.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length&gt;0&amp;&amp;(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t&gt;0;){var i=t-1&gt;&gt;1,a=e[i];if(r(n,a)&gt;=0)break;e[t]=a,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length&gt;&gt;1,i=e[t];t&lt;n;){var a=1+(t&lt;&lt;1),o=a+1,s=e[a];if(o&lt;this.length&amp;&amp;r(e[o],s)&lt;0&amp;&amp;(a=o,s=e[o]),r(s,i)&gt;=0)break;e[t]=s,t=a}e[t]=i}},l.default=c;var x=function(e){var r=new t.AlphaImage({width:0,height:0}),n={},i=new t.default$2(0,0,{autoResize:!0});for(var a in e){var o=e[a],s=n[a]={};for(var l in o){var c=o[+l];if(c&amp;&amp;0!==c.bitmap.width&amp;&amp;0!==c.bitmap.height){var u=i.packOne(c.bitmap.width+2,c.bitmap.height+2);r.resize({width:i.w,height:i.h}),t.AlphaImage.copy(c.bitmap,r,{x:0,y:0},{x:u.x+1,y:u.y+1},c.bitmap),s[l]={rect:u,metrics:c.metrics}}}}i.shrink(),r.resize({width:i.w,height:i.h}),this.image=r,this.positions=n};t.register(&quot;GlyphAtlas&quot;,x);var b=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming};function _(e,r){for(var n=new t.default$16(r),i=0,a=e;i&lt;a.length;i+=1)a[i].recalculate(n)}b.prototype.parse=function(e,r,n,i){var a=this;this.status=&quot;parsing&quot;,this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var o=new t.default$27(Object.keys(e.layers).sort()),s=new t.default$11(this.tileID);s.bucketLayerIDs=[];var l,c,u,f={},h={featureIndex:s,iconDependencies:{},glyphDependencies:{}},p=r.familiesBySource[this.source];for(var d in p){var m=e.layers[d];if(m){1===m.version&amp;&amp;t.warnOnce('Vector tile source &quot;'+a.source+'&quot; layer &quot;'+d+'&quot; does not use vector tile spec v2 and therefore may have some rendering errors.');for(var v=o.encode(d),y=[],b=0;b&lt;m.length;b++){var w=m.feature(b);y.push({feature:w,index:b,sourceLayerIndex:v})}for(var k=0,M=p[d];k&lt;M.length;k+=1){var A=M[k],T=A[0];T.minzoom&amp;&amp;a.zoom&lt;Math.floor(T.minzoom)||T.maxzoom&amp;&amp;a.zoom&gt;=T.maxzoom||&quot;none&quot;!==T.visibility&amp;&amp;(_(A,a.zoom),(f[T.id]=T.createBucket({index:s.bucketLayerIDs.length,layers:A,zoom:a.zoom,pixelRatio:a.pixelRatio,overscaling:a.overscaling,collisionBoxArray:a.collisionBoxArray,sourceLayerIndex:v})).populate(y,h),s.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(h.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send(&quot;getGlyphs&quot;,{uid:this.uid,stacks:S},function(t,e){l||(l=t,c=e,C.call(a))}):c={};var E=Object.keys(h.iconDependencies);function C(){if(l)return i(l);if(c&amp;&amp;u){var e=new x(c),r=new t.default$28(u);for(var n in f){var a=f[n];a instanceof t.default$14&amp;&amp;(_(a.layers,this.zoom),g(a,c,e.positions,u,r.positions,this.showCollisionBoxes))}this.status=&quot;done&quot;,i(null,{buckets:t.values(f).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,iconAtlasImage:r.image})}}E.length?n.send(&quot;getImages&quot;,{icons:E},function(t,e){l||(l=t,u=e,C.call(a))}):u={},C.call(this)};var w=function(t){return!(!performance||!performance.getEntriesByName)&amp;&amp;performance.getEntriesByName(t)};function k(e,r){var n=t.getArrayBuffer(e.request,function(e,n){e?r(e):n&amp;&amp;r(null,{vectorTile:new t.default$29.VectorTile(new t.default$30(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires})});return function(){n.abort(),r()}}var M=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||k,this.loading={},this.loaded={}};M.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var a=this.loading[i]=new b(e);a.abort=this.loadVectorData(e,function(o,s){if(delete n.loading[i],o||!s)return r(o);var l=s.rawData,c={};s.expires&amp;&amp;(c.expires=s.expires),s.cacheControl&amp;&amp;(c.cacheControl=s.cacheControl);var u={};if(e.request&amp;&amp;e.request.collectResourceTiming){var f=w(e.request.url);f&amp;&amp;(u.resourceTiming=JSON.parse(JSON.stringify(f)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[i]=a})},M.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,i=this;if(r&amp;&amp;r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=a.reloadCallback;n&amp;&amp;(delete a.reloadCallback,a.parse(a.vectorTile,i.layerIndex,i.actor,n)),e(t,r)};&quot;parsing&quot;===a.status?a.reloadCallback=o:&quot;done&quot;===a.status&amp;&amp;a.parse(a.vectorTile,this.layerIndex,this.actor,o)}},M.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&amp;&amp;r[n]&amp;&amp;r[n].abort&amp;&amp;(r[n].abort(),delete r[n]),e()},M.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&amp;&amp;r[n]&amp;&amp;delete r[n],e()};var A=function(){this.loading={},this.loaded={}};A.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=new t.default$31(n);this.loading[n]=a,a.loadFromImage(e.rawImageData,i),delete this.loading[n],this.loaded=this.loaded||{},this.loaded[n]=a,r(null,a)},A.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&amp;&amp;e[r]&amp;&amp;delete e[r]};var T={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function S(t){var e=0;if(t&amp;&amp;t.length&gt;0){e+=Math.abs(E(t[0]));for(var r=1;r&lt;t.length;r++)e-=Math.abs(E(t[r]))}return e}function E(t){var e,r,n,i,a,o,s=0,l=t.length;if(l&gt;2){for(o=0;o&lt;l;o++)o===l-2?(n=l-2,i=l-1,a=0):o===l-1?(n=l-1,i=0,a=1):(n=o,i=o+1,a=o+2),e=t[n],r=t[i],s+=(C(t[a][0])-C(e[0]))*Math.sin(C(r[1]));s=s*T.RADIUS*T.RADIUS/2}return s}function C(t){return t*Math.PI/180}var L={geometry:function t(e){var r,n=0;switch(e.type){case&quot;Polygon&quot;:return S(e.coordinates);case&quot;MultiPolygon&quot;:for(r=0;r&lt;e.coordinates.length;r++)n+=S(e.coordinates[r]);return n;case&quot;Point&quot;:case&quot;MultiPoint&quot;:case&quot;LineString&quot;:case&quot;MultiLineString&quot;:return 0;case&quot;GeometryCollection&quot;:for(r=0;r&lt;e.geometries.length;r++)n+=t(e.geometries[r]);return n}},ring:E};function z(t,e){return function(r){return t(r,e)}}function P(t,e){e=!!e,t[0]=O(t[0],e);for(var r=1;r&lt;t.length;r++)t[r]=O(t[r],!e);return t}function O(t,e){return function(t){return L.ring(t)&gt;=0}(t)===e?t:t.reverse()}var I=t.default$29.VectorTileFeature.prototype.toGeoJSON,D=function(e){this._feature=e,this.extent=t.default$8,this.type=e.type,this.properties=e.tags,&quot;id&quot;in e&amp;&amp;!isNaN(e.id)&amp;&amp;(this.id=parseInt(e.id,10))};D.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r&lt;n.length;r+=1){var i=n[r];e.push([new t.default$1(i[0],i[1])])}return e}for(var a=[],o=0,s=this._feature.geometry;o&lt;s.length;o+=1){for(var l=[],c=0,u=s[o];c&lt;u.length;c+=1){var f=u[c];l.push(new t.default$1(f[0],f[1]))}a.push(l)}return a},D.prototype.toGeoJSON=function(t,e,r){return I.call(this,t,e,r)};var R=function(e){this.layers={_geojsonTileLayer:this},this.name=&quot;_geojsonTileLayer&quot;,this.extent=t.default$8,this.length=e.length,this._features=e};R.prototype.feature=function(t){return new D(this._features[t])};var B=t.__moduleExports.VectorTileFeature,F=N;function N(t,e){this.options=e||{},this.features=t,this.length=t.length}function j(t,e){this.id=&quot;number&quot;==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}N.prototype.feature=function(t){return new j(this.features[t],this.options.extent)},j.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r&lt;e.length;r++){for(var n=e[r],i=[],a=0;a&lt;n.length;a++)i.push(new t.default$32(n[a][0],n[a][1]));this.geometry.push(i)}return this.geometry},j.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a&lt;t.length;a++)for(var o=t[a],s=0;s&lt;o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},j.prototype.toGeoJSON=B.prototype.toGeoJSON;var V=H,U=H,q=F;function H(e){var r=new t.__moduleExports$1;return function(t,e){for(var r in t.layers)e.writeMessage(3,G,t.layers[r])}(e,r),r.finish()}function G(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||&quot;&quot;),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r&lt;t.length;r++)n.feature=t.feature(r),e.writeMessage(2,W,n);var i=n.keys;for(r=0;r&lt;i.length;r++)e.writeStringField(3,i[r]);var a=n.values;for(r=0;r&lt;a.length;r++)e.writeMessage(4,J,a[r])}function W(t,e){var r=t.feature;void 0!==r.id&amp;&amp;e.writeVarintField(1,r.id),e.writeMessage(2,Y,t),e.writeVarintField(3,r.type),e.writeMessage(4,$,r)}function Y(t,e){var r=t.feature,n=t.keys,i=t.values,a=t.keycache,o=t.valuecache;for(var s in r.properties){var l=a[s];void 0===l&amp;&amp;(n.push(s),l=n.length-1,a[s]=l),e.writeVarint(l);var c=r.properties[s],u=typeof c;&quot;string&quot;!==u&amp;&amp;&quot;boolean&quot;!==u&amp;&amp;&quot;number&quot;!==u&amp;&amp;(c=JSON.stringify(c));var f=u+&quot;:&quot;+c,h=o[f];void 0===h&amp;&amp;(i.push(c),h=i.length-1,o[f]=h),e.writeVarint(h)}}function X(t,e){return(e&lt;&lt;3)+(7&amp;t)}function Z(t){return t&lt;&lt;1^t&gt;&gt;31}function $(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s&lt;o;s++){var l=r[s],c=1;1===n&amp;&amp;(c=l.length),e.writeVarint(X(1,c));for(var u=3===n?l.length-1:l.length,f=0;f&lt;u;f++){1===f&amp;&amp;1!==n&amp;&amp;e.writeVarint(X(2,u-1));var h=l[f].x-i,p=l[f].y-a;e.writeVarint(Z(h)),e.writeVarint(Z(p)),i+=h,a+=p}3===n&amp;&amp;e.writeVarint(X(7,0))}}function J(t,e){var r=typeof t;&quot;string&quot;===r?e.writeStringField(1,t):&quot;boolean&quot;===r?e.writeBooleanField(7,t):&quot;number&quot;===r&amp;&amp;(t%1!=0?e.writeDoubleField(3,t):t&lt;0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}V.fromVectorTileJs=U,V.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new F(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return H({layers:r})},V.GeoJSONWrapper=q;var K=function t(e,r,n,i,a,o){if(!(a-i&lt;=n)){var s=Math.floor((i+a)/2);!function t(e,r,n,i,a,o){for(;a&gt;i;){if(a-i&gt;600){var s=a-i+1,l=n-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2&lt;0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*u/s+f)),Math.min(a,Math.floor(n+(s-l)*u/s+f)),o)}var h=r[2*n+o],p=i,d=a;for(Q(e,r,i,n),r[2*a+o]&gt;h&amp;&amp;Q(e,r,i,a);p&lt;d;){for(Q(e,r,p,d),p++,d--;r[2*p+o]&lt;h;)p++;for(;r[2*d+o]&gt;h;)d--}r[2*i+o]===h?Q(e,r,i,d):Q(e,r,++d,a),d&lt;=n&amp;&amp;(i=d+1),n&lt;=d&amp;&amp;(a=d-1)}}(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}};function Q(t,e,r,n){tt(t,r,n),tt(e,2*r,2*n),tt(e,2*r+1,2*n+1)}function tt(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function et(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}var rt=function(t,e,r,n,i){return new nt(t,e,r,n,i)};function nt(t,e,r,n,i){e=e||it,r=r||at,i=i||Array,this.nodeSize=n||64,this.points=t,this.ids=new i(t.length),this.coords=new i(2*t.length);for(var a=0;a&lt;t.length;a++)this.ids[a]=a,this.coords[2*a]=e(t[a]),this.coords[2*a+1]=r(t[a]);K(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function it(t){return t[0]}function at(t){return t[1]}nt.prototype={range:function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),p=c.pop();if(h-p&lt;=o)for(var d=p;d&lt;=h;d++)s=e[2*d],l=e[2*d+1],s&gt;=r&amp;&amp;s&lt;=i&amp;&amp;l&gt;=n&amp;&amp;l&lt;=a&amp;&amp;u.push(t[d]);else{var g=Math.floor((p+h)/2);s=e[2*g],l=e[2*g+1],s&gt;=r&amp;&amp;s&lt;=i&amp;&amp;l&gt;=n&amp;&amp;l&lt;=a&amp;&amp;u.push(t[g]);var m=(f+1)%2;(0===f?r&lt;=s:n&lt;=l)&amp;&amp;(c.push(p),c.push(g-1),c.push(m)),(0===f?i&gt;=s:a&gt;=l)&amp;&amp;(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},within:function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),f=o.pop();if(u-f&lt;=a)for(var h=f;h&lt;=u;h++)et(e[2*h],e[2*h+1],r,n)&lt;=l&amp;&amp;s.push(t[h]);else{var p=Math.floor((f+u)/2),d=e[2*p],g=e[2*p+1];et(d,g,r,n)&lt;=l&amp;&amp;s.push(t[p]);var m=(c+1)%2;(0===c?r-i&lt;=d:n-i&lt;=g)&amp;&amp;(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i&gt;=d:n+i&gt;=g)&amp;&amp;(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)}};function ot(t){this.options=pt(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function st(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function lt(t,e){var r=t.geometry.coordinates;return{x:ft(r[0]),y:ht(r[1]),zoom:1/0,id:e,parentId:-1}}function ct(t){return{type:&quot;Feature&quot;,properties:ut(t),geometry:{type:&quot;Point&quot;,coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function ut(t){var e=t.numPoints,r=e&gt;=1e4?Math.round(e/1e3)+&quot;k&quot;:e&gt;=1e3?Math.round(e/100)/10+&quot;k&quot;:e;return pt(pt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function ft(t){return t/360+.5}function ht(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r&lt;0?0:r&gt;1?1:r}function pt(t,e){for(var r in e)t[r]=e[r];return t}function dt(t){return t.x}function gt(t){return t.y}function mt(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l&gt;1?(r=i,n=a):l&gt;0&amp;&amp;(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function vt(t,e,r,n){var i={id:t||null,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if(&quot;Point&quot;===r||&quot;MultiPoint&quot;===r||&quot;LineString&quot;===r)yt(t,e);else if(&quot;Polygon&quot;===r||&quot;MultiLineString&quot;===r)for(var n=0;n&lt;e.length;n++)yt(t,e[n]);else if(&quot;MultiPolygon&quot;===r)for(n=0;n&lt;e.length;n++)for(var i=0;i&lt;e[n].length;i++)yt(t,e[n][i])}(i),i}function yt(t,e){for(var r=0;r&lt;e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function xt(t,e,r){if(e.geometry){var n=e.geometry.coordinates,i=e.geometry.type,a=Math.pow(r.tolerance/((1&lt;&lt;r.maxZoom)*r.extent),2),o=[];if(&quot;Point&quot;===i)bt(n,o);else if(&quot;MultiPoint&quot;===i)for(var s=0;s&lt;n.length;s++)bt(n[s],o);else if(&quot;LineString&quot;===i)_t(n,o,a,!1);else if(&quot;MultiLineString&quot;===i)if(r.lineMetrics)for(s=0;s&lt;n.length;s++)return o=[],_t(n[s],o,a,!1),void t.push(vt(e.id,&quot;LineString&quot;,o,e.properties));else wt(n,o,a,!1);else if(&quot;Polygon&quot;===i)wt(n,o,a,!0);else{if(&quot;MultiPolygon&quot;!==i){if(&quot;GeometryCollection&quot;===i){for(s=0;s&lt;e.geometry.geometries.length;s++)xt(t,{id:e.id,geometry:e.geometry.geometries[s],properties:e.properties},r);return}throw new Error(&quot;Input data is not a valid GeoJSON object.&quot;)}for(s=0;s&lt;n.length;s++){var l=[];wt(n[s],l,a,!0),o.push(l)}}t.push(vt(e.id,i,o,e.properties))}}function bt(t,e){e.push(kt(t[0])),e.push(Mt(t[1])),e.push(0)}function _t(t,e,r,n){for(var i,a,o=0,s=0;s&lt;t.length;s++){var l=kt(t[s][0]),c=Mt(t[s][1]);e.push(l),e.push(c),e.push(0),s&gt;0&amp;&amp;(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=e.length-3;e[2]=1,function t(e,r,n,i){for(var a,o=i,s=e[r],l=e[r+1],c=e[n],u=e[n+1],f=r+3;f&lt;n;f+=3){var h=mt(e[f],e[f+1],s,l,c,u);h&gt;o&amp;&amp;(a=f,o=h)}o&gt;i&amp;&amp;(a-r&gt;3&amp;&amp;t(e,r,a,i),e[a+2]=o,n-a&gt;3&amp;&amp;t(e,a,n,i))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function wt(t,e,r,n){for(var i=0;i&lt;t.length;i++){var a=[];_t(t[i],a,r,n),e.push(a)}}function kt(t){return t/360+.5}function Mt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r&lt;0?0:r&gt;1?1:r}function At(t,e,r,n,i,a,o,s){if(n/=e,a&gt;=(r/=e)&amp;&amp;o&lt;=n)return t;if(a&gt;n||o&lt;r)return null;for(var l=[],c=0;c&lt;t.length;c++){var u=t[c],f=u.geometry,h=u.type,p=0===i?u.minX:u.minY,d=0===i?u.maxX:u.maxY;if(p&gt;=r&amp;&amp;d&lt;=n)l.push(u);else if(!(p&gt;n||d&lt;r)){var g=[];if(&quot;Point&quot;===h||&quot;MultiPoint&quot;===h)Tt(f,g,r,n,i);else if(&quot;LineString&quot;===h)St(f,g,r,n,i,!1,s.lineMetrics);else if(&quot;MultiLineString&quot;===h)Ct(f,g,r,n,i,!1);else if(&quot;Polygon&quot;===h)Ct(f,g,r,n,i,!0);else if(&quot;MultiPolygon&quot;===h)for(var m=0;m&lt;f.length;m++){var v=[];Ct(f[m],v,r,n,i,!0),v.length&amp;&amp;g.push(v)}if(g.length){if(s.lineMetrics&amp;&amp;&quot;LineString&quot;===h){for(m=0;m&lt;g.length;m++)l.push(vt(u.id,h,g[m],u.tags));continue}&quot;LineString&quot;!==h&amp;&amp;&quot;MultiLineString&quot;!==h||(1===g.length?(h=&quot;LineString&quot;,g=g[0]):h=&quot;MultiLineString&quot;),&quot;Point&quot;!==h&amp;&amp;&quot;MultiPoint&quot;!==h||(h=3===g.length?&quot;Point&quot;:&quot;MultiPoint&quot;),l.push(vt(u.id,h,g,u.tags))}}}return l.length?l:null}function Tt(t,e,r,n,i){for(var a=0;a&lt;t.length;a+=3){var o=t[a+i];o&gt;=r&amp;&amp;o&lt;=n&amp;&amp;(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function St(t,e,r,n,i,a,o){for(var s,l,c=Et(t),u=0===i?zt:Pt,f=t.start,h=0;h&lt;t.length-3;h+=3){var p=t[h],d=t[h+1],g=t[h+2],m=t[h+3],v=t[h+4],y=0===i?p:d,x=0===i?m:v,b=!1;o&amp;&amp;(s=Math.sqrt(Math.pow(p-m,2)+Math.pow(d-v,2))),y&lt;r?x&gt;=r&amp;&amp;(l=u(c,p,d,m,v,r),o&amp;&amp;(c.start=f+s*l)):y&gt;n?x&lt;=n&amp;&amp;(l=u(c,p,d,m,v,n),o&amp;&amp;(c.start=f+s*l)):Lt(c,p,d,g),x&lt;r&amp;&amp;y&gt;=r&amp;&amp;(l=u(c,p,d,m,v,r),b=!0),x&gt;n&amp;&amp;y&lt;=n&amp;&amp;(l=u(c,p,d,m,v,n),b=!0),!a&amp;&amp;b&amp;&amp;(o&amp;&amp;(c.end=f+s*l),e.push(c),c=Et(t)),o&amp;&amp;(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)&gt;=r&amp;&amp;y&lt;=n&amp;&amp;Lt(c,p,d,g),_=c.length-3,a&amp;&amp;_&gt;=3&amp;&amp;(c[_]!==c[0]||c[_+1]!==c[1])&amp;&amp;Lt(c,c[0],c[1],c[2]),c.length&amp;&amp;e.push(c)}function Et(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Ct(t,e,r,n,i,a){for(var o=0;o&lt;t.length;o++)St(t[o],e,r,n,i,a,!1)}function Lt(t,e,r,n){t.push(e),t.push(r),t.push(n)}function zt(t,e,r,n,i,a){var o=(a-e)/(n-e);return t.push(a),t.push(r+(i-r)*o),t.push(1),o}function Pt(t,e,r,n,i,a){var o=(a-r)/(i-r);return t.push(e+(n-e)*o),t.push(a),t.push(1),o}function Ot(t,e){for(var r=[],n=0;n&lt;t.length;n++){var i,a=t[n],o=a.type;if(&quot;Point&quot;===o||&quot;MultiPoint&quot;===o||&quot;LineString&quot;===o)i=It(a.geometry,e);else if(&quot;MultiLineString&quot;===o||&quot;Polygon&quot;===o){i=[];for(var s=0;s&lt;a.geometry.length;s++)i.push(It(a.geometry[s],e))}else if(&quot;MultiPolygon&quot;===o)for(i=[],s=0;s&lt;a.geometry.length;s++){for(var l=[],c=0;c&lt;a.geometry[s].length;c++)l.push(It(a.geometry[s][c],e));i.push(l)}r.push(vt(a.id,o,i,a.tags))}return r}function It(t,e){var r=[];r.size=t.size,void 0!==t.start&amp;&amp;(r.start=t.start,r.end=t.end);for(var n=0;n&lt;t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function Dt(t,e){if(t.transformed)return t;var r,n,i,a=1&lt;&lt;t.z,o=t.x,s=t.y;for(r=0;r&lt;t.features.length;r++){var l=t.features[r],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(n=0;n&lt;c.length;n+=2)l.geometry.push(Rt(c[n],c[n+1],e,a,o,s));else for(n=0;n&lt;c.length;n++){var f=[];for(i=0;i&lt;c[n].length;i+=2)f.push(Rt(c[n][i],c[n][i+1],e,a,o,s));l.geometry.push(f)}}return t.transformed=!0,t}function Rt(t,e,r,n,i,a){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-a))]}function Bt(t,e,r,n,i){for(var a=e===i.maxZoom?0:i.tolerance/((1&lt;&lt;e)*i.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s&lt;t.length;s++){o.numFeatures++,Ft(o,t[s],a,i);var l=t[s].minX,c=t[s].minY,u=t[s].maxX,f=t[s].maxY;l&lt;o.minX&amp;&amp;(o.minX=l),c&lt;o.minY&amp;&amp;(o.minY=c),u&gt;o.maxX&amp;&amp;(o.maxX=u),f&gt;o.maxY&amp;&amp;(o.maxY=f)}return o}function Ft(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(&quot;Point&quot;===a||&quot;MultiPoint&quot;===a)for(var s=0;s&lt;i.length;s+=3)o.push(i[s]),o.push(i[s+1]),t.numPoints++,t.numSimplified++;else if(&quot;LineString&quot;===a)Nt(o,i,t,r,!1,!1);else if(&quot;MultiLineString&quot;===a||&quot;Polygon&quot;===a)for(s=0;s&lt;i.length;s++)Nt(o,i[s],t,r,&quot;Polygon&quot;===a,0===s);else if(&quot;MultiPolygon&quot;===a)for(var l=0;l&lt;i.length;l++){var c=i[l];for(s=0;s&lt;c.length;s++)Nt(o,c[s],t,r,!0,0===s)}if(o.length){var u=e.tags||null;if(&quot;LineString&quot;===a&amp;&amp;n.lineMetrics){for(var f in u={},e.tags)u[f]=e.tags[f];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var h={geometry:o,type:&quot;Polygon&quot;===a||&quot;MultiPolygon&quot;===a?3:&quot;LineString&quot;===a||&quot;MultiLineString&quot;===a?2:1,tags:u};null!==e.id&amp;&amp;(h.id=e.id),t.features.push(h)}}function Nt(t,e,r,n,i,a){var o=n*n;if(n&gt;0&amp;&amp;e.size&lt;(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;l&lt;e.length;l+=3)(0===n||e[l+2]&gt;o)&amp;&amp;(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&amp;&amp;function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n&lt;i;a=n,n+=2)r+=(t[n]-t[a])*(t[n+1]+t[a+1]);if(r&gt;0===e)for(n=0,i=t.length;n&lt;i/2;n+=2){var o=t[n],s=t[n+1];t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=o,t[i-1-n]=s}}(s,a),t.push(s)}}function jt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&amp;&amp;console.time(&quot;preprocess data&quot;),e.maxZoom&lt;0||e.maxZoom&gt;24)throw new Error(&quot;maxZoom should be in the 0-24 range&quot;);var n=function(t,e){var r=[];if(&quot;FeatureCollection&quot;===t.type)for(var n=0;n&lt;t.features.length;n++)xt(r,t.features[n],e);else&quot;Feature&quot;===t.type?xt(r,t,e):xt(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&amp;&amp;(console.timeEnd(&quot;preprocess data&quot;),console.log(&quot;index: maxZoom: %d, maxPoints: %d&quot;,e.indexMaxZoom,e.indexMaxPoints),console.time(&quot;generate tiles&quot;),this.stats={},this.total=0),(n=function(t,e){var r=e.buffer/e.extent,n=t,i=At(t,1,-1-r,r,0,-1,2,e),a=At(t,1,1-r,2+r,0,-1,2,e);return(i||a)&amp;&amp;(n=At(t,1,-r,1+r,0,-1,2,e)||[],i&amp;&amp;(n=Ot(i,1).concat(n)),a&amp;&amp;(n=n.concat(Ot(a,-1)))),n}(n,e)).length&amp;&amp;this.splitTile(n,0,0,0),r&amp;&amp;(n.length&amp;&amp;console.log(&quot;features: %d, points: %d&quot;,this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(&quot;generate tiles&quot;),console.log(&quot;tiles generated:&quot;,this.total,JSON.stringify(this.stats)))}function Vt(t,e,r){return 32*((1&lt;&lt;t)*r+e)+t}function Ut(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);var i=new R(n.features),a=V(i);0===a.byteOffset&amp;&amp;a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:i,rawData:a.buffer})}ot.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&amp;&amp;console.time(&quot;total time&quot;);var r=&quot;prepare &quot;+t.length+&quot; points&quot;;e&amp;&amp;console.time(r),this.points=t;var n=t.map(lt);e&amp;&amp;console.timeEnd(r);for(var i=this.options.maxZoom;i&gt;=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=rt(n,dt,gt,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&amp;&amp;console.log(&quot;z%d: %d clusters in %dms&quot;,i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=rt(n,dt,gt,this.options.nodeSize,Float32Array),e&amp;&amp;console.timeEnd(&quot;total time&quot;),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(ft(t[0]),ht(t[3]),ft(t[2]),ht(t[1])),i=[],a=0;a&lt;n.length;a++){var o=r.points[n[a]];i.push(o.numPoints?ct(o):this.points[o.id])}return i},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(r.x,r.y,n),a=[],o=0;o&lt;i.length;o++){var s=this.trees[e+1].points[i[o]];s.parentId===t&amp;&amp;a.push(s.numPoints?ct(s):this.points[s.id])}return a},getLeaves:function(t,e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,r,n,0),i},getTile:function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options.extent,o=this.options.radius/a,s=(r-o)/i,l=(r+1+o)/i,c={features:[]};return this._addTileFeatures(n.range((e-o)/i,s,(e+1+o)/i,l),n.points,e,r,i,c),0===e&amp;&amp;this._addTileFeatures(n.range(1-o/i,s,1,l),n.points,i,r,i,c),e===i-1&amp;&amp;this._addTileFeatures(n.range(0,s,o/i,l),n.points,-1,r,i,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e&lt;this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,n,i,a){for(var o=this.getChildren(e,r),s=0;s&lt;o.length;s++){var l=o[s].properties;if(l.cluster?a+l.point_count&lt;=i?a+=l.point_count:a=this._appendLeaves(t,l.cluster_id,r+1,n,i,a):a&lt;i?a++:t.push(o[s]),t.length===n)break}return a},_addTileFeatures:function(t,e,r,n,i,a){for(var o=0;o&lt;t.length;o++){var s=e[t[o]];a.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-r)),Math.round(this.options.extent*(s.y*i-n))]],tags:s.numPoints?ut(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i&lt;t.length;i++){var a=t[i];if(!(a.zoom&lt;=e)){a.zoom=e;var o=this.trees[e+1],s=o.within(a.x,a.y,n),l=a.numPoints||1,c=a.x*l,u=a.y*l,f=null;this.options.reduce&amp;&amp;(f=this.options.initial(),this._accumulate(f,a));for(var h=0;h&lt;s.length;h++){var p=o.points[s[h]];if(e&lt;p.zoom){var d=p.numPoints||1;p.zoom=e,c+=p.x*d,u+=p.y*d,l+=d,p.parentId=i,this.options.reduce&amp;&amp;this._accumulate(f,p)}}1===l?r.push(a):(a.parentId=i,r.push(st(c/l,u/l,l,i,f)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}},jt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,debug:0},jt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var u=1&lt;&lt;e,f=Vt(e,r,n),h=this.tiles[f];if(!h&amp;&amp;(c&gt;1&amp;&amp;console.time(&quot;creation&quot;),h=this.tiles[f]=Bt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),c)){c&gt;1&amp;&amp;(console.log(&quot;tile z%d-%d-%d (features: %d, points: %d, simplified: %d)&quot;,e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd(&quot;creation&quot;));var p=&quot;z&quot;+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1&lt;&lt;i-e;if(r!==Math.floor(a/d)||n!==Math.floor(o/d))continue}else if(e===l.indexMaxZoom||h.numPoints&lt;=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){c&gt;1&amp;&amp;console.time(&quot;clipping&quot;);var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,M=1+_;g=m=v=y=null,x=At(t,u,r-_,r+k,0,h.minX,h.maxX,l),b=At(t,u,r+w,r+M,0,h.minX,h.maxX,l),t=null,x&amp;&amp;(g=At(x,u,n-_,n+k,1,h.minY,h.maxY,l),m=At(x,u,n+w,n+M,1,h.minY,h.maxY,l),x=null),b&amp;&amp;(v=At(b,u,n-_,n+k,1,h.minY,h.maxY,l),y=At(b,u,n+w,n+M,1,h.minY,h.maxY,l),b=null),c&gt;1&amp;&amp;console.timeEnd(&quot;clipping&quot;),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},jt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t&lt;0||t&gt;24)return null;var o=1&lt;&lt;t,s=Vt(t,e=(e%o+o)%o,r);if(this.tiles[s])return Dt(this.tiles[s],i);a&gt;1&amp;&amp;console.log(&quot;drilling down to z%d-%d-%d&quot;,t,e,r);for(var l,c=t,u=e,f=r;!l&amp;&amp;c&gt;0;)c--,u=Math.floor(u/2),f=Math.floor(f/2),l=this.tiles[Vt(c,u,f)];return l&amp;&amp;l.source?(a&gt;1&amp;&amp;console.log(&quot;found parent tile z%d-%d-%d&quot;,c,u,f),a&gt;1&amp;&amp;console.time(&quot;drilling down&quot;),this.splitTile(l.source,c,u,f,t,e,r),a&gt;1&amp;&amp;console.timeEnd(&quot;drilling down&quot;),this.tiles[s]?Dt(this.tiles[s],i):null):null};var qt=function(e){function r(t,r,n){e.call(this,t,r,Ut),n&amp;&amp;(this.loadGeoJSON=n)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&amp;&amp;this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&amp;&amp;&quot;Idle&quot;!==this._state?this._state=&quot;NeedsLoadData&quot;:(this._state=&quot;Coalescing&quot;,this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&amp;&amp;this._pendingLoadDataParams){var e=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams,this.loadGeoJSON(r,function(n,i){if(n||!i)return e(n);if(&quot;object&quot;!=typeof i)return e(new Error(&quot;Input data is not a valid GeoJSON object.&quot;));!function t(e,r){switch(e&amp;&amp;e.type||null){case&quot;FeatureCollection&quot;:return e.features=e.features.map(z(t,r)),e;case&quot;Feature&quot;:return e.geometry=t(e.geometry,r),e;case&quot;Polygon&quot;:case&quot;MultiPolygon&quot;:return function(t,e){return&quot;Polygon&quot;===t.type?t.coordinates=P(t.coordinates,e):&quot;MultiPolygon&quot;===t.type&amp;&amp;(t.coordinates=t.coordinates.map(z(P,e))),t}(e,r);default:return e}}(i,!0);try{t._geoJSONIndex=r.cluster?function(t){return new ot(t)}(r.superclusterOptions).load(i.features):new jt(i,r.geojsonVtOptions)}catch(n){return e(n)}t.loaded={};var a={};if(r.request&amp;&amp;r.request.collectResourceTiming){var o=w(r.request.url);o&amp;&amp;(a.resourceTiming={},a.resourceTiming[r.source]=JSON.parse(JSON.stringify(o)))}e(null,a)})}},r.prototype.coalesce=function(){&quot;Coalescing&quot;===this._state?this._state=&quot;Idle&quot;:&quot;NeedsLoadData&quot;===this._state&amp;&amp;(this._state=&quot;Coalescing&quot;,this._loadData())},r.prototype.reloadTile=function(t,r){var n=this.loaded,i=t.uid;return n&amp;&amp;n[i]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if(&quot;string&quot;!=typeof e.data)return r(new Error(&quot;Input data is not a valid GeoJSON object.&quot;));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error(&quot;Input data is not a valid GeoJSON object.&quot;))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&amp;&amp;this._pendingCallback(null,{abandoned:!0}),e()},r}(M),Ht=function(e){var r=this;this.self=e,this.actor=new t.default$7(e,this),this.layerIndexes={},this.workerSourceTypes={vector:M,geojson:qt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name &quot;'+t+'&quot; already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error(&quot;RTL text plugin already registered.&quot;);t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText}};return Ht.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},Ht.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},Ht.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},Ht.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},Ht.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},Ht.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},Ht.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},Ht.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Ht.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&amp;&amp;this.workerSources[t][e.type]&amp;&amp;this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}},Ht.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},Ht.prototype.loadRTLTextPlugin=function(e,r,n){try{t.plugin.isLoaded()||(this.self.importScripts(r),n(t.plugin.isLoaded()?null:new Error(&quot;RTL Text Plugin failed to import scripts from &quot;+r)))}catch(t){n(t.toString())}},Ht.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},Ht.prototype.getWorkerSource=function(t,e,r){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var i={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e][r]},Ht.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new A),this.demWorkerSources[t][e]},&quot;undefined&quot;!=typeof WorkerGlobalScope&amp;&amp;&quot;undefined&quot;!=typeof self&amp;&amp;self instanceof WorkerGlobalScope&amp;&amp;new Ht(self),Ht}),i(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!!(&quot;undefined&quot;!=typeof window&amp;&amp;&quot;undefined&quot;!=typeof document&amp;&amp;Array.prototype&amp;&amp;Array.prototype.every&amp;&amp;Array.prototype.filter&amp;&amp;Array.prototype.forEach&amp;&amp;Array.prototype.indexOf&amp;&amp;Array.prototype.lastIndexOf&amp;&amp;Array.prototype.map&amp;&amp;Array.prototype.some&amp;&amp;Array.prototype.reduce&amp;&amp;Array.prototype.reduceRight&amp;&amp;Array.isArray&amp;&amp;Function.prototype&amp;&amp;Function.prototype.bind&amp;&amp;Object.keys&amp;&amp;Object.create&amp;&amp;Object.getPrototypeOf&amp;&amp;Object.getOwnPropertyNames&amp;&amp;Object.isSealed&amp;&amp;Object.isFrozen&amp;&amp;Object.isExtensible&amp;&amp;Object.getOwnPropertyDescriptor&amp;&amp;Object.defineProperty&amp;&amp;Object.defineProperties&amp;&amp;Object.seal&amp;&amp;Object.freeze&amp;&amp;Object.preventExtensions&amp;&amp;&quot;JSON&quot;in window&amp;&amp;&quot;parse&quot;in JSON&amp;&amp;&quot;stringify&quot;in JSON&amp;&amp;function(){if(!(&quot;Worker&quot;in window&amp;&amp;&quot;Blob&quot;in window&amp;&amp;&quot;URL&quot;in window))return!1;var t,e,r=new Blob([&quot;&quot;],{type:&quot;text/javascript&quot;}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&amp;&amp;e.terminate(),URL.revokeObjectURL(n),t}()&amp;&amp;&quot;Uint8ClampedArray&quot;in window&amp;&amp;function(t){return void 0===r[t]&amp;&amp;(r[t]=function(t){var r=document.createElement(&quot;canvas&quot;),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext(&quot;webgl&quot;,n)||r.probablySupportsContext(&quot;experimental-webgl&quot;,n):r.supportsContext?r.supportsContext(&quot;webgl&quot;,n)||r.supportsContext(&quot;experimental-webgl&quot;,n):r.getContext(&quot;webgl&quot;,n)||r.getContext(&quot;experimental-webgl&quot;,n)}(t)),r[t]}(t&amp;&amp;t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&amp;&amp;(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r=t.default.performance&amp;&amp;t.default.performance.now?t.default.performance.now.bind(t.default.performance):Date.now.bind(Date),n=t.default.requestAnimationFrame||t.default.mozRequestAnimationFrame||t.default.webkitRequestAnimationFrame||t.default.msRequestAnimationFrame,i=t.default.cancelAnimationFrame||t.default.mozCancelAnimationFrame||t.default.webkitCancelAnimationFrame||t.default.msCancelAnimationFrame,a={now:r,frame:function(t){return n(t)},cancelFrame:function(t){return i(t)},getImageData:function(e){var r=t.default.document.createElement(&quot;canvas&quot;),n=r.getContext(&quot;2d&quot;);if(!n)throw new Error(&quot;failed to create canvas 2d context&quot;);return r.width=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(0,0,e.width,e.height)},hardwareConcurrency:t.default.navigator.hardwareConcurrency||4,get devicePixelRatio(){return t.default.devicePixelRatio},supportsWebp:!1};if(t.default.document){var o=t.default.document.createElement(&quot;img&quot;);o.onload=function(){a.supportsWebp=!0},o.src=&quot;data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=&quot;}var s={create:function(e,r,n){var i=t.default.document.createElement(e);return r&amp;&amp;(i.className=r),n&amp;&amp;n.appendChild(i),i},createNS:function(e,r){return t.default.document.createElementNS(e,r)}},l=t.default.document?t.default.document.documentElement.style:null;function c(t){if(!l)return null;for(var e=0;e&lt;t.length;e++)if(t[e]in l)return t[e];return t[0]}var u,f=c([&quot;userSelect&quot;,&quot;MozUserSelect&quot;,&quot;WebkitUserSelect&quot;,&quot;msUserSelect&quot;]);s.disableDrag=function(){l&amp;&amp;f&amp;&amp;(u=l[f],l[f]=&quot;none&quot;)},s.enableDrag=function(){l&amp;&amp;f&amp;&amp;(l[f]=u)};var h=c([&quot;transform&quot;,&quot;WebkitTransform&quot;]);s.setTransform=function(t,e){t.style[h]=e};var p=!1;try{var d=Object.defineProperty({},&quot;passive&quot;,{get:function(){p=!0}});t.default.addEventListener(&quot;test&quot;,d,d),t.default.removeEventListener(&quot;test&quot;,d,d)}catch(t){p=!1}s.addEventListener=function(t,e,r,n){void 0===n&amp;&amp;(n={}),&quot;passive&quot;in n&amp;&amp;p?t.addEventListener(e,r,n):t.addEventListener(e,r,n.capture)},s.removeEventListener=function(t,e,r,n){void 0===n&amp;&amp;(n={}),&quot;passive&quot;in n&amp;&amp;p?t.removeEventListener(e,r,n):t.removeEventListener(e,r,n.capture)};var g=function(e){e.preventDefault(),e.stopPropagation(),t.default.removeEventListener(&quot;click&quot;,g,!0)};s.suppressClick=function(){t.default.addEventListener(&quot;click&quot;,g,!0),t.default.setTimeout(function(){t.default.removeEventListener(&quot;click&quot;,g,!0)},0)},s.mousePos=function(e,r){var n=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t.default$1(r.clientX-n.left-e.clientLeft,r.clientY-n.top-e.clientTop)},s.touchPos=function(e,r){for(var n=e.getBoundingClientRect(),i=[],a=&quot;touchend&quot;===r.type?r.changedTouches:r.touches,o=0;o&lt;a.length;o++)i.push(new t.default$1(a[o].clientX-n.left-e.clientLeft,a[o].clientY-n.top-e.clientTop));return i},s.mouseButton=function(e){return void 0!==t.default.InstallTrigger&amp;&amp;2===e.button&amp;&amp;e.ctrlKey&amp;&amp;t.default.navigator.platform.toUpperCase().indexOf(&quot;MAC&quot;)&gt;=0?0:e.button},s.remove=function(t){t.parentNode&amp;&amp;t.parentNode.removeChild(t)};var m={API_URL:&quot;https://api.mapbox.com&quot;,REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},v=&quot;See https://www.mapbox.com/api-documentation/#access-tokens&quot;;function y(t,e){var r=A(m.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,&quot;/&quot;!==r.path&amp;&amp;(t.path=&quot;&quot;+r.path+t.path),!m.REQUIRE_ACCESS_TOKEN)return T(t);if(!(e=e||m.ACCESS_TOKEN))throw new Error(&quot;An API access token is required to use Mapbox GL. &quot;+v);if(&quot;s&quot;===e[0])throw new Error(&quot;Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). &quot;+v);return t.params.push(&quot;access_token=&quot;+e),T(t)}function x(t){return 0===t.indexOf(&quot;mapbox:&quot;)}var b=function(t,e){if(!x(t))return t;var r=A(t);return r.path=&quot;/v4/&quot;+r.authority+&quot;.json&quot;,r.params.push(&quot;secure&quot;),y(r,e)},_=function(t,e,r,n){var i=A(t);return x(t)?(i.path=&quot;/styles/v1&quot;+i.path+&quot;/sprite&quot;+e+r,y(i,n)):(i.path+=&quot;&quot;+e+r,T(i))},w=/(\.(png|jpg)\d*)(?=$)/,k=function(t,e,r){if(!e||!x(e))return t;var n=A(t),i=a.devicePixelRatio&gt;=2||512===r?&quot;@2x&quot;:&quot;&quot;,o=a.supportsWebp?&quot;.webp&quot;:&quot;$1&quot;;return n.path=n.path.replace(w,&quot;&quot;+i+o),function(t){for(var e=0;e&lt;t.length;e++)0===t[e].indexOf(&quot;access_token=tk.&quot;)&amp;&amp;(t[e]=&quot;access_token=&quot;+(m.ACCESS_TOKEN||&quot;&quot;))}(n.params),T(n)},M=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/;function A(t){var e=t.match(M);if(!e)throw new Error(&quot;Unable to parse URL object&quot;);return{protocol:e[1],authority:e[2],path:e[3]||&quot;/&quot;,params:e[4]?e[4].split(&quot;&amp;&quot;):[]}}function T(t){var e=t.params.length?&quot;?&quot;+t.params.join(&quot;&amp;&quot;):&quot;&quot;;return t.protocol+&quot;://&quot;+t.authority+t.path+e}var S=t.default.HTMLImageElement,E=t.default.HTMLCanvasElement,C=t.default.HTMLVideoElement,L=t.default.ImageData,z=function(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)};z.prototype.update=function(t,e){var r=t.width,n=t.height,i=!this.size||this.size[0]!==r||this.size[1]!==n,a=this.context,o=a.gl;this.useMipmap=Boolean(e&amp;&amp;e.useMipmap),o.bindTexture(o.TEXTURE_2D,this.texture),i?(this.size=[r,n],a.pixelStoreUnpack.set(1),this.format!==o.RGBA||e&amp;&amp;!1===e.premultiply||a.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof S||t instanceof E||t instanceof C||t instanceof L?o.texImage2D(o.TEXTURE_2D,0,this.format,this.format,o.UNSIGNED_BYTE,t):o.texImage2D(o.TEXTURE_2D,0,this.format,r,n,0,this.format,o.UNSIGNED_BYTE,t.data)):t instanceof S||t instanceof E||t instanceof C||t instanceof L?o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t):o.texSubImage2D(o.TEXTURE_2D,0,0,0,r,n,o.RGBA,o.UNSIGNED_BYTE,t.data),this.useMipmap&amp;&amp;this.isSizePowerOfTwo()&amp;&amp;o.generateMipmap(o.TEXTURE_2D)},z.prototype.bind=function(t,e,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),t!==this.filter&amp;&amp;(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&amp;&amp;(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},z.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&amp;&amp;Math.log(this.size[0])/Math.LN2%1==0},z.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var P=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new t.default$2(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new t.RGBAImage({width:64,height:64}),this.dirty=!0};P.prototype.isLoaded=function(){return this.loaded},P.prototype.setLoaded=function(t){if(this.loaded!==t&amp;&amp;(this.loaded=t,t)){for(var e=0,r=this.requestors;e&lt;r.length;e+=1){var n=r[e],i=n.ids,a=n.callback;this._notify(i,a)}this.requestors=[]}},P.prototype.getImage=function(t){return this.images[t]},P.prototype.addImage=function(t,e){this.images[t]=e},P.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&amp;&amp;(this.shelfPack.unref(e.bin),delete this.patterns[t])},P.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var n=0,i=t;n&lt;i.length;n+=1){var a=i[n];this.images[a]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},P.prototype._notify=function(t,e){for(var r={},n=0,i=t;n&lt;i.length;n+=1){var a=i[n],o=this.images[a];o&amp;&amp;(r[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf})}e(null,r)},P.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},P.prototype.getPattern=function(e){var r=this.patterns[e];if(r)return r.position;var n=this.getImage(e);if(!n)return null;var i=n.data.width+2,a=n.data.height+2,o=this.shelfPack.packOne(i,a);if(!o)return null;this.atlasImage.resize(this.getPixelSize());var s=n.data,l=this.atlasImage,c=o.x+1,u=o.y+1,f=s.width,h=s.height;t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u},{width:f,height:h}),t.RGBAImage.copy(s,l,{x:0,y:h-1},{x:c,y:u-1},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u+h},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:f-1,y:0},{x:c-1,y:u},{width:1,height:h}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c+f,y:u},{width:1,height:h}),this.dirty=!0;var p=new t.ImagePosition(o,n);return this.patterns[e]={bin:o,position:p},p},P.prototype.bind=function(t){var e=t.gl;this.atlasTexture?this.dirty&amp;&amp;(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new z(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)};var O=D,I=1e20;function D(t,e,r,n,i,a){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||&quot;sans-serif&quot;,this.fontWeight=a||&quot;normal&quot;,this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement(&quot;canvas&quot;),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext(&quot;2d&quot;),this.ctx.font=this.fontWeight+&quot; &quot;+this.fontSize+&quot;px &quot;+this.fontFamily,this.ctx.textBaseline=&quot;middle&quot;,this.ctx.fillStyle=&quot;black&quot;,this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf(&quot;Gecko/&quot;)&gt;=0?1.2:1))}function R(t,e,r,n,i,a,o){for(var s=0;s&lt;e;s++){for(var l=0;l&lt;r;l++)n[l]=t[l*e+s];for(B(n,i,a,o,r),l=0;l&lt;r;l++)t[l*e+s]=i[l]}for(l=0;l&lt;r;l++){for(s=0;s&lt;e;s++)n[s]=t[l*e+s];for(B(n,i,a,o,e),s=0;s&lt;e;s++)t[l*e+s]=Math.sqrt(i[s])}}function B(t,e,r,n,i){r[0]=0,n[0]=-I,n[1]=+I;for(var a=1,o=0;a&lt;i;a++){for(var s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s&lt;=n[o];)o--,s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=+I}for(a=0,o=0;a&lt;i;a++){for(;n[o+1]&lt;a;)o++;e[a]=(a-r[o])*(a-r[o])+t[r[o]]}}D.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n&lt;this.size*this.size;n++){var i=e.data[4*n+3]/255;this.gridOuter[n]=1===i?0:0===i?I:Math.pow(Math.max(0,.5-i),2),this.gridInner[n]=1===i?I:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(R(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),R(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n&lt;this.size*this.size;n++){var a=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(a/this.radius+this.cutoff))))}return r};var F=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};F.prototype.setURL=function(t){this.url=t},F.prototype.getGlyphs=function(e,r){var n=this,i=[];for(var a in e)for(var o=0,s=e[a];o&lt;s.length;o+=1){var l=s[o];i.push({stack:a,id:l})}t.asyncAll(i,function(t,e){var r=t.stack,i=t.id,a=n.entries[r];a||(a=n.entries[r]={glyphs:{},requests:{}});var o=a.glyphs[i];if(void 0===o)if(o=n._tinySDF(a,r,i))e(null,{stack:r,id:i,glyph:o});else{var s=Math.floor(i/256);if(256*s&gt;65535)e(new Error(&quot;glyphs &gt; 65535 not supported&quot;));else{var l=a.requests[s];l||(l=a.requests[s]=[],F.loadGlyphRange(r,s,n.url,n.requestTransform,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var n=0,i=l;n&lt;i.length;n+=1)(0,i[n])(t,e);delete a.requests[s]})),l.push(function(t,n){t?e(t):n&amp;&amp;e(null,{stack:r,id:i,glyph:n[i]||null})})}}else e(null,{stack:r,id:i,glyph:o})},function(t,e){if(t)r(t);else if(e){for(var n={},i=0,a=e;i&lt;a.length;i+=1){var o=a[i],s=o.stack,l=o.id,c=o.glyph;(n[s]||(n[s]={}))[l]=c&amp;&amp;{id:c.id,bitmap:c.bitmap.clone(),metrics:c.metrics}}r(null,n)}})},F.prototype._tinySDF=function(e,r,n){var i=this.localIdeographFontFamily;if(i&amp;&amp;(t.default$4[&quot;CJK Unified Ideographs&quot;](n)||t.default$4[&quot;Hangul Syllables&quot;](n))){var a=e.tinySDF;if(!a){var o=&quot;400&quot;;/bold/i.test(r)?o=&quot;900&quot;:/medium/i.test(r)?o=&quot;500&quot;:/light/i.test(r)&amp;&amp;(o=&quot;200&quot;),a=e.tinySDF=new F.TinySDF(24,3,8,.25,i,o)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},a.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},F.loadGlyphRange=function(e,r,n,i,a){var o=256*r,s=o+255,l=i(function(t,e){if(!x(t))return t;var r=A(t);return r.path=&quot;/fonts/v1&quot;+r.path,y(r,e)}(n).replace(&quot;{fontstack}&quot;,e).replace(&quot;{range}&quot;,o+&quot;-&quot;+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,r){if(e)a(e);else if(r){for(var n={},i=0,o=t.default$3(r.data);i&lt;o.length;i+=1){var s=o[i];n[s.id]=s}a(null,n)}})},F.TinySDF=O;var N=function(){this.specification=t.default$5.light.position};N.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},N.prototype.interpolate=function(e,r,n){return{x:t.number(e.x,r.x,n),y:t.number(e.y,r.y,n),z:t.number(e.z,r.z,n)}};var j=new t.Properties({anchor:new t.DataConstantProperty(t.default$5.light.anchor),position:new N,color:new t.DataConstantProperty(t.default$5.light.color),intensity:new t.DataConstantProperty(t.default$5.light.intensity)}),V=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(j),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var r in e){var n=e[r];t.endsWith(r,&quot;-transition&quot;)?this._transitionable.setTransition(r.slice(0,-&quot;-transition&quot;.length),n):this._transitionable.setValue(r,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.default$5})))},r}(t.Evented),U=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};U.prototype.getDash=function(t,e){var r=t.join(&quot;,&quot;)+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},U.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i&gt;this.height)return t.warnOnce(&quot;LineAtlas out of space&quot;),null;for(var a=0,o=0;o&lt;e.length;o++)a+=e[o];for(var s=this.width/a,l=s/2,c=e.length%2==1,u=-n;u&lt;=n;u++)for(var f=this.nextRow+n+u,h=this.width*f,p=c?-e[e.length-1]:0,d=e[0],g=1,m=0;m&lt;this.width;m++){for(;d&lt;m/s;)p=d,d+=e[g],c&amp;&amp;g===e.length-1&amp;&amp;(d+=e[0]),g++;var v=Math.abs(m-p*s),y=Math.abs(m-d*s),x=Math.min(v,y),b=g%2==1,_=void 0;if(r){var w=n?u/n*(l+1):0;if(b){var k=l-Math.abs(w);_=Math.sqrt(x*x+k*k)}else _=l-Math.sqrt(x*x+w*w)}else _=(b?1:-1)*x;this.data[3+4*(h+m)]=Math.max(0,Math.min(255,_+128))}var M={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=i,this.dirty=!0,M},U.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&amp;&amp;(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var q=function e(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),a=0;a&lt;i.length;a++){var o=i[a],s=new e.Actor(o,n,this.id);s.name=&quot;Worker &quot;+a,this.actors.push(s)}};function H(e,r,n){var i=function(e,r){if(e)return n(e);if(r){var i=t.pick(r,[&quot;tiles&quot;,&quot;minzoom&quot;,&quot;maxzoom&quot;,&quot;attribution&quot;,&quot;mapbox_logo&quot;,&quot;bounds&quot;]);r.vector_layers&amp;&amp;(i.vectorLayers=r.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),n(null,i)}};e.url?t.getJSON(r(b(e.url),t.ResourceType.Source),i):a.frame(function(){return i(null,e)})}q.prototype.broadcast=function(e,r,n){n=n||function(){},t.asyncAll(this.actors,function(t,n){t.send(e,r,n)},n)},q.prototype.send=function(t,e,r,n){return(&quot;number&quot;!=typeof n||isNaN(n))&amp;&amp;(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r),n},q.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},q.Actor=t.default$7;var G=function(t,e){if(isNaN(t)||isNaN(e))throw new Error(&quot;Invalid LngLat object: (&quot;+t+&quot;, &quot;+e+&quot;)&quot;);if(this.lng=+t,this.lat=+e,this.lat&gt;90||this.lat&lt;-90)throw new Error(&quot;Invalid LngLat latitude value: must be between -90 and 90&quot;)};G.prototype.wrap=function(){return new G(t.wrap(this.lng,-180,180),this.lat)},G.prototype.toArray=function(){return[this.lng,this.lat]},G.prototype.toString=function(){return&quot;LngLat(&quot;+this.lng+&quot;, &quot;+this.lat+&quot;)&quot;},G.prototype.toBounds=function(t){var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new W(new G(this.lng-r,this.lat-e),new G(this.lng+r,this.lat+e))},G.convert=function(t){if(t instanceof G)return t;if(Array.isArray(t)&amp;&amp;(2===t.length||3===t.length))return new G(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;null!==t)return new G(Number(t.lng),Number(t.lat));throw new Error(&quot;`LngLatLike` argument must be specified as a LngLat instance, an object {lng: &lt;lng&gt;, lat: &lt;lat&gt;}, or an array of [&lt;lng&gt;, &lt;lat&gt;]&quot;)};var W=function(t,e){t&amp;&amp;(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};W.prototype.setNorthEast=function(t){return this._ne=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.setSouthWest=function(t){return this._sw=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof G)e=t,r=t;else{if(!(t instanceof W))return Array.isArray(t)?t.every(Array.isArray)?this.extend(W.convert(t)):this.extend(G.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new G(e.lng,e.lat),this._ne=new G(r.lng,r.lat)),this},W.prototype.getCenter=function(){return new G((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},W.prototype.getSouthWest=function(){return this._sw},W.prototype.getNorthEast=function(){return this._ne},W.prototype.getNorthWest=function(){return new G(this.getWest(),this.getNorth())},W.prototype.getSouthEast=function(){return new G(this.getEast(),this.getSouth())},W.prototype.getWest=function(){return this._sw.lng},W.prototype.getSouth=function(){return this._sw.lat},W.prototype.getEast=function(){return this._ne.lng},W.prototype.getNorth=function(){return this._ne.lat},W.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},W.prototype.toString=function(){return&quot;LngLatBounds(&quot;+this._sw.toString()+&quot;, &quot;+this._ne.toString()+&quot;)&quot;},W.prototype.isEmpty=function(){return!(this._sw&amp;&amp;this._ne)},W.convert=function(t){return!t||t instanceof W?t:new W(t)};var Y=function(t,e,r){this.bounds=W.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};Y.prototype.validateBounds=function(t){return Array.isArray(t)&amp;&amp;4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},Y.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),r=Math.floor(this.latY(this.bounds.getNorth(),t.z)),n=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),i=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x&gt;=e&amp;&amp;t.x&lt;n&amp;&amp;t.y&gt;=r&amp;&amp;t.y&lt;i},Y.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},Y.prototype.latY=function(e,r){var n=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),i=Math.pow(2,r)/(2*Math.PI);return Math.pow(2,r-1)+.5*Math.log((1+n)/(1-n))*-i};var X=function(e){function r(r,n,i,a){if(e.call(this),this.id=r,this.dispatcher=i,this.type=&quot;vector&quot;,this.minzoom=0,this.maxzoom=22,this.scheme=&quot;xyz&quot;,this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(n,[&quot;url&quot;,&quot;scheme&quot;,&quot;tileSize&quot;])),this._options=t.extend({type:&quot;vector&quot;},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error(&quot;vector tile sources must have a tileSize of 512&quot;);this.setEventedParent(a)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(t.extend(e,n),n.bounds&amp;&amp;(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;})),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;})))})},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url),i={request:this.map._transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,n){return e.aborted?r(null):t?r(t):(n&amp;&amp;n.resourceTiming&amp;&amp;(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&amp;&amp;e.setExpiryData(n),e.loadVectorData(n,this.map.painter),r(null),void(e.reloadCallback&amp;&amp;(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||&quot;expired&quot;===e.state?e.workerID=this.dispatcher.send(&quot;loadTile&quot;,i,o.bind(this)):&quot;loading&quot;===e.state?e.reloadCallback=r:this.dispatcher.send(&quot;reloadTile&quot;,i,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send(&quot;abortTile&quot;,{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(&quot;removeTile&quot;,{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),Z=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.setEventedParent(a),this.type=&quot;raster&quot;,this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=&quot;xyz&quot;,this.tileSize=512,this._loaded=!1,this._options=t.extend({},n),t.extend(this,t.pick(n,[&quot;url&quot;,&quot;scheme&quot;,&quot;tileSize&quot;]))}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(t.extend(e,n),n.bounds&amp;&amp;(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;})),e.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;})))})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var n=this,i=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(t,i){if(delete e.request,e.aborted)e.state=&quot;unloaded&quot;,r(null);else if(t)e.state=&quot;errored&quot;,r(t);else if(i){n.map._refreshExpiredTiles&amp;&amp;e.setExpiryData(i),delete i.cacheControl,delete i.expires;var a=n.map.painter.context,o=a.gl;e.texture=n.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new z(a,i,o.RGBA,{useMipmap:!0}),e.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&amp;&amp;o.texParameterf(o.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state=&quot;loaded&quot;,r(null)}})},r.prototype.abortTile=function(t,e){t.request&amp;&amp;(t.request.abort(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&amp;&amp;this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),$=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),this.type=&quot;raster-dem&quot;,this.maxzoom=22,this._options=t.extend({},n),this.encoding=n.encoding||&quot;mapbox&quot;}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:&quot;raster-dem&quot;,url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(t,n){if(delete e.request,e.aborted)e.state=&quot;unloaded&quot;,r(null);else if(t)e.state=&quot;errored&quot;,r(t);else if(n){this.map._refreshExpiredTiles&amp;&amp;e.setExpiryData(n),delete n.cacheControl,delete n.expires;var i=a.getImageData(n),o={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:i,encoding:this.encoding};e.workerID&amp;&amp;&quot;expired&quot;!==e.state||(e.workerID=this.dispatcher.send(&quot;loadDEMTile&quot;,o,function(t,n){t&amp;&amp;(e.state=&quot;errored&quot;,r(t)),n&amp;&amp;(e.dem=n,e.needsHillshadePrepare=!0,e.state=&quot;loaded&quot;,r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y&gt;0&amp;&amp;(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1&lt;n&amp;&amp;(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&amp;&amp;this.map.painter.saveTileTexture(t.demTexture),t.fbo&amp;&amp;(t.fbo.destroy(),delete t.fbo),t.dem&amp;&amp;delete t.dem,delete t.neighboringTiles,t.state=&quot;unloaded&quot;,this.dispatcher.send(&quot;removeDEMTile&quot;,{uid:t.uid,source:this.id},void 0,t.workerID)},r}(Z),J=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.type=&quot;geojson&quot;,this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=i,this.setEventedParent(a),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&amp;&amp;(this.maxzoom=n.maxzoom),n.type&amp;&amp;(this.type=n.type);var o=t.default$8/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.default$8,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.default$8,radius:(n.clusterRadius||50)*o,log:!1}},n.workerOptions)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var n={dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;};e._collectResourceTiming&amp;&amp;e._resourceTiming&amp;&amp;e._resourceTiming.length&gt;0&amp;&amp;(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event(&quot;data&quot;,n))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),this._updateWorkerData(function(e){if(e)return r.fire(new t.ErrorEvent(e));var n={dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;};r._collectResourceTiming&amp;&amp;r._resourceTiming&amp;&amp;r._resourceTiming.length&gt;0&amp;&amp;(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event(&quot;data&quot;,n))}),this},r.prototype._updateWorkerData=function(e){var r,n,i=this,a=t.extend({},this.workerOptions),o=this._data;&quot;string&quot;==typeof o?(a.request=this.map._transformRequest((r=o,(n=t.default.document.createElement(&quot;a&quot;)).href=r,n.href),t.ResourceType.Source),a.request.collectResourceTiming=this._collectResourceTiming):a.data=JSON.stringify(o),this.workerID=this.dispatcher.send(this.type+&quot;.&quot;+a.source+&quot;.loadData&quot;,a,function(t,r){i._removed||r&amp;&amp;r.abandoned||(i._loaded=!0,r&amp;&amp;r.resourceTiming&amp;&amp;r.resourceTiming[i.id]&amp;&amp;(i._resourceTiming=r.resourceTiming[i.id].slice(0)),i.dispatcher.send(i.type+&quot;.&quot;+a.source+&quot;.coalesce&quot;,null,null,i.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(t,e){var r=this,n=void 0===t.workerID?&quot;loadTile&quot;:&quot;reloadTile&quot;,i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(n,i,function(i,a){return t.unloadVectorData(),t.aborted?e(null):i?e(i):(t.loadVectorData(a,r.map.painter,&quot;reloadTile&quot;===n),e(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(&quot;removeTile&quot;,{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send(&quot;removeSource&quot;,{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),K=t.createLayout([{name:&quot;a_pos&quot;,type:&quot;Int16&quot;,components:2},{name:&quot;a_texture_pos&quot;,type:&quot;Int16&quot;,components:2}]),Q=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Q.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&amp;&amp;c&lt;n.length;c++)this.boundPaintVertexBuffers[c]!==n[c]&amp;&amp;(l=!0);var u=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==a||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||u?this.freshBind(e,r,n,i,a,o,s):(t.bindVertexArrayOES.set(this.vao),o&amp;&amp;o.bind(),i&amp;&amp;i.dynamicDraw&amp;&amp;i.bind(),s&amp;&amp;s.bind())},Q.prototype.freshBind=function(t,e,r,n,i,a,o){var s,l=t.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&amp;&amp;this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=o;else{s=c.currentNumAttributes||0;for(var f=l;f&lt;s;f++)u.disableVertexAttribArray(f)}e.enableAttributes(u,t);for(var h=0,p=r;h&lt;p.length;h+=1)p[h].enableAttributes(u,t);a&amp;&amp;a.enableAttributes(u,t),o&amp;&amp;o.enableAttributes(u,t),e.bind(),e.setVertexAttribPointers(u,t,i);for(var d=0,g=r;d&lt;g.length;d+=1){var m=g[d];m.bind(),m.setVertexAttribPointers(u,t,i)}a&amp;&amp;(a.bind(),a.setVertexAttribPointers(u,t,i)),n&amp;&amp;n.bind(),o&amp;&amp;(o.bind(),o.setVertexAttribPointers(u,t,i)),c.currentNumAttributes=l},Q.prototype.destroy=function(){this.vao&amp;&amp;(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var tt=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type=&quot;image&quot;,this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;source&quot;})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(e.image=a.getImageData(n),e._finishLoading())})},r.prototype._finishLoading=function(){this.map&amp;&amp;(this.setCoordinates(this.coordinates),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;metadata&quot;})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){this.coordinates=e;var r=this.map,n=e.map(function(t){return r.transform.locationCoordinate(G.convert(t)).zoomTo(0)}),i=this.centerCoord=t.getCoordinatesCenter(n);i.column=Math.floor(i.column),i.row=Math.floor(i.row),this.tileID=new t.CanonicalTileID(i.zoom,i.column,i.row),this.minzoom=this.maxzoom=i.zoom;var a=n.map(function(e){var r=e.zoomTo(i.zoom);return new t.default$1(Math.round((r.column-i.column)*t.default$8),Math.round((r.row-i.row)*t.default$8))});return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,t.default$8,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,t.default$8),this._boundsArray.emplaceBack(a[2].x,a[2].y,t.default$8,t.default$8),this.boundsBuffer&amp;&amp;(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,sourceDataType:&quot;content&quot;})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&amp;&amp;this.image){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture||(this.texture=new z(t,this.image,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];&quot;loaded&quot;!==n.state&amp;&amp;(n.state=&quot;loaded&quot;,n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&amp;&amp;this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state=&quot;errored&quot;,e(null))},r.prototype.serialize=function(){return{type:&quot;image&quot;,url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),et=function(e){function r(t,r,n,i){e.call(this,t,r,n,i),this.roundZoom=!0,this.type=&quot;video&quot;,this.options=r}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var n=0,i=r.urls;n&lt;i.length;n+=1){var a=i[n];e.urls.push(e.map._transformRequest(a,t.ResourceType.Source).url)}t.getVideo(this.urls,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&amp;&amp;(e.video=n,e.video.loop=!0,e.video.addEventListener(&quot;playing&quot;,function(){e.map._rerender()}),e.map&amp;&amp;e.video.play(),e._finishLoading())})},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&amp;&amp;(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState&lt;2)){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new z(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];&quot;loaded&quot;!==n.state&amp;&amp;(n.state=&quot;loaded&quot;,n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:&quot;video&quot;,urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&amp;&amp;!this.video.paused},r}(tt),rt=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&amp;&amp;4===n.coordinates.length&amp;&amp;!n.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return&quot;number&quot;!=typeof t})})||this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'&quot;coordinates&quot; property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'missing required property &quot;coordinates&quot;'))),n.animate&amp;&amp;&quot;boolean&quot;!=typeof n.animate&amp;&amp;this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'optional &quot;animate&quot; property must be a boolean value'))),n.canvas?&quot;string&quot;==typeof n.canvas||n.canvas instanceof t.default.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'&quot;canvas&quot; must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.default$9(&quot;sources.&quot;+r,null,'missing required property &quot;canvas&quot;'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.default.HTMLCanvasElement?this.options.canvas:t.default.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error(&quot;Canvas dimensions cannot be less than or equal to zero.&quot;))):(this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&amp;&amp;this.animate&amp;&amp;this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&amp;&amp;(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&amp;&amp;(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&amp;&amp;0!==Object.keys(this.tiles).length){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?t?this.texture.update(this.canvas):this._playing&amp;&amp;(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.canvas)):(this.texture=new z(e,this.canvas,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];&quot;loaded&quot;!==i.state&amp;&amp;(i.state=&quot;loaded&quot;,i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:&quot;canvas&quot;,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t&lt;e.length;t+=1){var r=e[t];if(isNaN(r)||r&lt;=0)return!0}return!1},r}(tt),nt={vector:X,raster:Z,&quot;raster-dem&quot;:$,geojson:J,video:et,image:tt,canvas:rt},it=function(e,r,n,i){var a=new nt[r.type](e,r,n,i);if(a.id!==e)throw new Error(&quot;Expected Source id to be &quot;+e+&quot; instead of &quot;+a.id);return t.bindAll([&quot;load&quot;,&quot;abort&quot;,&quot;unload&quot;,&quot;serialize&quot;,&quot;prepare&quot;],a),a};function at(t,e,r,n,i){var a=i.maxPitchScaleFactor(),o=t.tilesIn(r,a);o.sort(ot);for(var s=[],l=0,c=o;l&lt;c.length;l+=1){var u=c[l];s.push({wrappedTileID:u.tileID.wrapped().key,queryResults:u.tile.queryRenderedFeatures(e,u.queryGeometry,u.scale,n,i,a,t.transform.calculatePosMatrix(u.tileID.toUnwrapped()))})}return function(t){for(var e={},r={},n=0,i=t;n&lt;i.length;n+=1){var a=i[n],o=a.queryResults,s=a.wrappedTileID,l=r[s]=r[s]||{};for(var c in o)for(var u=o[c],f=l[c]=l[c]||{},h=e[c]=e[c]||[],p=0,d=u;p&lt;d.length;p+=1){var g=d[p];f[g.featureIndex]||(f[g.featureIndex]=!0,h.push(g.feature))}}return e}(s)}function ot(t,e){var r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var st=function(e,r){this.tileID=e,this.uid=t.uniqueId(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.expiredRequestCount=0,this.state=&quot;loading&quot;};st.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e&lt;a.now()||this.fadeEndTime&amp;&amp;e&lt;this.fadeEndTime||(this.fadeEndTime=e)},st.prototype.wasRequested=function(){return&quot;errored&quot;===this.state||&quot;loaded&quot;===this.state||&quot;reloading&quot;===this.state},st.prototype.loadVectorData=function(e,r,n){if(this.hasData()&amp;&amp;this.unloadVectorData(),this.state=&quot;loaded&quot;,e){if(e.featureIndex&amp;&amp;(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&amp;&amp;(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var n=0,i=t;n&lt;i.length;n+=1){var a=i[n],o=a.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==o.length){a.layers=o;for(var s=0,l=o;s&lt;l.length;s+=1)r[l[s].id]=a}}return r}(e.buckets,r.style),n)for(var i in this.buckets){var a=this.buckets[i];a instanceof t.default$14&amp;&amp;(a.justReloaded=!0)}for(var o in this.queryPadding=0,this.buckets){var s=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(s.layerIds[0]).queryRadius(s))}e.iconAtlasImage&amp;&amp;(this.iconAtlasImage=e.iconAtlasImage),e.glyphAtlasImage&amp;&amp;(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.CollisionBoxArray},st.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&amp;&amp;this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&amp;&amp;this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=&quot;unloaded&quot;},st.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state=&quot;unloaded&quot;},st.prototype.getBucket=function(t){return this.buckets[t.id]},st.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploaded||(r.upload(t),r.uploaded=!0)}var n=t.gl;this.iconAtlasImage&amp;&amp;(this.iconAtlasTexture=new z(t,this.iconAtlasImage,n.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&amp;&amp;(this.glyphAtlasTexture=new z(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},st.prototype.queryRenderedFeatures=function(t,e,r,n,i,a,o){return this.latestFeatureIndex&amp;&amp;this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:e,scale:r,tileSize:this.tileSize,posMatrix:o,transform:i,params:n,queryPadding:this.queryPadding*a},t):{}},st.prototype.querySourceFeatures=function(e,r){if(this.latestFeatureIndex&amp;&amp;this.latestFeatureIndex.rawTileData){var n=this.latestFeatureIndex.loadVTLayers(),i=r?r.sourceLayer:&quot;&quot;,a=n._geojsonTileLayer||n[i];if(a)for(var o=t.default$13(r&amp;&amp;r.filter),s={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},l=0;l&lt;a.length;l++){var c=a.feature(l);if(o(new t.default$16(this.tileID.overscaledZ),c)){var u=new t.default$12(c,s.z,s.x,s.y);u.tile=s,e.push(u)}}}},st.prototype.clearMask=function(){this.segments&amp;&amp;(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&amp;&amp;(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&amp;&amp;(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},st.prototype.setMask=function(e,r){if(!t.default$10(this.mask,e)&amp;&amp;(this.mask=e,this.clearMask(),!t.default$10(e,{0:!0}))){var n=new t.RasterBoundsArray,i=new t.TriangleIndexArray;this.segments=new t.default$15,this.segments.prepareSegment(0,n,i);for(var a=Object.keys(e),o=0;o&lt;a.length;o++){var s=e[a[o]],l=t.default$8&gt;&gt;s.z,c=new t.default$1(s.x*l,s.y*l),u=new t.default$1(c.x+l,c.y+l),f=this.segments.prepareSegment(4,n,i);n.emplaceBack(c.x,c.y,c.x,c.y),n.emplaceBack(u.x,c.y,u.x,c.y),n.emplaceBack(c.x,u.y,c.x,u.y),n.emplaceBack(u.x,u.y,u.x,u.y);var h=f.vertexLength;i.emplaceBack(h,h+1,h+2),i.emplaceBack(h+1,h+2,h+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=r.createVertexBuffer(n,K.members),this.maskedIndexBuffer=r.createIndexBuffer(i)}},st.prototype.hasData=function(){return&quot;loaded&quot;===this.state||&quot;reloading&quot;===this.state||&quot;expired&quot;===this.state},st.prototype.setExpiryData=function(e){var r=this.expirationTime;if(e.cacheControl){var n=t.parseCacheControl(e.cacheControl);n[&quot;max-age&quot;]&amp;&amp;(this.expirationTime=Date.now()+1e3*n[&quot;max-age&quot;])}else e.expires&amp;&amp;(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var i=Date.now(),a=!1;if(this.expirationTime&gt;i)a=!1;else if(r)if(this.expirationTime&lt;r)a=!0;else{var o=this.expirationTime-r;o?this.expirationTime=i+Math.max(o,3e4):a=!0}else a=!0;a?(this.expiredRequestCount++,this.state=&quot;expired&quot;):this.expiredRequestCount=0}},st.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1&lt;&lt;Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)};var lt=function(t,e){this.max=t,this.onRemove=e,this.reset()};lt.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e&lt;r.length;e+=1){var n=r[e];n.timeout&amp;&amp;clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},lt.prototype.add=function(t,e,r){var n=this,i=t.wrapped().key;void 0===this.data[i]&amp;&amp;(this.data[i]=[]);var a={value:e,timeout:void 0};if(void 0!==r&amp;&amp;(a.timeout=setTimeout(function(){n.remove(t,a)},r)),this.data[i].push(a),this.order.push(i),this.order.length&gt;this.max){var o=this._getAndRemoveByKey(this.order[0]);o&amp;&amp;this.onRemove(o)}return this},lt.prototype.has=function(t){return t.wrapped().key in this.data},lt.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},lt.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&amp;&amp;clearTimeout(e.timeout),0===this.data[t].length&amp;&amp;delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},lt.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},lt.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&amp;&amp;clearTimeout(i.timeout),0===this.data[r].length&amp;&amp;delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},lt.prototype.setMaxSize=function(t){for(this.max=t;this.order.length&gt;this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&amp;&amp;this.onRemove(e)}return this};var ct=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ct.prototype.unbindVAO=function(){this.context.extVertexArrayObject&amp;&amp;this.context.bindVertexArrayOES.set(null)},ct.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},ct.prototype.updateData=function(t){var e=this.context.gl;this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},ct.prototype.destroy=function(){var t=this.context.gl;this.buffer&amp;&amp;(t.deleteBuffer(this.buffer),delete this.buffer)};var ut={Int8:&quot;BYTE&quot;,Uint8:&quot;UNSIGNED_BYTE&quot;,Int16:&quot;SHORT&quot;,Uint16:&quot;UNSIGNED_SHORT&quot;,Int32:&quot;INT&quot;,Uint32:&quot;UNSIGNED_INT&quot;,Float32:&quot;FLOAT&quot;},ft=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ft.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ft.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},ft.prototype.enableAttributes=function(t,e){for(var r=0;r&lt;this.attributes.length;r++){var n=this.attributes[r],i=e.attributes[n.name];void 0!==i&amp;&amp;t.enableVertexAttribArray(i)}},ft.prototype.setVertexAttribPointers=function(t,e,r){for(var n=0;n&lt;this.attributes.length;n++){var i=this.attributes[n],a=e.attributes[i.name];void 0!==a&amp;&amp;t.vertexAttribPointer(a,i.components,t[ut[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}},ft.prototype.destroy=function(){var t=this.context.gl;this.buffer&amp;&amp;(t.deleteBuffer(this.buffer),delete this.buffer)};var ht=function(e){this.context=e,this.current=t.default$6.transparent};ht.prototype.get=function(){return this.current},ht.prototype.set=function(t){var e=this.current;t.r===e.r&amp;&amp;t.g===e.g&amp;&amp;t.b===e.b&amp;&amp;t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t)};var pt=function(t){this.context=t,this.current=1};pt.prototype.get=function(){return this.current},pt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.clearDepth(t),this.current=t)};var dt=function(t){this.context=t,this.current=0};dt.prototype.get=function(){return this.current},dt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.clearStencil(t),this.current=t)};var gt=function(t){this.context=t,this.current=[!0,!0,!0,!0]};gt.prototype.get=function(){return this.current},gt.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]&amp;&amp;t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t)};var mt=function(t){this.context=t,this.current=!0};mt.prototype.get=function(){return this.current},mt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.depthMask(t),this.current=t)};var vt=function(t){this.context=t,this.current=255};vt.prototype.get=function(){return this.current},vt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.stencilMask(t),this.current=t)};var yt=function(t){this.context=t,this.current={func:t.gl.ALWAYS,ref:0,mask:255}};yt.prototype.get=function(){return this.current},yt.prototype.set=function(t){var e=this.current;t.func===e.func&amp;&amp;t.ref===e.ref&amp;&amp;t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t)};var xt=function(t){this.context=t;var e=this.context.gl;this.current=[e.KEEP,e.KEEP,e.KEEP]};xt.prototype.get=function(){return this.current},xt.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t)};var bt=function(t){this.context=t,this.current=!1};bt.prototype.get=function(){return this.current},bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t}};var _t=function(t){this.context=t,this.current=[0,1]};_t.prototype.get=function(){return this.current},_t.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t)};var wt=function(t){this.context=t,this.current=!1};wt.prototype.get=function(){return this.current},wt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t}};var kt=function(t){this.context=t,this.current=t.gl.LESS};kt.prototype.get=function(){return this.current},kt.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.depthFunc(t),this.current=t)};var Mt=function(t){this.context=t,this.current=!1};Mt.prototype.get=function(){return this.current},Mt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t}};var At=function(t){this.context=t;var e=this.context.gl;this.current=[e.ONE,e.ZERO]};At.prototype.get=function(){return this.current},At.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t)};var Tt=function(e){this.context=e,this.current=t.default$6.transparent};Tt.prototype.get=function(){return this.current},Tt.prototype.set=function(t){var e=this.current;t.r===e.r&amp;&amp;t.g===e.g&amp;&amp;t.b===e.b&amp;&amp;t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t)};var St=function(t){this.context=t,this.current=null};St.prototype.get=function(){return this.current},St.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.useProgram(t),this.current=t)};var Et=function(t){this.context=t,this.current=1};Et.prototype.get=function(){return this.current},Et.prototype.set=function(e){var r=this.context.lineWidthRange,n=t.clamp(e,r[0],r[1]);this.current!==n&amp;&amp;(this.context.gl.lineWidth(n),this.current=e)};var Ct=function(t){this.context=t,this.current=t.gl.TEXTURE0};Ct.prototype.get=function(){return this.current},Ct.prototype.set=function(t){this.current!==t&amp;&amp;(this.context.gl.activeTexture(t),this.current=t)};var Lt=function(t){this.context=t;var e=this.context.gl;this.current=[0,0,e.drawingBufferWidth,e.drawingBufferHeight]};Lt.prototype.get=function(){return this.current},Lt.prototype.set=function(t){var e=this.current;t[0]===e[0]&amp;&amp;t[1]===e[1]&amp;&amp;t[2]===e[2]&amp;&amp;t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t)};var zt=function(t){this.context=t,this.current=null};zt.prototype.get=function(){return this.current},zt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t}};var Pt=function(t){this.context=t,this.current=null};Pt.prototype.get=function(){return this.current},Pt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t}};var Ot=function(t){this.context=t,this.current=null};Ot.prototype.get=function(){return this.current},Ot.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t}};var It=function(t){this.context=t,this.current=null};It.prototype.get=function(){return this.current},It.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t}};var Dt=function(t){this.context=t,this.current=null};Dt.prototype.get=function(){return this.current},Dt.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t};var Rt=function(t){this.context=t,this.current=null};Rt.prototype.get=function(){return this.current},Rt.prototype.set=function(t){this.current!==t&amp;&amp;this.context.extVertexArrayObject&amp;&amp;(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t)};var Bt=function(t){this.context=t,this.current=4};Bt.prototype.get=function(){return this.current},Bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t}};var Ft=function(t){this.context=t,this.current=!1};Ft.prototype.get=function(){return this.current},Ft.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t}};var Nt=function(t,e){this.context=t,this.current=null,this.parent=e};Nt.prototype.get=function(){return this.current};var jt=function(t){function e(e,r){t.call(this,e,r),this.dirty=!1}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e.prototype.setDirty=function(){this.dirty=!0},e}(Nt),Vt=function(t){function e(){t.apply(this,arguments)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t}},e}(Nt),Ut=function(t,e,r){this.context=t,this.width=e,this.height=r;var n=t.gl,i=this.framebuffer=n.createFramebuffer();this.colorAttachment=new jt(t,i),this.depthAttachment=new Vt(t,i)};Ut.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&amp;&amp;t.deleteTexture(e);var r=this.depthAttachment.get();r&amp;&amp;t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var qt=function(t,e,r){this.func=t,this.mask=e,this.range=r};qt.ReadOnly=!1,qt.ReadWrite=!0,qt.disabled=new qt(519,qt.ReadOnly,[0,1]);var Ht=function(t,e,r,n,i,a){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=a};Ht.disabled=new Ht({func:519,mask:0},0,0,7680,7680,7680);var Gt=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Gt.disabled=new Gt(Gt.Replace=[1,0],t.default$6.transparent,[!1,!1,!1,!1]),Gt.unblended=new Gt(Gt.Replace,t.default$6.transparent,[!0,!0,!0,!0]),Gt.alphaBlended=new Gt([1,771],t.default$6.transparent,[!0,!0,!0,!0]);var Wt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension(&quot;OES_vertex_array_object&quot;),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new ht(this),this.clearDepth=new pt(this),this.clearStencil=new dt(this),this.colorMask=new gt(this),this.depthMask=new mt(this),this.stencilMask=new vt(this),this.stencilFunc=new yt(this),this.stencilOp=new xt(this),this.stencilTest=new bt(this),this.depthRange=new _t(this),this.depthTest=new wt(this),this.depthFunc=new kt(this),this.blend=new Mt(this),this.blendFunc=new At(this),this.blendColor=new Tt(this),this.program=new St(this),this.lineWidth=new Et(this),this.activeTexture=new Ct(this),this.viewport=new Lt(this),this.bindFramebuffer=new zt(this),this.bindRenderbuffer=new Pt(this),this.bindTexture=new Ot(this),this.bindVertexBuffer=new It(this),this.bindElementBuffer=new Dt(this),this.bindVertexArrayOES=this.extVertexArrayObject&amp;&amp;new Rt(this),this.pixelStoreUnpack=new Bt(this),this.pixelStoreUnpackPremultiplyAlpha=new Ft(this),this.extTextureFilterAnisotropic=t.getExtension(&quot;EXT_texture_filter_anisotropic&quot;)||t.getExtension(&quot;MOZ_EXT_texture_filter_anisotropic&quot;)||t.getExtension(&quot;WEBKIT_EXT_texture_filter_anisotropic&quot;),this.extTextureFilterAnisotropic&amp;&amp;(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension(&quot;OES_texture_half_float&quot;),this.extTextureHalfFloat&amp;&amp;t.getExtension(&quot;OES_texture_half_float_linear&quot;)};Wt.prototype.createIndexBuffer=function(t,e){return new ct(this,t,e)},Wt.prototype.createVertexBuffer=function(t,e,r){return new ft(this,t,e,r)},Wt.prototype.createRenderbuffer=function(t,e,r){var n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i},Wt.prototype.createFramebuffer=function(t,e){return new Ut(this,t,e)},Wt.prototype.clear=function(t){var e=t.color,r=t.depth,n=this.gl,i=0;e&amp;&amp;(i|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&amp;&amp;(i|=n.DEPTH_BUFFER_BIT,this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(i)},Wt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Wt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Wt.prototype.setColorMode=function(e){t.default$10(e.blendFunction,Gt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)};var Yt=function(e){function r(t,r,n){var i=this;e.call(this),this.id=t,this.dispatcher=n,this.on(&quot;data&quot;,function(t){&quot;source&quot;===t.dataType&amp;&amp;&quot;metadata&quot;===t.sourceDataType&amp;&amp;(i._sourceLoaded=!0),i._sourceLoaded&amp;&amp;!i._paused&amp;&amp;&quot;source&quot;===t.dataType&amp;&amp;&quot;content&quot;===t.sourceDataType&amp;&amp;(i.reload(),i.transform&amp;&amp;i.update(i.transform))}),this.on(&quot;error&quot;,function(){i._sourceErrored=!0}),this._source=it(t,r,n,this),this._tiles={},this._cache=new lt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={}}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&amp;&amp;this._source.onAdd&amp;&amp;this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&amp;&amp;this._source.onRemove&amp;&amp;this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if(&quot;loaded&quot;!==e.state&amp;&amp;&quot;errored&quot;!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&amp;&amp;this.reload(),this.transform&amp;&amp;this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&amp;&amp;this._source.prepare(),this._tiles)this._tiles[e].upload(t)},r.prototype.getIds=function(){var e=this;return Object.keys(this._tiles).map(Number).sort(function(r,n){var i=e._tiles[r].tileID,a=e._tiles[n].tileID,o=new t.default$1(i.canonical.x,i.canonical.y).rotate(e.transform.angle),s=new t.default$1(a.canonical.x,a.canonical.y).rotate(e.transform.angle);return i.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x})},r.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&amp;&amp;this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t){return this._tiles[t]&amp;&amp;this._tiles[t].hasData()&amp;&amp;!this._coveredTiles[t]},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)this._reloadTile(t,&quot;reloading&quot;)},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&amp;&amp;(&quot;loading&quot;!==r.state&amp;&amp;(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,n,i){if(i)return e.state=&quot;errored&quot;,void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=a.now(),&quot;expired&quot;===n&amp;&amp;(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),&quot;raster-dem&quot;===this.getSource().type&amp;&amp;e.dem&amp;&amp;this._backfillDEM(e),this._source.fire(new t.Event(&quot;data&quot;,{dataType:&quot;source&quot;,tile:e,coord:e.tileID})),this.map&amp;&amp;(this.map.painter.tileExtentVAO.vao=null)},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r&lt;e.length;r++){var n=e[r];if(t.neighboringTiles&amp;&amp;t.neighboringTiles[n]){var i=this.getTileByID(n);a(t,i),a(i,t)}}function a(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===r&amp;&amp;0===n||Math.abs(n)&gt;1||(Math.abs(r)&gt;1&amp;&amp;(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&amp;&amp;(r-=i)),e.dem&amp;&amp;t.dem&amp;&amp;(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&amp;&amp;t.neighboringTiles[a]&amp;&amp;(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._findLoadedChildren=function(t,e,r){var n=!1;for(var i in this._tiles){var a=this._tiles[i];if(!(r[i]||!a.hasData()||a.tileID.overscaledZ&lt;=t.overscaledZ||a.tileID.overscaledZ&gt;e)){var o=Math.pow(2,a.tileID.canonical.z-t.canonical.z);if(Math.floor(a.tileID.canonical.x/o)===t.canonical.x&amp;&amp;Math.floor(a.tileID.canonical.y/o)===t.canonical.y)for(r[i]=a.tileID,n=!0;a&amp;&amp;a.tileID.overscaledZ-1&gt;t.overscaledZ;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);if(!s)break;(a=this._tiles[s.key])&amp;&amp;a.hasData()&amp;&amp;(delete r[i],r[s.key]=s)}}}return n},r.prototype.findLoadedParent=function(t,e,r){for(var n=t.overscaledZ-1;n&gt;=e;n--){var i=t.scaledTo(n);if(!i)return;var a=String(i.key),o=this._tiles[a];if(o&amp;&amp;o.hasData())return r[a]=i,o;if(this._cache.has(i))return r[a]=i,this._cache.get(i)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n=&quot;number&quot;==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&amp;&amp;!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&amp;&amp;(i=i.filter(function(t){return n._source.hasTile(t)}))):i=[];var o,s=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),l=Math.max(s-r.maxOverzooming,this._source.minzoom),c=Math.max(s+r.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(i,s),f={};if(Zt(this._source.type))for(var h=Object.keys(u),p=0;p&lt;h.length;p++){var d=h[p],g=u[d],m=n._tiles[d];if(m&amp;&amp;(void 0===m.fadeEndTime||m.fadeEndTime&gt;=a.now())){n._findLoadedChildren(g,c,u)&amp;&amp;(u[d]=g);var v=n.findLoadedParent(g,l,f);v&amp;&amp;n._addTile(v.tileID)}}for(o in f)u[o]||(n._coveredTiles[o]=!0);for(o in f)u[o]=f[o];for(var y=t.keysDifference(this._tiles,u),x=0;x&lt;y.length;x++)n._removeTile(y[x])}},r.prototype._updateRetainedTiles=function(t,e){for(var n={},i={},a=Math.max(e-r.maxOverzooming,this._source.minzoom),o=Math.max(e+r.maxUnderzooming,this._source.minzoom),s=0;s&lt;t.length;s++){var l=t[s],c=this._addTile(l),u=!1;if(c.hasData())n[l.key]=l;else{u=c.wasRequested(),n[l.key]=l;var f=!0;if(e+1&gt;this._source.maxzoom){var h=l.children(this._source.maxzoom)[0],p=this.getTile(h);p&amp;&amp;p.hasData()?n[h.key]=h:f=!1}else{this._findLoadedChildren(l,o,n);for(var d=l.children(this._source.maxzoom),g=0;g&lt;d.length;g++)if(!n[d[g].key]){f=!1;break}}if(!f)for(var m=l.overscaledZ-1;m&gt;=a;--m){var v=l.scaledTo(m);if(i[v.key])break;if(i[v.key]=!0,!(c=this.getTile(v))&amp;&amp;u&amp;&amp;(c=this._addTile(v)),c&amp;&amp;(n[v.key]=v,u=c.wasRequested(),c.hasData()))break}}}return n},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&amp;&amp;(this._setTileReloadTimer(e.key,r),r.tileID=e);var n=Boolean(r);return n||(r=new st(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event(&quot;dataloading&quot;,{tile:r,coord:r.tileID,dataType:&quot;source&quot;})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&amp;&amp;(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&amp;&amp;(this._timers[t]=setTimeout(function(){r._reloadTile(t,&quot;expired&quot;),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&amp;&amp;(e.uses--,delete this._tiles[t],this._timers[t]&amp;&amp;(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses&gt;0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r){for(var n=[],i=this.getIds(),a=1/0,o=1/0,s=-1/0,l=-1/0,c=e[0].zoom,u=0;u&lt;e.length;u++){var f=e[u];a=Math.min(a,f.column),o=Math.min(o,f.row),s=Math.max(s,f.column),l=Math.max(l,f.row)}for(var h=0;h&lt;i.length;h++){var p=this._tiles[i[h]],d=p.tileID,g=Math.pow(2,this.transform.zoom-p.tileID.overscaledZ),m=r*p.queryPadding*t.default$8/p.tileSize/g,v=[Xt(d,new t.default$17(a,o,c)),Xt(d,new t.default$17(s,l,c))];if(v[0].x-m&lt;t.default$8&amp;&amp;v[0].y-m&lt;t.default$8&amp;&amp;v[1].x+m&gt;=0&amp;&amp;v[1].y+m&gt;=0){for(var y=[],x=0;x&lt;e.length;x++)y.push(Xt(d,e[x]));n.push({tile:p,tileID:d,queryGeometry:[y],scale:g})}}return n},r.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(function(e){return t._tiles[e].tileID}),r=0,n=e;r&lt;n.length;r+=1){var i=n[r];i.posMatrix=t.transform.calculatePosMatrix(i.toUnwrapped())}return e},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Zt(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&amp;&amp;e.fadeEndTime&gt;=a.now())return!0}return!1},r}(t.Evented);function Xt(e,r){var n=r.zoomTo(e.canonical.z);return new t.default$1((n.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.default$8,(n.row-e.canonical.y)*t.default$8)}function Zt(t){return&quot;raster&quot;===t||&quot;image&quot;===t||&quot;video&quot;===t}function $t(){return new t.default.Worker(En.workerUrl)}Yt.maxOverzooming=10,Yt.maxUnderzooming=3;var Jt,Kt=function(){this.active={}};function Qt(e,r){var n={};for(var i in e)&quot;ref&quot;!==i&amp;&amp;(n[i]=e[i]);return t.default$18.forEach(function(t){t in r&amp;&amp;(n[t]=r[t])}),n}function te(t){t=t.slice();for(var e=Object.create(null),r=0;r&lt;t.length;r++)e[t[r].id]=t[r];for(var n=0;n&lt;t.length;n++)&quot;ref&quot;in t[n]&amp;&amp;(t[n]=Qt(t[n],e[t[n].ref]));return t}Kt.prototype.acquire=function(t){if(!this.workers){var e=En.workerCount;for(this.workers=[];this.workers.length&lt;e;)this.workers.push(new $t)}return this.active[t]=!0,this.workers.slice()},Kt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&amp;&amp;(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var ee={setStyle:&quot;setStyle&quot;,addLayer:&quot;addLayer&quot;,removeLayer:&quot;removeLayer&quot;,setPaintProperty:&quot;setPaintProperty&quot;,setLayoutProperty:&quot;setLayoutProperty&quot;,setFilter:&quot;setFilter&quot;,addSource:&quot;addSource&quot;,removeSource:&quot;removeSource&quot;,setGeoJSONSourceData:&quot;setGeoJSONSourceData&quot;,setLayerZoomRange:&quot;setLayerZoomRange&quot;,setLayerProperty:&quot;setLayerProperty&quot;,setCenter:&quot;setCenter&quot;,setZoom:&quot;setZoom&quot;,setBearing:&quot;setBearing&quot;,setPitch:&quot;setPitch&quot;,setSprite:&quot;setSprite&quot;,setGlyphs:&quot;setGlyphs&quot;,setTransition:&quot;setTransition&quot;,setLight:&quot;setLight&quot;};function re(t,e,r){r.push({command:ee.addSource,args:[t,e[t]]})}function ne(t,e,r){e.push({command:ee.removeSource,args:[t]}),r[t]=!0}function ie(t,e,r,n){ne(t,r,n),re(t,e,r)}function ae(e,r,n){var i;for(i in e[n])if(e[n].hasOwnProperty(i)&amp;&amp;&quot;data&quot;!==i&amp;&amp;!t.default$10(e[n][i],r[n][i]))return!1;for(i in r[n])if(r[n].hasOwnProperty(i)&amp;&amp;&quot;data&quot;!==i&amp;&amp;!t.default$10(e[n][i],r[n][i]))return!1;return!0}function oe(e,r,n,i,a,o){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&amp;&amp;(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}));for(s in r)r.hasOwnProperty(s)&amp;&amp;!e.hasOwnProperty(s)&amp;&amp;(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}))}function se(t){return t.id}function le(t,e){return t[e.id]=e,t}var ce=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a&lt;this.xCellCount*this.yCellCount;a++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};ce.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ce.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ce.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},ce.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},ce.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},ce.prototype._query=function(t,e,r,n,i){if(r&lt;0||t&gt;this.width||n&lt;0||e&gt;this.height)return!i&amp;&amp;[];var a=[];if(t&lt;=0&amp;&amp;e&lt;=0&amp;&amp;this.width&lt;=r&amp;&amp;this.height&lt;=n){if(i)return!0;for(var o=0;o&lt;this.boxKeys.length;o++)a.push({key:this.boxKeys[o],x1:this.bboxes[4*o],y1:this.bboxes[4*o+1],x2:this.bboxes[4*o+2],y2:this.bboxes[4*o+3]});for(var s=0;s&lt;this.circleKeys.length;s++){var l=this.circles[3*s],c=this.circles[3*s+1],u=this.circles[3*s+2];a.push({key:this.circleKeys[s],x1:l-u,y1:c-u,x2:l+u,y2:c+u})}}else{var f={hitTest:i,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,r,n,this._queryCell,a,f)}return i?a.length&gt;0:a},ce.prototype._queryCircle=function(t,e,r,n){var i=t-r,a=t+r,o=e-r,s=e+r;if(a&lt;0||i&gt;this.width||s&lt;0||o&gt;this.height)return!n&amp;&amp;[];var l=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(i,o,a,s,this._queryCellCircle,l,c),n?l.length&gt;0:l},ce.prototype.query=function(t,e,r,n){return this._query(t,e,r,n,!1)},ce.prototype.hitTest=function(t,e,r,n){return this._query(t,e,r,n,!0)},ce.prototype.hitTestCircle=function(t,e,r){return this._queryCircle(t,e,r,!0)},ce.prototype._queryCell=function(t,e,r,n,i,a,o){var s=o.seenUids,l=this.boxCells[i];if(null!==l)for(var c=this.bboxes,u=0,f=l;u&lt;f.length;u+=1){var h=f[u];if(!s.box[h]){s.box[h]=!0;var p=4*h;if(t&lt;=c[p+2]&amp;&amp;e&lt;=c[p+3]&amp;&amp;r&gt;=c[p+0]&amp;&amp;n&gt;=c[p+1]){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[h],x1:c[p],y1:c[p+1],x2:c[p+2],y2:c[p+3]})}}}var d=this.circleCells[i];if(null!==d)for(var g=this.circles,m=0,v=d;m&lt;v.length;m+=1){var y=v[m];if(!s.circle[y]){s.circle[y]=!0;var x=3*y;if(this._circleAndRectCollide(g[x],g[x+1],g[x+2],t,e,r,n)){if(o.hitTest)return a.push(!0),!0;var b=g[x],_=g[x+1],w=g[x+2];a.push({key:this.circleKeys[y],x1:b-w,y1:_-w,x2:b+w,y2:_+w})}}}},ce.prototype._queryCellCircle=function(t,e,r,n,i,a,o){var s=o.circle,l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f&lt;h.length;f+=1){var p=h[f];if(!l.box[p]){l.box[p]=!0;var d=4*p;if(this._circleAndRectCollide(s.x,s.y,s.radius,u[d+0],u[d+1],u[d+2],u[d+3]))return a.push(!0),!0}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;v&lt;y.length;v+=1){var x=y[v];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circlesCollide(m[b],m[b+1],m[b+2],s.x,s.y,s.radius))return a.push(!0),!0}}},ce.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),u=this._convertToYCellCoord(n),f=s;f&lt;=c;f++)for(var h=l;h&lt;=u;h++){var p=this.xCellCount*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ce.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},ce.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},ce.prototype._circlesCollide=function(t,e,r,n,i,a){var o=n-t,s=i-e,l=r+a;return l*l&gt;o*o+s*s},ce.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l&gt;s+r)return!1;var c=(o-i)/2,u=Math.abs(e-(i+c));if(u&gt;c+r)return!1;if(l&lt;=s||u&lt;=c)return!0;var f=l-s,h=u-c;return f*f+h*h&lt;=r*r};var ue=t.default$19.layout;function fe(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.identity(o),t.mat4.scale(o,o,[1/a,1/a,1]),n||t.mat4.rotateZ(o,o,i.angle)):(t.mat4.scale(o,o,[i.width/2,-i.height/2,1]),t.mat4.translate(o,o,[1,-1,0]),t.mat4.multiply(o,o,e)),o}function he(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.multiply(o,o,e),t.mat4.scale(o,o,[a,a,1]),n||t.mat4.rotateZ(o,o,-i.angle)):(t.mat4.scale(o,o,[1,-1,1]),t.mat4.translate(o,o,[-1,-1,0]),t.mat4.scale(o,o,[2/i.width,2/i.height,1])),o}function pe(e,r){var n=[e.x,e.y,0,1];ke(n,n,r);var i=n[3];return{point:new t.default$1(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function de(t,e){var r=t[0]/t[3],n=t[1]/t[3];return r&gt;=-e[0]&amp;&amp;r&lt;=e[0]&amp;&amp;n&gt;=-e[1]&amp;&amp;n&lt;=e[1]}function ge(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom,ue.properties[i?&quot;text-size&quot;:&quot;icon-size&quot;]),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,m=!1,v=0;v&lt;d.length;v++){var y=d.get(v);if(y.hidden||y.writingMode===t.WritingMode.vertical&amp;&amp;!m)we(y.numGlyphs,h);else{m=!1;var x=[y.anchorX,y.anchorY,0,1];if(t.vec4.transformMat4(x,x,r),de(x,f)){var b=.5+x[3]/n.transform.cameraToCenterDistance*.5,_=t.evaluateSizeForFeature(c,u,y),w=s?_*b:_/b,k=new t.default$1(y.anchorX,y.anchorY),M=pe(k,a).point,A={},T=ye(y,w,!1,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g);m=T.useVertical,(T.notEnoughRoom||m||T.needsFlipping&amp;&amp;ye(y,w,!0,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g).notEnoughRoom)&amp;&amp;we(y.numGlyphs,h)}else we(y.numGlyphs,h)}}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function me(t,e,r,n,i,a,o,s,l,c,u,f){var h=s.glyphStartIndex+s.numGlyphs,p=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,g=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(h-1),v=be(t*g,r,n,i,a,o,s.segment,p,d,l,c,u,f);if(!v)return null;var y=be(t*m,r,n,i,a,o,s.segment,p,d,l,c,u,f);return y?{first:v,last:y}:null}function ve(e,r,n,i){return e===t.WritingMode.horizontal&amp;&amp;Math.abs(n.y-r.y)&gt;Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.y&lt;n.y:r.x&gt;n.x)?{needsFlipping:!0}:null}function ye(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*r,y=e.lineOffsetY*r;if(e.numGlyphs&gt;1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=me(m,l,v,y,n,f,h,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=pe(w.first.point,s).point,M=pe(w.last.point,s).point;if(i&amp;&amp;!n){var A=ve(e.writingMode,k,M,d);if(A)return A}g=[w.first];for(var T=e.glyphStartIndex+1;T&lt;x-1;T++)g.push(be(m*l.getoffsetX(T),v,y,n,f,h,e.segment,b,_,c,o,p,!1));g.push(w.last)}else{if(i&amp;&amp;!n){var S=pe(h,a).point,E=e.lineStartIndex+e.segment+1,C=new t.default$1(c.getx(E),c.gety(E)),L=pe(C,a),z=L.signedDistanceFromCamera&gt;0?L.point:xe(h,C,S,1,a),P=ve(e.writingMode,S,z,d);if(P)return P}var O=be(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!O)return{notEnoughRoom:!0};g=[O]}for(var I=0,D=g;I&lt;D.length;I+=1){var R=D[I];t.addDynamicAttributes(u,R.point,R.angle)}return{}}function xe(t,e,r,n,i){var a=pe(t.add(t.sub(e)._unit()),i).point,o=r.sub(a);return r.add(o._mult(n/o.mag()))}function be(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=i?e-r:e+r,g=d&gt;0?1:-1,m=0;i&amp;&amp;(g*=-1,m=Math.PI),g&lt;0&amp;&amp;(m+=Math.PI);for(var v=g&gt;0?l+s:l+s+1,y=v,x=a,b=a,_=0,w=0,k=Math.abs(d);_+w&lt;=k;){if((v+=g)&lt;l||v&gt;=c)return null;if(b=x,void 0===(x=h[v])){var M=new t.default$1(u.getx(v),u.gety(v)),A=pe(M,f);if(A.signedDistanceFromCamera&gt;0)x=h[v]=A.point;else{var T=v-g;x=xe(0===_?o:new t.default$1(u.getx(T),u.gety(T)),M,b,k-_+1,f)}}_+=w,w=b.dist(x)}var S=(k-_)/w,E=x.sub(b),C=E.mult(S)._add(b);return C._add(E._unit()._perp()._mult(n*g)),{point:C,angle:m+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:v-g===y?0:u.gettileUnitDistanceFromAnchor(v-g),lastSegmentViewportDistance:k-_}:null}}var _e=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function we(t,e){for(var r=0;r&lt;t;r++){var n=e.length;e.resize(n+4),e.float32.set(_e,3*n)}}function ke(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}t.default$20.mat4;var Me=function(t,e,r){void 0===e&amp;&amp;(e=new ce(t.width+200,t.height+200,25)),void 0===r&amp;&amp;(r=new ce(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100};function Ae(t,e,r){t[e+4]=r?1:0}function Te(e,r,n){return r*(t.default$8/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}Me.prototype.placeCollisionBox=function(t,e,r,n){var i=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),a=r*i.perspectiveRatio,o=t.x1*a+i.point.x,s=t.y1*a+i.point.y,l=t.x2*a+i.point.x,c=t.y2*a+i.point.y;return!e&amp;&amp;this.grid.hitTest(o,s,l,c)?{box:[],offscreen:!1}:{box:[o,s,l,c],offscreen:this.isOffscreen(o,s,l,c)}},Me.prototype.approximateTileDistance=function(t,e,r,n,i){var a=i?1:n/this.pitchfactor,o=t.lastSegmentViewportDistance*r;return t.prevTileDistance+o+(a-1)*o*Math.abs(Math.sin(e))},Me.prototype.placeCollisionCircles=function(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=[],g=this.projectAnchor(u,o.anchorX,o.anchorY),m=c/24,v=o.lineOffsetX*c,y=o.lineOffsetY*c,x=new t.default$1(o.anchorX,o.anchorY),b=me(m,l,v,y,!1,pe(x,f).point,x,o,s,f,{},!0),_=!1,w=!0,k=g.perspectiveRatio*i,M=1/(i*n),A=0,T=0;b&amp;&amp;(A=this.approximateTileDistance(b.first.tileDistance,b.first.angle,M,g.cameraDistance,p),T=this.approximateTileDistance(b.last.tileDistance,b.last.angle,M,g.cameraDistance,p));for(var S=0;S&lt;e.length;S+=5){var E=e[S],C=e[S+1],L=e[S+2],z=e[S+3];if(!b||z&lt;-A||z&gt;T)Ae(e,S,!1);else{var P=this.projectPoint(u,E,C),O=L*k;if(d.length&gt;0){var I=P.x-d[d.length-4],D=P.y-d[d.length-3];if(O*O*2&gt;I*I+D*D&amp;&amp;S+8&lt;e.length){var R=e[S+8];if(R&gt;-A&amp;&amp;R&lt;T){Ae(e,S,!1);continue}}}var B=S/5;if(d.push(P.x,P.y,O,B),Ae(e,S,!0),w=w&amp;&amp;this.isOffscreen(P.x-O,P.y-O,P.x+O,P.y+O),!r&amp;&amp;this.grid.hitTestCircle(P.x,P.y,O)){if(!h)return{circles:[],offscreen:!1};_=!0}}}return{circles:_?[]:d,offscreen:w}},Me.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&amp;&amp;0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,i=1/0,a=-1/0,o=-1/0,s=0,l=e;s&lt;l.length;s+=1){var c=l[s],u=new t.default$1(c.x+100,c.y+100);n=Math.min(n,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),o=Math.max(o,u.y),r.push(u)}for(var f={},h={},p=0,d=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o));p&lt;d.length;p+=1){var g=d[p],m=g.key;if(void 0===f[m.bucketInstanceId]&amp;&amp;(f[m.bucketInstanceId]={}),!f[m.bucketInstanceId][m.featureIndex]){var v=[new t.default$1(g.x1,g.y1),new t.default$1(g.x2,g.y1),new t.default$1(g.x2,g.y2),new t.default$1(g.x1,g.y2)];t.polygonIntersectsPolygon(r,v)&amp;&amp;(f[m.bucketInstanceId][m.featureIndex]=!0,void 0===h[m.bucketInstanceId]&amp;&amp;(h[m.bucketInstanceId]=[]),h[m.bucketInstanceId].push(m.featureIndex))}}return h},Me.prototype.insertCollisionBox=function(t,e,r,n){var i={bucketInstanceId:r,featureIndex:n};(e?this.ignoredGrid:this.grid).insert(i,t[0],t[1],t[2],t[3])},Me.prototype.insertCollisionCircles=function(t,e,r,n){for(var i=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:n},o=0;o&lt;t.length;o+=4)i.insertCircle(a,t[o],t[o+1],t[o+2])},Me.prototype.projectAnchor=function(t,e,r){var n=[e,r,0,1];return ke(n,n,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},Me.prototype.projectPoint=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100)},Me.prototype.projectAndGetPerspectiveRatio=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),{point:new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},Me.prototype.isOffscreen=function(t,e,r,n){return r&lt;100||t&gt;=this.screenRightBoundary||n&lt;100||e&gt;this.screenBottomBoundary};var Se=t.default$19.layout,Ee=function(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&amp;&amp;r?1:0,this.placed=r};Ee.prototype.isHidden=function(){return 0===this.opacity&amp;&amp;!this.placed};var Ce=function(t,e,r,n,i){this.text=new Ee(t?t.text:null,e,r,i),this.icon=new Ee(t?t.icon:null,e,n,i)};Ce.prototype.isHidden=function(){return this.text.isHidden()&amp;&amp;this.icon.isHidden()};var Le=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},ze=function(t,e){this.transform=t.clone(),this.collisionIndex=new Me(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={}};function Pe(t,e,r){t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0)}ze.prototype.placeLayerTile=function(e,r,n,i){var a=r.getBucket(e),o=r.latestFeatureIndex;if(a&amp;&amp;o&amp;&amp;e.id===a.layerIds[0]){var s=r.collisionBoxArray,l=a.layers[0].layout,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/t.default$8,f=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=fe(f,&quot;map&quot;===l.get(&quot;text-pitch-alignment&quot;),&quot;map&quot;===l.get(&quot;text-rotation-alignment&quot;),this.transform,Te(r,1,this.transform.zoom)),p=fe(f,&quot;map&quot;===l.get(&quot;icon-pitch-alignment&quot;),&quot;map&quot;===l.get(&quot;icon-rotation-alignment&quot;),this.transform,Te(r,1,this.transform.zoom));this.retainedQueryData[a.bucketInstanceId]=new function(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,r.tileID),this.placeLayerBucket(a,f,h,p,c,u,n,i,s)}},ze.prototype.placeLayerBucket=function(e,r,n,i,a,o,s,l,c){for(var u=e.layers[0].layout,f=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,Se.properties[&quot;text-size&quot;]),h=!e.hasTextData()||u.get(&quot;text-optional&quot;),p=!e.hasIconData()||u.get(&quot;icon-optional&quot;),d=0,g=e.symbolInstances;d&lt;g.length;d+=1){var m=g[d];if(!l[m.crossTileID]){var v=void 0!==m.feature.text,y=void 0!==m.feature.icon,x=!0,b=null,_=null,w=null,k=0,M=0;m.collisionArrays||(m.collisionArrays=e.deserializeCollisionBoxes(c,m.textBoxStartIndex,m.textBoxEndIndex,m.iconBoxStartIndex,m.iconBoxEndIndex)),m.collisionArrays.textFeatureIndex&amp;&amp;(k=m.collisionArrays.textFeatureIndex),m.collisionArrays.textBox&amp;&amp;(v=(b=this.collisionIndex.placeCollisionBox(m.collisionArrays.textBox,u.get(&quot;text-allow-overlap&quot;),o,r)).box.length&gt;0,x=x&amp;&amp;b.offscreen);var A=m.collisionArrays.textCircles;if(A){var T=e.text.placedSymbolArray.get(m.placedTextSymbolIndices[0]),S=t.evaluateSizeForFeature(e.textSizeData,f,T);_=this.collisionIndex.placeCollisionCircles(A,u.get(&quot;text-allow-overlap&quot;),a,o,m.key,T,e.lineVertexArray,e.glyphOffsetArray,S,r,n,s,&quot;map&quot;===u.get(&quot;text-pitch-alignment&quot;)),v=u.get(&quot;text-allow-overlap&quot;)||_.circles.length&gt;0,x=x&amp;&amp;_.offscreen}m.collisionArrays.iconFeatureIndex&amp;&amp;(M=m.collisionArrays.iconFeatureIndex),m.collisionArrays.iconBox&amp;&amp;(y=(w=this.collisionIndex.placeCollisionBox(m.collisionArrays.iconBox,u.get(&quot;icon-allow-overlap&quot;),o,r)).box.length&gt;0,x=x&amp;&amp;w.offscreen),h||p?p?h||(y=y&amp;&amp;v):v=y&amp;&amp;v:y=v=y&amp;&amp;v,v&amp;&amp;b&amp;&amp;this.collisionIndex.insertCollisionBox(b.box,u.get(&quot;text-ignore-placement&quot;),e.bucketInstanceId,k),y&amp;&amp;w&amp;&amp;this.collisionIndex.insertCollisionBox(w.box,u.get(&quot;icon-ignore-placement&quot;),e.bucketInstanceId,M),v&amp;&amp;_&amp;&amp;this.collisionIndex.insertCollisionCircles(_.circles,u.get(&quot;text-ignore-placement&quot;),e.bucketInstanceId,k),this.placements[m.crossTileID]=new Le(v,y,x||e.justReloaded),l[m.crossTileID]=!0}}e.justReloaded=!1},ze.prototype.commit=function(t,e){this.commitTime=e;var r=!1,n=t&amp;&amp;0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,i=t?t.opacities:{};for(var a in this.placements){var o=this.placements[a],s=i[a];s?(this.opacities[a]=new Ce(s,n,o.text,o.icon),r=r||o.text!==s.text.placed||o.icon!==s.icon.placed):(this.opacities[a]=new Ce(null,n,o.text,o.icon,o.skipFade),r=r||o.text||o.icon)}for(var l in i){var c=i[l];if(!this.opacities[l]){var u=new Ce(c,n,!1,!1);u.isHidden()||(this.opacities[l]=u,r=r||c.text.placed||c.icon.placed)}}r?this.lastPlacementChangeTime=e:&quot;number&quot;!=typeof this.lastPlacementChangeTime&amp;&amp;(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},ze.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n&lt;i.length;n+=1){var a=i[n],o=a.getBucket(t);o&amp;&amp;a.latestFeatureIndex&amp;&amp;t.id===o.layerIds[0]&amp;&amp;this.updateBucketOpacities(o,r,a.collisionBoxArray)}},ze.prototype.updateBucketOpacities=function(t,e,r){t.hasTextData()&amp;&amp;t.text.opacityVertexArray.clear(),t.hasIconData()&amp;&amp;t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&amp;&amp;t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&amp;&amp;t.collisionCircle.collisionVertexArray.clear();for(var n=t.layers[0].layout,i=new Ce(null,0,!1,!1,!0),a=new Ce(null,0,n.get(&quot;text-allow-overlap&quot;),n.get(&quot;icon-allow-overlap&quot;),!0),o=0;o&lt;t.symbolInstances.length;o++){var s=t.symbolInstances[o],l=e[s.crossTileID],c=this.opacities[s.crossTileID];l?c=i:c||(c=a,this.opacities[s.crossTileID]=c),e[s.crossTileID]=!0;var u=s.numGlyphVertices&gt;0||s.numVerticalGlyphVertices&gt;0,f=s.numIconVertices&gt;0;if(u){for(var h=je(c.text),p=(s.numGlyphVertices+s.numVerticalGlyphVertices)/4,d=0;d&lt;p;d++)t.text.opacityVertexArray.emplaceBack(h);for(var g=0,m=s.placedTextSymbolIndices;g&lt;m.length;g+=1){var v=m[g];t.text.placedSymbolArray.get(v).hidden=c.text.isHidden()}}if(f){for(var y=je(c.icon),x=0;x&lt;s.numIconVertices/4;x++)t.icon.opacityVertexArray.emplaceBack(y);t.icon.placedSymbolArray.get(o).hidden=c.icon.isHidden()}s.collisionArrays||(s.collisionArrays=t.deserializeCollisionBoxes(r,s.textBoxStartIndex,s.textBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex));var b=s.collisionArrays;if(b){b.textBox&amp;&amp;t.hasCollisionBoxData()&amp;&amp;Pe(t.collisionBox.collisionVertexArray,c.text.placed,!1),b.iconBox&amp;&amp;t.hasCollisionBoxData()&amp;&amp;Pe(t.collisionBox.collisionVertexArray,c.icon.placed,!1);var _=b.textCircles;if(_&amp;&amp;t.hasCollisionCircleData())for(var w=0;w&lt;_.length;w+=5){var k=l||0===_[w+4];Pe(t.collisionCircle.collisionVertexArray,c.text.placed,k)}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&amp;&amp;(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&amp;&amp;t.text.opacityVertexBuffer&amp;&amp;t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&amp;&amp;t.icon.opacityVertexBuffer&amp;&amp;t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&amp;&amp;t.collisionBox.collisionVertexBuffer&amp;&amp;t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&amp;&amp;t.collisionCircle.collisionVertexBuffer&amp;&amp;t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},ze.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},ze.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime&lt;this.fadeDuration},ze.prototype.stillRecent=function(t){return&quot;undefined&quot;!==this.commitTime&amp;&amp;this.commitTime+this.fadeDuration&gt;t},ze.prototype.setStale=function(){this.stale=!0};var Oe=Math.pow(2,25),Ie=Math.pow(2,24),De=Math.pow(2,17),Re=Math.pow(2,16),Be=Math.pow(2,9),Fe=Math.pow(2,8),Ne=Math.pow(2,1);function je(t){if(0===t.opacity&amp;&amp;!t.placed)return 0;if(1===t.opacity&amp;&amp;t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Oe+e*Ie+r*De+e*Re+r*Be+e*Fe+r*Ne+e}var Ve=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ve.prototype.continuePlacement=function(t,e,r,n,i){for(;this._currentTileIndex&lt;t.length;){var a=t[this._currentTileIndex];if(e.placeLayerTile(n,a,r,this._seenCrossTileIDs),this._currentTileIndex++,i())return!0}};var Ue=function(t,e,r,n,i){this.placement=new ze(t,i),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};Ue.prototype.isDone=function(){return this._done},Ue.prototype.continuePlacement=function(t,e,r){for(var n=this,i=a.now(),o=function(){var t=a.now()-i;return!n._forceFullPlacement&amp;&amp;t&gt;2};this._currentPlacementIndex&gt;=0;){var s=e[t[n._currentPlacementIndex]],l=n.placement.collisionIndex.transform.zoom;if(&quot;symbol&quot;===s.type&amp;&amp;(!s.minzoom||s.minzoom&lt;=l)&amp;&amp;(!s.maxzoom||s.maxzoom&gt;l)){if(n._inProgressLayer||(n._inProgressLayer=new Ve),n._inProgressLayer.continuePlacement(r[s.source],n.placement,n._showCollisionBoxes,s,o))return;delete n._inProgressLayer}n._currentPlacementIndex--}this._done=!0},Ue.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var qe=512/t.default$8/2,He=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0,i=e;n&lt;i.length;n+=1){var a=i[n],o=a.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:a.crossTileID,coord:this.getScaledCoordinates(a,t)})}};He.prototype.getScaledCoordinates=function(e,r){var n=r.canonical.z-this.tileID.canonical.z,i=qe/Math.pow(2,n),a=e.anchor;return{x:Math.floor((r.canonical.x*t.default$8+a.x)*i),y:Math.floor((r.canonical.y*t.default$8+a.y)*i)}},He.prototype.findMatches=function(t,e,r){for(var n=this.tileID.canonical.z&lt;e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0,a=t;i&lt;a.length;i+=1){var o=a[i];if(!o.crossTileID){var s=this.indexedSymbolInstances[o.key];if(s)for(var l=this.getScaledCoordinates(o,e),c=0,u=s;c&lt;u.length;c+=1){var f=u[c];if(Math.abs(f.coord.x-l.x)&lt;=n&amp;&amp;Math.abs(f.coord.y-l.y)&lt;=n&amp;&amp;!r[f.crossTileID]){r[f.crossTileID]=!0,o.crossTileID=f.crossTileID;break}}}}};var Ge=function(){this.maxCrossTileID=0};Ge.prototype.generate=function(){return++this.maxCrossTileID};var We=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};We.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var n=this.indexes[r],i={};for(var a in n){var o=n[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+e),i[o.tileID.key]=o}this.indexes[r]=i}this.lng=t},We.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&amp;&amp;this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var n=0,i=e.symbolInstances;n&lt;i.length;n+=1)i[n].crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var a=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var s=this.indexes[o];if(Number(o)&gt;t.overscaledZ)for(var l in s){var c=s[l];c.tileID.isChildOf(t)&amp;&amp;c.findMatches(e.symbolInstances,t,a)}else{var u=s[t.scaledTo(Number(o)).key];u&amp;&amp;u.findMatches(e.symbolInstances,t,a)}}for(var f=0,h=e.symbolInstances;f&lt;h.length;f+=1){var p=h[f];p.crossTileID||(p.crossTileID=r.generate(),a[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&amp;&amp;(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new He(t,e.symbolInstances,e.bucketInstanceId),!0},We.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var n=0,i=e.indexedSymbolInstances[r];n&lt;i.length;n+=1){var a=i[n];delete this.usedCrossTileIDs[t][a.crossTileID]}},We.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var n=this.indexes[r];for(var i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e};var Ye=function(){this.layerIndexes={},this.crossTileIDs=new Ge,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ye.prototype.addLayer=function(t,e,r){var n=this.layerIndexes[t.id];void 0===n&amp;&amp;(n=this.layerIndexes[t.id]=new We);var i=!1,a={};n.handleWrapJump(r);for(var o=0,s=e;o&lt;s.length;o+=1){var l=s[o],c=l.getBucket(t);c&amp;&amp;t.id===c.layerIds[0]&amp;&amp;(c.bucketInstanceId||(c.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,c,this.crossTileIDs)&amp;&amp;(i=!0),a[c.bucketInstanceId]=!0)}return n.removeStaleBuckets(a)&amp;&amp;(i=!0),i},Ye.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Xe=function(e,r){return t.emitValidationErrors(e,r&amp;&amp;r.filter(function(t){return&quot;source.canvas&quot;!==t.identifier}))},Ze=t.pick(ee,[&quot;addLayer&quot;,&quot;removeLayer&quot;,&quot;setPaintProperty&quot;,&quot;setLayoutProperty&quot;,&quot;setFilter&quot;,&quot;addSource&quot;,&quot;removeSource&quot;,&quot;setLayerZoomRange&quot;,&quot;setLight&quot;,&quot;setTransition&quot;,&quot;setGeoJSONSourceData&quot;]),$e=t.pick(ee,[&quot;setCenter&quot;,&quot;setZoom&quot;,&quot;setBearing&quot;,&quot;setPitch&quot;]),Je=function(e){function r(n,i){var a=this;void 0===i&amp;&amp;(i={}),e.call(this),this.map=n,this.dispatcher=new q((Jt||(Jt=new Kt),Jt),this),this.imageManager=new P,this.glyphManager=new F(n._transformRequest,i.localIdeographFontFamily),this.lineAtlas=new U(256,512),this.crossTileSymbolIndex=new Ye,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.default$23,this._loaded=!1,this._resetUpdates();var o=this;this._rtlTextPluginCallback=r.registerForPluginAvailability(function(t){for(var e in o.dispatcher.broadcast(&quot;loadRTLTextPlugin&quot;,t.pluginURL,t.completionCallback),o.sourceCaches)o.sourceCaches[e].reload()}),this.on(&quot;data&quot;,function(t){if(&quot;source&quot;===t.dataType&amp;&amp;&quot;metadata&quot;===t.sourceDataType){var e=a.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&amp;&amp;r.vectorLayerIds)for(var n in a._layers){var i=a._layers[n];i.source===r.id&amp;&amp;a._validateLayer(i)}}}})}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var n=this;void 0===r&amp;&amp;(r={}),this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;style&quot;}));var i=&quot;boolean&quot;==typeof r.validate?r.validate:!x(e);e=function(t,e){if(!x(t))return t;var r=A(t);return r.path=&quot;/styles/v1&quot;+r.path,y(r,e)}(e,r.accessToken);var a=this.map._transformRequest(e,t.ResourceType.Style);t.getJSON(a,function(e,r){e?n.fire(new t.ErrorEvent(e)):r&amp;&amp;n._load(r,i)})},r.prototype.loadJSON=function(e,r){var n=this;void 0===r&amp;&amp;(r={}),this.fire(new t.Event(&quot;dataloading&quot;,{dataType:&quot;style&quot;})),a.frame(function(){n._load(e,!1!==r.validate)})},r.prototype._load=function(e,r){var n=this;if(!r||!Xe(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)n.addSource(i,e.sources[i],{validate:!1});e.sprite?function(e,r,n){var i,o,s,l=a.devicePixelRatio&gt;1?&quot;@2x&quot;:&quot;&quot;;function c(){if(s)n(s);else if(i&amp;&amp;o){var e=a.getImageData(o),r={};for(var l in i){var c=i[l],u=c.width,f=c.height,h=c.x,p=c.y,d=c.sdf,g=c.pixelRatio,m=new t.RGBAImage({width:u,height:f});t.RGBAImage.copy(e,m,{x:h,y:p},{x:0,y:0},{width:u,height:f}),r[l]={data:m,pixelRatio:g,sdf:d}}n(null,r)}}t.getJSON(r(_(e,l,&quot;.json&quot;),t.ResourceType.SpriteJSON),function(t,e){s||(s=t,i=e,c())}),t.getImage(r(_(e,l,&quot;.png&quot;),t.ResourceType.SpriteImage),function(t,e){s||(s=t,o=e,c())})}(e.sprite,this.map._transformRequest,function(e,r){if(e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=te(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var s=0,l=o;s&lt;l.length;s+=1){var c=l[s];(c=t.default$22(c)).setEventedParent(n,{layer:{id:c.id}}),n._layers[c.id]=c}this.dispatcher.broadcast(&quot;setLayers&quot;,this._serializeLayers(this._order)),this.light=new V(this.stylesheet.light),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;})),this.fire(new t.Event(&quot;style.load&quot;))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();(&quot;geojson&quot;===i.type||i.vectorLayerIds&amp;&amp;-1===i.vectorLayerIds.indexOf(n))&amp;&amp;this.fire(new t.ErrorEvent(new Error('Source layer &quot;'+n+'&quot; does not exist on source &quot;'+i.id+'&quot; as specified by style layer &quot;'+e.id+'&quot;')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},r.prototype.hasTransitions=function(){if(this.light&amp;&amp;this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(&quot;Style is not done loading&quot;)},r.prototype.update=function(e){if(this._loaded){if(this._changed){var r=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var i in(r.length||n.length)&amp;&amp;this._updateWorkerLayers(r,n),this._updatedSources){var a=this._updatedSources[i];&quot;reload&quot;===a?this._reloadSource(i):&quot;clear&quot;===a&amp;&amp;this._clearSource(i)}for(var o in this._updatedPaintProps)this._layers[o].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var l=0,c=this._order;l&lt;c.length;l+=1){var u=c[l],f=this._layers[u];f.recalculate(e),!f.isHidden(e.zoom)&amp;&amp;f.source&amp;&amp;(this.sourceCaches[f.source].used=!0)}this.light.recalculate(e),this.z=e.zoom}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast(&quot;updateLayers&quot;,{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Xe(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=te(e.layers);var n=function(e,r){if(!e)return[{command:ee.setStyle,args:[r]}];var n=[];try{if(!t.default$10(e.version,r.version))return[{command:ee.setStyle,args:[r]}];t.default$10(e.center,r.center)||n.push({command:ee.setCenter,args:[r.center]}),t.default$10(e.zoom,r.zoom)||n.push({command:ee.setZoom,args:[r.zoom]}),t.default$10(e.bearing,r.bearing)||n.push({command:ee.setBearing,args:[r.bearing]}),t.default$10(e.pitch,r.pitch)||n.push({command:ee.setPitch,args:[r.pitch]}),t.default$10(e.sprite,r.sprite)||n.push({command:ee.setSprite,args:[r.sprite]}),t.default$10(e.glyphs,r.glyphs)||n.push({command:ee.setGlyphs,args:[r.glyphs]}),t.default$10(e.transition,r.transition)||n.push({command:ee.setTransition,args:[r.transition]}),t.default$10(e.light,r.light)||n.push({command:ee.setLight,args:[r.light]});var i={},a=[];!function(e,r,n,i){var a;for(a in r=r||{},e=e||{})e.hasOwnProperty(a)&amp;&amp;(r.hasOwnProperty(a)||ne(a,n,i));for(a in r)r.hasOwnProperty(a)&amp;&amp;(e.hasOwnProperty(a)?t.default$10(e[a],r[a])||(&quot;geojson&quot;===e[a].type&amp;&amp;&quot;geojson&quot;===r[a].type&amp;&amp;ae(e,r,a)?n.push({command:ee.setGeoJSONSourceData,args:[a,r[a].data]}):ie(a,r,n,i)):re(a,r,n))}(e.sources,r.sources,a,i);var o=[];e.layers&amp;&amp;e.layers.forEach(function(t){i[t.source]?n.push({command:ee.removeLayer,args:[t.id]}):o.push(t)}),n=n.concat(a),function(e,r,n){r=r||[];var i,a,o,s,l,c,u,f=(e=e||[]).map(se),h=r.map(se),p=e.reduce(le,{}),d=r.reduce(le,{}),g=f.slice(),m=Object.create(null);for(i=0,a=0;i&lt;f.length;i++)o=f[i],d.hasOwnProperty(o)?a++:(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.indexOf(o,a),1));for(i=0,a=0;i&lt;h.length;i++)o=h[h.length-1-i],g[g.length-1-i]!==o&amp;&amp;(p.hasOwnProperty(o)?(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.lastIndexOf(o,g.length-a),1)):a++,c=g[g.length-i],n.push({command:ee.addLayer,args:[d[o],c]}),g.splice(g.length-i,0,o),m[o]=!0);for(i=0;i&lt;h.length;i++)if(s=p[o=h[i]],l=d[o],!m[o]&amp;&amp;!t.default$10(s,l))if(t.default$10(s.source,l.source)&amp;&amp;t.default$10(s[&quot;source-layer&quot;],l[&quot;source-layer&quot;])&amp;&amp;t.default$10(s.type,l.type)){for(u in oe(s.layout,l.layout,n,o,null,ee.setLayoutProperty),oe(s.paint,l.paint,n,o,null,ee.setPaintProperty),t.default$10(s.filter,l.filter)||n.push({command:ee.setFilter,args:[o,l.filter]}),t.default$10(s.minzoom,l.minzoom)&amp;&amp;t.default$10(s.maxzoom,l.maxzoom)||n.push({command:ee.setLayerZoomRange,args:[o,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(u)&amp;&amp;&quot;layout&quot;!==u&amp;&amp;&quot;paint&quot;!==u&amp;&amp;&quot;filter&quot;!==u&amp;&amp;&quot;metadata&quot;!==u&amp;&amp;&quot;minzoom&quot;!==u&amp;&amp;&quot;maxzoom&quot;!==u&amp;&amp;(0===u.indexOf(&quot;paint.&quot;)?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}));for(u in l)l.hasOwnProperty(u)&amp;&amp;!s.hasOwnProperty(u)&amp;&amp;&quot;layout&quot;!==u&amp;&amp;&quot;paint&quot;!==u&amp;&amp;&quot;filter&quot;!==u&amp;&amp;&quot;metadata&quot;!==u&amp;&amp;&quot;minzoom&quot;!==u&amp;&amp;&quot;maxzoom&quot;!==u&amp;&amp;(0===u.indexOf(&quot;paint.&quot;)?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}))}else n.push({command:ee.removeLayer,args:[o]}),c=g[g.lastIndexOf(o)+1],n.push({command:ee.addLayer,args:[l,c]})}(o,r.layers,n)}catch(t){console.warn(&quot;Unable to compute style diff:&quot;,t),n=[{command:ee.setStyle,args:[r]}]}return n}(this.serialize(),e).filter(function(t){return!(t.command in $e)});if(0===n.length)return!1;var i=n.filter(function(t){return!(t.command in Ze)});if(i.length&gt;0)throw new Error(&quot;Unimplemented: &quot;+i.map(function(t){return t.command}).join(&quot;, &quot;)+&quot;.&quot;);return n.forEach(function(t){&quot;setTransition&quot;!==t.command&amp;&amp;r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(&quot;An image with this name already exists.&quot;)));this.imageManager.addImage(e,r),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(&quot;No image with this name exists.&quot;)));this.imageManager.removeImage(e),this.fire(new t.Event(&quot;data&quot;,{dataType:&quot;style&quot;}))},r.prototype.addSource=function(e,r,n){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(&quot;There is already a source with this ID&quot;);if(!r.type)throw new Error(&quot;The type property must be defined, but the only the following properties were given: &quot;+Object.keys(r).join(&quot;, &quot;)+&quot;.&quot;);if(!([&quot;vector&quot;,&quot;raster&quot;,&quot;geojson&quot;,&quot;video&quot;,&quot;image&quot;].indexOf(r.type)&gt;=0&amp;&amp;this._validate(t.validateStyle.source,&quot;sources.&quot;+e,r,null,n))){this.map&amp;&amp;this.map._collectResourceTiming&amp;&amp;(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Yt(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(&quot;There is no source with this ID&quot;);for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source &quot;'+e+'&quot; cannot be removed while layer &quot;'+r+'&quot; is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event(&quot;data&quot;,{sourceDataType:&quot;metadata&quot;,dataType:&quot;source&quot;,sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&amp;&amp;n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&amp;&amp;this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id &quot;'+i+'&quot; already exists on this map')));else if(&quot;object&quot;==typeof e.source&amp;&amp;(this.addSource(i,e.source),e=t.clone(e),e=t.extend(e,{source:i})),!this._validate(t.validateStyle.layer,&quot;layers.&quot;+i,e,{arrayIndex:-1},n)){var a=t.default$22(e);this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}});var o=r?this._order.indexOf(r):this._order.length;if(r&amp;&amp;-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id &quot;'+r+'&quot; does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&amp;&amp;a.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]=&quot;clear&quot;:(this._updatedSources[a.source]=&quot;reload&quot;,this.sourceCaches[a.source].pause())}this._updateLayer(a)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&amp;&amp;-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id &quot;'+r+'&quot; does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be moved.&quot;)))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be removed.&quot;)))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&amp;&amp;i.maxzoom===n||(null!=r&amp;&amp;(i.minzoom=r),null!=n&amp;&amp;(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot have zoom extent.&quot;)))},r.prototype.setFilter=function(e,r){this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.default$10(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,&quot;layers.&quot;+n.id+&quot;.filter&quot;,r)||(n.filter=t.clone(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be filtered.&quot;)))},r.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?t.default$10(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be styled.&quot;)))},r.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},r.prototype.setPaintProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.default$10(i.getPaintProperty(r),n)){var a=i._transitionablePaint._values[r].value.isDataDriven();i.setPaintProperty(r,n),(i._transitionablePaint._values[r].value.isDataDriven()||a)&amp;&amp;this._updateLayer(i),this._changed=!0,this._updatedPaintProps[e]=!0}}else this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+e+&quot;' does not exist in the map's style and cannot be styled.&quot;)))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&amp;&amp;this.stylesheet.transition)},r.prototype.serialize=function(){var e=this;return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&amp;&amp;!this._updatedSources[t.source]&amp;&amp;(this._updatedSources[t.source]=&quot;reload&quot;,this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenRenderedFeatures=function(t){for(var e=[],r=this._order.length-1;r&gt;=0;r--)for(var n=this._order[r],i=0,a=t;i&lt;a.length;i+=1){var o=a[i][n];if(o)for(var s=0,l=o;s&lt;l.length;s+=1){var c=l[s];e.push(c)}}return e},r.prototype.queryRenderedFeatures=function(e,r,n){r&amp;&amp;r.filter&amp;&amp;this._validate(t.validateStyle.filter,&quot;queryRenderedFeatures.filter&quot;,r.filter);var i={};if(r&amp;&amp;r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error(&quot;parameters.layers must be an Array.&quot;))),[];for(var a=0,o=r.layers;a&lt;o.length;a+=1){var s=o[a],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error(&quot;The layer '&quot;+s+&quot;' does not exist in the map's style and cannot be queried for features.&quot;))),[];i[l.source]=!0}}var c=[];for(var u in this.sourceCaches)r.layers&amp;&amp;!i[u]||c.push(at(this.sourceCaches[u],this._layers,e.worldCoordinate,r,n));return this.placement&amp;&amp;c.push(function(t,e,r,n,i){for(var a={},o=n.queryRenderedSymbols(e),s=[],l=0,c=Object.keys(o).map(Number);l&lt;c.length;l+=1){var u=c[l];s.push(i[u])}s.sort(ot);for(var f=function(){var e=p[h],n=e.featureIndex.lookupSymbolFeatures(o[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,r.filter,r.layers,t);for(var i in n){var s=a[i]=a[i]||[],l=n[i];l.sort(function(t,r){var n=e.featureSortOrder;if(n){var i=n.indexOf(t.featureIndex);return n.indexOf(r.featureIndex)-i}return r.featureIndex-t.featureIndex});for(var c=0,u=l;c&lt;u.length;c+=1){var f=u[c];s.push(f.feature)}}},h=0,p=s;h&lt;p.length;h+=1)f();return a}(this._layers,e.viewport,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(c)},r.prototype.querySourceFeatures=function(e,r){r&amp;&amp;r.filter&amp;&amp;this._validate(t.validateStyle.filter,&quot;querySourceFeatures.filter&quot;,r.filter);var n=this.sourceCaches[e];return n?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],i={},a=0;a&lt;r.length;a++){var o=r[a],s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(n,e))}return n}(n,r):[]},r.prototype.addSourceType=function(t,e,n){return r.getSourceType(t)?n(new Error('A source type called &quot;'+t+'&quot; already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(&quot;loadWorkerSource&quot;,{name:t,url:e.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e){this._checkLoaded();var r=this.light.getLight(),n=!1;for(var i in e)if(!t.default$10(e[i],r[i])){n=!0;break}if(n){var o={now:a.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(o)}},r.prototype._validate=function(e,r,n,i,a){return(!a||!1!==a.validate)&amp;&amp;Xe(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:n,styleSpec:t.default$5},i)))},r.prototype._remove=function(){for(var e in t.evented.off(&quot;pluginAvailable&quot;,this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(t,e,r){for(var n=!1,i=!1,o={},s=0,l=this._order;s&lt;l.length;s+=1){var c=l[s],u=this._layers[c];if(&quot;symbol&quot;===u.type){if(!o[u.source]){var f=this.sourceCaches[u.source];o[u.source]=f.getRenderableIds().map(function(t){return f.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var h=this.crossTileSymbolIndex.addLayer(u,o[u.source],t.center.lng);n=n||h}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var p=this._layerOrderChanged;if((p||!this.pauseablePlacement||this.pauseablePlacement.isDone()&amp;&amp;!this.placement.stillRecent(a.now()))&amp;&amp;(this.pauseablePlacement=new Ue(t,this._order,p,e,r),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&amp;&amp;(this.placement=this.pauseablePlacement.commit(this.placement,a.now()),i=!0),n&amp;&amp;this.pauseablePlacement.placement.setStale()),i||n)for(var d=0,g=this._order;d&lt;g.length;d+=1){var m=g[d],v=this._layers[m];&quot;symbol&quot;===v.type&amp;&amp;this.placement.updateLayerOpacities(v,o[v.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.now())},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r}(t.Evented);Je.getSourceType=function(t){return nt[t]},Je.setSourceType=function(t,e){nt[t]=e},Je.registerForPluginAvailability=t.registerForPluginAvailability;var Ke=t.createLayout([{name:&quot;a_pos&quot;,type:&quot;Int16&quot;,components:2}]),Qe={prelude:{fragmentSource:&quot;#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n&quot;,vertexSource:&quot;#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n    int packedIntValue = int(packedValue);\n    int v0 = packedIntValue / 256;\n    return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n    int intOpacity = int(packedOpacity) / 2;\n    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n//   floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n    return vec4(\n        unpack_float(encodedColor[0]) / 255.0,\n        unpack_float(encodedColor[1]) / 255.0\n    );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n    return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\n    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n    return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n    return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n&quot;},background:{fragmentSource:&quot;uniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n    gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},backgroundPattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n&quot;},circle:{fragmentSource:&quot;#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    vec2 extrude = v_data.xy;\n    float extrude_length = length(extrude);\n\n    lowp float antialiasblur = v_data.z;\n    float antialiased_blur = -max(blur, antialiasblur);\n\n    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n    float color_t = stroke_width &lt; 0.01 ? 0.0 : smoothstep(\n        antialiased_blur,\n        0.0,\n        extrude_length - radius / (radius + stroke_width)\n    );\n\n    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main(void) {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec2 circle_center = floor(a_pos * 0.5);\n    if (u_pitch_with_map) {\n        vec2 corner_position = circle_center;\n        if (u_scale_with_map) {\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n        } else {\n            // Pitching the circle with the map effectively scales it with the map\n            // To counteract the effect for pitch-scale: viewport, we rescale the\n            // whole circle based on the pitch scaling effect at its central point\n            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n        }\n\n        gl_Position = u_matrix * vec4(corner_position, 0, 1);\n    } else {\n        gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n        if (u_scale_with_map) {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n        } else {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n        }\n    }\n\n    // This is a minimum blur distance that serves as a faux-antialiasing for\n    // the circle. since blur is a ratio of the circle's size and the intent is\n    // to keep the blur at roughly 1px, the two are inversely related.\n    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n    v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n&quot;},clippingMask:{fragmentSource:&quot;void main() {\n    gl_FragColor = vec4(1.0);\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},heatmap:{fragmentSource:&quot;#pragma mapbox: define highp float weight\n\nuniform highp float u_intensity;\nvarying vec2 v_extrude;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n    #pragma mapbox: initialize highp float weight\n\n    // Kernel density estimation with a Gaussian kernel of size 5x5\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n    float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n// Effective \&quot;0\&quot; in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n    #pragma mapbox: initialize highp float weight\n    #pragma mapbox: initialize mediump float radius\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use\n    // it to produce the vertices of a square mesh framing the point feature\n    // we're adding to the kernel density texture.  We'll also pass it as\n    // a varying, so that the fragment shader can determine the distance of\n    // each fragment from the point feature.\n    // Before we do so, we need to scale it up sufficiently so that the\n    // kernel falls effectively to zero at the edge of the mesh.\n    // That is, we want to know S such that\n    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n    // Which solves to:\n    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n    // Pass the varying in units of radius\n    v_extrude = S * unscaled_extrude;\n\n    // Scale by radius and the zoom-based scale factor to produce actual\n    // mesh position\n    vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n    gl_Position = u_matrix * pos;\n}\n&quot;},heatmapTexture:{fragmentSource:&quot;uniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    float t = texture2D(u_image, v_pos).r;\n    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n    gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n&quot;},collisionBox:{fragmentSource:&quot;\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed &gt; 0.5) {\n        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed &gt; 0.5) {\n        // This box not used, fade it out\n        gl_FragColor *= .1;\n    }\n}&quot;,vertexSource:&quot;attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n}\n&quot;},collisionCircle:{fragmentSource:&quot;uniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed &gt; 0.5) {\n        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed &gt; 0.5) {\n        // This box not used, fade it out\n        color *= .2;\n    }\n\n    float extrude_scale_length = length(v_extrude_scale);\n    float extrude_length = length(v_extrude) * extrude_scale_length;\n    float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n    float radius = v_radius * extrude_scale_length;\n\n    float distance_to_edge = abs(extrude_length - radius);\n    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n    gl_FragColor = opacity_t * color;\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n    v_extrude = a_extrude * padding_factor;\n    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n&quot;},debug:{fragmentSource:&quot;uniform highp vec4 u_color;\n\nvoid main() {\n    gl_FragColor = u_color;\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},fill:{fragmentSource:&quot;#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n&quot;},fillOutline:{fragmentSource:&quot;#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n    gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n&quot;},fillOutlinePattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    // find distance to outline for alpha interpolation\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n&quot;},fillPattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n&quot;},fillExtrusion:{fragmentSource:&quot;varying vec4 v_color;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    vec3 normal = a_normal_ed.xyz;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n\n    gl_Position = u_matrix * vec4(a_pos, t &gt; 0.0 ? height : base, 1);\n\n    // Relative luminance (how dark/bright is the surface color?)\n    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n    v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n    // Add slight ambient lighting so no extrusions are totally black\n    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n    color += ambientlight;\n\n    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n    // Adjust directional so that\n    // the range of values for highlight/shading is narrower\n    // with lower light intensity\n    // and with lighter/brighter surface colors\n    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n    // Add gradient along z axis of side surfaces\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n    // with lower bounds adjusted to hue of light\n    // so that shading is tinted with the complementary (opposite) color to the light color\n    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n&quot;},fillExtrusionPattern:{fragmentSource:&quot;uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    vec4 mixedColor = mix(color1, color2, u_mix);\n\n    gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\nuniform float u_height_factor;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\nvarying float v_directional;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec3 normal = a_normal_ed.xyz;\n    float edgedistance = a_normal_ed.w;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n    float z = t &gt; 0.0 ? height : base;\n\n    gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n    vec2 pos = normal.x == 1.0 &amp;&amp; normal.y == 0.0 &amp;&amp; normal.z == 16384.0\n        ? a_pos // extrusion top\n        : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\n\n    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n&quot;},extrusionTexture:{fragmentSource:&quot;uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n&quot;},hillshadePrepare:{fragmentSource:&quot;#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nfloat getElevation(vec2 coord, float bias) {\n    // Convert encoded elevation value to meters\n    vec4 data = texture2D(u_image, coord) * 255.0;\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\n}\n\nvoid main() {\n    vec2 epsilon = 1.0 / u_dimension;\n\n    // queried pixels:\n    // +-----------+\n    // |   |   |   |\n    // | a | b | c |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | d | e | f |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | g | h | i |\n    // |   |   |   |\n    // +-----------+\n\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n    float e = getElevation(v_pos, 0.0);\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n    // here we divide the x and y slopes by 8 * pixel size\n    // where pixel size (aka meters/pixel) is:\n    // circumference of the world / (pixels per tile * number of tiles)\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n    // we want to vertically exaggerate the hillshading though, because otherwise\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\n    // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n    // Here we use a=0.3 which works out to the expression below. see \n    // nickidlugash's awesome breakdown for more info\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\n    float exaggeration = u_zoom &lt; 2.0 ? 0.4 : u_zoom &lt; 4.5 ? 0.35 : 0.3;\n\n    vec2 deriv = vec2(\n        (c + f + f + i) - (a + d + d + g),\n        (g + h + h + i) - (a + b + b + c)\n    ) /  pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n    gl_FragColor = clamp(vec4(\n        deriv.x / 2.0 + 0.5,\n        deriv.y / 2.0 + 0.5,\n        1.0,\n        1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\n}\n&quot;},hillshade:{fragmentSource:&quot;uniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n    vec4 pixel = texture2D(u_image, v_pos);\n\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n    // to account for mercator projection distortion. see #4807 for details\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n    // We also multiply the slope by an arbitrary z-factor of 1.25\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y &gt; 0.0 ? 1.0 : -1.0);\n\n    float intensity = u_light.x;\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n    float azimuth = u_light.y + PI;\n\n    // We scale the slope exponentially based on intensity, using a calculation similar to\n    // the exponential interpolation function in the style spec:\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\n    // so that higher intensity values create more opaque hillshading.\n    float base = 1.875 - intensity * 1.75;\n    float maxValue = 0.5 * PI;\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n    // so that the accent color's rate of change eases in while the shade color's eases out.\n    float accent = cos(scaledSlope);\n    // We multiply both the accent and shade color by a clamped intensity value\n    // so that intensities &gt;= 0.5 do not additionally affect the color values\n    // while intensity values &lt; 0.5 make the overall color more transparent.\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = a_texture_pos / 8192.0;\n}\n&quot;},line:{fragmentSource:&quot;#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n&quot;},lineGradient:{fragmentSource:&quot;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    // For gradient lines, v_lineprogress is the ratio along the entire line,\n    // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n    vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n&quot;},linePattern:{fragmentSource:&quot;uniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n    float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n\n    // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n    // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n    // to ensure we don't sample outside the designated symbol on the sprite sheet.\n    // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n    // the texture coordinate\n    float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);\n    float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);\n    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\n    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n    gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_linesofar = a_linesofar;\n    v_width2 = vec2(outset, inset);\n}\n&quot;},lineSDF:{fragmentSource:&quot;\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float sdfdist_a = texture2D(u_image, v_tex_a).a;\n    float sdfdist_b = texture2D(u_image, v_tex_b).a;\n    float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n    alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \&quot;special\&quot; normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth &gt; 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth &gt; 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist =outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n    v_width2 = vec2(outset, inset);\n}\n&quot;},raster:{fragmentSource:&quot;uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n    // read and cross-fade colors from the main and parent tiles\n    vec4 color0 = texture2D(u_image0, v_pos0);\n    vec4 color1 = texture2D(u_image1, v_pos1);\n    if (color0.a &gt; 0.0) {\n        color0.rgb = color0.rgb / color0.a;\n    }\n    if (color1.a &gt; 0.0) {\n        color1.rgb = color1.rgb / color1.a;\n    }\n    vec4 color = mix(color0, color1, u_fade_t);\n    color.a *= u_opacity;\n    vec3 rgb = color.rgb;\n\n    // spin\n    rgb = vec3(\n        dot(rgb, u_spin_weights.xyz),\n        dot(rgb, u_spin_weights.zxy),\n        dot(rgb, u_spin_weights.yzx));\n\n    // saturation\n    float average = (color.r + color.g + color.b) / 3.0;\n    rgb += (average - rgb) * u_saturation_factor;\n\n    // contrast\n    rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n    // brightness\n    vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n    vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n    gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    // We are using Int16 for texture position coordinates to give us enough precision for\n    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n    // as an arbitrarily high number to preserve adequate precision when rendering.\n    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n    // so math for modifying either is consistent.\n    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n&quot;},symbolIcon:{fragmentSource:&quot;uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    lowp float alpha = opacity * v_fade_opacity;\n    gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n\n    float size;\n    if (!u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant &amp;&amp; u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // See comments in symbol_sdf.vertex\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n            0.5 + 0.5 * distance_ratio,\n            0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n            4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // See comments in symbol_sdf.vertex\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n\n    v_tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] &gt; 0.5 ? u_fade_change : -u_fade_change;\n    v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n}\n&quot;},symbolSDF:{fragmentSource:&quot;#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 tex = v_data0.xy;\n    float gamma_scale = v_data1.x;\n    float size = v_data1.y;\n    float fade_opacity = v_data1[2];\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    lowp vec4 color = fill_color;\n    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n    lowp float buff = (256.0 - 64.0) / 256.0;\n    if (u_is_halo) {\n        color = halo_color;\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n        buff = (6.0 - halo_width / fontScale) / SDF_PX;\n    }\n\n    lowp float dist = texture2D(u_texture, tex).a;\n    highp float gamma_scaled = gamma * gamma_scale;\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n    gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n&quot;,vertexSource:&quot;const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n//   text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n    float size;\n\n    if (!u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant &amp;&amp; !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant &amp;&amp; u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // If the label is pitched with the map, layout is done in pitched space,\n    // which makes labels in the distance smaller relative to viewport space.\n    // We counteract part of that effect by multiplying by the perspective ratio.\n    // If the label isn't pitched with the map, we do layout in viewport space,\n    // which makes labels in the distance larger relative to the features around\n    // them. We counteract part of that effect by dividing by the perspective ratio.\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n        0.5 + 0.5 * distance_ratio,\n        0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n        4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n        // To figure out that angle in projected space, we draw a short horizontal line in tile\n        // space, project it, and measure its angle in projected space.\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n    float gamma_scale = gl_Position.w;\n\n    vec2 tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] &gt; 0.5 ? u_fade_change : -u_fade_change;\n    float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n    v_data0 = vec2(tex.x, tex.y);\n    v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\n}\n&quot;}},tr=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,er=function(t){var e=Qe[t],r={};e.fragmentSource=e.fragmentSource.replace(tr,function(t,e,n,i,a){return r[a]=!0,&quot;define&quot;===e?&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\nvarying &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot;;\n#else\nuniform &quot;+n+&quot; &quot;+i+&quot; u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;\n#ifdef HAS_UNIFORM_u_&quot;+a+&quot;\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = u_&quot;+a+&quot;;\n#endif\n&quot;}),e.vertexSource=e.vertexSource.replace(tr,function(t,e,n,i,a){var o=&quot;float&quot;===i?&quot;vec2&quot;:&quot;vec4&quot;;return r[a]?&quot;define&quot;===e?&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\nuniform lowp float a_&quot;+a+&quot;_t;\nattribute &quot;+n+&quot; &quot;+o+&quot; a_&quot;+a+&quot;;\nvarying &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot;;\n#else\nuniform &quot;+n+&quot; &quot;+i+&quot; u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\n    &quot;+a+&quot; = unpack_mix_&quot;+o+&quot;(a_&quot;+a+&quot;, a_&quot;+a+&quot;_t);\n#else\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;define&quot;===e?&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\nuniform lowp float a_&quot;+a+&quot;_t;\nattribute &quot;+n+&quot; &quot;+o+&quot; a_&quot;+a+&quot;;\n#else\nuniform &quot;+n+&quot; &quot;+i+&quot; u_&quot;+a+&quot;;\n#endif\n&quot;:&quot;\n#ifndef HAS_UNIFORM_u_&quot;+a+&quot;\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = unpack_mix_&quot;+o+&quot;(a_&quot;+a+&quot;, a_&quot;+a+&quot;_t);\n#else\n    &quot;+n+&quot; &quot;+i+&quot; &quot;+a+&quot; = u_&quot;+a+&quot;;\n#endif\n&quot;})};for(var rr in Qe)er(rr);var nr=Qe,ir=function(t,e,r,n){var i=t.gl;this.program=i.createProgram();var o=r.defines().concat(&quot;#define DEVICE_PIXEL_RATIO &quot;+a.devicePixelRatio.toFixed(1));n&amp;&amp;o.push(&quot;#define OVERDRAW_INSPECTOR;&quot;);var s=o.concat(nr.prelude.fragmentSource,e.fragmentSource).join(&quot;\n&quot;),l=o.concat(nr.prelude.vertexSource,e.vertexSource).join(&quot;\n&quot;),c=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(c,s),i.compileShader(c),i.attachShader(this.program,c);var u=i.createShader(i.VERTEX_SHADER);i.shaderSource(u,l),i.compileShader(u),i.attachShader(this.program,u);for(var f=r.layoutAttributes||[],h=0;h&lt;f.length;h++)i.bindAttribLocation(this.program,h,f[h].name);i.linkProgram(this.program),this.numAttributes=i.getProgramParameter(this.program,i.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var p=0;p&lt;this.numAttributes;p++){var d=i.getActiveAttrib(this.program,p);d&amp;&amp;(this.attributes[d.name]=i.getAttribLocation(this.program,d.name))}for(var g=i.getProgramParameter(this.program,i.ACTIVE_UNIFORMS),m=0;m&lt;g;m++){var v=i.getActiveUniform(this.program,m);v&amp;&amp;(this.uniforms[v.name]=i.getUniformLocation(this.program,v.name))}};function ar(e,r,n,i,a){for(var o=0;o&lt;n.length;o++){var s=n[o];if(i.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var l=r.children(1/0),c=0;c&lt;l.length;c++)ar(e,l[c],n.slice(o),i,a);return}}var u=r.overscaledZ-e.overscaledZ,f=new t.CanonicalTileID(u,r.canonical.x-(e.canonical.x&lt;&lt;u),r.canonical.y-(e.canonical.y&lt;&lt;u));a[f.key]=a[f.key]||f}function or(t,e,r,n,i){var a=t.context,o=a.gl,s=i?t.useProgram(&quot;collisionCircle&quot;):t.useProgram(&quot;collisionBox&quot;);a.setDepthMode(qt.disabled),a.setStencilMode(Ht.disabled),a.setColorMode(t.colorModeForRenderPass());for(var l=0;l&lt;n.length;l++){var c=n[l],u=e.getTile(c),f=u.getBucket(r);if(f){var h=i?f.collisionCircle:f.collisionBox;if(h){o.uniformMatrix4fv(s.uniforms.u_matrix,!1,c.posMatrix),i||a.lineWidth.set(1),o.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var p=Te(u,1,t.transform.zoom),d=Math.pow(2,t.transform.zoom-u.tileID.overscaledZ);o.uniform1f(s.uniforms.u_pixels_to_tile_units,p),o.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(p*d),t.transform.pixelsToGLUnits[1]/(p*d)),o.uniform1f(s.uniforms.u_overscale_factor,u.tileID.overscaleFactor()),s.draw(a,i?o.TRIANGLES:o.LINES,r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,h.collisionVertexBuffer,null)}}}}ir.prototype.draw=function(t,e,r,n,i,a,o,s,l){for(var c,u=t.gl,f=(c={},c[u.LINES]=2,c[u.TRIANGLES]=3,c)[e],h=0,p=a.get();h&lt;p.length;h+=1){var d=p[h],g=d.vaos||(d.vaos={});(g[r]||(g[r]=new Q)).bind(t,this,n,o?o.getPaintVertexBuffers():[],i,d.vertexOffset,s,l),u.drawElements(e,d.primitiveLength*f,u.UNSIGNED_SHORT,d.primitiveOffset*f*2)}};var sr=t.mat4.identity(new Float32Array(16)),lr=t.default$19.layout;function cr(t,e,r,n,i,a,o,s,l,c){var u,f=t.context,h=f.gl,p=t.transform,d=&quot;map&quot;===s,g=&quot;map&quot;===l,m=d&amp;&amp;&quot;line&quot;===r.layout.get(&quot;symbol-placement&quot;),v=d&amp;&amp;!g&amp;&amp;!m,y=g;f.setDepthMode(y?t.depthModeForSublayer(0,qt.ReadOnly):qt.disabled);for(var x=0,b=n;x&lt;b.length;x+=1){var _=b[x],w=e.getTile(_),k=w.getBucket(r);if(k){var M=i?k.text:k.icon;if(M&amp;&amp;M.segments.get().length){var A=M.programConfigurations.get(r.id),T=i||k.sdfIcons,S=i?k.textSizeData:k.iconSizeData;if(u||(u=t.useProgram(T?&quot;symbolSDF&quot;:&quot;symbolIcon&quot;,A),A.setUniforms(t.context,u,r.paint,{zoom:t.transform.zoom}),ur(u,t,r,i,v,g,S)),f.activeTexture.set(h.TEXTURE0),h.uniform1i(u.uniforms.u_texture,0),i)w.glyphAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.glyphAtlasTexture.size);else{var E=1!==r.layout.get(&quot;icon-size&quot;).constantOr(0)||k.iconsNeedLinear,C=g||0!==p.pitch;w.iconAtlasTexture.bind(T||t.options.rotating||t.options.zooming||E||C?h.LINEAR:h.NEAREST,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.iconAtlasTexture.size)}h.uniformMatrix4fv(u.uniforms.u_matrix,!1,t.translatePosMatrix(_.posMatrix,w,a,o));var L=Te(w,1,t.transform.zoom),z=fe(_.posMatrix,g,d,t.transform,L),P=he(_.posMatrix,g,d,t.transform,L);h.uniformMatrix4fv(u.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(P,w,a,o,!0)),m?(h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,sr),ge(k,_.posMatrix,t,i,z,P,g,c)):h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,z),h.uniform1f(u.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),fr(u,A,t,r,w,M,i,T,g)}}}}function ur(e,r,n,i,a,o,s){var l=r.context.gl,c=r.transform;l.uniform1i(e.uniforms.u_pitch_with_map,o?1:0),l.uniform1f(e.uniforms.u_is_text,i?1:0),l.uniform1f(e.uniforms.u_pitch,c.pitch/360*2*Math.PI);var u=&quot;constant&quot;===s.functionType||&quot;source&quot;===s.functionType,f=&quot;constant&quot;===s.functionType||&quot;camera&quot;===s.functionType;l.uniform1i(e.uniforms.u_is_size_zoom_constant,u?1:0),l.uniform1i(e.uniforms.u_is_size_feature_constant,f?1:0),l.uniform1f(e.uniforms.u_camera_to_center_distance,c.cameraToCenterDistance);var h=t.evaluateSizeForZoom(s,c.zoom,lr.properties[i?&quot;text-size&quot;:&quot;icon-size&quot;]);void 0!==h.uSizeT&amp;&amp;l.uniform1f(e.uniforms.u_size_t,h.uSizeT),void 0!==h.uSize&amp;&amp;l.uniform1f(e.uniforms.u_size,h.uSize),l.uniform1f(e.uniforms.u_aspect_ratio,c.width/c.height),l.uniform1i(e.uniforms.u_rotate_symbol,a?1:0)}function fr(t,e,r,n,i,a,o,s,l){var c=r.context,u=c.gl,f=r.transform;if(s){var h=0!==n.paint.get(o?&quot;text-halo-width&quot;:&quot;icon-halo-width&quot;).constantOr(1),p=l?Math.cos(f._pitch)*f.cameraToCenterDistance:1;u.uniform1f(t.uniforms.u_gamma_scale,p),h&amp;&amp;(u.uniform1f(t.uniforms.u_is_halo,1),hr(a,n,c,t)),u.uniform1f(t.uniforms.u_is_halo,0)}hr(a,n,c,t)}function hr(t,e,r,n){n.draw(r,r.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function pr(t,e,r,n,i,o,s,l,c){var u,f,h,p,d=e.context,g=d.gl,m=i.paint.get(&quot;line-dasharray&quot;),v=i.paint.get(&quot;line-pattern&quot;);if(l||c){var y=1/Te(r,1,e.transform.tileZoom);if(m){u=e.lineAtlas.getDash(m.from,&quot;round&quot;===i.layout.get(&quot;line-cap&quot;)),f=e.lineAtlas.getDash(m.to,&quot;round&quot;===i.layout.get(&quot;line-cap&quot;));var x=u.width*m.fromScale,b=f.width*m.toScale;g.uniform2f(t.uniforms.u_patternscale_a,y/x,-u.height/2),g.uniform2f(t.uniforms.u_patternscale_b,y/b,-f.height/2),g.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(x,b)*a.devicePixelRatio)/2)}else if(v){if(h=e.imageManager.getPattern(v.from),p=e.imageManager.getPattern(v.to),!h||!p)return;g.uniform2f(t.uniforms.u_pattern_size_a,h.displaySize[0]*v.fromScale/y,h.displaySize[1]),g.uniform2f(t.uniforms.u_pattern_size_b,p.displaySize[0]*v.toScale/y,p.displaySize[1]);var _=e.imageManager.getPixelSize(),w=_.width,k=_.height;g.uniform2fv(t.uniforms.u_texsize,[w,k])}g.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}l&amp;&amp;(m?(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.lineAtlas.bind(d),g.uniform1f(t.uniforms.u_tex_y_a,u.y),g.uniform1f(t.uniforms.u_tex_y_b,f.y),g.uniform1f(t.uniforms.u_mix,m.t)):v&amp;&amp;(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.imageManager.bind(d),g.uniform2fv(t.uniforms.u_pattern_tl_a,h.tl),g.uniform2fv(t.uniforms.u_pattern_br_a,h.br),g.uniform2fv(t.uniforms.u_pattern_tl_b,p.tl),g.uniform2fv(t.uniforms.u_pattern_br_b,p.br),g.uniform1f(t.uniforms.u_fade,v.t))),d.setStencilMode(e.stencilModeForClipping(o));var M=e.translatePosMatrix(o.posMatrix,r,i.paint.get(&quot;line-translate&quot;),i.paint.get(&quot;line-translate-anchor&quot;));if(g.uniformMatrix4fv(t.uniforms.u_matrix,!1,M),g.uniform1f(t.uniforms.u_ratio,1/Te(r,1,e.transform.zoom)),i.paint.get(&quot;line-gradient&quot;)){d.activeTexture.set(g.TEXTURE0);var A=i.gradientTexture;if(!i.gradient)return;A||(A=i.gradientTexture=new z(d,i.gradient,g.RGBA)),A.bind(g.LINEAR,g.CLAMP_TO_EDGE),g.uniform1i(t.uniforms.u_image,0)}t.draw(d,g.TRIANGLES,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,s)}var dr=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),n=e.imageManager.getPattern(t.to);return!r||!n},gr=function(t,e,r){var n=e.context,i=n.gl,a=e.imageManager.getPattern(t.from),o=e.imageManager.getPattern(t.to);i.uniform1i(r.uniforms.u_image,0),i.uniform2fv(r.uniforms.u_pattern_tl_a,a.tl),i.uniform2fv(r.uniforms.u_pattern_br_a,a.br),i.uniform2fv(r.uniforms.u_pattern_tl_b,o.tl),i.uniform2fv(r.uniforms.u_pattern_br_b,o.br);var s=e.imageManager.getPixelSize(),l=s.width,c=s.height;i.uniform2fv(r.uniforms.u_texsize,[l,c]),i.uniform1f(r.uniforms.u_mix,t.t),i.uniform2fv(r.uniforms.u_pattern_size_a,a.displaySize),i.uniform2fv(r.uniforms.u_pattern_size_b,o.displaySize),i.uniform1f(r.uniforms.u_scale_a,t.fromScale),i.uniform1f(r.uniforms.u_scale_b,t.toScale),n.activeTexture.set(i.TEXTURE0),e.imageManager.bind(e.context)},mr=function(t,e,r){var n=e.context.gl;n.uniform1f(r.uniforms.u_tile_units_to_pixels,1/Te(t,1,e.transform.tileZoom));var i=Math.pow(2,t.tileID.overscaledZ),a=t.tileSize*Math.pow(2,e.transform.tileZoom)/i,o=a*(t.tileID.canonical.x+t.tileID.wrap*i),s=a*t.tileID.canonical.y;n.uniform2f(r.uniforms.u_pixel_coord_upper,o&gt;&gt;16,s&gt;&gt;16),n.uniform2f(r.uniforms.u_pixel_coord_lower,65535&amp;o,65535&amp;s)};function vr(t,e,r,n,i){if(!dr(r.paint.get(&quot;fill-pattern&quot;),t))for(var a=!0,o=0,s=n;o&lt;s.length;o+=1){var l=s[o],c=e.getTile(l),u=c.getBucket(r);u&amp;&amp;(t.context.setStencilMode(t.stencilModeForClipping(l)),i(t,e,r,c,l,u,a),a=!1)}}function yr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id);br(&quot;fill&quot;,r.paint.get(&quot;fill-pattern&quot;),t,l,r,n,i,o).draw(t.context,s.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,l)}function xr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id),c=br(&quot;fillOutline&quot;,r.getPaintProperty(&quot;fill-outline-color&quot;)?null:r.paint.get(&quot;fill-pattern&quot;),t,l,r,n,i,o);s.uniform2f(c.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),c.draw(t.context,s.LINES,r.id,a.layoutVertexBuffer,a.indexBuffer2,a.segments2,l)}function br(t,e,r,n,i,a,o,s){var l,c=r.context.program.get();return e?(l=r.useProgram(t+&quot;Pattern&quot;,n),(s||l.program!==c)&amp;&amp;(n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom}),gr(e,r,l)),mr(a,r,l)):(l=r.useProgram(t,n),(s||l.program!==c)&amp;&amp;n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom})),r.context.gl.uniformMatrix4fv(l.uniforms.u_matrix,!1,r.translatePosMatrix(o.posMatrix,a,i.paint.get(&quot;fill-translate&quot;),i.paint.get(&quot;fill-translate-anchor&quot;))),l}var _r=t.default$20.mat3,wr=t.default$20.mat4,kr=t.default$20.vec3;function Mr(t,e,r,n,i,a,o){var s=t.context,l=s.gl,c=r.paint.get(&quot;fill-extrusion-pattern&quot;),u=t.context.program.get(),f=a.programConfigurations.get(r.id),h=t.useProgram(c?&quot;fillExtrusionPattern&quot;:&quot;fillExtrusion&quot;,f);if((o||h.program!==u)&amp;&amp;f.setUniforms(s,h,r.paint,{zoom:t.transform.zoom}),c){if(dr(c,t))return;gr(c,t,h),mr(n,t,h),l.uniform1f(h.uniforms.u_height_factor,-Math.pow(2,i.overscaledZ)/n.tileSize/8)}t.context.gl.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.translatePosMatrix(i.posMatrix,n,r.paint.get(&quot;fill-extrusion-translate&quot;),r.paint.get(&quot;fill-extrusion-translate-anchor&quot;))),function(t,e){var r=e.context.gl,n=e.style.light,i=n.properties.get(&quot;position&quot;),a=[i.x,i.y,i.z],o=_r.create();&quot;viewport&quot;===n.properties.get(&quot;anchor&quot;)&amp;&amp;_r.fromRotation(o,-e.transform.angle),kr.transformMat3(a,a,o);var s=n.properties.get(&quot;color&quot;);r.uniform3fv(t.uniforms.u_lightpos,a),r.uniform1f(t.uniforms.u_lightintensity,n.properties.get(&quot;intensity&quot;)),r.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b)}(h,t),h.draw(s,l.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,f)}function Ar(e,r,n){var i=e.context,a=i.gl,o=r.fbo;if(o){var s=e.useProgram(&quot;hillshade&quot;),l=e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),!0);!function(t,e,r){var n=r.paint.get(&quot;hillshade-illumination-direction&quot;)*(Math.PI/180);&quot;viewport&quot;===r.paint.get(&quot;hillshade-illumination-anchor&quot;)&amp;&amp;(n-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,r.paint.get(&quot;hillshade-exaggeration&quot;),n)}(s,e,n);var c=function(e,r){var n=r.toCoordinate(),i=new t.default$17(n.column,n.row+1,n.zoom);return[e.transform.coordinateLocation(n).lat,e.transform.coordinateLocation(i).lat]}(e,r.tileID);i.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),a.uniformMatrix4fv(s.uniforms.u_matrix,!1,l),a.uniform2fv(s.uniforms.u_latrange,c),a.uniform1i(s.uniforms.u_image,0);var u=n.paint.get(&quot;hillshade-shadow-color&quot;);a.uniform4f(s.uniforms.u_shadow,u.r,u.g,u.b,u.a);var f=n.paint.get(&quot;hillshade-highlight-color&quot;);a.uniform4f(s.uniforms.u_highlight,f.r,f.g,f.b,f.a);var h=n.paint.get(&quot;hillshade-accent-color&quot;);if(a.uniform4f(s.uniforms.u_accent,h.r,h.g,h.b,h.a),r.maskedBoundsBuffer&amp;&amp;r.maskedIndexBuffer&amp;&amp;r.segments)s.draw(i,a.TRIANGLES,n.id,r.maskedBoundsBuffer,r.maskedIndexBuffer,r.segments);else{var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,s,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length)}}}function Tr(e,r,n){var i=e.context,a=i.gl;if(r.dem&amp;&amp;r.dem.level){var o=r.dem.level.dim,s=r.dem.getPixels();if(i.activeTexture.set(a.TEXTURE1),i.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(r.tileSize),r.demTexture){var l=r.demTexture;l.update(s,{premultiply:!1}),l.bind(a.NEAREST,a.CLAMP_TO_EDGE)}else r.demTexture=new z(i,s,a.RGBA,{premultiply:!1}),r.demTexture.bind(a.NEAREST,a.CLAMP_TO_EDGE);i.activeTexture.set(a.TEXTURE0);var c=r.fbo;if(!c){var u=new z(i,{width:o,height:o,data:null},a.RGBA);u.bind(a.LINEAR,a.CLAMP_TO_EDGE),(c=r.fbo=i.createFramebuffer(o,o)).colorAttachment.set(u.texture)}i.bindFramebuffer.set(c.framebuffer),i.viewport.set([0,0,o,o]);var f=t.mat4.create();t.mat4.ortho(f,0,t.default$8,-t.default$8,0,0,1),t.mat4.translate(f,f,[0,-t.default$8,0]);var h=e.useProgram(&quot;hillshadePrepare&quot;);a.uniformMatrix4fv(h.uniforms.u_matrix,!1,f),a.uniform1f(h.uniforms.u_zoom,r.tileID.overscaledZ),a.uniform2fv(h.uniforms.u_dimension,[2*o,2*o]),a.uniform1i(h.uniforms.u_image,1),a.uniform1f(h.uniforms.u_maxzoom,n);var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,h,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length),r.needsHillshadePrepare=!1}}function Sr(e,r,n,i,o){var s=i.paint.get(&quot;raster-fade-duration&quot;);if(s&gt;0){var l=a.now(),c=(l-e.timeAdded)/s,u=r?(l-r.timeAdded)/s:-1,f=n.getSource(),h=o.coveringZoomLevel({tileSize:f.tileSize,roundZoom:f.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-h)&gt;Math.abs(e.tileID.overscaledZ-h),d=p&amp;&amp;e.refreshedUponExpiration?1:t.clamp(p?c:1-u,0,1);return e.refreshedUponExpiration&amp;&amp;c&gt;=1&amp;&amp;(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}function Er(e,r,n){var i=e.context,o=i.gl;i.lineWidth.set(1*a.devicePixelRatio);var s=n.posMatrix,l=e.useProgram(&quot;debug&quot;);i.setDepthMode(qt.disabled),i.setStencilMode(Ht.disabled),i.setColorMode(e.colorModeForRenderPass()),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.uniform4f(l.uniforms.u_color,1,0,0,1),e.debugVAO.bind(i,l,e.debugBuffer,[]),o.drawArrays(o.LINE_STRIP,0,e.debugBuffer.length);for(var c=function(t,e,r,n){n=n||1;var i,a,o,s,l,c,u,f,h=[];for(i=0,a=t.length;i&lt;a;i++)if(l=Cr[t[i]]){for(f=null,o=0,s=l[1].length;o&lt;s;o+=2)-1===l[1][o]&amp;&amp;-1===l[1][o+1]?f=null:(c=e+l[1][o]*n,u=200-l[1][o+1]*n,f&amp;&amp;h.push(f.x,f.y,c,u),f={x:c,y:u});e+=l[0]*n}return h}(n.toString(),50,0,5),u=new t.PosArray,f=0;f&lt;c.length;f+=2)u.emplaceBack(c[f],c[f+1]);var h=i.createVertexBuffer(u,Ke.members);(new Q).bind(i,l,h,[]),o.uniform4f(l.uniforms.u_color,1,1,1,1);for(var p=r.getTile(n).tileSize,d=t.default$8/(Math.pow(2,e.transform.zoom-n.overscaledZ)*p),g=[[-1,-1],[-1,1],[1,-1],[1,1]],m=0;m&lt;g.length;m++){var v=g[m];o.uniformMatrix4fv(l.uniforms.u_matrix,!1,t.mat4.translate([],s,[d*v[0],d*v[1],0])),o.drawArrays(o.LINES,0,h.length)}o.uniform4f(l.uniforms.u_color,0,0,0,1),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.drawArrays(o.LINES,0,h.length)}var Cr={&quot; &quot;:[16,[]],&quot;!&quot;:[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'&quot;':[16,[4,21,4,14,-1,-1,12,21,12,14]],&quot;#&quot;:[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],&quot;%&quot;:[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],&quot;&amp;&quot;:[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],&quot;'&quot;:[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],&quot;(&quot;:[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],&quot;)&quot;:[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],&quot;*&quot;:[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],&quot;+&quot;:[26,[13,18,13,0,-1,-1,4,9,22,9]],&quot;,&quot;:[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],&quot;-&quot;:[26,[4,9,22,9]],&quot;.&quot;:[10,[5,2,4,1,5,0,6,1,5,2]],&quot;/&quot;:[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],&quot;:&quot;:[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],&quot;;&quot;:[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],&quot;&lt;&quot;:[24,[20,18,4,9,20,0]],&quot;=&quot;:[26,[4,12,22,12,-1,-1,4,6,22,6]],&quot;&gt;&quot;:[24,[4,18,20,9,4,0]],&quot;?&quot;:[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],&quot;@&quot;:[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],&quot;[&quot;:[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],&quot;\\&quot;:[14,[0,21,14,-3]],&quot;]&quot;:[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],&quot;^&quot;:[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],&quot;`&quot;:[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],&quot;{&quot;:[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],&quot;|&quot;:[8,[4,25,4,-7]],&quot;}&quot;:[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],&quot;~&quot;:[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},Lr={symbol:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass){var i=t.context;i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass()),0!==r.paint.get(&quot;icon-opacity&quot;).constantOr(1)&amp;&amp;cr(t,e,r,n,!1,r.paint.get(&quot;icon-translate&quot;),r.paint.get(&quot;icon-translate-anchor&quot;),r.layout.get(&quot;icon-rotation-alignment&quot;),r.layout.get(&quot;icon-pitch-alignment&quot;),r.layout.get(&quot;icon-keep-upright&quot;)),0!==r.paint.get(&quot;text-opacity&quot;).constantOr(1)&amp;&amp;cr(t,e,r,n,!0,r.paint.get(&quot;text-translate&quot;),r.paint.get(&quot;text-translate-anchor&quot;),r.layout.get(&quot;text-rotation-alignment&quot;),r.layout.get(&quot;text-pitch-alignment&quot;),r.layout.get(&quot;text-keep-upright&quot;)),e.map.showCollisionBoxes&amp;&amp;function(t,e,r,n){or(t,e,r,n,!1),or(t,e,r,n,!0)}(t,e,r,n)}},circle:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass){var i=r.paint.get(&quot;circle-opacity&quot;),a=r.paint.get(&quot;circle-stroke-width&quot;),o=r.paint.get(&quot;circle-stroke-opacity&quot;);if(0!==i.constantOr(1)||0!==a.constantOr(1)&amp;&amp;0!==o.constantOr(1)){var s=t.context,l=s.gl;s.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),s.setStencilMode(Ht.disabled),s.setColorMode(t.colorModeForRenderPass());for(var c=!0,u=0;u&lt;n.length;u++){var f=n[u],h=e.getTile(f),p=h.getBucket(r);if(p){var d=t.context.program.get(),g=p.programConfigurations.get(r.id),m=t.useProgram(&quot;circle&quot;,g);if((c||m.program!==d)&amp;&amp;(g.setUniforms(s,m,r.paint,{zoom:t.transform.zoom}),c=!1),l.uniform1f(m.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),l.uniform1i(m.uniforms.u_scale_with_map,&quot;map&quot;===r.paint.get(&quot;circle-pitch-scale&quot;)?1:0),&quot;map&quot;===r.paint.get(&quot;circle-pitch-alignment&quot;)){l.uniform1i(m.uniforms.u_pitch_with_map,1);var v=Te(h,1,t.transform.zoom);l.uniform2f(m.uniforms.u_extrude_scale,v,v)}else l.uniform1i(m.uniforms.u_pitch_with_map,0),l.uniform2fv(m.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);l.uniformMatrix4fv(m.uniforms.u_matrix,!1,t.translatePosMatrix(f.posMatrix,h,r.paint.get(&quot;circle-translate&quot;),r.paint.get(&quot;circle-translate-anchor&quot;))),m.draw(s,l.TRIANGLES,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,g)}}}}},heatmap:function(e,r,n,i){if(0!==n.paint.get(&quot;heatmap-opacity&quot;))if(&quot;offscreen&quot;===e.renderPass){var a=e.context,o=a.gl;a.setDepthMode(e.depthModeForSublayer(0,qt.ReadOnly)),a.setStencilMode(Ht.disabled),function(t,e,r){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=r.heatmapFbo;if(i)n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var a=n.createTexture();n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),i=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,r,n,i){var a=e.gl;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r.width/4,r.height/4,0,a.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),i.colorAttachment.set(n),e.extTextureHalfFloat&amp;&amp;a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE&amp;&amp;(e.extTextureHalfFloat=null,i.colorAttachment.setDirty(),t(e,r,n,i))}(t,e,a,i)}}(a,e,n),a.clear({color:t.default$6.transparent}),a.setColorMode(new Gt([o.ONE,o.ONE],t.default$6.transparent,[!0,!0,!0,!0]));for(var s=!0,l=0;l&lt;i.length;l++){var c=i[l];if(!r.hasRenderableParent(c)){var u=r.getTile(c),f=u.getBucket(n);if(f){var h=e.context.program.get(),p=f.programConfigurations.get(n.id),d=e.useProgram(&quot;heatmap&quot;,p),g=e.transform.zoom;(s||d.program!==h)&amp;&amp;(p.setUniforms(e.context,d,n.paint,{zoom:g}),s=!1),o.uniform1f(d.uniforms.u_extrude_scale,Te(u,1,g)),o.uniform1f(d.uniforms.u_intensity,n.paint.get(&quot;heatmap-intensity&quot;)),o.uniformMatrix4fv(d.uniforms.u_matrix,!1,c.posMatrix),d.draw(a,o.TRIANGLES,n.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,p)}}}a.viewport.set([0,0,e.width,e.height])}else&quot;translucent&quot;===e.renderPass&amp;&amp;(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var n=e.context,i=n.gl,a=r.heatmapFbo;if(a){n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1);var o=r.colorRampTexture;o||(o=r.colorRampTexture=new z(n,r.colorRamp,i.RGBA)),o.bind(i.LINEAR,i.CLAMP_TO_EDGE),n.setDepthMode(qt.disabled);var s=e.useProgram(&quot;heatmapTexture&quot;),l=r.paint.get(&quot;heatmap-opacity&quot;);i.uniform1f(s.uniforms.u_opacity,l),i.uniform1i(s.uniforms.u_image,0),i.uniform1i(s.uniforms.u_color_ramp,1);var c=t.mat4.create();t.mat4.ortho(c,0,e.width,e.height,0,0,1),i.uniformMatrix4fv(s.uniforms.u_matrix,!1,c),i.uniform2f(s.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),e.viewportVAO.bind(e.context,s,e.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n))},line:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass&amp;&amp;0!==r.paint.get(&quot;line-opacity&quot;).constantOr(1)){var i=t.context;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setColorMode(t.colorModeForRenderPass());for(var a,o=r.paint.get(&quot;line-dasharray&quot;)?&quot;lineSDF&quot;:r.paint.get(&quot;line-pattern&quot;)?&quot;linePattern&quot;:r.paint.get(&quot;line-gradient&quot;)?&quot;lineGradient&quot;:&quot;line&quot;,s=!0,l=0,c=n;l&lt;c.length;l+=1){var u=c[l],f=e.getTile(u),h=f.getBucket(r);if(h){var p=h.programConfigurations.get(r.id),d=t.context.program.get(),g=t.useProgram(o,p),m=s||g.program!==d,v=a!==f.tileID.overscaledZ;m&amp;&amp;p.setUniforms(t.context,g,r.paint,{zoom:t.transform.zoom}),pr(g,t,f,h,r,u,p,m,v),a=f.tileID.overscaledZ,s=!1}}}},fill:function(e,r,n,i){var a=n.paint.get(&quot;fill-color&quot;),o=n.paint.get(&quot;fill-opacity&quot;);if(0!==o.constantOr(1)){var s=e.context;s.setColorMode(e.colorModeForRenderPass());var l=n.paint.get(&quot;fill-pattern&quot;)||1!==a.constantOr(t.default$6.transparent).a||1!==o.constantOr(0)?&quot;translucent&quot;:&quot;opaque&quot;;e.renderPass===l&amp;&amp;(s.setDepthMode(e.depthModeForSublayer(1,&quot;opaque&quot;===e.renderPass?qt.ReadWrite:qt.ReadOnly)),vr(e,r,n,i,yr)),&quot;translucent&quot;===e.renderPass&amp;&amp;n.paint.get(&quot;fill-antialias&quot;)&amp;&amp;(s.lineWidth.set(2),s.setDepthMode(e.depthModeForSublayer(n.getPaintProperty(&quot;fill-outline-color&quot;)?2:0,qt.ReadOnly)),vr(e,r,n,i,xr))}},&quot;fill-extrusion&quot;:function(e,r,n,i){if(0!==n.paint.get(&quot;fill-extrusion-opacity&quot;))if(&quot;offscreen&quot;===e.renderPass){!function(e,r){var n=e.context,i=n.gl,a=r.viewportFrame;if(e.depthRboNeedsClear&amp;&amp;e.setupOffscreenDepthRenderbuffer(),!a){var o=new z(n,{width:e.width,height:e.height,data:null},i.RGBA);o.bind(i.LINEAR,i.CLAMP_TO_EDGE),(a=r.viewportFrame=n.createFramebuffer(e.width,e.height)).colorAttachment.set(o.texture)}n.bindFramebuffer.set(a.framebuffer),a.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&amp;&amp;(n.clear({depth:1}),e.depthRboNeedsClear=!1),n.clear({color:t.default$6.transparent}),n.setStencilMode(Ht.disabled),n.setDepthMode(new qt(i.LEQUAL,qt.ReadWrite,[0,1])),n.setColorMode(e.colorModeForRenderPass())}(e,n);for(var a=!0,o=0,s=i;o&lt;s.length;o+=1){var l=s[o],c=r.getTile(l),u=c.getBucket(n);u&amp;&amp;(Mr(e,0,n,c,l,u,a),a=!1)}}else&quot;translucent&quot;===e.renderPass&amp;&amp;function(t,e){var r=e.viewportFrame;if(r){var n=t.context,i=n.gl,a=t.useProgram(&quot;extrusionTexture&quot;);n.setStencilMode(Ht.disabled),n.setDepthMode(qt.disabled),n.setColorMode(t.colorModeForRenderPass()),n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.colorAttachment.get()),i.uniform1f(a.uniforms.u_opacity,e.paint.get(&quot;fill-extrusion-opacity&quot;)),i.uniform1i(a.uniforms.u_image,0);var o=wr.create();wr.ortho(o,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(a.uniforms.u_matrix,!1,o),i.uniform2f(a.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),t.viewportVAO.bind(n,a,t.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n)},hillshade:function(t,e,r,n){if(&quot;offscreen&quot;===t.renderPass||&quot;translucent&quot;===t.renderPass){var i=t.context,a=e.getSource().maxzoom;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass());for(var o=0,s=n;o&lt;s.length;o+=1){var l=s[o],c=e.getTile(l);c.needsHillshadePrepare&amp;&amp;&quot;offscreen&quot;===t.renderPass?Tr(t,c,a):&quot;translucent&quot;===t.renderPass&amp;&amp;Ar(t,c,r)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,n){if(&quot;translucent&quot;===t.renderPass&amp;&amp;0!==r.paint.get(&quot;raster-opacity&quot;)){var i,a,o=t.context,s=o.gl,l=e.getSource(),c=t.useProgram(&quot;raster&quot;);o.setStencilMode(Ht.disabled),o.setColorMode(t.colorModeForRenderPass()),s.uniform1f(c.uniforms.u_brightness_low,r.paint.get(&quot;raster-brightness-min&quot;)),s.uniform1f(c.uniforms.u_brightness_high,r.paint.get(&quot;raster-brightness-max&quot;)),s.uniform1f(c.uniforms.u_saturation_factor,(i=r.paint.get(&quot;raster-saturation&quot;))&gt;0?1-1/(1.001-i):-i),s.uniform1f(c.uniforms.u_contrast_factor,(a=r.paint.get(&quot;raster-contrast&quot;))&gt;0?1/(1-a):1+a),s.uniform3fv(c.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(r.paint.get(&quot;raster-hue-rotate&quot;))),s.uniform1f(c.uniforms.u_buffer_scale,1),s.uniform1i(c.uniforms.u_image0,0),s.uniform1i(c.uniforms.u_image1,1);for(var u=n.length&amp;&amp;n[0].overscaledZ,f=0,h=n;f&lt;h.length;f+=1){var p=h[f];o.setDepthMode(t.depthModeForSublayer(p.overscaledZ-u,1===r.paint.get(&quot;raster-opacity&quot;)?qt.ReadWrite:qt.ReadOnly,s.LESS));var d=e.getTile(p),g=t.transform.calculatePosMatrix(p.toUnwrapped(),!0);d.registerFadeDuration(r.paint.get(&quot;raster-fade-duration&quot;)),s.uniformMatrix4fv(c.uniforms.u_matrix,!1,g);var m=e.findLoadedParent(p,0,{}),v=Sr(d,m,e,r,t.transform),y=void 0,x=void 0;if(o.activeTexture.set(s.TEXTURE0),d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),o.activeTexture.set(s.TEXTURE1),m?(m.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),y=Math.pow(2,m.tileID.overscaledZ-d.tileID.overscaledZ),x=[d.tileID.canonical.x*y%1,d.tileID.canonical.y*y%1]):d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),s.uniform2fv(c.uniforms.u_tl_parent,x||[0,0]),s.uniform1f(c.uniforms.u_scale_parent,y||1),s.uniform1f(c.uniforms.u_fade_t,v.mix),s.uniform1f(c.uniforms.u_opacity,v.opacity*r.paint.get(&quot;raster-opacity&quot;)),l instanceof tt){var b=l.boundsBuffer;l.boundsVAO.bind(o,c,b,[]),s.drawArrays(s.TRIANGLE_STRIP,0,b.length)}else if(d.maskedBoundsBuffer&amp;&amp;d.maskedIndexBuffer&amp;&amp;d.segments)c.draw(o,s.TRIANGLES,r.id,d.maskedBoundsBuffer,d.maskedIndexBuffer,d.segments);else{var _=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(o,c,_,[]),s.drawArrays(s.TRIANGLE_STRIP,0,_.length)}}}},background:function(t,e,r){var n=r.paint.get(&quot;background-color&quot;),i=r.paint.get(&quot;background-opacity&quot;);if(0!==i){var a=t.context,o=a.gl,s=t.transform,l=s.tileSize,c=r.paint.get(&quot;background-pattern&quot;),u=c||1!==n.a||1!==i?&quot;translucent&quot;:&quot;opaque&quot;;if(t.renderPass===u){var f;if(a.setStencilMode(Ht.disabled),a.setDepthMode(t.depthModeForSublayer(0,&quot;opaque&quot;===u?qt.ReadWrite:qt.ReadOnly)),a.setColorMode(t.colorModeForRenderPass()),c){if(dr(c,t))return;f=t.useProgram(&quot;backgroundPattern&quot;),gr(c,t,f),t.tileExtentPatternVAO.bind(a,f,t.tileExtentBuffer,[])}else f=t.useProgram(&quot;background&quot;),o.uniform4fv(f.uniforms.u_color,[n.r,n.g,n.b,n.a]),t.tileExtentVAO.bind(a,f,t.tileExtentBuffer,[]);o.uniform1f(f.uniforms.u_opacity,i);for(var h=0,p=s.coveringTiles({tileSize:l});h&lt;p.length;h+=1){var d=p[h];c&amp;&amp;mr({tileID:d,tileSize:l},t,f),o.uniformMatrix4fv(f.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(d.toUnwrapped())),o.drawArrays(o.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}},debug:function(t,e,r){for(var n=0;n&lt;r.length;n++)Er(t,e,r[n])}},zr=function(e,r){this.context=new Wt(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=Yt.maxUnderzooming+Yt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.default$24,this.crossTileSymbolIndex=new Ye};function Pr(t,e){if(t.row&gt;e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function Or(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&amp;&amp;t.y0===e.y0?t.x0+e.dy/t.dy*t.dx&lt;e.x1:t.x1-e.dy/t.dy*t.dx&lt;e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,c=e.dx/e.dy,u=t.dx&gt;0,f=e.dx&lt;0,h=a;h&lt;o;h++){var p=l*Math.max(0,Math.min(t.dy,h+u-t.y0))+t.x0,d=c*Math.max(0,Math.min(e.dy,h+f-e.y0))+e.x0;i(Math.floor(d),Math.ceil(p),h)}}function Ir(t,e,r,n,i,a){var o,s=Pr(t,e),l=Pr(e,r),c=Pr(r,t);s.dy&gt;l.dy&amp;&amp;(o=s,s=l,l=o),s.dy&gt;c.dy&amp;&amp;(o=s,s=c,c=o),l.dy&gt;c.dy&amp;&amp;(o=l,l=c,c=o),s.dy&amp;&amp;Or(c,s,n,i,a),l.dy&amp;&amp;Or(c,l,n,i,a)}zr.prototype.resize=function(t,e){var r=this.context.gl;if(this.width=t*a.devicePixelRatio,this.height=e*a.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n&lt;i.length;n+=1){var o=i[n];this.style._layers[o].resize()}this.depthRbo&amp;&amp;(r.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},zr.prototype.setup=function(){var e=this.context,r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(t.default$8,0),r.emplaceBack(0,t.default$8),r.emplaceBack(t.default$8,t.default$8),this.tileExtentBuffer=e.createVertexBuffer(r,Ke.members),this.tileExtentVAO=new Q,this.tileExtentPatternVAO=new Q;var n=new t.PosArray;n.emplaceBack(0,0),n.emplaceBack(t.default$8,0),n.emplaceBack(t.default$8,t.default$8),n.emplaceBack(0,t.default$8),n.emplaceBack(0,0),this.debugBuffer=e.createVertexBuffer(n,Ke.members),this.debugVAO=new Q;var i=new t.RasterBoundsArray;i.emplaceBack(0,0,0,0),i.emplaceBack(t.default$8,0,t.default$8,0),i.emplaceBack(0,t.default$8,0,t.default$8),i.emplaceBack(t.default$8,t.default$8,t.default$8,t.default$8),this.rasterBoundsBuffer=e.createVertexBuffer(i,K.members),this.rasterBoundsVAO=new Q;var a=new t.PosArray;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,Ke.members),this.viewportVAO=new Q},zr.prototype.clearStencil=function(){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled),e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},0,255,r.ZERO,r.ZERO,r.ZERO));var n=t.mat4.create();t.mat4.ortho(n,0,this.width,this.height,0,0,1),t.mat4.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]);var i=this.useProgram(&quot;clippingMask&quot;);r.uniformMatrix4fv(i.uniforms.u_matrix,!1,n),this.viewportVAO.bind(e,i,this.viewportBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,4)},zr.prototype._renderTileClippingMasks=function(t){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled);var n=1;this._tileClippingMaskIDs={};for(var i=0,a=t;i&lt;a.length;i+=1){var o=a[i],s=this._tileClippingMaskIDs[o.key]=n++;e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},s,255,r.KEEP,r.KEEP,r.REPLACE));var l=this.useProgram(&quot;clippingMask&quot;);r.uniformMatrix4fv(l.uniforms.u_matrix,!1,o.posMatrix),this.tileExtentVAO.bind(this.context,l,this.tileExtentBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}},zr.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Ht({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},zr.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Gt([e.CONSTANT_COLOR,e.ONE],new t.default$6(1/8,1/8,1/8,0),[!0,!0,!0,!0]):&quot;opaque&quot;===this.renderPass?Gt.unblended:Gt.alphaBlended},zr.prototype.depthModeForSublayer=function(t,e,r){var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,i=n-1+this.depthRange;return new qt(r||this.context.gl.LEQUAL,e,[i,n])},zr.prototype.render=function(e,r){var n=this;for(var i in this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(a.now()),e.sourceCaches){var o=n.style.sourceCaches[i];o.used&amp;&amp;o.prepare(n.context)}var s=this.style._order,l=t.filterObject(this.style.sourceCaches,function(t){return&quot;raster&quot;===t.getSource().type||&quot;raster-dem&quot;===t.getSource().type}),c=function(e){var r=l[e];!function(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i&lt;n.length;i++){var a={},o=n[i],s=n.slice(i+1);ar(o.tileID.wrapped(),o.tileID,s,new t.OverscaledTileID(0,o.tileID.wrap+1,0,0,0),a),o.setMask(a,r)}}(r.getVisibleCoordinates().map(function(t){return r.getTile(t)}),n.context)};for(var u in l)c(u);this.renderPass=&quot;offscreen&quot;;var f,h=[];this.depthRboNeedsClear=!0;for(var p=0;p&lt;s.length;p++){var d=n.style._layers[s[p]];d.hasOffscreenPass()&amp;&amp;!d.isHidden(n.transform.zoom)&amp;&amp;(d.source!==(f&amp;&amp;f.id)&amp;&amp;(h=[],(f=n.style.sourceCaches[d.source])&amp;&amp;(h=f.getVisibleCoordinates()).reverse()),h.length&amp;&amp;n.renderLayer(n,f,d,h))}this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.default$6.black:t.default$6.transparent,depth:1}),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass=&quot;opaque&quot;;var g,m=[];for(this.currentLayer=s.length-1,this.currentLayer;this.currentLayer&gt;=0;this.currentLayer--){var v=n.style._layers[s[n.currentLayer]];v.source!==(g&amp;&amp;g.id)&amp;&amp;(m=[],(g=n.style.sourceCaches[v.source])&amp;&amp;(n.clearStencil(),m=g.getVisibleCoordinates(),g.getSource().isTileClipped&amp;&amp;n._renderTileClippingMasks(m))),n.renderLayer(n,g,v,m)}this.renderPass=&quot;translucent&quot;;var y,x=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer&lt;s.length;this.currentLayer++){var b=n.style._layers[s[n.currentLayer]];b.source!==(y&amp;&amp;y.id)&amp;&amp;(x=[],(y=n.style.sourceCaches[b.source])&amp;&amp;(n.clearStencil(),x=y.getVisibleCoordinates(),y.getSource().isTileClipped&amp;&amp;n._renderTileClippingMasks(x)),x.reverse()),n.renderLayer(n,y,b,x)}if(this.options.showTileBoundaries){var _=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];_&amp;&amp;Lr.debug(this,_,_.getVisibleCoordinates())}},zr.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},zr.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||(&quot;background&quot;===r.type||n.length)&amp;&amp;(this.id=r.id,Lr[r.type](t,e,r,n))},zr.prototype.translatePosMatrix=function(e,r,n,i,a){if(!n[0]&amp;&amp;!n[1])return e;var o=a?&quot;map&quot;===i?this.transform.angle:0:&quot;viewport&quot;===i?-this.transform.angle:0;if(o){var s=Math.sin(o),l=Math.cos(o);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var c=[a?n[0]:Te(r,n[0],this.transform.zoom),a?n[1]:Te(r,n[1],this.transform.zoom),0],u=new Float32Array(16);return t.mat4.translate(u,e,c),u},zr.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},zr.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&amp;&amp;e.length&gt;0?e.pop():null},zr.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=&quot;&quot;+t+(e.cacheKey||&quot;&quot;)+(this._showOverdrawInspector?&quot;/overdraw&quot;:&quot;&quot;);return this.cache[r]||(this.cache[r]=new ir(this.context,nr[t],e,this._showOverdrawInspector)),this.cache[r]},zr.prototype.useProgram=function(t,e){var r=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(r.program),r};var Dr=t.default$20.vec4,Rr=t.default$20.mat4,Br=t.default$20.mat2,Fr=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new G(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},Nr={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};Fr.prototype.clone=function(){var t=new Fr(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Nr.minZoom.get=function(){return this._minZoom},Nr.minZoom.set=function(t){this._minZoom!==t&amp;&amp;(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Nr.maxZoom.get=function(){return this._maxZoom},Nr.maxZoom.set=function(t){this._maxZoom!==t&amp;&amp;(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Nr.renderWorldCopies.get=function(){return this._renderWorldCopies},Nr.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&amp;&amp;(t=!1),this._renderWorldCopies=t},Nr.worldSize.get=function(){return this.tileSize*this.scale},Nr.centerPoint.get=function(){return this.size._div(2)},Nr.size.get=function(){return new t.default$1(this.width,this.height)},Nr.bearing.get=function(){return-this.angle/Math.PI*180},Nr.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&amp;&amp;(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=Br.create(),Br.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Nr.pitch.get=function(){return this._pitch/Math.PI*180},Nr.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&amp;&amp;(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Nr.fov.get=function(){return this._fov/Math.PI*180},Nr.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&amp;&amp;(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Nr.zoom.get=function(){return this._zoom},Nr.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&amp;&amp;(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Nr.center.get=function(){return this._center},Nr.center.set=function(t){t.lat===this._center.lat&amp;&amp;t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Fr.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Fr.prototype.getVisibleUnwrappedCoordinates=function(e){var r=this.pointCoordinate(new t.default$1(0,0),0),n=this.pointCoordinate(new t.default$1(this.width,0),0),i=Math.floor(r.column),a=Math.floor(n.column),o=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var s=i;s&lt;=a;s++)0!==s&amp;&amp;o.push(new t.UnwrappedTileID(s,e));return o},Fr.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&amp;&amp;r&lt;e.minzoom)return[];void 0!==e.maxzoom&amp;&amp;r&gt;e.maxzoom&amp;&amp;(r=e.maxzoom);var i=this.pointCoordinate(this.centerPoint,r),a=new t.default$1(i.column-.5,i.row-.5);return function(e,r,n,i){void 0===i&amp;&amp;(i=!0);var a=1&lt;&lt;e,o={};function s(r,s,l){var c,u,f,h;if(l&gt;=0&amp;&amp;l&lt;=a)for(c=r;c&lt;s;c++)u=Math.floor(c/a),f=(c%a+a)%a,0!==u&amp;&amp;!0!==i||(h=new t.OverscaledTileID(n,u,e,f,l),o[h.key]=h)}return Ir(r[0],r[1],r[2],0,a,s),Ir(r[2],r[3],r[0],0,a,s),Object.keys(o).map(function(t){return o[t]})}(r,[this.pointCoordinate(new t.default$1(0,0),r),this.pointCoordinate(new t.default$1(this.width,0),r),this.pointCoordinate(new t.default$1(this.width,this.height),r),this.pointCoordinate(new t.default$1(0,this.height),r)],e.reparseOverscaled?n:r,this._renderWorldCopies).sort(function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)})},Fr.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Nr.unmodified.get=function(){return this._unmodified},Fr.prototype.zoomScale=function(t){return Math.pow(2,t)},Fr.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Fr.prototype.project=function(e){return new t.default$1(this.lngX(e.lng),this.latY(e.lat))},Fr.prototype.unproject=function(t){return new G(this.xLng(t.x),this.yLat(t.y))},Nr.x.get=function(){return this.lngX(this.center.lng)},Nr.y.get=function(){return this.latY(this.center.lat)},Nr.point.get=function(){return new t.default$1(this.x,this.y)},Fr.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Fr.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},Fr.prototype.xLng=function(t){return 360*t/this.worldSize-180},Fr.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},Fr.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&amp;&amp;(this.center=this.center.wrap())},Fr.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Fr.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Fr.prototype.locationCoordinate=function(e){return new t.default$17(this.lngX(e.lng)/this.tileSize,this.latY(e.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Fr.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new G(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},Fr.prototype.pointCoordinate=function(e,r){void 0===r&amp;&amp;(r=this.tileZoom);var n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];Dr.transformMat4(n,n,this.pixelMatrixInverse),Dr.transformMat4(i,i,this.pixelMatrixInverse);var a=n[3],o=i[3],s=n[0]/a,l=i[0]/o,c=n[1]/a,u=i[1]/o,f=n[2]/a,h=i[2]/o,p=f===h?0:(0-f)/(h-f);return new t.default$17(t.number(s,l,p)/this.tileSize,t.number(c,u,p)/this.tileSize,this.zoom)._zoomTo(r)},Fr.prototype.coordinatePoint=function(e){var r=e.zoomTo(this.zoom),n=[r.column*this.tileSize,r.row*this.tileSize,0,1];return Dr.transformMat4(n,n,this.pixelMatrix),new t.default$1(n[0]/n[3],n[1]/n[3])},Fr.prototype.calculatePosMatrix=function(e,r){void 0===r&amp;&amp;(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=Rr.identity(new Float64Array(16));return Rr.translate(l,l,[s*o,a.y*o,0]),Rr.scale(l,l,[o/t.default$8,o/t.default$8,1]),Rr.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},Fr.prototype._constrain=function(){if(this.center&amp;&amp;this.width&amp;&amp;this.height&amp;&amp;!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var f=this.latRange;a=this.latY(f[1]),e=(o=this.latY(f[0]))-a&lt;c.y?c.y/(o-a):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),r=(l=this.lngX(h[1]))-s&lt;c.x?c.x/(l-s):0}var p=Math.max(r||0,e||0);if(p)return this.center=this.unproject(new t.default$1(r?(l+s)/2:this.x,e?(o+a)/2:this.y)),this.zoom+=this.scaleZoom(p),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var d=this.y,g=c.y/2;d-g&lt;a&amp;&amp;(i=a+g),d+g&gt;o&amp;&amp;(i=o-g)}if(this.lngRange){var m=this.x,v=c.x/2;m-v&lt;s&amp;&amp;(n=s+v),m+v&gt;l&amp;&amp;(n=l-v)}void 0===n&amp;&amp;void 0===i||(this.center=this.unproject(new t.default$1(void 0!==n?n:this.x,void 0!==i?i:this.y))),this._unmodified=u,this._constraining=!1}},Fr.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),n=this.x,i=this.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),o=new Float64Array(16);Rr.perspective(o,this._fov,this.width/this.height,1,a),Rr.scale(o,o,[1,-1,1]),Rr.translate(o,o,[0,0,-this.cameraToCenterDistance]),Rr.rotateX(o,o,this._pitch),Rr.rotateZ(o,o,this.angle),Rr.translate(o,o,[-n,-i,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));Rr.scale(o,o,[1,1,s,1]),this.projMatrix=o;var l=this.width%2/2,c=this.height%2/2,u=Math.cos(this.angle),f=Math.sin(this.angle),h=n-Math.round(n)+u*l+f*c,p=i-Math.round(i)+u*c+f*l,d=new Float64Array(o);if(Rr.translate(d,d,[h&gt;.5?h-1:h,p&gt;.5?p-1:p,0]),this.alignedProjMatrix=d,o=Rr.create(),Rr.scale(o,o,[this.width/2,-this.height/2,1]),Rr.translate(o,o,[1,-1,0]),this.pixelMatrix=Rr.multiply(new Float64Array(16),o,this.projMatrix),!(o=Rr.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(&quot;failed to invert matrix&quot;);this.pixelMatrixInverse=o,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Fr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.default$1(0,0)).zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return Dr.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(Fr.prototype,Nr);var jr=function(){var e,r,n,i;t.bindAll([&quot;_onHashChange&quot;,&quot;_updateHash&quot;],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),300,r=!1,n=0,i=function(){n=0,r&amp;&amp;(e(),n=setTimeout(i,300),r=!1)},function(){return r=!0,n||i(),n})};jr.prototype.addTo=function(e){return this._map=e,t.default.addEventListener(&quot;hashchange&quot;,this._onHashChange,!1),this._map.on(&quot;moveend&quot;,this._updateHash),this},jr.prototype.remove=function(){return t.default.removeEventListener(&quot;hashchange&quot;,this._onHashChange,!1),this._map.off(&quot;moveend&quot;,this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},jr.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),a=Math.round(e.lng*i)/i,o=Math.round(e.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch(),c=&quot;&quot;;return c+=t?&quot;#/&quot;+a+&quot;/&quot;+o+&quot;/&quot;+r:&quot;#&quot;+r+&quot;/&quot;+o+&quot;/&quot;+a,(s||l)&amp;&amp;(c+=&quot;/&quot;+Math.round(10*s)/10),l&amp;&amp;(c+=&quot;/&quot;+Math.round(l)),c},jr.prototype._onHashChange=function(){var e=t.default.location.hash.replace(&quot;#&quot;,&quot;&quot;).split(&quot;/&quot;);return e.length&gt;=3&amp;&amp;(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},jr.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.default.history.replaceState(t.default.history.state,&quot;&quot;,e)};var Vr=function(e){function r(r,n,i,a){void 0===a&amp;&amp;(a={});var o=s.mousePos(n.getCanvasContainer(),i),l=n.unproject(o);e.call(this,r,t.extend({point:o,lngLat:l,originalEvent:i},a)),this._defaultPrevented=!1,this.target=n}e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),Ur=function(e){function r(r,n,i){var a=s.touchPos(n.getCanvasContainer(),i),o=a.map(function(t){return n.unproject(t)}),l=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.default$1(0,0)),c=n.unproject(l);e.call(this,r,{points:a,point:l,lngLats:o,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),qr=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Hr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll([&quot;_onWheel&quot;,&quot;_onTimeout&quot;,&quot;_onScrollFrame&quot;,&quot;_onScrollFinished&quot;],this)};Hr.prototype.isEnabled=function(){return!!this._enabled},Hr.prototype.isActive=function(){return!!this._active},Hr.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&amp;&amp;&quot;center&quot;===t.around)},Hr.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._enabled=!1)},Hr.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.default.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=a.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&amp;&amp;r%4.000244140625==0?this._type=&quot;wheel&quot;:0!==r&amp;&amp;Math.abs(r)&lt;4?this._type=&quot;trackpad&quot;:i&gt;400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)&lt;200?&quot;trackpad&quot;:&quot;wheel&quot;,this._timeout&amp;&amp;(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&amp;&amp;r&amp;&amp;(r/=4),this._type&amp;&amp;(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},Hr.prototype._onTimeout=function(t){this._type=&quot;wheel&quot;,this._delta-=this._lastValue,this.isActive()||this._start(t)},Hr.prototype._start=function(e){if(this._delta){this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event(&quot;movestart&quot;,{originalEvent:e})),this._map.fire(new t.Event(&quot;zoomstart&quot;,{originalEvent:e})),this._finishTimeout&amp;&amp;clearTimeout(this._finishTimeout);var r=s.mousePos(this._el,e);this._around=G.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},Hr.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n=&quot;wheel&quot;===this._type&amp;&amp;Math.abs(this._delta)&gt;4.000244140625?1/450:.01,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta&lt;0&amp;&amp;0!==i&amp;&amp;(i=1/i);var o=&quot;number&quot;==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),&quot;wheel&quot;===this._type&amp;&amp;(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var s=!1;if(&quot;wheel&quot;===this._type){var l=Math.min((a.now()-this._lastWheelEventTime)/200,1),c=this._easing(l);r.zoom=t.number(this._startZoom,this._targetZoom,c),l&lt;1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):s=!0}else r.zoom=this._targetZoom,s=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event(&quot;move&quot;,{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event(&quot;zoom&quot;,{originalEvent:this._lastWheelEvent})),s&amp;&amp;(this._active=!1,this._finishTimeout=setTimeout(function(){e._map.fire(new t.Event(&quot;zoomend&quot;,{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event(&quot;moveend&quot;,{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},Hr.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(a.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),s=.27/Math.sqrt(o*o+1e-4)*.01,l=Math.sqrt(.0729-s*s);r=t.bezier(s,l,.25,1)}return this._prevEase={start:a.now(),duration:e,easing:r},r};var Gr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),t.bindAll([&quot;_onMouseMove&quot;,&quot;_onMouseUp&quot;,&quot;_onKeyDown&quot;],this)};Gr.prototype.isEnabled=function(){return!!this._enabled},Gr.prototype.isActive=function(){return!!this._active},Gr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Gr.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._enabled=!1)},Gr.prototype.onMouseDown=function(e){this.isEnabled()&amp;&amp;e.shiftKey&amp;&amp;0===e.button&amp;&amp;(t.default.document.addEventListener(&quot;mousemove&quot;,this._onMouseMove,!1),t.default.document.addEventListener(&quot;keydown&quot;,this._onKeyDown,!1),t.default.document.addEventListener(&quot;mouseup&quot;,this._onMouseUp,!1),s.disableDrag(),this._startPos=s.mousePos(this._el,e),this._active=!0)},Gr.prototype._onMouseMove=function(t){var e=this._startPos,r=s.mousePos(this._el,t);this._box||(this._box=s.create(&quot;div&quot;,&quot;mapboxgl-boxzoom&quot;,this._container),this._container.classList.add(&quot;mapboxgl-crosshair&quot;),this._fireEvent(&quot;boxzoomstart&quot;,t));var n=Math.min(e.x,r.x),i=Math.max(e.x,r.x),a=Math.min(e.y,r.y),o=Math.max(e.y,r.y);s.setTransform(this._box,&quot;translate(&quot;+n+&quot;px,&quot;+a+&quot;px)&quot;),this._box.style.width=i-n+&quot;px&quot;,this._box.style.height=o-a+&quot;px&quot;},Gr.prototype._onMouseUp=function(e){if(0===e.button){var r=this._startPos,n=s.mousePos(this._el,e),i=(new W).extend(this._map.unproject(r)).extend(this._map.unproject(n));this._finish(),s.suppressClick(),r.x===n.x&amp;&amp;r.y===n.y?this._fireEvent(&quot;boxzoomcancel&quot;,e):this._map.fitBounds(i,{linear:!0}).fire(new t.Event(&quot;boxzoomend&quot;,{originalEvent:e,boxZoomBounds:i}))}},Gr.prototype._onKeyDown=function(t){27===t.keyCode&amp;&amp;(this._finish(),this._fireEvent(&quot;boxzoomcancel&quot;,t))},Gr.prototype._finish=function(){this._active=!1,t.default.document.removeEventListener(&quot;mousemove&quot;,this._onMouseMove,!1),t.default.document.removeEventListener(&quot;keydown&quot;,this._onKeyDown,!1),t.default.document.removeEventListener(&quot;mouseup&quot;,this._onMouseUp,!1),this._container.classList.remove(&quot;mapboxgl-crosshair&quot;),this._box&amp;&amp;(s.remove(this._box),this._box=null),s.enableDrag()},Gr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Wr=t.bezier(0,0,.25,1),Yr=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state=&quot;disabled&quot;,this._button=r.button||&quot;right&quot;,this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll([&quot;_onMouseMove&quot;,&quot;_onMouseUp&quot;,&quot;_onBlur&quot;,&quot;_onDragFrame&quot;],this)};Yr.prototype.isEnabled=function(){return&quot;disabled&quot;!==this._state},Yr.prototype.isActive=function(){return&quot;active&quot;===this._state},Yr.prototype.enable=function(){this.isEnabled()||(this._state=&quot;enabled&quot;)},Yr.prototype.disable=function(){if(this.isEnabled())switch(this._state){case&quot;active&quot;:this._state=&quot;disabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;rotateend&quot;),this._pitchWithRotate&amp;&amp;this._fireEvent(&quot;pitchend&quot;),this._fireEvent(&quot;moveend&quot;);break;case&quot;pending&quot;:this._state=&quot;disabled&quot;,this._unbind();break;default:this._state=&quot;disabled&quot;}},Yr.prototype.onMouseDown=function(e){if(&quot;enabled&quot;===this._state){if(&quot;right&quot;===this._button){if(this._eventButton=s.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==s.mouseButton(e))return;this._eventButton=0}s.disableDrag(),t.default.document.addEventListener(&quot;mousemove&quot;,this._onMouseMove,{capture:!0}),t.default.document.addEventListener(&quot;mouseup&quot;,this._onMouseUp),t.default.addEventListener(&quot;blur&quot;,this._onBlur),this._state=&quot;pending&quot;,this._inertia=[[a.now(),this._map.getBearing()]],this._previousPos=s.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},Yr.prototype._onMouseMove=function(t){this._lastMoveEvent=t,this._pos=s.mousePos(this._el,t),&quot;pending&quot;===this._state&amp;&amp;(this._state=&quot;active&quot;,this._fireEvent(&quot;rotatestart&quot;,t),this._fireEvent(&quot;movestart&quot;,t),this._pitchWithRotate&amp;&amp;this._fireEvent(&quot;pitchstart&quot;,t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Yr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform,r=this._previousPos,n=this._pos,i=.8*(r.x-n.x),o=-.5*(r.y-n.y),s=e.bearing-i,l=e.pitch-o,c=this._inertia,u=c[c.length-1];this._drainInertiaBuffer(),c.push([a.now(),this._map._normalizeBearing(s,u[1])]),e.bearing=s,this._pitchWithRotate&amp;&amp;(this._fireEvent(&quot;pitch&quot;,t),e.pitch=l),this._fireEvent(&quot;rotate&quot;,t),this._fireEvent(&quot;move&quot;,t),delete this._lastMoveEvent,this._previousPos=this._pos}},Yr.prototype._onMouseUp=function(t){if(s.mouseButton(t)===this._eventButton)switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,s.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Yr.prototype._onBlur=function(t){switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;rotateend&quot;,t),this._pitchWithRotate&amp;&amp;this._fireEvent(&quot;pitchend&quot;,t),this._fireEvent(&quot;moveend&quot;,t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Yr.prototype._unbind=function(){t.default.document.removeEventListener(&quot;mousemove&quot;,this._onMouseMove,{capture:!0}),t.default.document.removeEventListener(&quot;mouseup&quot;,this._onMouseUp),t.default.removeEventListener(&quot;blur&quot;,this._onBlur),s.enableDrag()},Yr.prototype._deactivate=function(){this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos},Yr.prototype._inertialRotate=function(t){var e=this;this._fireEvent(&quot;rotateend&quot;,t),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),i=this._inertia,a=function(){Math.abs(n)&lt;e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent(&quot;moveend&quot;,t),e._pitchWithRotate&amp;&amp;e._fireEvent(&quot;pitchend&quot;,t)};if(i.length&lt;2)a();else{var o=i[0],s=i[i.length-1],l=i[i.length-2],c=r._normalizeBearing(n,l[1]),u=s[1]-o[1],f=u&lt;0?-1:1,h=(s[0]-o[0])/1e3;if(0!==u&amp;&amp;0!==h){var p=Math.abs(u*(.25/h));p&gt;180&amp;&amp;(p=180);var d=p/180;c+=f*p*(d/2),Math.abs(r._normalizeBearing(c,0))&lt;this._bearingSnap&amp;&amp;(c=r._normalizeBearing(0,c)),r.rotateTo(c,{duration:1e3*d,easing:Wr,noMoveStart:!0},{originalEvent:t})}else a()}},Yr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Yr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length&gt;0&amp;&amp;e-t[0][0]&gt;160;)t.shift()};var Xr=t.bezier(0,0,.3,1),Zr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._state=&quot;disabled&quot;,t.bindAll([&quot;_onMove&quot;,&quot;_onMouseUp&quot;,&quot;_onTouchEnd&quot;,&quot;_onBlur&quot;,&quot;_onDragFrame&quot;],this)};Zr.prototype.isEnabled=function(){return&quot;disabled&quot;!==this._state},Zr.prototype.isActive=function(){return&quot;active&quot;===this._state},Zr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add(&quot;mapboxgl-touch-drag-pan&quot;),this._state=&quot;enabled&quot;)},Zr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove(&quot;mapboxgl-touch-drag-pan&quot;),this._state){case&quot;active&quot;:this._state=&quot;disabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;dragend&quot;),this._fireEvent(&quot;moveend&quot;);break;case&quot;pending&quot;:this._state=&quot;disabled&quot;,this._unbind();break;default:this._state=&quot;disabled&quot;}},Zr.prototype.onMouseDown=function(e){&quot;enabled&quot;===this._state&amp;&amp;(e.ctrlKey||0!==s.mouseButton(e)||(s.addEventListener(t.default.document,&quot;mousemove&quot;,this._onMove,{capture:!0}),s.addEventListener(t.default.document,&quot;mouseup&quot;,this._onMouseUp),this._start(e)))},Zr.prototype.onTouchStart=function(e){&quot;enabled&quot;===this._state&amp;&amp;(e.touches.length&gt;1||(s.addEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{capture:!0,passive:!1}),s.addEventListener(t.default.document,&quot;touchend&quot;,this._onTouchEnd),this._start(e)))},Zr.prototype._start=function(e){t.default.addEventListener(&quot;blur&quot;,this._onBlur),this._state=&quot;pending&quot;,this._previousPos=s.mousePos(this._el,e),this._inertia=[[a.now(),this._previousPos]]},Zr.prototype._onMove=function(t){this._lastMoveEvent=t,t.preventDefault(),this._pos=s.mousePos(this._el,t),this._drainInertiaBuffer(),this._inertia.push([a.now(),this._pos]),&quot;pending&quot;===this._state&amp;&amp;(this._state=&quot;active&quot;,this._fireEvent(&quot;dragstart&quot;,t),this._fireEvent(&quot;movestart&quot;,t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Zr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._previousPos),this._pos),this._fireEvent(&quot;drag&quot;,t),this._fireEvent(&quot;move&quot;,t),this._previousPos=this._pos,delete this._lastMoveEvent}},Zr.prototype._onMouseUp=function(t){if(0===s.mouseButton(t))switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,s.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Zr.prototype._onTouchEnd=function(t){switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,this._unbind(),this._deactivate(),this._inertialPan(t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Zr.prototype._onBlur=function(t){switch(this._state){case&quot;active&quot;:this._state=&quot;enabled&quot;,this._unbind(),this._deactivate(),this._fireEvent(&quot;dragend&quot;,t),this._fireEvent(&quot;moveend&quot;,t);break;case&quot;pending&quot;:this._state=&quot;enabled&quot;,this._unbind()}},Zr.prototype._unbind=function(){s.removeEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{capture:!0,passive:!1}),s.removeEventListener(t.default.document,&quot;touchend&quot;,this._onTouchEnd),s.removeEventListener(t.default.document,&quot;mousemove&quot;,this._onMove,{capture:!0}),s.removeEventListener(t.default.document,&quot;mouseup&quot;,this._onMouseUp),s.removeEventListener(t.default,&quot;blur&quot;,this._onBlur)},Zr.prototype._deactivate=function(){this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos,delete this._pos},Zr.prototype._inertialPan=function(t){this._fireEvent(&quot;dragend&quot;,t),this._drainInertiaBuffer();var e=this._inertia;if(e.length&lt;2)this._fireEvent(&quot;moveend&quot;,t);else{var r=e[e.length-1],n=e[0],i=r[1].sub(n[1]),a=(r[0]-n[0])/1e3;if(0===a||r[1].equals(n[1]))this._fireEvent(&quot;moveend&quot;,t);else{var o=i.mult(.3/a),s=o.mag();s&gt;1400&amp;&amp;(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:Xr,noMoveStart:!0},{originalEvent:t})}}},Zr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Zr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length&gt;0&amp;&amp;e-t[0][0]&gt;160;)t.shift()};var $r=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([&quot;_onKeyDown&quot;],this)};function Jr(t){return t*(2-t)}$r.prototype.isEnabled=function(){return!!this._enabled},$r.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(&quot;keydown&quot;,this._onKeyDown,!1),this._enabled=!0)},$r.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._el.removeEventListener(&quot;keydown&quot;,this._onKeyDown),this._enabled=!1)},$r.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,i=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:Jr,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-i,100*-a],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var Kr=function(e){this._map=e,t.bindAll([&quot;_onDblClick&quot;,&quot;_onZoomEnd&quot;],this)};Kr.prototype.isEnabled=function(){return!!this._enabled},Kr.prototype.isActive=function(){return!!this._active},Kr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Kr.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._enabled=!1)},Kr.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&amp;&amp;(t.points.length&gt;1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},Kr.prototype.onDblClick=function(t){this.isEnabled()&amp;&amp;(t.originalEvent.preventDefault(),this._zoom(t))},Kr.prototype._zoom=function(t){this._active=!0,this._map.on(&quot;zoomend&quot;,this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},Kr.prototype._onZoomEnd=function(){this._active=!1,this._map.off(&quot;zoomend&quot;,this._onZoomEnd)};var Qr=t.bezier(0,0,.15,1),tn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([&quot;_onMove&quot;,&quot;_onEnd&quot;,&quot;_onTouchFrame&quot;],this)};tn.prototype.isEnabled=function(){return!!this._enabled},tn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add(&quot;mapboxgl-touch-zoom-rotate&quot;),this._enabled=!0,this._aroundCenter=!!t&amp;&amp;&quot;center&quot;===t.around)},tn.prototype.disable=function(){this.isEnabled()&amp;&amp;(this._el.classList.remove(&quot;mapboxgl-touch-zoom-rotate&quot;),this._enabled=!1)},tn.prototype.disableRotation=function(){this._rotationDisabled=!0},tn.prototype.enableRotation=function(){this._rotationDisabled=!1},tn.prototype.onStart=function(e){if(this.isEnabled()&amp;&amp;2===e.touches.length){var r=s.mousePos(this._el,e.touches[0]),n=s.mousePos(this._el,e.touches[1]);this._startVec=r.sub(n),this._gestureIntent=void 0,this._inertia=[],s.addEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{passive:!1}),s.addEventListener(t.default.document,&quot;touchend&quot;,this._onEnd)}},tn.prototype._getTouchEventData=function(t){var e=s.mousePos(this._el,t.touches[0]),r=s.mousePos(this._el,t.touches[1]),n=e.sub(r);return{vec:n,center:e.add(r).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},tn.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,i=r.scale,a=r.bearing;if(!this._gestureIntent){var o=Math.abs(1-i)&gt;.15;Math.abs(a)&gt;10?this._gestureIntent=&quot;rotate&quot;:o&amp;&amp;(this._gestureIntent=&quot;zoom&quot;),this._gestureIntent&amp;&amp;(this._map.fire(new t.Event(this._gestureIntent+&quot;start&quot;,{originalEvent:e})),this._map.fire(new t.Event(&quot;movestart&quot;,{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},tn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),i=n.center,o=n.bearing,s=n.scale,l=r.pointLocation(i),c=r.locationPoint(l);&quot;rotate&quot;===e&amp;&amp;(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*s),r.setLocationAtPoint(l,c),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event(&quot;move&quot;,{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([a.now(),s,i])}},tn.prototype._onEnd=function(e){s.removeEventListener(t.default.document,&quot;touchmove&quot;,this._onMove,{passive:!1}),s.removeEventListener(t.default.document,&quot;touchend&quot;,this._onEnd);var r=this._gestureIntent,n=this._startScale;if(this._frameId&amp;&amp;(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,r){this._map.fire(new t.Event(r+&quot;end&quot;,{originalEvent:e})),this._drainInertiaBuffer();var i=this._inertia,a=this._map;if(i.length&lt;2)a.snapToNorth({},{originalEvent:e});else{var o=i[i.length-1],l=i[0],c=a.transform.scaleZoom(n*o[1]),u=a.transform.scaleZoom(n*l[1]),f=c-u,h=(o[0]-l[0])/1e3,p=o[2];if(0!==h&amp;&amp;c!==u){var d=.15*f/h;Math.abs(d)&gt;2.5&amp;&amp;(d=d&gt;0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),m=c+d*g/2e3;m&lt;0&amp;&amp;(m=0),a.easeTo({zoom:m,duration:g,easing:Qr,around:this._aroundCenter?a.getCenter():a.unproject(p),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},tn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length&gt;2&amp;&amp;e-t[0][0]&gt;160;)t.shift()};var en={scrollZoom:Hr,boxZoom:Gr,dragRotate:Yr,dragPan:Zr,keyboard:$r,doubleClickZoom:Kr,touchZoomRotate:tn},rn=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll([&quot;_renderFrameCallback&quot;],this)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return this.transform.center},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.default$1.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())&lt;this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.fitBounds=function(e,r,n){if(&quot;number&quot;==typeof(r=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){var i=r.padding;r.padding={top:i,bottom:i,right:i,left:i}}if(!t.default$10(Object.keys(r.padding).sort(function(t,e){return t&lt;e?-1:t&gt;e?1:0}),[&quot;bottom&quot;,&quot;left&quot;,&quot;right&quot;,&quot;top&quot;]))return t.warnOnce(&quot;options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'&quot;),this;e=W.convert(e);var a=[(r.padding.left-r.padding.right)/2,(r.padding.top-r.padding.bottom)/2],o=Math.min(r.padding.right,r.padding.left),s=Math.min(r.padding.top,r.padding.bottom);r.offset=[r.offset[0]+a[0],r.offset[1]+a[1]];var l=t.default$1.convert(r.offset),c=this.transform,u=c.project(e.getNorthWest()),f=c.project(e.getSouthEast()),h=f.sub(u),p=(c.width-2*o-2*Math.abs(l.x))/h.x,d=(c.height-2*s-2*Math.abs(l.y))/h.y;return d&lt;0||p&lt;0?(t.warnOnce(&quot;Map cannot fit within canvas with the given bounds, padding, and/or offset.&quot;),this):(r.center=c.unproject(u.add(f).div(2)),r.zoom=Math.min(c.scaleZoom(c.scale*Math.min(p,d)),r.maxZoom),r.bearing=0,r.linear?this.easeTo(r,n):this.flyTo(r,n))},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return&quot;zoom&quot;in e&amp;&amp;n.zoom!==+e.zoom&amp;&amp;(i=!0,n.zoom=+e.zoom),void 0!==e.center&amp;&amp;(n.center=G.convert(e.center)),&quot;bearing&quot;in e&amp;&amp;n.bearing!==+e.bearing&amp;&amp;(a=!0,n.bearing=+e.bearing),&quot;pitch&quot;in e&amp;&amp;n.pitch!==+e.pitch&amp;&amp;(o=!0,n.pitch=+e.pitch),this.fire(new t.Event(&quot;movestart&quot;,r)).fire(new t.Event(&quot;move&quot;,r)),i&amp;&amp;this.fire(new t.Event(&quot;zoomstart&quot;,r)).fire(new t.Event(&quot;zoom&quot;,r)).fire(new t.Event(&quot;zoomend&quot;,r)),a&amp;&amp;this.fire(new t.Event(&quot;rotatestart&quot;,r)).fire(new t.Event(&quot;rotate&quot;,r)).fire(new t.Event(&quot;rotateend&quot;,r)),o&amp;&amp;this.fire(new t.Event(&quot;pitchstart&quot;,r)).fire(new t.Event(&quot;pitch&quot;,r)).fire(new t.Event(&quot;pitchend&quot;,r)),this.fire(new t.Event(&quot;moveend&quot;,r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&amp;&amp;(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=&quot;zoom&quot;in e?+e.zoom:a,c=&quot;bearing&quot;in e?this._normalizeBearing(e.bearing,o):o,u=&quot;pitch&quot;in e?+e.pitch:s,f=i.centerPoint.add(t.default$1.convert(e.offset)),h=i.pointLocation(f),p=G.convert(e.center||h);this._normalizeCenter(p);var d,g,m=i.project(h),v=i.project(p).sub(m),y=i.zoomScale(l-a);return e.around&amp;&amp;(d=G.convert(e.around),g=i.locationPoint(d)),this._zooming=l!==a,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&amp;&amp;(i.zoom=t.number(a,l,e)),n._rotating&amp;&amp;(i.bearing=t.number(o,c,e)),n._pitching&amp;&amp;(i.pitch=t.number(s,u,e)),d)i.setLocationAtPoint(d,g);else{var h=i.zoomScale(i.zoom-a),p=l&gt;a?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=i.unproject(m.add(v.mult(e*x)).mult(h));i.setLocationAtPoint(i.renderWorldCopies?b.wrap():b,f)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event(&quot;movestart&quot;,e)),this._zooming&amp;&amp;this.fire(new t.Event(&quot;zoomstart&quot;,e)),this._rotating&amp;&amp;this.fire(new t.Event(&quot;rotatestart&quot;,e)),this._pitching&amp;&amp;this.fire(new t.Event(&quot;pitchstart&quot;,e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event(&quot;move&quot;,e)),this._zooming&amp;&amp;this.fire(new t.Event(&quot;zoom&quot;,e)),this._rotating&amp;&amp;this.fire(new t.Event(&quot;rotate&quot;,e)),this._pitching&amp;&amp;this.fire(new t.Event(&quot;pitch&quot;,e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&amp;&amp;this.fire(new t.Event(&quot;zoomend&quot;,e)),n&amp;&amp;this.fire(new t.Event(&quot;rotateend&quot;,e)),i&amp;&amp;this.fire(new t.Event(&quot;pitchend&quot;,e)),this.fire(new t.Event(&quot;moveend&quot;,e))},r.prototype.flyTo=function(e,r){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=&quot;zoom&quot;in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):a,c=&quot;bearing&quot;in e?this._normalizeBearing(e.bearing,o):o,u=&quot;pitch&quot;in e?+e.pitch:s,f=i.zoomScale(l-a),h=i.centerPoint.add(t.default$1.convert(e.offset)),p=i.pointLocation(h),d=G.convert(e.center||p);this._normalizeCenter(d);var g=i.project(p),m=i.project(d).sub(g),v=e.curve,y=Math.max(i.width,i.height),x=y/f,b=m.mag();if(&quot;minZoom&quot;in e){var _=t.clamp(Math.min(e.minZoom,a,l),i.minZoom,i.maxZoom),w=y/i.zoomScale(_-a);v=Math.sqrt(w/b*2)}var k=v*v;function M(t){var e=(x*x-y*y+(t?-1:1)*k*k*b*b)/(2*(t?x:y)*k*b);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function T(t){return(Math.exp(t)+Math.exp(-t))/2}var S=M(0),E=function(t){return T(S)/T(S+v*t)},C=function(t){return y*((T(S)*(A(e=S+v*t)/T(e))-A(S))/k)/b;var e},L=(M(1)-S)/v;if(Math.abs(b)&lt;1e-6||!isFinite(L)){if(Math.abs(y-x)&lt;1e-6)return this.easeTo(e,r);var z=x&lt;y?-1:1;L=Math.abs(Math.log(x/y))/v,C=function(){return 0},E=function(t){return Math.exp(z*v*t)}}if(&quot;duration&quot;in e)e.duration=+e.duration;else{var P=&quot;screenSpeed&quot;in e?+e.screenSpeed/v:+e.speed;e.duration=1e3*L/P}return e.maxDuration&amp;&amp;e.duration&gt;e.maxDuration&amp;&amp;(e.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,!1),this._ease(function(e){var l=e*L,f=1/E(l);i.zoom=a+i.scaleZoom(f),n._rotating&amp;&amp;(i.bearing=t.number(o,c,e)),n._pitching&amp;&amp;(i.pitch=t.number(s,u,e));var p=i.unproject(g.add(m.mult(C(l))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?p.wrap():p,h),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&amp;&amp;(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(t,e,r){!1===r.animate||0===r.duration?(t(1),e()):(this._easeStart=a.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((a.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t&lt;1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)&lt;n&amp;&amp;(e-=360),Math.abs(e+360-r)&lt;n&amp;&amp;(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&amp;&amp;!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r&gt;180?-360:r&lt;-180?360:0}},r}(t.Evented),nn=function(e){void 0===e&amp;&amp;(e={}),this.options=e,t.bindAll([&quot;_updateEditLink&quot;,&quot;_updateData&quot;,&quot;_updateCompact&quot;],this)};nn.prototype.getDefaultPosition=function(){return&quot;bottom-right&quot;},nn.prototype.onAdd=function(t){var e=this.options&amp;&amp;this.options.compact;return this._map=t,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-attrib&quot;),e&amp;&amp;this._container.classList.add(&quot;mapboxgl-compact&quot;),this._updateAttributions(),this._updateEditLink(),this._map.on(&quot;sourcedata&quot;,this._updateData),this._map.on(&quot;moveend&quot;,this._updateEditLink),void 0===e&amp;&amp;(this._map.on(&quot;resize&quot;,this._updateCompact),this._updateCompact()),this._container},nn.prototype.onRemove=function(){s.remove(this._container),this._map.off(&quot;sourcedata&quot;,this._updateData),this._map.off(&quot;moveend&quot;,this._updateEditLink),this._map.off(&quot;resize&quot;,this._updateCompact),this._map=void 0},nn.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(&quot;.mapbox-improve-map&quot;));var e=[{key:&quot;owner&quot;,value:this.styleOwner},{key:&quot;id&quot;,value:this.styleId},{key:&quot;access_token&quot;,value:m.ACCESS_TOKEN}];if(t){var r=e.reduce(function(t,r,n){return r.value&amp;&amp;(t+=r.key+&quot;=&quot;+r.value+(n&lt;e.length-1?&quot;&amp;&quot;:&quot;&quot;)),t},&quot;?&quot;);t.href=&quot;https://www.mapbox.com/feedback/&quot;+r+(this._map._hash?this._map._hash.getHashString(!0):&quot;&quot;)}},nn.prototype._updateData=function(t){t&amp;&amp;&quot;metadata&quot;===t.sourceDataType&amp;&amp;(this._updateAttributions(),this._updateEditLink())},nn.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n].getSource();i.attribution&amp;&amp;t.indexOf(i.attribution)&lt;0&amp;&amp;t.push(i.attribution)}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,r){for(var n=r+1;n&lt;t.length;n++)if(t[n].indexOf(e)&gt;=0)return!1;return!0})).length?(this._container.innerHTML=t.join(&quot; | &quot;),this._container.classList.remove(&quot;mapboxgl-attrib-empty&quot;)):this._container.classList.add(&quot;mapboxgl-attrib-empty&quot;),this._editLink=null}},nn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth&lt;=640?this._container.classList.add(&quot;mapboxgl-compact&quot;):this._container.classList.remove(&quot;mapboxgl-compact&quot;)};var an=function(){t.bindAll([&quot;_updateLogo&quot;],this)};an.prototype.onAdd=function(t){this._map=t,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl&quot;);var e=s.create(&quot;a&quot;,&quot;mapboxgl-ctrl-logo&quot;);return e.target=&quot;_blank&quot;,e.href=&quot;https://www.mapbox.com/&quot;,e.setAttribute(&quot;aria-label&quot;,&quot;Mapbox logo&quot;),this._container.appendChild(e),this._container.style.display=&quot;none&quot;,this._map.on(&quot;sourcedata&quot;,this._updateLogo),this._updateLogo(),this._container},an.prototype.onRemove=function(){s.remove(this._container),this._map.off(&quot;sourcedata&quot;,this._updateLogo)},an.prototype.getDefaultPosition=function(){return&quot;bottom-left&quot;},an.prototype._updateLogo=function(t){t&amp;&amp;&quot;metadata&quot;!==t.sourceDataType||(this._container.style.display=this._logoRequired()?&quot;block&quot;:&quot;none&quot;)},an.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}};var on=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};on.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},on.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;r&lt;n.length;r+=1){var i=n[r];if(i.id===t)return void(i.cancelled=!0)}},on.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e&lt;r.length;e+=1){var n=r[e];if(!n.cancelled&amp;&amp;(n.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},on.prototype.clear=function(){this._currentlyRunning&amp;&amp;(this._cleared=!0),this._queue=[]};var sn=t.default.HTMLImageElement,ln=t.default.HTMLElement,cn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300},un=function(r){function n(e){if(null!=(e=t.extend({},cn,e)).minZoom&amp;&amp;null!=e.maxZoom&amp;&amp;e.minZoom&gt;e.maxZoom)throw new Error(&quot;maxZoom must be greater than minZoom&quot;);var n=new Fr(e.minZoom,e.maxZoom,e.renderWorldCopies);r.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new on;var i=e.transformRequest;if(this._transformRequest=i?function(t,e){return i(t,e)||{url:t}}:function(t){return{url:t}},&quot;string&quot;==typeof e.container){var a=t.default.document.getElementById(e.container);if(!a)throw new Error(&quot;Container '&quot;+e.container+&quot;' not found.&quot;);this._container=a}else{if(!(e.container instanceof ln))throw new Error(&quot;Invalid type: 'container' must be a String or HTMLElement.&quot;);this._container=e.container}e.maxBounds&amp;&amp;this.setMaxBounds(e.maxBounds),t.bindAll([&quot;_onWindowOnline&quot;,&quot;_onWindowResize&quot;,&quot;_contextLost&quot;,&quot;_contextRestored&quot;,&quot;_update&quot;,&quot;_render&quot;,&quot;_onData&quot;,&quot;_onDataLoading&quot;],this),this._setupContainer(),this._setupPainter(),this.on(&quot;move&quot;,this._update.bind(this,!1)),this.on(&quot;zoom&quot;,this._update.bind(this,!0)),void 0!==t.default&amp;&amp;(t.default.addEventListener(&quot;online&quot;,this._onWindowOnline,!1),t.default.addEventListener(&quot;resize&quot;,this._onWindowResize,!1)),function(t,e){var r=t.getCanvasContainer(),n=null,i=!1;for(var a in en)t[a]=new en[a](t,e),e.interactive&amp;&amp;e[a]&amp;&amp;t[a].enable(e[a]);s.addEventListener(r,&quot;mouseout&quot;,function(e){t.fire(new Vr(&quot;mouseout&quot;,t,e))}),s.addEventListener(r,&quot;mousedown&quot;,function(r){i=!0;var n=new Vr(&quot;mousedown&quot;,t,r);t.fire(n),n.defaultPrevented||(e.interactive&amp;&amp;!t.doubleClickZoom.isActive()&amp;&amp;t.stop(),t.boxZoom.onMouseDown(r),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(r),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(r))}),s.addEventListener(r,&quot;mouseup&quot;,function(e){var r=t.dragRotate.isActive();n&amp;&amp;!r&amp;&amp;t.fire(new Vr(&quot;contextmenu&quot;,t,n)),n=null,i=!1,t.fire(new Vr(&quot;mouseup&quot;,t,e))}),s.addEventListener(r,&quot;mousemove&quot;,function(e){if(!t.dragPan.isActive()&amp;&amp;!t.dragRotate.isActive()){for(var n=e.toElement||e.target;n&amp;&amp;n!==r;)n=n.parentNode;n===r&amp;&amp;t.fire(new Vr(&quot;mousemove&quot;,t,e))}}),s.addEventListener(r,&quot;mouseover&quot;,function(e){for(var n=e.toElement||e.target;n&amp;&amp;n!==r;)n=n.parentNode;n===r&amp;&amp;t.fire(new Vr(&quot;mouseover&quot;,t,e))}),s.addEventListener(r,&quot;touchstart&quot;,function(r){var n=new Ur(&quot;touchstart&quot;,t,r);t.fire(n),n.defaultPrevented||(e.interactive&amp;&amp;t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),s.addEventListener(r,&quot;touchmove&quot;,function(e){t.fire(new Ur(&quot;touchmove&quot;,t,e))},{passive:!1}),s.addEventListener(r,&quot;touchend&quot;,function(e){t.fire(new Ur(&quot;touchend&quot;,t,e))}),s.addEventListener(r,&quot;touchcancel&quot;,function(e){t.fire(new Ur(&quot;touchcancel&quot;,t,e))}),s.addEventListener(r,&quot;click&quot;,function(e){t.fire(new Vr(&quot;click&quot;,t,e))}),s.addEventListener(r,&quot;dblclick&quot;,function(e){var r=new Vr(&quot;dblclick&quot;,t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)}),s.addEventListener(r,&quot;contextmenu&quot;,function(e){var r=t.dragRotate.isActive();i||r?i&amp;&amp;(n=e):t.fire(new Vr(&quot;contextmenu&quot;,t,e)),e.preventDefault()}),s.addEventListener(r,&quot;wheel&quot;,function(e){var r=new qr(&quot;wheel&quot;,t,e);t.fire(r),r.defaultPrevented||t.scrollZoom.onWheel(e)},{passive:!1})}(this,e),this._hash=e.hash&amp;&amp;(new jr).addTo(this),this._hash&amp;&amp;this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this.resize(),e.style&amp;&amp;this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&amp;&amp;this.addControl(new nn),this.addControl(new an,e.logoPosition),this.on(&quot;style.load&quot;,function(){this.transform.unmodified&amp;&amp;this.jumpTo(this.style.stylesheet)}),this.on(&quot;data&quot;,this._onData),this.on(&quot;dataloading&quot;,this._onDataLoading)}r&amp;&amp;(n.__proto__=r),n.prototype=Object.create(r&amp;&amp;r.prototype),n.prototype.constructor=n;var i={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype.addControl=function(t,e){void 0===e&amp;&amp;t.getDefaultPosition&amp;&amp;(e=t.getDefaultPosition()),void 0===e&amp;&amp;(e=&quot;top-right&quot;);var r=t.onAdd(this),n=this._controlPositions[e];return-1!==e.indexOf(&quot;bottom&quot;)?n.insertBefore(r,n.firstChild):n.appendChild(r),this},n.prototype.removeControl=function(t){return t.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];return this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i),this.fire(new t.Event(&quot;movestart&quot;,e)).fire(new t.Event(&quot;move&quot;,e)).fire(new t.Event(&quot;resize&quot;,e)).fire(new t.Event(&quot;moveend&quot;,e))},n.prototype.getBounds=function(){var e=new W(this.transform.pointLocation(new t.default$1(0,this.transform.height)),this.transform.pointLocation(new t.default$1(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&amp;&amp;(e.extend(this.transform.pointLocation(new t.default$1(this.transform.size.x,0))),e.extend(this.transform.pointLocation(new t.default$1(0,this.transform.size.y)))),e},n.prototype.getMaxBounds=function(){return this.transform.latRange&amp;&amp;2===this.transform.latRange.length&amp;&amp;this.transform.lngRange&amp;&amp;2===this.transform.lngRange.length?new W([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},n.prototype.setMaxBounds=function(t){if(t){var e=W.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null==t&amp;&amp;(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)&gt;=0&amp;&amp;t&lt;=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()&lt;t&amp;&amp;this.setZoom(t),this;throw new Error(&quot;minZoom must be between 0 and the current maxZoom, inclusive&quot;)},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)&gt;=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()&gt;t&amp;&amp;this.setZoom(t),this;throw new Error(&quot;maxZoom must be greater than the current minZoom&quot;)},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update(),this},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(t){return this.transform.locationPoint(G.convert(t))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.default$1.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,n){var i,a=this;if(void 0===n)return r.prototype.on.call(this,t,e);var o=function(){if(&quot;mouseenter&quot;===t||&quot;mouseover&quot;===t){var r=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){var o=a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[];o.length?r||(r=!0,n.call(a,new Vr(t,a,i.originalEvent,{features:o}))):r=!1},mouseout:function(){r=!1}}}}if(&quot;mouseleave&quot;===t||&quot;mouseout&quot;===t){var o=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){(a.getLayer(e)?a.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?o=!0:o&amp;&amp;(o=!1,n.call(a,new Vr(t,a,r.originalEvent)))},mouseout:function(e){o&amp;&amp;(o=!1,n.call(a,new Vr(t,a,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(i={},i[t]=function(t){var r=a.getLayer(e)?a.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&amp;&amp;(t.features=r,n.call(a,t),delete t.features)},i)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)a.on(s,o.delegates[s]);return this},n.prototype.off=function(t,e,n){if(void 0===n)return r.prototype.off.call(this,t,e);if(this._delegatedListeners&amp;&amp;this._delegatedListeners[t])for(var i=this._delegatedListeners[t],a=0;a&lt;i.length;a++){var o=i[a];if(o.layer===e&amp;&amp;o.listener===n){for(var s in o.delegates)this.off(s,o.delegates[s]);return i.splice(a,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,r){var n;return 2===arguments.length?(e=arguments[0],r=arguments[1]):1===arguments.length&amp;&amp;((n=arguments[0])instanceof t.default$1||Array.isArray(n))?(e=arguments[0],r={}):1===arguments.length?(e=void 0,r=arguments[0]):(e=void 0,r={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(e),r,this.transform):[]},n.prototype._makeQueryGeometry=function(e){var r,n=this;if(void 0===e&amp;&amp;(e=[t.default$1.convert([0,0]),t.default$1.convert([this.transform.width,this.transform.height])]),e instanceof t.default$1||&quot;number&quot;==typeof e[0])r=[t.default$1.convert(e)];else{var i=[t.default$1.convert(e[0]),t.default$1.convert(e[1])];r=[i[0],new t.default$1(i[1].x,i[0].y),i[1],new t.default$1(i[0].x,i[1].y),i[0]]}return{viewport:r,worldCoordinate:r.map(function(t){return n.transform.pointCoordinate(t)})}},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){if((!r||!1!==r.diff&amp;&amp;!r.localIdeographFontFamily)&amp;&amp;this.style&amp;&amp;e&amp;&amp;&quot;object&quot;==typeof e)try{return this.style.setState(e)&amp;&amp;this._update(!0),this}catch(e){t.warnOnce(&quot;Unable to perform style diff: &quot;+(e.message||e.error||e)+&quot;.  Rebuilding the style from scratch.&quot;)}return this.style&amp;&amp;(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Je(this,r||{}),this.style.setEventedParent(this,{style:this.style}),&quot;string&quot;==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce(&quot;There is no style added to the map.&quot;)},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},n.prototype.isSourceLoaded=function(e){var r=this.style&amp;&amp;this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error(&quot;There is no source with ID '&quot;+e+&quot;'&quot;)))},n.prototype.areTilesLoaded=function(){var t=this.style&amp;&amp;this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var n in r){var i=r[n];if(&quot;loaded&quot;!==i.state&amp;&amp;&quot;errored&quot;!==i.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,n){void 0===n&amp;&amp;(n={});var i=n.pixelRatio;void 0===i&amp;&amp;(i=1);var o=n.sdf;if(void 0===o&amp;&amp;(o=!1),r instanceof sn){var s=a.getImageData(r),l=s.width,c=s.height,u=s.data;this.style.addImage(e,{data:new t.RGBAImage({width:l,height:c},u),pixelRatio:i,sdf:o})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error(&quot;Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`&quot;)));var f=r.width,h=r.height,p=r.data;this.style.addImage(e,{data:new t.RGBAImage({width:f,height:h},p.slice(0)),pixelRatio:i,sdf:o})}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error(&quot;Missing required image id&quot;))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r){return this.style.setPaintProperty(t,e,r),this._update(!0),this},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&amp;&amp;(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},n.prototype._setupContainer=function(){var t=this._container;t.classList.add(&quot;mapboxgl-map&quot;),(this._missingCSSContainer=s.create(&quot;div&quot;,&quot;mapboxgl-missing-css&quot;,t)).innerHTML=&quot;Missing Mapbox GL JS CSS&quot;;var e=this._canvasContainer=s.create(&quot;div&quot;,&quot;mapboxgl-canvas-container&quot;,t);this._interactive&amp;&amp;e.classList.add(&quot;mapboxgl-interactive&quot;),this._canvas=s.create(&quot;canvas&quot;,&quot;mapboxgl-canvas&quot;,e),this._canvas.style.position=&quot;absolute&quot;,this._canvas.addEventListener(&quot;webglcontextlost&quot;,this._contextLost,!1),this._canvas.addEventListener(&quot;webglcontextrestored&quot;,this._contextRestored,!1),this._canvas.setAttribute(&quot;tabindex&quot;,&quot;0&quot;),this._canvas.setAttribute(&quot;aria-label&quot;,&quot;Map&quot;);var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var n=this._controlContainer=s.create(&quot;div&quot;,&quot;mapboxgl-control-container&quot;,t),i=this._controlPositions={};[&quot;top-left&quot;,&quot;top-right&quot;,&quot;bottom-left&quot;,&quot;bottom-right&quot;].forEach(function(t){i[t]=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl-&quot;+t,n)})},n.prototype._resizeCanvas=function(e,r){var n=t.default.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*r,this._canvas.style.width=e+&quot;px&quot;,this._canvas.style.height=r+&quot;px&quot;},n.prototype._setupPainter=function(){var r=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),n=this._canvas.getContext(&quot;webgl&quot;,r)||this._canvas.getContext(&quot;experimental-webgl&quot;,r);n?this.painter=new zr(n,this.transform):this.fire(new t.ErrorEvent(new Error(&quot;Failed to initialize WebGL&quot;)))},n.prototype._contextLost=function(e){e.preventDefault(),this._frameId&amp;&amp;(a.cancelFrame(this._frameId),this._frameId=null),this.fire(new t.Event(&quot;webglcontextlost&quot;,{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event(&quot;webglcontextrestored&quot;,{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&amp;&amp;!this._sourcesDirty&amp;&amp;!(!this.style||!this.style.loaded())},n.prototype._update=function(t){this.style&amp;&amp;(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender())},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this._renderTaskQueue.run();var e=!1;if(this.style&amp;&amp;this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,n=a.now();this.style.zoomHistory.update(r,n);var i=new t.default$16(r,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=i.crossFadingFactor();1===o&amp;&amp;o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(i)}return this.style&amp;&amp;this._sourcesDirty&amp;&amp;(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&amp;&amp;this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),fadeDuration:this._fadeDuration}),this.fire(new t.Event(&quot;render&quot;)),this.loaded()&amp;&amp;!this._loaded&amp;&amp;(this._loaded=!0,this.fire(new t.Event(&quot;load&quot;))),this.style&amp;&amp;(this.style.hasTransitions()||e)&amp;&amp;(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&amp;&amp;this._rerender(),this},n.prototype.remove=function(){this._hash&amp;&amp;this._hash.remove(),a.cancelFrame(this._frameId),this._renderTaskQueue.clear(),this._frameId=null,this.setStyle(null),void 0!==t.default&amp;&amp;(t.default.removeEventListener(&quot;resize&quot;,this._onWindowResize,!1),t.default.removeEventListener(&quot;online&quot;,this._onWindowOnline,!1));var e=this.painter.context.gl.getExtension(&quot;WEBGL_lose_context&quot;);e&amp;&amp;e.loseContext(),fn(this._canvasContainer),fn(this._controlContainer),fn(this._missingCSSContainer),this._container.classList.remove(&quot;mapboxgl-map&quot;),this.fire(new t.Event(&quot;remove&quot;))},n.prototype._rerender=function(){var t=this;this.style&amp;&amp;!this._frameId&amp;&amp;(this._frameId=a.frame(function(){t._frameId=null,t._render()}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&amp;&amp;this.stop().resize()._update()},i.showTileBoundaries.get=function(){return!!this._showTileBoundaries},i.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&amp;&amp;(this._showTileBoundaries=t,this._update())},i.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},i.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&amp;&amp;(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},i.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},i.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&amp;&amp;(this._showOverdrawInspector=t,this._update())},i.repaint.get=function(){return!!this._repaint},i.repaint.set=function(t){this._repaint=t,this._update()},i.vertices.get=function(){return!!this._vertices},i.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._onData=function(e){this._update(&quot;style&quot;===e.dataType),this.fire(new t.Event(e.dataType+&quot;data&quot;,e))},n.prototype._onDataLoading=function(e){this.fire(new t.Event(e.dataType+&quot;dataloading&quot;,e))},Object.defineProperties(n.prototype,i),n}(rn);function fn(t){t.parentNode&amp;&amp;t.parentNode.removeChild(t)}var hn={showCompass:!0,showZoom:!0},pn=function(e){var r=this;this.options=t.extend({},hn,e),this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-group&quot;),this._container.addEventListener(&quot;contextmenu&quot;,function(t){return t.preventDefault()}),this.options.showZoom&amp;&amp;(this._zoomInButton=this._createButton(&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in&quot;,&quot;Zoom In&quot;,function(){return r._map.zoomIn()}),this._zoomOutButton=this._createButton(&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out&quot;,&quot;Zoom Out&quot;,function(){return r._map.zoomOut()})),this.options.showCompass&amp;&amp;(t.bindAll([&quot;_rotateCompassArrow&quot;],this),this._compass=this._createButton(&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-compass&quot;,&quot;Reset North&quot;,function(){return r._map.resetNorth()}),this._compassArrow=s.create(&quot;span&quot;,&quot;mapboxgl-ctrl-compass-arrow&quot;,this._compass))};function dn(t,e,r){if(t=new G(t.lng,t.lat),e){var n=new G(t.lng-360,t.lat),i=new G(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(e);r.locationPoint(n).distSqr(e)&lt;a?t=n:r.locationPoint(i).distSqr(e)&lt;a&amp;&amp;(t=i)}for(;Math.abs(t.lng-r.center.lng)&gt;180;){var o=r.locationPoint(t);if(o.x&gt;=0&amp;&amp;o.y&gt;=0&amp;&amp;o.x&lt;=r.width&amp;&amp;o.y&lt;=r.height)break;t.lng&gt;r.center.lng?t.lng-=360:t.lng+=360}return t}pn.prototype._rotateCompassArrow=function(){var t=&quot;rotate(&quot;+this._map.transform.angle*(180/Math.PI)+&quot;deg)&quot;;this._compassArrow.style.transform=t},pn.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&amp;&amp;(this._map.on(&quot;rotate&quot;,this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Yr(t,{button:&quot;left&quot;,element:this._compass}),this._handler.enable()),this._container},pn.prototype.onRemove=function(){s.remove(this._container),this.options.showCompass&amp;&amp;(this._map.off(&quot;rotate&quot;,this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map},pn.prototype._createButton=function(t,e,r){var n=s.create(&quot;button&quot;,t,this._container);return n.type=&quot;button&quot;,n.setAttribute(&quot;aria-label&quot;,e),n.addEventListener(&quot;click&quot;,r),n};var gn={center:&quot;translate(-50%,-50%)&quot;,top:&quot;translate(-50%,0)&quot;,&quot;top-left&quot;:&quot;translate(0,0)&quot;,&quot;top-right&quot;:&quot;translate(-100%,0)&quot;,bottom:&quot;translate(-50%,-100%)&quot;,&quot;bottom-left&quot;:&quot;translate(0,-100%)&quot;,&quot;bottom-right&quot;:&quot;translate(-100%,-100%)&quot;,left:&quot;translate(0,-50%)&quot;,right:&quot;translate(-100%,-50%)&quot;};function mn(t,e,r){var n=t.classList;for(var i in gn)n.remove(&quot;mapboxgl-&quot;+r+&quot;-anchor-&quot;+i);n.add(&quot;mapboxgl-&quot;+r+&quot;-anchor-&quot;+e)}var vn=function(e){if((arguments[0]instanceof t.default.HTMLElement||2===arguments.length)&amp;&amp;(e=t.extend({element:e},arguments[1])),t.bindAll([&quot;_update&quot;,&quot;_onMapClick&quot;],this),this._anchor=e&amp;&amp;e.anchor||&quot;center&quot;,this._color=e&amp;&amp;e.color||&quot;#3FB1CE&quot;,e&amp;&amp;e.element)this._element=e.element,this._offset=t.default$1.convert(e&amp;&amp;e.offset||[0,0]);else{this._defaultMarker=!0,this._element=s.create(&quot;div&quot;);var r=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;svg&quot;);r.setAttributeNS(null,&quot;height&quot;,&quot;41px&quot;),r.setAttributeNS(null,&quot;width&quot;,&quot;27px&quot;),r.setAttributeNS(null,&quot;viewBox&quot;,&quot;0 0 27 41&quot;);var n=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);n.setAttributeNS(null,&quot;stroke&quot;,&quot;none&quot;),n.setAttributeNS(null,&quot;stroke-width&quot;,&quot;1&quot;),n.setAttributeNS(null,&quot;fill&quot;,&quot;none&quot;),n.setAttributeNS(null,&quot;fill-rule&quot;,&quot;evenodd&quot;);var i=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);i.setAttributeNS(null,&quot;fill-rule&quot;,&quot;nonzero&quot;);var a=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);a.setAttributeNS(null,&quot;transform&quot;,&quot;translate(3.0, 29.0)&quot;),a.setAttributeNS(null,&quot;fill&quot;,&quot;#000000&quot;);for(var o=0,l=[{rx:&quot;10.5&quot;,ry:&quot;5.25002273&quot;},{rx:&quot;10.5&quot;,ry:&quot;5.25002273&quot;},{rx:&quot;9.5&quot;,ry:&quot;4.77275007&quot;},{rx:&quot;8.5&quot;,ry:&quot;4.29549936&quot;},{rx:&quot;7.5&quot;,ry:&quot;3.81822308&quot;},{rx:&quot;6.5&quot;,ry:&quot;3.34094679&quot;},{rx:&quot;5.5&quot;,ry:&quot;2.86367051&quot;},{rx:&quot;4.5&quot;,ry:&quot;2.38636864&quot;}];o&lt;l.length;o+=1){var c=l[o],u=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;ellipse&quot;);u.setAttributeNS(null,&quot;opacity&quot;,&quot;0.04&quot;),u.setAttributeNS(null,&quot;cx&quot;,&quot;10.5&quot;),u.setAttributeNS(null,&quot;cy&quot;,&quot;5.80029008&quot;),u.setAttributeNS(null,&quot;rx&quot;,c.rx),u.setAttributeNS(null,&quot;ry&quot;,c.ry),a.appendChild(u)}var f=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);f.setAttributeNS(null,&quot;fill&quot;,this._color);var h=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;path&quot;);h.setAttributeNS(null,&quot;d&quot;,&quot;M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z&quot;),f.appendChild(h);var p=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);p.setAttributeNS(null,&quot;opacity&quot;,&quot;0.25&quot;),p.setAttributeNS(null,&quot;fill&quot;,&quot;#000000&quot;);var d=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;path&quot;);d.setAttributeNS(null,&quot;d&quot;,&quot;M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z&quot;),p.appendChild(d);var g=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);g.setAttributeNS(null,&quot;transform&quot;,&quot;translate(6.0, 7.0)&quot;),g.setAttributeNS(null,&quot;fill&quot;,&quot;#FFFFFF&quot;);var m=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;g&quot;);m.setAttributeNS(null,&quot;transform&quot;,&quot;translate(8.0, 8.0)&quot;);var v=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;circle&quot;);v.setAttributeNS(null,&quot;fill&quot;,&quot;#000000&quot;),v.setAttributeNS(null,&quot;opacity&quot;,&quot;0.25&quot;),v.setAttributeNS(null,&quot;cx&quot;,&quot;5.5&quot;),v.setAttributeNS(null,&quot;cy&quot;,&quot;5.5&quot;),v.setAttributeNS(null,&quot;r&quot;,&quot;5.4999962&quot;);var y=s.createNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;circle&quot;);y.setAttributeNS(null,&quot;fill&quot;,&quot;#FFFFFF&quot;),y.setAttributeNS(null,&quot;cx&quot;,&quot;5.5&quot;),y.setAttributeNS(null,&quot;cy&quot;,&quot;5.5&quot;),y.setAttributeNS(null,&quot;r&quot;,&quot;5.4999962&quot;),m.appendChild(v),m.appendChild(y),i.appendChild(a),i.appendChild(f),i.appendChild(p),i.appendChild(g),i.appendChild(m),r.appendChild(i),this._element.appendChild(r),this._offset=t.default$1.convert(e&amp;&amp;e.offset||[0,-14])}this._element.classList.add(&quot;mapboxgl-marker&quot;),this._popup=null};vn.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(&quot;move&quot;,this._update),t.on(&quot;moveend&quot;,this._update),this._update(),this._map.on(&quot;click&quot;,this._onMapClick),this},vn.prototype.remove=function(){return this._map&amp;&amp;(this._map.off(&quot;click&quot;,this._onMapClick),this._map.off(&quot;move&quot;,this._update),this._map.off(&quot;moveend&quot;,this._update),delete this._map),s.remove(this._element),this._popup&amp;&amp;this._popup.remove(),this},vn.prototype.getLngLat=function(){return this._lngLat},vn.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._popup&amp;&amp;this._popup.setLngLat(this._lngLat),this._update(),this},vn.prototype.getElement=function(){return this._element},vn.prototype.setPopup=function(t){if(this._popup&amp;&amp;(this._popup.remove(),this._popup=null),t){if(!(&quot;offset&quot;in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],&quot;top-left&quot;:[0,0],&quot;top-right&quot;:[0,0],bottom:[0,-38.1],&quot;bottom-left&quot;:[e,-1*(24.6+e)],&quot;bottom-right&quot;:[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&amp;&amp;this._popup.setLngLat(this._lngLat)}return this},vn.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&amp;&amp;(e===r||r.contains(e))&amp;&amp;this.togglePopup()},vn.prototype.getPopup=function(){return this._popup},vn.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},vn.prototype._update=function(t){this._map&amp;&amp;(this._map.transform.renderWorldCopies&amp;&amp;(this._lngLat=dn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&amp;&amp;&quot;moveend&quot;!==t.type||(this._pos=this._pos.round()),s.setTransform(this._element,gn[this._anchor]+&quot; translate(&quot;+this._pos.x+&quot;px, &quot;+this._pos.y+&quot;px)&quot;),mn(this._element,this._anchor,&quot;marker&quot;))},vn.prototype.getOffset=function(){return this._offset},vn.prototype.setOffset=function(e){return this._offset=t.default$1.convert(e),this._update(),this};var yn,xn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},bn=function(e){function r(r){e.call(this),this.options=t.extend({},xn,r),t.bindAll([&quot;_onSuccess&quot;,&quot;_onError&quot;,&quot;_finish&quot;,&quot;_setupUI&quot;,&quot;_updateCamera&quot;,&quot;_updateMarker&quot;],this)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(e){var r;return this._map=e,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-group&quot;),r=this._setupUI,void 0!==yn?r(yn):void 0!==t.default.navigator.permissions?t.default.navigator.permissions.query({name:&quot;geolocation&quot;}).then(function(t){yn=&quot;denied&quot;!==t.state,r(yn)}):(yn=!!t.default.navigator.geolocation,r(yn)),this._container},r.prototype.onRemove=function(){void 0!==this._geolocationWatchID&amp;&amp;(t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&amp;&amp;this._userLocationDotMarker.remove(),s.remove(this._container),this._map=void 0},r.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case&quot;WAITING_ACTIVE&quot;:case&quot;ACTIVE_LOCK&quot;:case&quot;ACTIVE_ERROR&quot;:this._watchState=&quot;ACTIVE_LOCK&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active&quot;);break;case&quot;BACKGROUND&quot;:case&quot;BACKGROUND_ERROR&quot;:this._watchState=&quot;BACKGROUND&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background&quot;)}this.options.showUserLocation&amp;&amp;&quot;OFF&quot;!==this._watchState&amp;&amp;this._updateMarker(e),this.options.trackUserLocation&amp;&amp;&quot;ACTIVE_LOCK&quot;!==this._watchState||this._updateCamera(e),this.options.showUserLocation&amp;&amp;this._dotElement.classList.remove(&quot;mapboxgl-user-location-dot-stale&quot;),this.fire(new t.Event(&quot;geolocate&quot;,e)),this._finish()},r.prototype._updateCamera=function(t){var e=new G(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},r.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},r.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState=&quot;OFF&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),void 0!==this._geolocationWatchID&amp;&amp;this._clearWatch();else switch(this._watchState){case&quot;WAITING_ACTIVE&quot;:this._watchState=&quot;ACTIVE_ERROR&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active-error&quot;);break;case&quot;ACTIVE_LOCK&quot;:this._watchState=&quot;ACTIVE_ERROR&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;);break;case&quot;BACKGROUND&quot;:this._watchState=&quot;BACKGROUND_ERROR&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;)}&quot;OFF&quot;!==this._watchState&amp;&amp;this.options.showUserLocation&amp;&amp;this._dotElement.classList.add(&quot;mapboxgl-user-location-dot-stale&quot;),this.fire(new t.Event(&quot;error&quot;,e)),this._finish()},r.prototype._finish=function(){this._timeoutId&amp;&amp;clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(e){var r=this;!1!==e&amp;&amp;(this._container.addEventListener(&quot;contextmenu&quot;,function(t){return t.preventDefault()}),this._geolocateButton=s.create(&quot;button&quot;,&quot;mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate&quot;,this._container),this._geolocateButton.type=&quot;button&quot;,this._geolocateButton.setAttribute(&quot;aria-label&quot;,&quot;Geolocate&quot;),this.options.trackUserLocation&amp;&amp;(this._geolocateButton.setAttribute(&quot;aria-pressed&quot;,&quot;false&quot;),this._watchState=&quot;OFF&quot;),this.options.showUserLocation&amp;&amp;(this._dotElement=s.create(&quot;div&quot;,&quot;mapboxgl-user-location-dot&quot;),this._userLocationDotMarker=new vn(this._dotElement),this.options.trackUserLocation&amp;&amp;(this._watchState=&quot;OFF&quot;)),this._geolocateButton.addEventListener(&quot;click&quot;,this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&amp;&amp;this._map.on(&quot;movestart&quot;,function(e){e.geolocateSource||&quot;ACTIVE_LOCK&quot;!==r._watchState||(r._watchState=&quot;BACKGROUND&quot;,r._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background&quot;),r._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),r.fire(new t.Event(&quot;trackuserlocationend&quot;)))}))},r.prototype.trigger=function(){if(!this._setup)return t.warnOnce(&quot;Geolocate control triggered before added to a map&quot;),!1;if(this.options.trackUserLocation){switch(this._watchState){case&quot;OFF&quot;:this._watchState=&quot;WAITING_ACTIVE&quot;,this.fire(new t.Event(&quot;trackuserlocationstart&quot;));break;case&quot;WAITING_ACTIVE&quot;:case&quot;ACTIVE_LOCK&quot;:case&quot;ACTIVE_ERROR&quot;:case&quot;BACKGROUND_ERROR&quot;:this._watchState=&quot;OFF&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-active-error&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background-error&quot;),this.fire(new t.Event(&quot;trackuserlocationend&quot;));break;case&quot;BACKGROUND&quot;:this._watchState=&quot;ACTIVE_LOCK&quot;,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-background&quot;),this._lastKnownPosition&amp;&amp;this._updateCamera(this._lastKnownPosition),this.fire(new t.Event(&quot;trackuserlocationstart&quot;))}switch(this._watchState){case&quot;WAITING_ACTIVE&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active&quot;);break;case&quot;ACTIVE_LOCK&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active&quot;);break;case&quot;ACTIVE_ERROR&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-active-error&quot;);break;case&quot;BACKGROUND&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background&quot;);break;case&quot;BACKGROUND_ERROR&quot;:this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-background-error&quot;)}&quot;OFF&quot;===this._watchState&amp;&amp;void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&amp;&amp;(this._geolocateButton.classList.add(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.setAttribute(&quot;aria-pressed&quot;,&quot;true&quot;),this._geolocationWatchID=t.default.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.default.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(&quot;mapboxgl-ctrl-geolocate-waiting&quot;),this._geolocateButton.setAttribute(&quot;aria-pressed&quot;,&quot;false&quot;),this.options.showUserLocation&amp;&amp;this._updateMarker(null)},r}(t.Evented),_n={maxWidth:100,unit:&quot;metric&quot;},wn=function(e){this.options=t.extend({},_n,e),t.bindAll([&quot;_onMove&quot;,&quot;setUnit&quot;],this)};function kn(t,e,r){var n,i,a,o,s,l,c=r&amp;&amp;r.maxWidth||100,u=t._container.clientHeight/2,f=(n=t.unproject([0,u]),i=t.unproject([c,u]),a=Math.PI/180,o=n.lat*a,s=i.lat*a,l=Math.sin(o)*Math.sin(s)+Math.cos(o)*Math.cos(s)*Math.cos((i.lng-n.lng)*a),6371e3*Math.acos(Math.min(l,1)));if(r&amp;&amp;&quot;imperial&quot;===r.unit){var h=3.2808*f;h&gt;5280?Mn(e,c,h/5280,&quot;mi&quot;):Mn(e,c,h,&quot;ft&quot;)}else r&amp;&amp;&quot;nautical&quot;===r.unit?Mn(e,c,f/1852,&quot;nm&quot;):Mn(e,c,f,&quot;m&quot;)}function Mn(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(&quot;&quot;+Math.floor(i)).length-1))*(o=(o=i/a)&gt;=10?10:o&gt;=5?5:o&gt;=3?3:o&gt;=2?2:1)),l=s/r;&quot;m&quot;===n&amp;&amp;s&gt;=1e3&amp;&amp;(s/=1e3,n=&quot;km&quot;),t.style.width=e*l+&quot;px&quot;,t.innerHTML=s+n}wn.prototype.getDefaultPosition=function(){return&quot;bottom-left&quot;},wn.prototype._onMove=function(){kn(this._map,this._container,this.options)},wn.prototype.onAdd=function(t){return this._map=t,this._container=s.create(&quot;div&quot;,&quot;mapboxgl-ctrl mapboxgl-ctrl-scale&quot;,t.getContainer()),this._map.on(&quot;move&quot;,this._onMove),this._onMove(),this._container},wn.prototype.onRemove=function(){s.remove(this._container),this._map.off(&quot;move&quot;,this._onMove),this._map=void 0},wn.prototype.setUnit=function(t){this.options.unit=t,kn(this._map,this._container,this.options)};var An=function(){this._fullscreen=!1,t.bindAll([&quot;_onClickFullscreen&quot;,&quot;_changeIcon&quot;],this),&quot;onfullscreenchange&quot;in t.default.document?this._fullscreenchange=&quot;fullscreenchange&quot;:&quot;onmozfullscreenchange&quot;in t.default.document?this._fullscreenchange=&quot;mozfullscreenchange&quot;:&quot;onwebkitfullscreenchange&quot;in t.default.document?this._fullscreenchange=&quot;webkitfullscreenchange&quot;:&quot;onmsfullscreenchange&quot;in t.default.document&amp;&amp;(this._fullscreenchange=&quot;MSFullscreenChange&quot;),this._className=&quot;mapboxgl-ctrl&quot;};An.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=s.create(&quot;div&quot;,this._className+&quot; mapboxgl-ctrl-group&quot;),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display=&quot;none&quot;,t.warnOnce(&quot;This device does not support fullscreen mode.&quot;)),this._container},An.prototype.onRemove=function(){s.remove(this._container),this._map=null,t.default.document.removeEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._checkFullscreenSupport=function(){return!!(t.default.document.fullscreenEnabled||t.default.document.mozFullScreenEnabled||t.default.document.msFullscreenEnabled||t.default.document.webkitFullscreenEnabled)},An.prototype._setupUI=function(){var e=this._fullscreenButton=s.create(&quot;button&quot;,this._className+&quot;-icon &quot;+this._className+&quot;-fullscreen&quot;,this._container);e.setAttribute(&quot;aria-label&quot;,&quot;Toggle fullscreen&quot;),e.type=&quot;button&quot;,this._fullscreenButton.addEventListener(&quot;click&quot;,this._onClickFullscreen),t.default.document.addEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._isFullscreen=function(){return this._fullscreen},An.prototype._changeIcon=function(){(t.default.document.fullscreenElement||t.default.document.mozFullScreenElement||t.default.document.webkitFullscreenElement||t.default.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&amp;&amp;(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+&quot;-shrink&quot;),this._fullscreenButton.classList.toggle(this._className+&quot;-fullscreen&quot;))},An.prototype._onClickFullscreen=function(){this._isFullscreen()?t.default.document.exitFullscreen?t.default.document.exitFullscreen():t.default.document.mozCancelFullScreen?t.default.document.mozCancelFullScreen():t.default.document.msExitFullscreen?t.default.document.msExitFullscreen():t.default.document.webkitCancelFullScreen&amp;&amp;t.default.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&amp;&amp;this._mapContainer.webkitRequestFullscreen()};var Tn={closeButton:!0,closeOnClick:!0},Sn=function(e){function r(r){e.call(this),this.options=t.extend(Object.create(Tn),r),t.bindAll([&quot;_update&quot;,&quot;_onClickClose&quot;],this)}return e&amp;&amp;(r.__proto__=e),r.prototype=Object.create(e&amp;&amp;e.prototype),r.prototype.constructor=r,r.prototype.addTo=function(e){return this._map=e,this._map.on(&quot;move&quot;,this._update),this.options.closeOnClick&amp;&amp;this._map.on(&quot;click&quot;,this._onClickClose),this._update(),this.fire(new t.Event(&quot;open&quot;)),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&amp;&amp;s.remove(this._content),this._container&amp;&amp;(s.remove(this._container),delete this._container),this._map&amp;&amp;(this._map.off(&quot;move&quot;,this._update),this._map.off(&quot;click&quot;,this._onClickClose),delete this._map),this.fire(new t.Event(&quot;close&quot;)),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._update(),this},r.prototype.setText=function(e){return this.setDOMContent(t.default.document.createTextNode(e))},r.prototype.setHTML=function(e){var r,n=t.default.document.createDocumentFragment(),i=t.default.document.createElement(&quot;body&quot;);for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},r.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},r.prototype._createContent=function(){this._content&amp;&amp;s.remove(this._content),this._content=s.create(&quot;div&quot;,&quot;mapboxgl-popup-content&quot;,this._container),this.options.closeButton&amp;&amp;(this._closeButton=s.create(&quot;button&quot;,&quot;mapboxgl-popup-close-button&quot;,this._content),this._closeButton.type=&quot;button&quot;,this._closeButton.setAttribute(&quot;aria-label&quot;,&quot;Close popup&quot;),this._closeButton.innerHTML=&quot;&amp;#215;&quot;,this._closeButton.addEventListener(&quot;click&quot;,this._onClickClose))},r.prototype._update=function(){if(this._map&amp;&amp;this._lngLat&amp;&amp;this._content){this._container||(this._container=s.create(&quot;div&quot;,&quot;mapboxgl-popup&quot;,this._map.getContainer()),this._tip=s.create(&quot;div&quot;,&quot;mapboxgl-popup-tip&quot;,this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&amp;&amp;(this._lngLat=dn(this._lngLat,this._pos,this._map.transform));var e=this._pos=this._map.project(this._lngLat),r=this.options.anchor,n=function e(r){if(r){if(&quot;number&quot;==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.default$1(0,0),top:new t.default$1(0,r),&quot;top-left&quot;:new t.default$1(n,n),&quot;top-right&quot;:new t.default$1(-n,n),bottom:new t.default$1(0,-r),&quot;bottom-left&quot;:new t.default$1(n,-n),&quot;bottom-right&quot;:new t.default$1(-n,-n),left:new t.default$1(r,0),right:new t.default$1(-r,0)}}if(r instanceof t.default$1||Array.isArray(r)){var i=t.default$1.convert(r);return{center:i,top:i,&quot;top-left&quot;:i,&quot;top-right&quot;:i,bottom:i,&quot;bottom-left&quot;:i,&quot;bottom-right&quot;:i,left:i,right:i}}return{center:t.default$1.convert(r.center||[0,0]),top:t.default$1.convert(r.top||[0,0]),&quot;top-left&quot;:t.default$1.convert(r[&quot;top-left&quot;]||[0,0]),&quot;top-right&quot;:t.default$1.convert(r[&quot;top-right&quot;]||[0,0]),bottom:t.default$1.convert(r.bottom||[0,0]),&quot;bottom-left&quot;:t.default$1.convert(r[&quot;bottom-left&quot;]||[0,0]),&quot;bottom-right&quot;:t.default$1.convert(r[&quot;bottom-right&quot;]||[0,0]),left:t.default$1.convert(r.left||[0,0]),right:t.default$1.convert(r.right||[0,0])}}return e(new t.default$1(0,0))}(this.options.offset);if(!r){var i,a=this._container.offsetWidth,o=this._container.offsetHeight;i=e.y+n.bottom.y&lt;o?[&quot;top&quot;]:e.y&gt;this._map.transform.height-o?[&quot;bottom&quot;]:[],e.x&lt;a/2?i.push(&quot;left&quot;):e.x&gt;this._map.transform.width-a/2&amp;&amp;i.push(&quot;right&quot;),r=0===i.length?&quot;bottom&quot;:i.join(&quot;-&quot;)}var l=e.add(n[r]).round();s.setTransform(this._container,gn[r]+&quot; translate(&quot;+l.x+&quot;px,&quot;+l.y+&quot;px)&quot;),mn(this._container,r,&quot;popup&quot;)}},r.prototype._onClickClose=function(){this.remove()},r}(t.Evented),En={version:&quot;0.45.0&quot;,supported:e,workerCount:Math.max(Math.floor(a.hardwareConcurrency/2),1),setRTLTextPlugin:t.setRTLTextPlugin,Map:un,NavigationControl:pn,GeolocateControl:bn,AttributionControl:nn,ScaleControl:wn,FullscreenControl:An,Popup:Sn,Marker:vn,Style:Je,LngLat:G,LngLatBounds:W,Point:t.default$1,Evented:t.Evented,config:m,get accessToken(){return m.ACCESS_TOKEN},set accessToken(t){m.ACCESS_TOKEN=t},workerUrl:&quot;&quot;};return En}),n})}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{}],407:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=1&lt;&lt;t+1,r=new Array(e),n=0;n&lt;e;++n)r[n]=a(t,n);return r};var n=t(&quot;convex-hull&quot;);function i(t,e,r){for(var n=new Array(t),i=0;i&lt;t;++i)n[i]=0,i===e&amp;&amp;(n[i]+=.5),i===r&amp;&amp;(n[i]+=.5);return n}function a(t,e){if(0===e||e===(1&lt;&lt;t+1)-1)return[];for(var r=[],a=[],o=0;o&lt;=t;++o)if(e&amp;1&lt;&lt;o){r.push(i(t,o-1,o-1)),a.push(null);for(var s=0;s&lt;=t;++s)~e&amp;1&lt;&lt;s&amp;&amp;(r.push(i(t,o-1,s-1)),a.push([o,s]))}var l=n(r),c=[];t:for(o=0;o&lt;l.length;++o){var u=l[o],f=[];for(s=0;s&lt;u.length;++s){if(!a[u[s]])continue t;f.push(a[u[s]].slice())}c.push(f)}return c}},{&quot;convex-hull&quot;:117}],408:[function(t,e,r){var n=t(&quot;./normalize&quot;),i=t(&quot;gl-mat4/create&quot;),a=t(&quot;gl-mat4/clone&quot;),o=t(&quot;gl-mat4/determinant&quot;),s=t(&quot;gl-mat4/invert&quot;),l=t(&quot;gl-mat4/transpose&quot;),c={length:t(&quot;gl-vec3/length&quot;),normalize:t(&quot;gl-vec3/normalize&quot;),dot:t(&quot;gl-vec3/dot&quot;),cross:t(&quot;gl-vec3/cross&quot;)},u=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function g(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}e.exports=function(t,e,r,i,m,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),m||(m=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,t))return!1;if(a(f,u),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)&lt;1e-8))return!1;var y,x,b,_,w,k,M,A=u[3],T=u[7],S=u[11],E=u[12],C=u[13],L=u[14],z=u[15];if(0!==A||0!==T||0!==S){if(h[0]=A,h[1]=T,h[2]=S,h[3]=z,!s(f,f))return!1;l(f,f),y=m,b=f,_=(x=h)[0],w=x[1],k=x[2],M=x[3],y[0]=b[0]*_+b[4]*w+b[8]*k+b[12]*M,y[1]=b[1]*_+b[5]*w+b[9]*k+b[13]*M,y[2]=b[2]*_+b[6]*w+b[10]*k+b[14]*M,y[3]=b[3]*_+b[7]*w+b[11]*k+b[15]*M}else m[0]=m[1]=m[2]=0,m[3]=1;if(e[0]=E,e[1]=C,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,u),r[0]=c.length(p[0]),c.normalize(p[0],p[0]),i[0]=c.dot(p[0],p[1]),g(p[1],p[1],p[0],1,-i[0]),r[1]=c.length(p[1]),c.normalize(p[1],p[1]),i[0]/=r[1],i[1]=c.dot(p[0],p[2]),g(p[2],p[2],p[0],1,-i[1]),i[2]=c.dot(p[1],p[2]),g(p[2],p[2],p[1],1,-i[2]),r[2]=c.length(p[2]),c.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],c.cross(d,p[1],p[2]),c.dot(p[0],d)&lt;0)for(var P=0;P&lt;3;P++)r[P]*=-1,p[P][0]*=-1,p[P][1]*=-1,p[P][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]&gt;p[1][2]&amp;&amp;(v[0]=-v[0]),p[0][2]&gt;p[2][0]&amp;&amp;(v[1]=-v[1]),p[1][0]&gt;p[0][1]&amp;&amp;(v[2]=-v[2]),!0}},{&quot;./normalize&quot;:409,&quot;gl-mat4/clone&quot;:247,&quot;gl-mat4/create&quot;:248,&quot;gl-mat4/determinant&quot;:249,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/transpose&quot;:263,&quot;gl-vec3/cross&quot;:315,&quot;gl-vec3/dot&quot;:320,&quot;gl-vec3/length&quot;:330,&quot;gl-vec3/normalize&quot;:337}],409:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i&lt;16;i++)t[i]=e[i]*n;return!0}},{}],410:[function(t,e,r){var n=t(&quot;gl-vec3/lerp&quot;),i=t(&quot;mat4-recompose&quot;),a=t(&quot;mat4-decompose&quot;),o=t(&quot;gl-mat4/determinant&quot;),s=t(&quot;quat-slerp&quot;),l=f(),c=f(),u=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!p||(n(u.translate,l.translate,c.translate,f),n(u.skew,l.skew,c.skew,f),n(u.scale,l.scale,c.scale,f),n(u.perspective,l.perspective,c.perspective,f),s(u.quaternion,l.quaternion,c.quaternion,f),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{&quot;gl-mat4/determinant&quot;:249,&quot;gl-vec3/lerp&quot;:331,&quot;mat4-decompose&quot;:408,&quot;mat4-recompose&quot;:411,&quot;quat-slerp&quot;:463}],411:[function(t,e,r){var n={identity:t(&quot;gl-mat4/identity&quot;),translate:t(&quot;gl-mat4/translate&quot;),multiply:t(&quot;gl-mat4/multiply&quot;),create:t(&quot;gl-mat4/create&quot;),scale:t(&quot;gl-mat4/scale&quot;),fromRotationTranslation:t(&quot;gl-mat4/fromRotationTranslation&quot;)},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&amp;&amp;(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&amp;&amp;(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&amp;&amp;(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{&quot;gl-mat4/create&quot;:248,&quot;gl-mat4/fromRotationTranslation&quot;:251,&quot;gl-mat4/identity&quot;:252,&quot;gl-mat4/multiply&quot;:255,&quot;gl-mat4/scale&quot;:261,&quot;gl-mat4/translate&quot;:262}],412:[function(t,e,r){&quot;use strict&quot;;e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],413:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;mat4-interpolate&quot;),a=t(&quot;gl-mat4/invert&quot;),o=t(&quot;gl-mat4/rotateX&quot;),s=t(&quot;gl-mat4/rotateY&quot;),l=t(&quot;gl-mat4/rotateZ&quot;),c=t(&quot;gl-mat4/lookAt&quot;),u=t(&quot;gl-mat4/translate&quot;),f=(t(&quot;gl-mat4/scale&quot;),t(&quot;gl-vec3/normalize&quot;)),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r&lt;0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c&lt;16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(c=0;c&lt;16;++c)h[c]=s[l++];var d=this.nextMatrix;for(c=0;c&lt;16;++c)d[c]=s[l++],p=p&amp;&amp;h[c]===d[c];if(u&lt;1e-6||p)for(c=0;c&lt;16;++c)o[c]=h[c];else i(o,h,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],f(g,g);var m=this.computedInverse;a(m,o);var v=this.computedEye,y=m[15];v[0]=m[12]/y,v[1]=m[13]/y,v[2]=m[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c&lt;3;++c)x[c]=v[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t&lt;this.lastT())){for(var e=this._components,r=e.length-16,n=0;n&lt;16;++n)e.push(e[r++]);this._time.push(t)}},d.flush=function(t){var e=n.gt(this._time,t)-2;e&lt;0||(this._time.splice(0,e),this._components.splice(0,16*e))},d.lastT=function(){return this._time[this._time.length-1]},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||h,n=n||this.computedUp,this.setMatrix(t,c(this.computedMatrix,e,r,n));for(var i=0,a=0;a&lt;3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},d.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&amp;&amp;s(i,i,e),r&amp;&amp;o(i,i,r),n&amp;&amp;l(i,i,n),this.setMatrix(t,a(this.computedMatrix,i))};var g=[0,0,0];d.pan=function(t,e,r,n){g[0]=-(e||0),g[1]=-(r||0),g[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;u(i,i,g),this.setMatrix(t,a(i,i))},d.translate=function(t,e,r,n){g[0]=e||0,g[1]=r||0,g[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;u(i,i,g),this.setMatrix(t,i)},d.setMatrix=function(t,e){if(!(t&lt;this.lastT())){this._time.push(t);for(var r=0;r&lt;16;++r)this._components.push(e[r])}},d.setDistance=function(t,e){this.computedRadius[0]=e},d.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},d.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},{&quot;binary-search-bounds&quot;:78,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/lookAt&quot;:254,&quot;gl-mat4/rotateX&quot;:258,&quot;gl-mat4/rotateY&quot;:259,&quot;gl-mat4/rotateZ&quot;:260,&quot;gl-mat4/scale&quot;:261,&quot;gl-mat4/translate&quot;:262,&quot;gl-vec3/normalize&quot;:337,&quot;mat4-interpolate&quot;:410}],414:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.length;if(e&lt;3){for(var r=new Array(e),i=0;i&lt;e;++i)r[i]=i;return 2===e&amp;&amp;t[0][0]===t[1][0]&amp;&amp;t[0][1]===t[1][1]?[0]:r}for(var a=new Array(e),i=0;i&lt;e;++i)a[i]=i;a.sort(function(e,r){var n=t[e][0]-t[r][0];return n||t[e][1]-t[r][1]});for(var o=[a[0],a[1]],s=[a[0],a[1]],i=2;i&lt;e;++i){for(var l=a[i],c=t[l],u=o.length;u&gt;1&amp;&amp;n(t[o[u-2]],t[o[u-1]],c)&lt;=0;)u-=1,o.pop();for(o.push(l),u=s.length;u&gt;1&amp;&amp;n(t[s[u-2]],t[s[u-1]],c)&gt;=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),f=0,i=0,h=o.length;i&lt;h;++i)r[f++]=o[i];for(var p=s.length-2;p&gt;0;--p)r[f++]=s[p];return r};var n=t(&quot;robust-orientation&quot;)[3]},{&quot;robust-orientation&quot;:483}],415:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return&quot;altKey&quot;in t&amp;&amp;(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),&quot;shiftKey&quot;in t&amp;&amp;(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),&quot;ctrlKey&quot;in t&amp;&amp;(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),&quot;metaKey&quot;in t&amp;&amp;(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);&quot;buttons&quot;in s&amp;&amp;(t=0|s.buttons),(t!==r||c!==i||u!==a||l(s))&amp;&amp;(r=0|t,i=c||0,a=u||0,e&amp;&amp;e(r,i,a,o))}function u(t){c(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&amp;&amp;(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&amp;&amp;e(0,0,0,o))}function h(t){l(t)&amp;&amp;e&amp;&amp;e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&amp;~n.buttons(t),t)}function m(){s||(s=!0,t.addEventListener(&quot;mousemove&quot;,p),t.addEventListener(&quot;mousedown&quot;,d),t.addEventListener(&quot;mouseup&quot;,g),t.addEventListener(&quot;mouseleave&quot;,u),t.addEventListener(&quot;mouseenter&quot;,u),t.addEventListener(&quot;mouseout&quot;,u),t.addEventListener(&quot;mouseover&quot;,u),t.addEventListener(&quot;blur&quot;,f),t.addEventListener(&quot;keyup&quot;,h),t.addEventListener(&quot;keydown&quot;,h),t.addEventListener(&quot;keypress&quot;,h),t!==window&amp;&amp;(window.addEventListener(&quot;blur&quot;,f),window.addEventListener(&quot;keyup&quot;,h),window.addEventListener(&quot;keydown&quot;,h),window.addEventListener(&quot;keypress&quot;,h)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():s&amp;&amp;(s=!1,t.removeEventListener(&quot;mousemove&quot;,p),t.removeEventListener(&quot;mousedown&quot;,d),t.removeEventListener(&quot;mouseup&quot;,g),t.removeEventListener(&quot;mouseleave&quot;,u),t.removeEventListener(&quot;mouseenter&quot;,u),t.removeEventListener(&quot;mouseout&quot;,u),t.removeEventListener(&quot;mouseover&quot;,u),t.removeEventListener(&quot;blur&quot;,f),t.removeEventListener(&quot;keyup&quot;,h),t.removeEventListener(&quot;keydown&quot;,h),t.removeEventListener(&quot;keypress&quot;,h),t!==window&amp;&amp;(window.removeEventListener(&quot;blur&quot;,f),window.removeEventListener(&quot;keyup&quot;,h),window.removeEventListener(&quot;keydown&quot;,h),window.removeEventListener(&quot;keypress&quot;,h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var n=t(&quot;mouse-event&quot;)},{&quot;mouse-event&quot;:417}],416:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},{}],417:[function(t,e,r){&quot;use strict&quot;;function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(&quot;object&quot;==typeof t){if(&quot;buttons&quot;in t)return t.buttons;if(&quot;which&quot;in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e&gt;0)return 1&lt;&lt;e-1}else if(&quot;button&quot;in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e&gt;=0)return 1&lt;&lt;e}}return 0},r.element=n,r.x=function(t){if(&quot;object&quot;==typeof t){if(&quot;offsetX&quot;in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(&quot;object&quot;==typeof t){if(&quot;offsetY&quot;in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],418:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;to-px&quot;);e.exports=function(t,e,r){&quot;function&quot;==typeof t&amp;&amp;(r=!!e,e=t,t=window);var i=n(&quot;ex&quot;,t),a=function(t){r&amp;&amp;t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=t.deltaMode,l=1;switch(s){case 1:l=i;break;case 2:l=window.innerHeight}if(a*=l,o*=l,(n*=l)||a||o)return e(n,a,o,t)};return t.addEventListener(&quot;wheel&quot;,a),a}},{&quot;to-px&quot;:513}],419:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;);function i(t){return&quot;a&quot;+t}function a(t){return&quot;d&quot;+t}function o(t,e){return&quot;c&quot;+t+&quot;_&quot;+e}function s(t){return&quot;s&quot;+t}function l(t,e){return&quot;t&quot;+t+&quot;_&quot;+e}function c(t){return&quot;o&quot;+t}function u(t){return&quot;x&quot;+t}function f(t){return&quot;p&quot;+t}function h(t,e){return&quot;d&quot;+t+&quot;_&quot;+e}function p(t){return&quot;i&quot;+t}function d(t,e){return&quot;u&quot;+t+&quot;_&quot;+e}function g(t){return&quot;b&quot;+t}function m(t){return&quot;y&quot;+t}function v(t){return&quot;e&quot;+t}function y(t){return&quot;v&quot;+t}e.exports=function(t){function e(t){throw new Error(&quot;ndarray-extract-contour: &quot;+t)}&quot;object&quot;!=typeof t&amp;&amp;e(&quot;Must specify arguments&quot;);var r=t.order;Array.isArray(r)||e(&quot;Must specify order&quot;);var T=t.arrayArguments||1;T&lt;1&amp;&amp;e(&quot;Must have at least one array argument&quot;);var S=t.scalarArguments||0;S&lt;0&amp;&amp;e(&quot;Scalar arg count must be &gt; 0&quot;);&quot;function&quot;!=typeof t.vertex&amp;&amp;e(&quot;Must specify vertex creation function&quot;);&quot;function&quot;!=typeof t.cell&amp;&amp;e(&quot;Must specify cell creation function&quot;);&quot;function&quot;!=typeof t.phase&amp;&amp;e(&quot;Must specify phase function&quot;);for(var E=t.getters||[],C=new Array(T),L=0;L&lt;T;++L)E.indexOf(L)&gt;=0?C[L]=!0:C[L]=!1;return function(t,e,r,T,S,E){var C=E.length,L=S.length;if(L&lt;2)throw new Error(&quot;ndarray-extract-contour: Dimension must be at least 2&quot;);for(var z=&quot;extractContour&quot;+S.join(&quot;_&quot;),P=[],O=[],I=[],D=0;D&lt;C;++D)I.push(i(D));for(var D=0;D&lt;T;++D)I.push(u(D));for(var D=0;D&lt;L;++D)O.push(s(D)+&quot;=&quot;+i(0)+&quot;.shape[&quot;+D+&quot;]|0&quot;);for(var D=0;D&lt;C;++D){O.push(a(D)+&quot;=&quot;+i(D)+&quot;.data&quot;,c(D)+&quot;=&quot;+i(D)+&quot;.offset|0&quot;);for(var R=0;R&lt;L;++R)O.push(l(D,R)+&quot;=&quot;+i(D)+&quot;.stride[&quot;+R+&quot;]|0&quot;)}for(var D=0;D&lt;C;++D){O.push(f(D)+&quot;=&quot;+c(D)),O.push(o(D,0));for(var R=1;R&lt;1&lt;&lt;L;++R){for(var B=[],F=0;F&lt;L;++F)R&amp;1&lt;&lt;F&amp;&amp;B.push(&quot;-&quot;+l(D,F));O.push(h(D,R)+&quot;=(&quot;+B.join(&quot;&quot;)+&quot;)|0&quot;),O.push(o(D,R)+&quot;=0&quot;)}}for(var D=0;D&lt;C;++D)for(var R=0;R&lt;L;++R){var N=[l(D,S[R])];R&gt;0&amp;&amp;N.push(l(D,S[R-1])+&quot;*&quot;+s(S[R-1])),O.push(d(D,S[R])+&quot;=(&quot;+N.join(&quot;-&quot;)+&quot;)|0&quot;)}for(var D=0;D&lt;L;++D)O.push(p(D)+&quot;=0&quot;);O.push(_+&quot;=0&quot;);for(var j=[&quot;2&quot;],D=L-2;D&gt;=0;--D)j.push(s(S[D]));O.push(w+&quot;=(&quot;+j.join(&quot;*&quot;)+&quot;)|0&quot;,b+&quot;=mallocUint32(&quot;+w+&quot;)&quot;,x+&quot;=mallocUint32(&quot;+w+&quot;)&quot;,k+&quot;=0&quot;),O.push(g(0)+&quot;=0&quot;);for(var R=1;R&lt;1&lt;&lt;L;++R){for(var V=[],U=[],F=0;F&lt;L;++F)R&amp;1&lt;&lt;F&amp;&amp;(0===U.length?V.push(&quot;1&quot;):V.unshift(U.join(&quot;*&quot;))),U.push(s(S[F]));var q=&quot;&quot;;V[0].indexOf(s(S[L-2]))&lt;0&amp;&amp;(q=&quot;-&quot;);var H=A(L,R,S);O.push(v(H)+&quot;=(-&quot;+V.join(&quot;-&quot;)+&quot;)|0&quot;,m(H)+&quot;=(&quot;+q+V.join(&quot;-&quot;)+&quot;)|0&quot;,g(H)+&quot;=0&quot;)}function G(t,e){P.push(&quot;for(&quot;,p(S[t]),&quot;=&quot;,e,&quot;;&quot;,p(S[t]),&quot;&lt;&quot;,s(S[t]),&quot;;&quot;,&quot;++&quot;,p(S[t]),&quot;){&quot;)}function W(t){for(var e=0;e&lt;C;++e)P.push(f(e),&quot;+=&quot;,d(e,S[t]),&quot;;&quot;);P.push(&quot;}&quot;)}function Y(){for(var t=1;t&lt;1&lt;&lt;L;++t)P.push(M,&quot;=&quot;,v(t),&quot;;&quot;,v(t),&quot;=&quot;,m(t),&quot;;&quot;,m(t),&quot;=&quot;,M,&quot;;&quot;)}O.push(y(0)+&quot;=0&quot;,M+&quot;=0&quot;),function t(e,r){if(e&lt;0)return void function(t){for(var e=0;e&lt;C;++e)E[e]?P.push(o(e,0),&quot;=&quot;,a(e),&quot;.get(&quot;,f(e),&quot;);&quot;):P.push(o(e,0),&quot;=&quot;,a(e),&quot;[&quot;,f(e),&quot;];&quot;);for(var r=[],e=0;e&lt;C;++e)r.push(o(e,0));for(var e=0;e&lt;T;++e)r.push(u(e));P.push(g(0),&quot;=&quot;,b,&quot;[&quot;,k,&quot;]=phase(&quot;,r.join(),&quot;);&quot;);for(var n=1;n&lt;1&lt;&lt;L;++n)P.push(g(n),&quot;=&quot;,b,&quot;[&quot;,k,&quot;+&quot;,v(n),&quot;];&quot;);for(var i=[],n=1;n&lt;1&lt;&lt;L;++n)i.push(&quot;(&quot;+g(0)+&quot;!==&quot;+g(n)+&quot;)&quot;);P.push(&quot;if(&quot;,i.join(&quot;||&quot;),&quot;){&quot;);for(var s=[],e=0;e&lt;L;++e)s.push(p(e));for(var e=0;e&lt;C;++e){s.push(o(e,0));for(var n=1;n&lt;1&lt;&lt;L;++n)E[e]?P.push(o(e,n),&quot;=&quot;,a(e),&quot;.get(&quot;,f(e),&quot;+&quot;,h(e,n),&quot;);&quot;):P.push(o(e,n),&quot;=&quot;,a(e),&quot;[&quot;,f(e),&quot;+&quot;,h(e,n),&quot;];&quot;),s.push(o(e,n))}for(var e=0;e&lt;1&lt;&lt;L;++e)s.push(g(e));for(var e=0;e&lt;T;++e)s.push(u(e));P.push(&quot;vertex(&quot;,s.join(),&quot;);&quot;,y(0),&quot;=&quot;,x,&quot;[&quot;,k,&quot;]=&quot;,_,&quot;++;&quot;);for(var l=(1&lt;&lt;L)-1,c=g(l),n=0;n&lt;L;++n)if(0==(t&amp;~(1&lt;&lt;n))){for(var d=l^1&lt;&lt;n,m=g(d),w=[],M=d;M&gt;0;M=M-1&amp;d)w.push(x+&quot;[&quot;+k+&quot;+&quot;+v(M)+&quot;]&quot;);w.push(y(0));for(var M=0;M&lt;C;++M)1&amp;n?w.push(o(M,l),o(M,d)):w.push(o(M,d),o(M,l));1&amp;n?w.push(c,m):w.push(m,c);for(var M=0;M&lt;T;++M)w.push(u(M));P.push(&quot;if(&quot;,c,&quot;!==&quot;,m,&quot;){&quot;,&quot;face(&quot;,w.join(),&quot;)}&quot;)}P.push(&quot;}&quot;,k,&quot;+=1;&quot;)}(r);!function(t){for(var e=t-1;e&gt;=0;--e)G(e,0);for(var r=[],e=0;e&lt;C;++e)E[e]?r.push(a(e)+&quot;.get(&quot;+f(e)+&quot;)&quot;):r.push(a(e)+&quot;[&quot;+f(e)+&quot;]&quot;);for(var e=0;e&lt;T;++e)r.push(u(e));P.push(b,&quot;[&quot;,k,&quot;++]=phase(&quot;,r.join(),&quot;);&quot;);for(var e=0;e&lt;t;++e)W(e);for(var n=0;n&lt;C;++n)P.push(f(n),&quot;+=&quot;,d(n,S[t]),&quot;;&quot;)}(e);P.push(&quot;if(&quot;,s(S[e]),&quot;&gt;0){&quot;,p(S[e]),&quot;=1;&quot;);t(e-1,r|1&lt;&lt;S[e]);for(var n=0;n&lt;C;++n)P.push(f(n),&quot;+=&quot;,d(n,S[e]),&quot;;&quot;);e===L-1&amp;&amp;(P.push(k,&quot;=0;&quot;),Y());G(e,2);t(e-1,r);e===L-1&amp;&amp;(P.push(&quot;if(&quot;,p(S[L-1]),&quot;&amp;1){&quot;,k,&quot;=0;}&quot;),Y());W(e);P.push(&quot;}&quot;)}(L-1,0),P.push(&quot;freeUint32(&quot;,x,&quot;);freeUint32(&quot;,b,&quot;);&quot;);var X=[&quot;'use strict';&quot;,&quot;function &quot;,z,&quot;(&quot;,I.join(),&quot;){&quot;,&quot;var &quot;,O.join(),&quot;;&quot;,P.join(&quot;&quot;),&quot;}&quot;,&quot;return &quot;,z].join(&quot;&quot;);return new Function(&quot;vertex&quot;,&quot;face&quot;,&quot;phase&quot;,&quot;mallocUint32&quot;,&quot;freeUint32&quot;,X)(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,S,r,C)};var x=&quot;V&quot;,b=&quot;P&quot;,_=&quot;N&quot;,w=&quot;Q&quot;,k=&quot;X&quot;,M=&quot;T&quot;;function A(t,e,r){for(var n=0,i=0;i&lt;t;++i)e&amp;1&lt;&lt;i&amp;&amp;(n|=1&lt;&lt;r[i]);return n}},{&quot;typedarray-pool&quot;:519}],420:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;],pre:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},body:{body:&quot;{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_1_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_1_arg2_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;cwise&quot;,blockSize:64});e.exports=function(t,e){return n(t,e),t}},{&quot;cwise/lib/wrapper&quot;:136}],421:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error(&quot;ndarray-gradient: invalid boundary conditions&quot;)}else r=n(e.dimension,&quot;string&quot;==typeof r?r:&quot;clamp&quot;);if(t.dimension!==e.dimension+1)throw new Error(&quot;ndarray-gradient: output dimension must be +1 input dimension&quot;);if(t.shape[e.dimension]!==e.dimension)throw new Error(&quot;ndarray-gradient: output shape must match input shape&quot;);for(var i=0;i&lt;e.dimension;++i)if(t.shape[i]!==e.shape[i])throw new Error(&quot;ndarray-gradient: shape mismatch&quot;);if(0===e.size)return t;if(e.dimension&lt;=0)return t.set(0),t;return function(t){var e=t.join();if(v=o[e])return v;var r=t.length,n=[&quot;function gradient(dst,src){var s=src.shape.slice();&quot;];function i(e){for(var i=r-e.length,a=[],o=[],s=[],l=0;l&lt;r;++l)e.indexOf(l+1)&gt;=0?s.push(&quot;0&quot;):e.indexOf(-(l+1))&gt;=0?s.push(&quot;s[&quot;+l+&quot;]-1&quot;):(s.push(&quot;-1&quot;),a.push(&quot;1&quot;),o.push(&quot;s[&quot;+l+&quot;]-2&quot;));var c=&quot;.lo(&quot;+a.join()+&quot;).hi(&quot;+o.join()+&quot;)&quot;;if(0===a.length&amp;&amp;(c=&quot;&quot;),i&gt;0){n.push(&quot;if(1&quot;);for(var l=0;l&lt;r;++l)e.indexOf(l+1)&gt;=0||e.indexOf(-(l+1))&gt;=0||n.push(&quot;&amp;&amp;s[&quot;,l,&quot;]&gt;2&quot;);n.push(&quot;){grad&quot;,i,&quot;(src.pick(&quot;,s.join(),&quot;)&quot;,c);for(var l=0;l&lt;r;++l)e.indexOf(l+1)&gt;=0||e.indexOf(-(l+1))&gt;=0||n.push(&quot;,dst.pick(&quot;,s.join(),&quot;,&quot;,l,&quot;)&quot;,c);n.push(&quot;);&quot;)}for(var l=0;l&lt;e.length;++l){var u=Math.abs(e[l])-1,f=&quot;dst.pick(&quot;+s.join()+&quot;,&quot;+u+&quot;)&quot;+c;switch(t[u]){case&quot;clamp&quot;:var h=s.slice(),p=s.slice();e[l]&lt;0?h[u]=&quot;s[&quot;+u+&quot;]-2&quot;:p[u]=&quot;1&quot;,0===i?n.push(&quot;if(s[&quot;,u,&quot;]&gt;1){dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0.5*(src.get(&quot;,h.join(),&quot;)-src.get(&quot;,p.join(),&quot;)))}else{dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0)};&quot;):n.push(&quot;if(s[&quot;,u,&quot;]&gt;1){diff(&quot;,f,&quot;,src.pick(&quot;,h.join(),&quot;)&quot;,c,&quot;,src.pick(&quot;,p.join(),&quot;)&quot;,c,&quot;);}else{zero(&quot;,f,&quot;);};&quot;);break;case&quot;mirror&quot;:0===i?n.push(&quot;dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0);&quot;):n.push(&quot;zero(&quot;,f,&quot;);&quot;);break;case&quot;wrap&quot;:var d=s.slice(),g=s.slice();e[l]&lt;0?(d[u]=&quot;s[&quot;+u+&quot;]-2&quot;,g[u]=&quot;0&quot;):(d[u]=&quot;s[&quot;+u+&quot;]-1&quot;,g[u]=&quot;1&quot;),0===i?n.push(&quot;if(s[&quot;,u,&quot;]&gt;2){dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0.5*(src.get(&quot;,d.join(),&quot;)-src.get(&quot;,g.join(),&quot;)))}else{dst.set(&quot;,s.join(),&quot;,&quot;,u,&quot;,0)};&quot;):n.push(&quot;if(s[&quot;,u,&quot;]&gt;2){diff(&quot;,f,&quot;,src.pick(&quot;,d.join(),&quot;)&quot;,c,&quot;,src.pick(&quot;,g.join(),&quot;)&quot;,c,&quot;);}else{zero(&quot;,f,&quot;);};&quot;);break;default:throw new Error(&quot;ndarray-gradient: Invalid boundary condition&quot;)}}i&gt;0&amp;&amp;n.push(&quot;};&quot;)}for(var s=0;s&lt;1&lt;&lt;r;++s){for(var f=[],h=0;h&lt;r;++h)s&amp;1&lt;&lt;h&amp;&amp;f.push(h+1);for(var p=0;p&lt;1&lt;&lt;f.length;++p){for(var d=f.slice(),h=0;h&lt;f.length;++h)p&amp;1&lt;&lt;h&amp;&amp;(d[h]=-d[h]);i(d)}}n.push(&quot;return dst;};return gradient&quot;);for(var g=[&quot;diff&quot;,&quot;zero&quot;],m=[l,c],s=1;s&lt;=r;++s)g.push(&quot;grad&quot;+s),m.push(u(s));g.push(n.join(&quot;&quot;));var v=Function.apply(void 0,g).apply(void 0,m);return a[e]=v,v}(r)(t,e)};var n=t(&quot;dup&quot;),i=t(&quot;cwise-compiler&quot;),a={},o={},s={body:&quot;&quot;,args:[],thisVars:[],localVars:[]},l=i({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],pre:s,post:s,body:{args:[{name:&quot;out&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;left&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;right&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;out=0.5*(left-right)&quot;,thisVars:[],localVars:[]},funcName:&quot;cdiff&quot;}),c=i({args:[&quot;array&quot;],pre:s,post:s,body:{args:[{name:&quot;out&quot;,lvalue:!0,rvalue:!1,count:1}],body:&quot;out=0&quot;,thisVars:[],localVars:[]},funcName:&quot;zero&quot;});function u(t){if(t in a)return a[t];for(var e=[],r=0;r&lt;t;++r)e.push(&quot;out&quot;,r,&quot;s=0.5*(inp&quot;,r,&quot;l-inp&quot;,r,&quot;r);&quot;);var o=[&quot;array&quot;],l=[&quot;junk&quot;];for(r=0;r&lt;t;++r){o.push(&quot;array&quot;),l.push(&quot;out&quot;+r+&quot;s&quot;);var c=n(t);c[r]=-1,o.push({array:0,offset:c.slice()}),c[r]=1,o.push({array:0,offset:c.slice()}),l.push(&quot;inp&quot;+r+&quot;l&quot;,&quot;inp&quot;+r+&quot;r&quot;)}return a[t]=i({args:o,pre:s,post:s,body:{body:e.join(&quot;&quot;),args:l.map(function(t){return{name:t,lvalue:0===t.indexOf(&quot;out&quot;),rvalue:0===t.indexOf(&quot;inp&quot;),count:&quot;junk&quot;!==t|0}}),thisVars:[],localVars:[]},funcName:&quot;fdTemplate&quot;+t})}},{&quot;cwise-compiler&quot;:133,dup:154}],422:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray-warp&quot;),i=t(&quot;gl-matrix-invert&quot;);e.exports=function(t,e,r){var a=e.dimension,o=i([],r);return n(t,e,function(t,e){for(var r=0;r&lt;a;++r){t[r]=o[(a+1)*a+r];for(var n=0;n&lt;a;++n)t[r]+=o[(a+1)*n+r]*e[n]}var i=o[(a+1)*(a+1)-1];for(n=0;n&lt;a;++n)i+=o[(a+1)*n+a]*e[n];var s=1/i;for(r=0;r&lt;a;++r)t[r]*=s;return t}),t}},{&quot;gl-matrix-invert&quot;:264,&quot;ndarray-warp&quot;:429}],423:[function(t,e,r){&quot;use strict&quot;;function n(t,e){var r=Math.floor(e),n=e-r,i=0&lt;=r&amp;&amp;r&lt;t.shape[0],a=0&lt;=r+1&amp;&amp;r+1&lt;t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function i(t,e,r){var n=Math.floor(e),i=e-n,a=0&lt;=n&amp;&amp;n&lt;t.shape[0],o=0&lt;=n+1&amp;&amp;n+1&lt;t.shape[0],s=Math.floor(r),l=r-s,c=0&lt;=s&amp;&amp;s&lt;t.shape[1],u=0&lt;=s+1&amp;&amp;s+1&lt;t.shape[1],f=a&amp;&amp;c?t.get(n,s):0,h=a&amp;&amp;u?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&amp;&amp;c?t.get(n+1,s):0))+l*((1-i)*h+i*(o&amp;&amp;u?t.get(n+1,s+1):0))}function a(t,e,r,n){var i=Math.floor(e),a=e-i,o=0&lt;=i&amp;&amp;i&lt;t.shape[0],s=0&lt;=i+1&amp;&amp;i+1&lt;t.shape[0],l=Math.floor(r),c=r-l,u=0&lt;=l&amp;&amp;l&lt;t.shape[1],f=0&lt;=l+1&amp;&amp;l+1&lt;t.shape[1],h=Math.floor(n),p=n-h,d=0&lt;=h&amp;&amp;h&lt;t.shape[2],g=0&lt;=h+1&amp;&amp;h+1&lt;t.shape[2],m=o&amp;&amp;u&amp;&amp;d?t.get(i,l,h):0,v=o&amp;&amp;f&amp;&amp;d?t.get(i,l+1,h):0,y=s&amp;&amp;u&amp;&amp;d?t.get(i+1,l,h):0,x=s&amp;&amp;f&amp;&amp;d?t.get(i+1,l+1,h):0,b=o&amp;&amp;u&amp;&amp;g?t.get(i,l,h+1):0,_=o&amp;&amp;f&amp;&amp;g?t.get(i,l+1,h+1):0;return(1-p)*((1-c)*((1-a)*m+a*y)+c*((1-a)*v+a*x))+p*((1-c)*((1-a)*b+a*(s&amp;&amp;u&amp;&amp;g?t.get(i+1,l,h+1):0))+c*((1-a)*_+a*(s&amp;&amp;f&amp;&amp;g?t.get(i+1,l+1,h+1):0)))}e.exports=function(t,e,r,o){switch(t.shape.length){case 0:return 0;case 1:return n(t,e);case 2:return i(t,e,r);case 3:return a(t,e,r,o);default:return function(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e&lt;n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0&lt;=i[e]&amp;&amp;i[e]&lt;t.shape[e],s[e]=0&lt;=i[e]+1&amp;&amp;i[e]+1&lt;t.shape[e];var l,c,u,f=0;t:for(e=0;e&lt;1&lt;&lt;n;++e){for(c=1,u=t.offset,l=0;l&lt;n;++l)if(e&amp;1&lt;&lt;l){if(!s[l])continue t;c*=a[l],u+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;c*=1-a[l],u+=t.stride[l]*i[l]}f+=c*t.data[u]}return f}.apply(void 0,arguments)}},e.exports.d1=n,e.exports.d2=i,e.exports.d3=a},{}],424:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;cwise-compiler&quot;),i={body:&quot;&quot;,args:[],thisVars:[],localVars:[]};function a(t){if(!t)return i;for(var e=0;e&lt;t.args.length;++e){var r=t.args[e];t.args[e]=0===e?{name:r,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function o(t){for(var e=[],r=0;r&lt;t.args.length;++r)e.push(&quot;a&quot;+r);return new Function(&quot;P&quot;,[&quot;return function &quot;,t.funcName,&quot;_ndarrayops(&quot;,e.join(&quot;,&quot;),&quot;) {P(&quot;,e.join(&quot;,&quot;),&quot;);return a0}&quot;].join(&quot;&quot;))(function(t){return n({args:t.args,pre:a(t.pre),body:a(t.body),post:a(t.proc),funcName:t.funcName})}(t))}var s={add:&quot;+&quot;,sub:&quot;-&quot;,mul:&quot;*&quot;,div:&quot;/&quot;,mod:&quot;%&quot;,band:&quot;&amp;&quot;,bor:&quot;|&quot;,bxor:&quot;^&quot;,lshift:&quot;&lt;&lt;&quot;,rshift:&quot;&gt;&gt;&quot;,rrshift:&quot;&gt;&gt;&gt;&quot;};!function(){for(var t in s){var e=s[t];r[t]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=b&quot;+e+&quot;c&quot;},funcName:t}),r[t+&quot;eq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a&quot;+e+&quot;=b&quot;},rvalue:!0,funcName:t+&quot;eq&quot;}),r[t+&quot;s&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;s&quot;],body:&quot;a=b&quot;+e+&quot;s&quot;},funcName:t+&quot;s&quot;}),r[t+&quot;seq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;s&quot;],body:&quot;a&quot;+e+&quot;=s&quot;},rvalue:!0,funcName:t+&quot;seq&quot;})}}();var l={not:&quot;!&quot;,bnot:&quot;~&quot;,neg:&quot;-&quot;,recip:&quot;1.0/&quot;};!function(){for(var t in l){var e=l[t];r[t]=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=&quot;+e+&quot;b&quot;},funcName:t}),r[t+&quot;eq&quot;]=o({args:[&quot;array&quot;],body:{args:[&quot;a&quot;],body:&quot;a=&quot;+e+&quot;a&quot;},rvalue:!0,count:2,funcName:t+&quot;eq&quot;})}}();var c={and:&quot;&amp;&amp;&quot;,or:&quot;||&quot;,eq:&quot;===&quot;,neq:&quot;!==&quot;,lt:&quot;&lt;&quot;,gt:&quot;&gt;&quot;,leq:&quot;&lt;=&quot;,geq:&quot;&gt;=&quot;};!function(){for(var t in c){var e=c[t];r[t]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=b&quot;+e+&quot;c&quot;},funcName:t}),r[t+&quot;s&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;s&quot;],body:&quot;a=b&quot;+e+&quot;s&quot;},funcName:t+&quot;s&quot;}),r[t+&quot;eq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=a&quot;+e+&quot;b&quot;},rvalue:!0,count:2,funcName:t+&quot;eq&quot;}),r[t+&quot;seq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;s&quot;],body:&quot;a=a&quot;+e+&quot;s&quot;},rvalue:!0,count:2,funcName:t+&quot;seq&quot;})}}();var u=[&quot;abs&quot;,&quot;acos&quot;,&quot;asin&quot;,&quot;atan&quot;,&quot;ceil&quot;,&quot;cos&quot;,&quot;exp&quot;,&quot;floor&quot;,&quot;log&quot;,&quot;round&quot;,&quot;sin&quot;,&quot;sqrt&quot;,&quot;tan&quot;];!function(){for(var t=0;t&lt;u.length;++t){var e=u[t];r[e]=o({args:[&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(b)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e}),r[e+&quot;eq&quot;]=o({args:[&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;],body:&quot;a=this_f(a)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;eq&quot;})}}();var f=[&quot;max&quot;,&quot;min&quot;,&quot;atan2&quot;,&quot;pow&quot;];!function(){for(var t=0;t&lt;f.length;++t){var e=f[t];r[e]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(b,c)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e}),r[e+&quot;s&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(b,c)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e+&quot;s&quot;}),r[e+&quot;eq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(a,b)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;eq&quot;}),r[e+&quot;seq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(a,b)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;seq&quot;})}}();var h=[&quot;atan2&quot;,&quot;pow&quot;];!function(){for(var t=0;t&lt;h.length;++t){var e=h[t];r[e+&quot;op&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(c,b)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e+&quot;op&quot;}),r[e+&quot;ops&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;],body:&quot;a=this_f(c,b)&quot;,thisVars:[&quot;this_f&quot;]},funcName:e+&quot;ops&quot;}),r[e+&quot;opeq&quot;]=o({args:[&quot;array&quot;,&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(b,a)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;opeq&quot;}),r[e+&quot;opseq&quot;]=o({args:[&quot;array&quot;,&quot;scalar&quot;],pre:{args:[],body:&quot;this_f=Math.&quot;+e,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=this_f(b,a)&quot;,thisVars:[&quot;this_f&quot;]},rvalue:!0,count:2,funcName:e+&quot;opseq&quot;})}}(),r.any=n({args:[&quot;array&quot;],pre:i,body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;if(a){return true}&quot;,localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:&quot;return false&quot;},funcName:&quot;any&quot;}),r.all=n({args:[&quot;array&quot;],pre:i,body:{args:[{name:&quot;x&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;if(!x){return false}&quot;,localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:&quot;return true&quot;},funcName:&quot;all&quot;}),r.sum=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;this_s+=a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;sum&quot;}),r.prod=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=1&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;this_s*=a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;prod&quot;}),r.norm2squared=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:2}],body:&quot;this_s+=a*a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;norm2squared&quot;}),r.norm2=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:2}],body:&quot;this_s+=a*a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return Math.sqrt(this_s)&quot;},funcName:&quot;norm2&quot;}),r.norminf=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:4}],body:&quot;if(-a&gt;this_s){this_s=-a}else if(a&gt;this_s){this_s=a}&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;norminf&quot;}),r.norm1=n({args:[&quot;array&quot;],pre:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;this_s=0&quot;},body:{args:[{name:&quot;a&quot;,lvalue:!1,rvalue:!0,count:3}],body:&quot;this_s+=a&lt;0?-a:a&quot;,localVars:[],thisVars:[&quot;this_s&quot;]},post:{args:[],localVars:[],thisVars:[&quot;this_s&quot;],body:&quot;return this_s&quot;},funcName:&quot;norm1&quot;}),r.sup=n({args:[&quot;array&quot;],pre:{body:&quot;this_h=-Infinity&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]},body:{body:&quot;if(_inline_1_arg0_&gt;this_h)this_h=_inline_1_arg0_&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_h&quot;],localVars:[]},post:{body:&quot;return this_h&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]}}),r.inf=n({args:[&quot;array&quot;],pre:{body:&quot;this_h=Infinity&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]},body:{body:&quot;if(_inline_1_arg0_&lt;this_h)this_h=_inline_1_arg0_&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_h&quot;],localVars:[]},post:{body:&quot;return this_h&quot;,args:[],thisVars:[&quot;this_h&quot;],localVars:[]}}),r.argmin=n({args:[&quot;index&quot;,&quot;array&quot;,&quot;shape&quot;],pre:{body:&quot;{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}&quot;,args:[{name:&quot;_inline_0_arg0_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg1_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg2_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[]},body:{body:&quot;{if(_inline_1_arg1_&lt;this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k&lt;_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2},{name:&quot;_inline_1_arg1_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[&quot;_inline_1_k&quot;]},post:{body:&quot;{return this_i}&quot;,args:[],thisVars:[&quot;this_i&quot;],localVars:[]}}),r.argmax=n({args:[&quot;index&quot;,&quot;array&quot;,&quot;shape&quot;],pre:{body:&quot;{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}&quot;,args:[{name:&quot;_inline_0_arg0_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg1_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_0_arg2_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[]},body:{body:&quot;{if(_inline_1_arg1_&gt;this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k&lt;_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!1,rvalue:!0,count:2},{name:&quot;_inline_1_arg1_&quot;,lvalue:!1,rvalue:!0,count:2}],thisVars:[&quot;this_i&quot;,&quot;this_v&quot;],localVars:[&quot;_inline_1_k&quot;]},post:{body:&quot;{return this_i}&quot;,args:[],thisVars:[&quot;this_i&quot;],localVars:[]}}),r.random=o({args:[&quot;array&quot;],pre:{args:[],body:&quot;this_f=Math.random&quot;,thisVars:[&quot;this_f&quot;]},body:{args:[&quot;a&quot;],body:&quot;a=this_f()&quot;,thisVars:[&quot;this_f&quot;]},funcName:&quot;random&quot;}),r.assign=o({args:[&quot;array&quot;,&quot;array&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=b&quot;},funcName:&quot;assign&quot;}),r.assigns=o({args:[&quot;array&quot;,&quot;scalar&quot;],body:{args:[&quot;a&quot;,&quot;b&quot;],body:&quot;a=b&quot;},funcName:&quot;assigns&quot;}),r.equals=n({args:[&quot;array&quot;,&quot;array&quot;],pre:i,body:{args:[{name:&quot;x&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;y&quot;,lvalue:!1,rvalue:!0,count:1}],body:&quot;if(x!==y){return false}&quot;,localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:&quot;return true&quot;},funcName:&quot;equals&quot;})},{&quot;cwise-compiler&quot;:133}],425:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray&quot;),i=t(&quot;./doConvert.js&quot;);e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{&quot;./doConvert.js&quot;:426,ndarray:430}],426:[function(t,e,r){e.exports=t(&quot;cwise-compiler&quot;)({args:[&quot;array&quot;,&quot;scalar&quot;,&quot;index&quot;],pre:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},body:{body:&quot;{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i&lt;_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}&quot;,args:[{name:&quot;_inline_1_arg0_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_1_arg1_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_1_arg2_&quot;,lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:[&quot;_inline_1_i&quot;,&quot;_inline_1_v&quot;]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},funcName:&quot;convert&quot;,blockSize:64})},{&quot;cwise-compiler&quot;:133}],427:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;),i=32;function a(t){switch(t){case&quot;uint8&quot;:return[n.mallocUint8,n.freeUint8];case&quot;uint16&quot;:return[n.mallocUint16,n.freeUint16];case&quot;uint32&quot;:return[n.mallocUint32,n.freeUint32];case&quot;int8&quot;:return[n.mallocInt8,n.freeInt8];case&quot;int16&quot;:return[n.mallocInt16,n.freeInt16];case&quot;int32&quot;:return[n.mallocInt32,n.freeInt32];case&quot;float32&quot;:return[n.mallocFloat,n.freeFloat];case&quot;float64&quot;:return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r&lt;t;++r)e.push(&quot;s&quot;+r);for(r=0;r&lt;t;++r)e.push(&quot;n&quot;+r);for(r=1;r&lt;t;++r)e.push(&quot;d&quot;+r);for(r=1;r&lt;t;++r)e.push(&quot;e&quot;+r);for(r=1;r&lt;t;++r)e.push(&quot;f&quot;+r);return e}e.exports=function(t,e){var r=[&quot;'use strict'&quot;],n=[&quot;ndarraySortWrapper&quot;,t.join(&quot;d&quot;),e].join(&quot;&quot;);r.push([&quot;function &quot;,n,&quot;(&quot;,[&quot;array&quot;].join(&quot;,&quot;),&quot;){&quot;].join(&quot;&quot;));for(var s=[&quot;data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride&quot;],l=0;l&lt;t.length;++l)s.push([&quot;s&quot;,l,&quot;=stride[&quot;,l,&quot;]|0,n&quot;,l,&quot;=shape[&quot;,l,&quot;]|0&quot;].join(&quot;&quot;));var c=new Array(t.length),u=[];for(l=0;l&lt;t.length;++l)0!==(p=t[l])&amp;&amp;(0===u.length?c[p]=&quot;1&quot;:c[p]=u.join(&quot;*&quot;),u.push(&quot;n&quot;+p));var f=-1,h=-1;for(l=0;l&lt;t.length;++l){var p,d=t[l];0!==d&amp;&amp;(f&gt;0?s.push([&quot;d&quot;,d,&quot;=s&quot;,d,&quot;-d&quot;,f,&quot;*n&quot;,f].join(&quot;&quot;)):s.push([&quot;d&quot;,d,&quot;=s&quot;,d].join(&quot;&quot;)),f=d),0!=(p=t.length-1-l)&amp;&amp;(h&gt;0?s.push([&quot;e&quot;,p,&quot;=s&quot;,p,&quot;-e&quot;,h,&quot;*n&quot;,h,&quot;,f&quot;,p,&quot;=&quot;,c[p],&quot;-f&quot;,h,&quot;*n&quot;,h].join(&quot;&quot;)):s.push([&quot;e&quot;,p,&quot;=s&quot;,p,&quot;,f&quot;,p,&quot;=&quot;,c[p]].join(&quot;&quot;)),h=p)}r.push(&quot;var &quot;+s.join(&quot;,&quot;));var g=[&quot;0&quot;,&quot;n0-1&quot;,&quot;data&quot;,&quot;offset&quot;].concat(o(t.length));r.push([&quot;if(n0&lt;=&quot;,i,&quot;){&quot;,&quot;insertionSort(&quot;,g.join(&quot;,&quot;),&quot;)}else{&quot;,&quot;quickSort(&quot;,g.join(&quot;,&quot;),&quot;)}&quot;].join(&quot;&quot;)),r.push(&quot;}return &quot;+n);var m=new Function(&quot;insertionSort&quot;,&quot;quickSort&quot;,r.join(&quot;\n&quot;)),v=function(t,e){var r=[&quot;'use strict'&quot;],n=[&quot;ndarrayInsertionSort&quot;,t.join(&quot;d&quot;),e].join(&quot;&quot;),i=[&quot;left&quot;,&quot;right&quot;,&quot;data&quot;,&quot;offset&quot;].concat(o(t.length)),s=a(e),l=[&quot;i,j,cptr,ptr=left*s0+offset&quot;];if(t.length&gt;1){for(var c=[],u=1;u&lt;t.length;++u)l.push(&quot;i&quot;+u),c.push(&quot;n&quot;+u);s?l.push(&quot;scratch=malloc(&quot;+c.join(&quot;*&quot;)+&quot;)&quot;):l.push(&quot;scratch=new Array(&quot;+c.join(&quot;*&quot;)+&quot;)&quot;),l.push(&quot;dptr&quot;,&quot;sptr&quot;,&quot;a&quot;,&quot;b&quot;)}else l.push(&quot;scratch&quot;);function f(t){return&quot;generic&quot;===e?[&quot;data.get(&quot;,t,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]&quot;].join(&quot;&quot;)}function h(t,r){return&quot;generic&quot;===e?[&quot;data.set(&quot;,t,&quot;,&quot;,r,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]=&quot;,r].join(&quot;&quot;)}if(r.push([&quot;function &quot;,n,&quot;(&quot;,i.join(&quot;,&quot;),&quot;){var &quot;,l.join(&quot;,&quot;)].join(&quot;&quot;),&quot;for(i=left+1;i&lt;=right;++i){&quot;,&quot;j=i;ptr+=s0&quot;,&quot;cptr=ptr&quot;),t.length&gt;1){for(r.push(&quot;dptr=0;sptr=ptr&quot;),u=t.length-1;u&gt;=0;--u)0!==(p=t[u])&amp;&amp;r.push([&quot;for(i&quot;,p,&quot;=0;i&quot;,p,&quot;&lt;n&quot;,p,&quot;;++i&quot;,p,&quot;){&quot;].join(&quot;&quot;));for(r.push(&quot;scratch[dptr++]=&quot;,f(&quot;sptr&quot;)),u=0;u&lt;t.length;++u)0!==(p=t[u])&amp;&amp;r.push(&quot;sptr+=d&quot;+p,&quot;}&quot;);for(r.push(&quot;__g:while(j--\x3eleft){&quot;,&quot;dptr=0&quot;,&quot;sptr=cptr-s0&quot;),u=1;u&lt;t.length;++u)1===u&amp;&amp;r.push(&quot;__l:&quot;),r.push([&quot;for(i&quot;,u,&quot;=0;i&quot;,u,&quot;&lt;n&quot;,u,&quot;;++i&quot;,u,&quot;){&quot;].join(&quot;&quot;));for(r.push([&quot;a=&quot;,f(&quot;sptr&quot;),&quot;\nb=scratch[dptr]\nif(a&lt;b){break __g}\nif(a&gt;b){break __l}&quot;].join(&quot;&quot;)),u=t.length-1;u&gt;=1;--u)r.push(&quot;sptr+=e&quot;+u,&quot;dptr+=f&quot;+u,&quot;}&quot;);for(r.push(&quot;dptr=cptr;sptr=cptr-s0&quot;),u=t.length-1;u&gt;=0;--u)0!==(p=t[u])&amp;&amp;r.push([&quot;for(i&quot;,p,&quot;=0;i&quot;,p,&quot;&lt;n&quot;,p,&quot;;++i&quot;,p,&quot;){&quot;].join(&quot;&quot;));for(r.push(h(&quot;dptr&quot;,f(&quot;sptr&quot;))),u=0;u&lt;t.length;++u)0!==(p=t[u])&amp;&amp;r.push([&quot;dptr+=d&quot;,p,&quot;;sptr+=d&quot;,p].join(&quot;&quot;),&quot;}&quot;);for(r.push(&quot;cptr-=s0\n}&quot;),r.push(&quot;dptr=cptr;sptr=0&quot;),u=t.length-1;u&gt;=0;--u)0!==(p=t[u])&amp;&amp;r.push([&quot;for(i&quot;,p,&quot;=0;i&quot;,p,&quot;&lt;n&quot;,p,&quot;;++i&quot;,p,&quot;){&quot;].join(&quot;&quot;));for(r.push(h(&quot;dptr&quot;,&quot;scratch[sptr++]&quot;)),u=0;u&lt;t.length;++u){var p;0!==(p=t[u])&amp;&amp;r.push(&quot;dptr+=d&quot;+p,&quot;}&quot;)}}else r.push(&quot;scratch=&quot;+f(&quot;ptr&quot;),&quot;while((j--\x3eleft)&amp;&amp;(&quot;+f(&quot;cptr-s0&quot;)+&quot;&gt;scratch)){&quot;,h(&quot;cptr&quot;,f(&quot;cptr-s0&quot;)),&quot;cptr-=s0&quot;,&quot;}&quot;,h(&quot;cptr&quot;,&quot;scratch&quot;));return r.push(&quot;}&quot;),t.length&gt;1&amp;&amp;s&amp;&amp;r.push(&quot;free(scratch)&quot;),r.push(&quot;} return &quot;+n),s?new Function(&quot;malloc&quot;,&quot;free&quot;,r.join(&quot;\n&quot;))(s[0],s[1]):new Function(r.join(&quot;\n&quot;))()}(t,e),y=function(t,e,r){var n=[&quot;'use strict'&quot;],s=[&quot;ndarrayQuickSort&quot;,t.join(&quot;d&quot;),e].join(&quot;&quot;),l=[&quot;left&quot;,&quot;right&quot;,&quot;data&quot;,&quot;offset&quot;].concat(o(t.length)),c=a(e),u=0;n.push([&quot;function &quot;,s,&quot;(&quot;,l.join(&quot;,&quot;),&quot;){&quot;].join(&quot;&quot;));var f=[&quot;sixth=((right-left+1)/6)|0&quot;,&quot;index1=left+sixth&quot;,&quot;index5=right-sixth&quot;,&quot;index3=(left+right)&gt;&gt;1&quot;,&quot;index2=index3-sixth&quot;,&quot;index4=index3+sixth&quot;,&quot;el1=index1&quot;,&quot;el2=index2&quot;,&quot;el3=index3&quot;,&quot;el4=index4&quot;,&quot;el5=index5&quot;,&quot;less=left+1&quot;,&quot;great=right-1&quot;,&quot;pivots_are_equal=true&quot;,&quot;tmp&quot;,&quot;tmp0&quot;,&quot;x&quot;,&quot;y&quot;,&quot;z&quot;,&quot;k&quot;,&quot;ptr0&quot;,&quot;ptr1&quot;,&quot;ptr2&quot;,&quot;comp_pivot1=0&quot;,&quot;comp_pivot2=0&quot;,&quot;comp=0&quot;];if(t.length&gt;1){for(var h=[],p=1;p&lt;t.length;++p)h.push(&quot;n&quot;+p),f.push(&quot;i&quot;+p);for(p=0;p&lt;8;++p)f.push(&quot;b_ptr&quot;+p);f.push(&quot;ptr3&quot;,&quot;ptr4&quot;,&quot;ptr5&quot;,&quot;ptr6&quot;,&quot;ptr7&quot;,&quot;pivot_ptr&quot;,&quot;ptr_shift&quot;,&quot;elementSize=&quot;+h.join(&quot;*&quot;)),c?f.push(&quot;pivot1=malloc(elementSize)&quot;,&quot;pivot2=malloc(elementSize)&quot;):f.push(&quot;pivot1=new Array(elementSize),pivot2=new Array(elementSize)&quot;)}else f.push(&quot;pivot1&quot;,&quot;pivot2&quot;);function d(t){return[&quot;(offset+&quot;,t,&quot;*s0)&quot;].join(&quot;&quot;)}function g(t){return&quot;generic&quot;===e?[&quot;data.get(&quot;,t,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]&quot;].join(&quot;&quot;)}function m(t,r){return&quot;generic&quot;===e?[&quot;data.set(&quot;,t,&quot;,&quot;,r,&quot;)&quot;].join(&quot;&quot;):[&quot;data[&quot;,t,&quot;]=&quot;,r].join(&quot;&quot;)}function v(e,r,i){if(1===e.length)n.push(&quot;ptr0=&quot;+d(e[0]));else for(var a=0;a&lt;e.length;++a)n.push([&quot;b_ptr&quot;,a,&quot;=s0*&quot;,e[a]].join(&quot;&quot;));for(r&amp;&amp;n.push(&quot;pivot_ptr=0&quot;),n.push(&quot;ptr_shift=offset&quot;),a=t.length-1;a&gt;=0;--a)0!==(o=t[a])&amp;&amp;n.push([&quot;for(i&quot;,o,&quot;=0;i&quot;,o,&quot;&lt;n&quot;,o,&quot;;++i&quot;,o,&quot;){&quot;].join(&quot;&quot;));if(e.length&gt;1)for(a=0;a&lt;e.length;++a)n.push([&quot;ptr&quot;,a,&quot;=b_ptr&quot;,a,&quot;+ptr_shift&quot;].join(&quot;&quot;));for(n.push(i),r&amp;&amp;n.push(&quot;++pivot_ptr&quot;),a=0;a&lt;t.length;++a){var o;0!==(o=t[a])&amp;&amp;(e.length&gt;1?n.push(&quot;ptr_shift+=d&quot;+o):n.push(&quot;ptr0+=d&quot;+o),n.push(&quot;}&quot;))}}function y(e,r,i,a){if(1===r.length)n.push(&quot;ptr0=&quot;+d(r[0]));else{for(var o=0;o&lt;r.length;++o)n.push([&quot;b_ptr&quot;,o,&quot;=s0*&quot;,r[o]].join(&quot;&quot;));n.push(&quot;ptr_shift=offset&quot;)}for(i&amp;&amp;n.push(&quot;pivot_ptr=0&quot;),e&amp;&amp;n.push(e+&quot;:&quot;),o=1;o&lt;t.length;++o)n.push([&quot;for(i&quot;,o,&quot;=0;i&quot;,o,&quot;&lt;n&quot;,o,&quot;;++i&quot;,o,&quot;){&quot;].join(&quot;&quot;));if(r.length&gt;1)for(o=0;o&lt;r.length;++o)n.push([&quot;ptr&quot;,o,&quot;=b_ptr&quot;,o,&quot;+ptr_shift&quot;].join(&quot;&quot;));for(n.push(a),o=t.length-1;o&gt;=1;--o)i&amp;&amp;n.push(&quot;pivot_ptr+=f&quot;+o),r.length&gt;1?n.push(&quot;ptr_shift+=e&quot;+o):n.push(&quot;ptr0+=e&quot;+o),n.push(&quot;}&quot;)}function x(){t.length&gt;1&amp;&amp;c&amp;&amp;n.push(&quot;free(pivot1)&quot;,&quot;free(pivot2)&quot;)}function b(e,r){var i=&quot;el&quot;+e,a=&quot;el&quot;+r;if(t.length&gt;1){var o=&quot;__l&quot;+ ++u;y(o,[i,a],!1,[&quot;comp=&quot;,g(&quot;ptr0&quot;),&quot;-&quot;,g(&quot;ptr1&quot;),&quot;\n&quot;,&quot;if(comp&gt;0){tmp0=&quot;,i,&quot;;&quot;,i,&quot;=&quot;,a,&quot;;&quot;,a,&quot;=tmp0;break &quot;,o,&quot;}\n&quot;,&quot;if(comp&lt;0){break &quot;,o,&quot;}&quot;].join(&quot;&quot;))}else n.push([&quot;if(&quot;,g(d(i)),&quot;&gt;&quot;,g(d(a)),&quot;){tmp0=&quot;,i,&quot;;&quot;,i,&quot;=&quot;,a,&quot;;&quot;,a,&quot;=tmp0}&quot;].join(&quot;&quot;))}function _(e,r){t.length&gt;1?v([e,r],!1,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;))):n.push(m(d(e),g(d(r))))}function w(e,r,i){if(t.length&gt;1){var a=&quot;__l&quot;+ ++u;y(a,[r],!0,[e,&quot;=&quot;,g(&quot;ptr0&quot;),&quot;-pivot&quot;,i,&quot;[pivot_ptr]\n&quot;,&quot;if(&quot;,e,&quot;!==0){break &quot;,a,&quot;}&quot;].join(&quot;&quot;))}else n.push([e,&quot;=&quot;,g(d(r)),&quot;-pivot&quot;,i].join(&quot;&quot;))}function k(e,r){t.length&gt;1?v([e,r],!1,[&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,&quot;tmp&quot;)].join(&quot;&quot;)):n.push([&quot;ptr0=&quot;,d(e),&quot;\n&quot;,&quot;ptr1=&quot;,d(r),&quot;\n&quot;,&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,&quot;tmp&quot;)].join(&quot;&quot;))}function M(e,r,i){t.length&gt;1?(v([e,r,i],!1,[&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,g(&quot;ptr2&quot;)),&quot;\n&quot;,m(&quot;ptr2&quot;,&quot;tmp&quot;)].join(&quot;&quot;)),n.push(&quot;++&quot;+r,&quot;--&quot;+i)):n.push([&quot;ptr0=&quot;,d(e),&quot;\n&quot;,&quot;ptr1=&quot;,d(r),&quot;\n&quot;,&quot;ptr2=&quot;,d(i),&quot;\n&quot;,&quot;++&quot;,r,&quot;\n&quot;,&quot;--&quot;,i,&quot;\n&quot;,&quot;tmp=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,g(&quot;ptr2&quot;)),&quot;\n&quot;,m(&quot;ptr2&quot;,&quot;tmp&quot;)].join(&quot;&quot;))}function A(t,e){k(t,e),n.push(&quot;--&quot;+e)}function T(e,r,i){t.length&gt;1?v([e,r],!0,[m(&quot;ptr0&quot;,g(&quot;ptr1&quot;)),&quot;\n&quot;,m(&quot;ptr1&quot;,[&quot;pivot&quot;,i,&quot;[pivot_ptr]&quot;].join(&quot;&quot;))].join(&quot;&quot;)):n.push(m(d(e),g(d(r))),m(d(r),&quot;pivot&quot;+i))}function S(e,r){n.push([&quot;if((&quot;,r,&quot;-&quot;,e,&quot;)&lt;=&quot;,i,&quot;){\n&quot;,&quot;insertionSort(&quot;,e,&quot;,&quot;,r,&quot;,data,offset,&quot;,o(t.length).join(&quot;,&quot;),&quot;)\n&quot;,&quot;}else{\n&quot;,s,&quot;(&quot;,e,&quot;,&quot;,r,&quot;,data,offset,&quot;,o(t.length).join(&quot;,&quot;),&quot;)\n&quot;,&quot;}&quot;].join(&quot;&quot;))}function E(e,r,i){t.length&gt;1?(n.push([&quot;__l&quot;,++u,&quot;:while(true){&quot;].join(&quot;&quot;)),v([e],!0,[&quot;if(&quot;,g(&quot;ptr0&quot;),&quot;!==pivot&quot;,r,&quot;[pivot_ptr]){break __l&quot;,u,&quot;}&quot;].join(&quot;&quot;)),n.push(i,&quot;}&quot;)):n.push([&quot;while(&quot;,g(d(e)),&quot;===pivot&quot;,r,&quot;){&quot;,i,&quot;}&quot;].join(&quot;&quot;))}return n.push(&quot;var &quot;+f.join(&quot;,&quot;)),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length&gt;1?v([&quot;el1&quot;,&quot;el2&quot;,&quot;el3&quot;,&quot;el4&quot;,&quot;el5&quot;,&quot;index1&quot;,&quot;index3&quot;,&quot;index5&quot;],!0,[&quot;pivot1[pivot_ptr]=&quot;,g(&quot;ptr1&quot;),&quot;\n&quot;,&quot;pivot2[pivot_ptr]=&quot;,g(&quot;ptr3&quot;),&quot;\n&quot;,&quot;pivots_are_equal=pivots_are_equal&amp;&amp;(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n&quot;,&quot;x=&quot;,g(&quot;ptr0&quot;),&quot;\n&quot;,&quot;y=&quot;,g(&quot;ptr2&quot;),&quot;\n&quot;,&quot;z=&quot;,g(&quot;ptr4&quot;),&quot;\n&quot;,m(&quot;ptr5&quot;,&quot;x&quot;),&quot;\n&quot;,m(&quot;ptr6&quot;,&quot;y&quot;),&quot;\n&quot;,m(&quot;ptr7&quot;,&quot;z&quot;)].join(&quot;&quot;)):n.push([&quot;pivot1=&quot;,g(d(&quot;el2&quot;)),&quot;\n&quot;,&quot;pivot2=&quot;,g(d(&quot;el4&quot;)),&quot;\n&quot;,&quot;pivots_are_equal=pivot1===pivot2\n&quot;,&quot;x=&quot;,g(d(&quot;el1&quot;)),&quot;\n&quot;,&quot;y=&quot;,g(d(&quot;el3&quot;)),&quot;\n&quot;,&quot;z=&quot;,g(d(&quot;el5&quot;)),&quot;\n&quot;,m(d(&quot;index1&quot;),&quot;x&quot;),&quot;\n&quot;,m(d(&quot;index3&quot;),&quot;y&quot;),&quot;\n&quot;,m(d(&quot;index5&quot;),&quot;z&quot;)].join(&quot;&quot;)),_(&quot;index2&quot;,&quot;left&quot;),_(&quot;index4&quot;,&quot;right&quot;),n.push(&quot;if(pivots_are_equal){&quot;),n.push(&quot;for(k=less;k&lt;=great;++k){&quot;),w(&quot;comp&quot;,&quot;k&quot;,1),n.push(&quot;if(comp===0){continue}&quot;),n.push(&quot;if(comp&lt;0){&quot;),n.push(&quot;if(k!==less){&quot;),k(&quot;k&quot;,&quot;less&quot;),n.push(&quot;}&quot;),n.push(&quot;++less&quot;),n.push(&quot;}else{&quot;),n.push(&quot;while(true){&quot;),w(&quot;comp&quot;,&quot;great&quot;,1),n.push(&quot;if(comp&gt;0){&quot;),n.push(&quot;great--&quot;),n.push(&quot;}else if(comp&lt;0){&quot;),M(&quot;k&quot;,&quot;less&quot;,&quot;great&quot;),n.push(&quot;break&quot;),n.push(&quot;}else{&quot;),A(&quot;k&quot;,&quot;great&quot;),n.push(&quot;break&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}else{&quot;),n.push(&quot;for(k=less;k&lt;=great;++k){&quot;),w(&quot;comp_pivot1&quot;,&quot;k&quot;,1),n.push(&quot;if(comp_pivot1&lt;0){&quot;),n.push(&quot;if(k!==less){&quot;),k(&quot;k&quot;,&quot;less&quot;),n.push(&quot;}&quot;),n.push(&quot;++less&quot;),n.push(&quot;}else{&quot;),w(&quot;comp_pivot2&quot;,&quot;k&quot;,2),n.push(&quot;if(comp_pivot2&gt;0){&quot;),n.push(&quot;while(true){&quot;),w(&quot;comp&quot;,&quot;great&quot;,2),n.push(&quot;if(comp&gt;0){&quot;),n.push(&quot;if(--great&lt;k){break}&quot;),n.push(&quot;continue&quot;),n.push(&quot;}else{&quot;),w(&quot;comp&quot;,&quot;great&quot;,1),n.push(&quot;if(comp&lt;0){&quot;),M(&quot;k&quot;,&quot;less&quot;,&quot;great&quot;),n.push(&quot;}else{&quot;),A(&quot;k&quot;,&quot;great&quot;),n.push(&quot;}&quot;),n.push(&quot;break&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),T(&quot;left&quot;,&quot;(less-1)&quot;,1),T(&quot;right&quot;,&quot;(great+1)&quot;,2),S(&quot;left&quot;,&quot;(less-2)&quot;),S(&quot;(great+2)&quot;,&quot;right&quot;),n.push(&quot;if(pivots_are_equal){&quot;),x(),n.push(&quot;return&quot;),n.push(&quot;}&quot;),n.push(&quot;if(less&lt;index1&amp;&amp;great&gt;index5){&quot;),E(&quot;less&quot;,1,&quot;++less&quot;),E(&quot;great&quot;,2,&quot;--great&quot;),n.push(&quot;for(k=less;k&lt;=great;++k){&quot;),w(&quot;comp_pivot1&quot;,&quot;k&quot;,1),n.push(&quot;if(comp_pivot1===0){&quot;),n.push(&quot;if(k!==less){&quot;),k(&quot;k&quot;,&quot;less&quot;),n.push(&quot;}&quot;),n.push(&quot;++less&quot;),n.push(&quot;}else{&quot;),w(&quot;comp_pivot2&quot;,&quot;k&quot;,2),n.push(&quot;if(comp_pivot2===0){&quot;),n.push(&quot;while(true){&quot;),w(&quot;comp&quot;,&quot;great&quot;,2),n.push(&quot;if(comp===0){&quot;),n.push(&quot;if(--great&lt;k){break}&quot;),n.push(&quot;continue&quot;),n.push(&quot;}else{&quot;),w(&quot;comp&quot;,&quot;great&quot;,1),n.push(&quot;if(comp&lt;0){&quot;),M(&quot;k&quot;,&quot;less&quot;,&quot;great&quot;),n.push(&quot;}else{&quot;),A(&quot;k&quot;,&quot;great&quot;),n.push(&quot;}&quot;),n.push(&quot;break&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),n.push(&quot;}&quot;),x(),S(&quot;less&quot;,&quot;great&quot;),n.push(&quot;}return &quot;+s),t.length&gt;1&amp;&amp;c?new Function(&quot;insertionSort&quot;,&quot;malloc&quot;,&quot;free&quot;,n.join(&quot;\n&quot;))(r,c[0],c[1]):new Function(&quot;insertionSort&quot;,n.join(&quot;\n&quot;))(r)}(t,e,v);return m(v,y)}},{&quot;typedarray-pool&quot;:519}],428:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./lib/compile_sort.js&quot;),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(&quot;:&quot;),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{&quot;./lib/compile_sort.js&quot;:427}],429:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;ndarray-linear-interpolate&quot;),i=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=new Array(_inline_3_arg4_)}&quot;,args:[{name:&quot;_inline_3_arg0_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg1_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg2_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg3_&quot;,lvalue:!1,rvalue:!1,count:0},{name:&quot;_inline_3_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}&quot;,args:[{name:&quot;_inline_4_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_4_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_4_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_4_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_4_arg4_&quot;,lvalue:!1,rvalue:!1,count:0}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warpND&quot;,blockSize:64}),a=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=[0]}&quot;,args:[],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}&quot;,args:[{name:&quot;_inline_7_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_7_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_7_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_7_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_7_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warp1D&quot;,blockSize:64}),o=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=[0,0]}&quot;,args:[],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}&quot;,args:[{name:&quot;_inline_10_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_10_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_10_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_10_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_10_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warp2D&quot;,blockSize:64}),s=t(&quot;cwise/lib/wrapper&quot;)({args:[&quot;index&quot;,&quot;array&quot;,&quot;scalar&quot;,&quot;scalar&quot;,&quot;scalar&quot;],pre:{body:&quot;{this_warped=[0,0,0]}&quot;,args:[],thisVars:[&quot;this_warped&quot;],localVars:[]},body:{body:&quot;{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}&quot;,args:[{name:&quot;_inline_13_arg0_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_13_arg1_&quot;,lvalue:!0,rvalue:!1,count:1},{name:&quot;_inline_13_arg2_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_13_arg3_&quot;,lvalue:!1,rvalue:!0,count:1},{name:&quot;_inline_13_arg4_&quot;,lvalue:!1,rvalue:!0,count:1}],thisVars:[&quot;this_warped&quot;],localVars:[]},post:{body:&quot;{}&quot;,args:[],thisVars:[],localVars:[]},debug:!1,funcName:&quot;warp3D&quot;,blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{&quot;cwise/lib/wrapper&quot;:136,&quot;ndarray-linear-interpolate&quot;:423}],430:[function(t,e,r){var n=t(&quot;iota-array&quot;),i=t(&quot;is-buffer&quot;),a=&quot;undefined&quot;!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;t&lt;r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(o);var n=new Array(r.length);for(t=0;t&lt;n.length;++t)n[t]=r[t][1];return n}function l(t,e){var r=[&quot;View&quot;,e,&quot;d&quot;,t].join(&quot;&quot;);e&lt;0&amp;&amp;(r=&quot;View_Nil&quot;+t);var i=&quot;generic&quot;===t;if(-1===e){var a=&quot;function &quot;+r+&quot;(a){this.data=a;};var proto=&quot;+r+&quot;.prototype;proto.dtype='&quot;+t+&quot;';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new &quot;+r+&quot;(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_&quot;+r+&quot;(a){return new &quot;+r+&quot;(a);}&quot;;return new Function(a)()}if(0===e){a=&quot;function &quot;+r+&quot;(a,d) {this.data = a;this.offset = d};var proto=&quot;+r+&quot;.prototype;proto.dtype='&quot;+t+&quot;';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function &quot;+r+&quot;_copy() {return new &quot;+r+&quot;(this.data,this.offset)};proto.pick=function &quot;+r+&quot;_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function &quot;+r+&quot;_get(){return &quot;+(i?&quot;this.data.get(this.offset)&quot;:&quot;this.data[this.offset]&quot;)+&quot;};proto.set=function &quot;+r+&quot;_set(v){return &quot;+(i?&quot;this.data.set(this.offset,v)&quot;:&quot;this.data[this.offset]=v&quot;)+&quot;};return function construct_&quot;+r+&quot;(a,b,c,d){return new &quot;+r+&quot;(a,d)}&quot;;return new Function(&quot;TrivialArray&quot;,a)(c[t][0])}a=[&quot;'use strict'&quot;];var o=n(e),l=o.map(function(t){return&quot;i&quot;+t}),u=&quot;this.offset+&quot;+o.map(function(t){return&quot;this.stride[&quot;+t+&quot;]*i&quot;+t}).join(&quot;+&quot;),f=o.map(function(t){return&quot;b&quot;+t}).join(&quot;,&quot;),h=o.map(function(t){return&quot;c&quot;+t}).join(&quot;,&quot;);a.push(&quot;function &quot;+r+&quot;(a,&quot;+f+&quot;,&quot;+h+&quot;,d){this.data=a&quot;,&quot;this.shape=[&quot;+f+&quot;]&quot;,&quot;this.stride=[&quot;+h+&quot;]&quot;,&quot;this.offset=d|0}&quot;,&quot;var proto=&quot;+r+&quot;.prototype&quot;,&quot;proto.dtype='&quot;+t+&quot;'&quot;,&quot;proto.dimension=&quot;+e),a.push(&quot;Object.defineProperty(proto,'size',{get:function &quot;+r+&quot;_size(){return &quot;+o.map(function(t){return&quot;this.shape[&quot;+t+&quot;]&quot;}).join(&quot;*&quot;),&quot;}})&quot;),1===e?a.push(&quot;proto.order=[0]&quot;):(a.push(&quot;Object.defineProperty(proto,'order',{get:&quot;),e&lt;4?(a.push(&quot;function &quot;+r+&quot;_order(){&quot;),2===e?a.push(&quot;return (Math.abs(this.stride[0])&gt;Math.abs(this.stride[1]))?[1,0]:[0,1]}})&quot;):3===e&amp;&amp;a.push(&quot;var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0&gt;s1){if(s1&gt;s2){return [2,1,0];}else if(s0&gt;s2){return [1,2,0];}else{return [1,0,2];}}else if(s0&gt;s2){return [2,0,1];}else if(s2&gt;s1){return [0,1,2];}else{return [0,2,1];}}})&quot;)):a.push(&quot;ORDER})&quot;)),a.push(&quot;proto.set=function &quot;+r+&quot;_set(&quot;+l.join(&quot;,&quot;)+&quot;,v){&quot;),i?a.push(&quot;return this.data.set(&quot;+u+&quot;,v)}&quot;):a.push(&quot;return this.data[&quot;+u+&quot;]=v}&quot;),a.push(&quot;proto.get=function &quot;+r+&quot;_get(&quot;+l.join(&quot;,&quot;)+&quot;){&quot;),i?a.push(&quot;return this.data.get(&quot;+u+&quot;)}&quot;):a.push(&quot;return this.data[&quot;+u+&quot;]}&quot;),a.push(&quot;proto.index=function &quot;+r+&quot;_index(&quot;,l.join(),&quot;){return &quot;+u+&quot;}&quot;),a.push(&quot;proto.hi=function &quot;+r+&quot;_hi(&quot;+l.join(&quot;,&quot;)+&quot;){return new &quot;+r+&quot;(this.data,&quot;+o.map(function(t){return[&quot;(typeof i&quot;,t,&quot;!=='number'||i&quot;,t,&quot;&lt;0)?this.shape[&quot;,t,&quot;]:i&quot;,t,&quot;|0&quot;].join(&quot;&quot;)}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;this.stride[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,this.offset)}&quot;);var p=o.map(function(t){return&quot;a&quot;+t+&quot;=this.shape[&quot;+t+&quot;]&quot;}),d=o.map(function(t){return&quot;c&quot;+t+&quot;=this.stride[&quot;+t+&quot;]&quot;});a.push(&quot;proto.lo=function &quot;+r+&quot;_lo(&quot;+l.join(&quot;,&quot;)+&quot;){var b=this.offset,d=0,&quot;+p.join(&quot;,&quot;)+&quot;,&quot;+d.join(&quot;,&quot;));for(var g=0;g&lt;e;++g)a.push(&quot;if(typeof i&quot;+g+&quot;==='number'&amp;&amp;i&quot;+g+&quot;&gt;=0){d=i&quot;+g+&quot;|0;b+=c&quot;+g+&quot;*d;a&quot;+g+&quot;-=d}&quot;);a.push(&quot;return new &quot;+r+&quot;(this.data,&quot;+o.map(function(t){return&quot;a&quot;+t}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;c&quot;+t}).join(&quot;,&quot;)+&quot;,b)}&quot;),a.push(&quot;proto.step=function &quot;+r+&quot;_step(&quot;+l.join(&quot;,&quot;)+&quot;){var &quot;+o.map(function(t){return&quot;a&quot;+t+&quot;=this.shape[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;b&quot;+t+&quot;=this.stride[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,c=this.offset,d=0,ceil=Math.ceil&quot;);for(g=0;g&lt;e;++g)a.push(&quot;if(typeof i&quot;+g+&quot;==='number'){d=i&quot;+g+&quot;|0;if(d&lt;0){c+=b&quot;+g+&quot;*(a&quot;+g+&quot;-1);a&quot;+g+&quot;=ceil(-a&quot;+g+&quot;/d)}else{a&quot;+g+&quot;=ceil(a&quot;+g+&quot;/d)}b&quot;+g+&quot;*=d}&quot;);a.push(&quot;return new &quot;+r+&quot;(this.data,&quot;+o.map(function(t){return&quot;a&quot;+t}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;b&quot;+t}).join(&quot;,&quot;)+&quot;,c)}&quot;);var m=new Array(e),v=new Array(e);for(g=0;g&lt;e;++g)m[g]=&quot;a[i&quot;+g+&quot;]&quot;,v[g]=&quot;b[i&quot;+g+&quot;]&quot;;a.push(&quot;proto.transpose=function &quot;+r+&quot;_transpose(&quot;+l+&quot;){&quot;+l.map(function(t,e){return t+&quot;=(&quot;+t+&quot;===undefined?&quot;+e+&quot;:&quot;+t+&quot;|0)&quot;}).join(&quot;;&quot;),&quot;var a=this.shape,b=this.stride;return new &quot;+r+&quot;(this.data,&quot;+m.join(&quot;,&quot;)+&quot;,&quot;+v.join(&quot;,&quot;)+&quot;,this.offset)}&quot;),a.push(&quot;proto.pick=function &quot;+r+&quot;_pick(&quot;+l+&quot;){var a=[],b=[],c=this.offset&quot;);for(g=0;g&lt;e;++g)a.push(&quot;if(typeof i&quot;+g+&quot;==='number'&amp;&amp;i&quot;+g+&quot;&gt;=0){c=(c+this.stride[&quot;+g+&quot;]*i&quot;+g+&quot;)|0}else{a.push(this.shape[&quot;+g+&quot;]);b.push(this.stride[&quot;+g+&quot;])}&quot;);return a.push(&quot;var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}&quot;),a.push(&quot;return function construct_&quot;+r+&quot;(data,shape,stride,offset){return new &quot;+r+&quot;(data,&quot;+o.map(function(t){return&quot;shape[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,&quot;+o.map(function(t){return&quot;stride[&quot;+t+&quot;]&quot;}).join(&quot;,&quot;)+&quot;,offset)}&quot;),new Function(&quot;CTOR_LIST&quot;,&quot;ORDER&quot;,a.join(&quot;\n&quot;))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);&quot;number&quot;==typeof t&amp;&amp;(t=[t]),void 0===e&amp;&amp;(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s&gt;=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s&lt;o;++s)r[s]&lt;0&amp;&amp;(n-=(e[s]-1)*r[s]);for(var f=function(t){if(i(t))return&quot;buffer&quot;;if(a)switch(Object.prototype.toString.call(t)){case&quot;[object Float64Array]&quot;:return&quot;float64&quot;;case&quot;[object Float32Array]&quot;:return&quot;float32&quot;;case&quot;[object Int8Array]&quot;:return&quot;int8&quot;;case&quot;[object Int16Array]&quot;:return&quot;int16&quot;;case&quot;[object Int32Array]&quot;:return&quot;int32&quot;;case&quot;[object Uint8Array]&quot;:return&quot;uint8&quot;;case&quot;[object Uint16Array]&quot;:return&quot;uint16&quot;;case&quot;[object Uint32Array]&quot;:return&quot;uint32&quot;;case&quot;[object Uint8ClampedArray]&quot;:return&quot;uint8_clamped&quot;}return Array.isArray(t)?&quot;array&quot;:&quot;generic&quot;}(t),h=c[f];h.length&lt;=o+1;)h.push(l(f,h.length-1));return(0,h[o+1])(t,e,r,n)}},{&quot;iota-array&quot;:397,&quot;is-buffer&quot;:399}],431:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;double-bits&quot;),i=Math.pow(2,-1074),a=-1&gt;&gt;&gt;0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e&lt;0?-i:i;var r=n.hi(t),o=n.lo(t);e&gt;t==t&gt;0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1;return n.pack(o,r)}},{&quot;double-bits&quot;:151}],432:[function(t,e,r){var n=Math.PI,i=c(120);function a(t,e,r,n){return[&quot;C&quot;,t,e,r,n,r,n]}function o(t,e,r,n,i,a){return[&quot;C&quot;,t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,c,u,f,h,p){if(p)k=p[0],M=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(f=(d=l(f,h,-o)).x))/2,m=(e-(h=d.y))/2,v=g*g/(r*r)+m*m/(a*a);v&gt;1&amp;&amp;(r*=v=Math.sqrt(v),a*=v);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*m*m-x*g*g)/(y*m*m+x*g*g)));b==1/0&amp;&amp;(b=1);var _=b*r*m/a+(t+f)/2,w=b*-a*g/r+(e+h)/2,k=Math.asin(((e-w)/a).toFixed(9)),M=Math.asin(((h-w)/a).toFixed(9));(k=t&lt;_?n-k:k)&lt;0&amp;&amp;(k=2*n+k),(M=f&lt;_?n-M:M)&lt;0&amp;&amp;(M=2*n+M),u&amp;&amp;k&gt;M&amp;&amp;(k-=2*n),!u&amp;&amp;M&gt;k&amp;&amp;(M-=2*n)}if(Math.abs(M-k)&gt;i){var A=M,T=f,S=h;M=k+i*(u&amp;&amp;M&gt;k?1:-1);var E=s(f=_+r*Math.cos(M),h=w+a*Math.sin(M),r,a,o,0,u,T,S,[M,A,_,w])}var C=Math.tan((M-k)/4),L=4/3*r*C,z=4/3*a*C,P=[2*t-(t+L*Math.sin(k)),2*e-(e-z*Math.cos(k)),f+L*Math.sin(M),h-z*Math.cos(M),f,h];if(p)return P;E&amp;&amp;(P=P.concat(E));for(var O=0;O&lt;P.length;){var I=l(P[O],P[O+1],o);P[O++]=I.x,P[O++]=I.y}return P}function l(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function c(t){return t*(n/180)}e.exports=function(t){for(var e,r=[],n=0,i=0,l=0,u=0,f=null,h=null,p=0,d=0,g=0,m=t.length;g&lt;m;g++){var v=t[g],y=v[0];switch(y){case&quot;M&quot;:l=v[1],u=v[2];break;case&quot;A&quot;:(v=s(p,d,v[1],v[2],c(v[3]),v[4],v[5],v[6],v[7])).unshift(&quot;C&quot;),v.length&gt;7&amp;&amp;(r.push(v.splice(0,7)),v.unshift(&quot;C&quot;));break;case&quot;S&quot;:var x=p,b=d;&quot;C&quot;!=e&amp;&amp;&quot;S&quot;!=e||(x+=x-n,b+=b-i),v=[&quot;C&quot;,x,b,v[1],v[2],v[3],v[4]];break;case&quot;T&quot;:&quot;Q&quot;==e||&quot;T&quot;==e?(f=2*p-f,h=2*d-h):(f=p,h=d),v=o(p,d,f,h,v[1],v[2]);break;case&quot;Q&quot;:f=v[1],h=v[2],v=o(p,d,v[1],v[2],v[3],v[4]);break;case&quot;L&quot;:v=a(p,d,v[1],v[2]);break;case&quot;H&quot;:v=a(p,d,v[1],d);break;case&quot;V&quot;:v=a(p,d,p,v[1]);break;case&quot;Z&quot;:v=a(p,d,l,u)}e=y,p=v[v.length-2],d=v[v.length-1],v.length&gt;4?(n=v[v.length-4],i=v[v.length-3]):(n=p,i=d),r.push(v)}return r}},{}],433:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o&lt;n;++o)i[o]=[0,0,0];for(o=0;o&lt;t.length;++o)for(var s=t[o],l=0,c=s[s.length-1],u=s[0],f=0;f&lt;s.length;++f){l=c,c=u,u=s[(f+1)%s.length];for(var h=e[l],p=e[c],d=e[u],g=new Array(3),m=0,v=new Array(3),y=0,x=0;x&lt;3;++x)g[x]=h[x]-p[x],m+=g[x]*g[x],v[x]=d[x]-p[x],y+=v[x]*v[x];if(m*y&gt;a){var b=i[c],_=1/Math.sqrt(m*y);for(x=0;x&lt;3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(v[w]*g[k]-v[k]*g[w])}}}for(o=0;o&lt;n;++o){b=i[o];var M=0;for(x=0;x&lt;3;++x)M+=b[x]*b[x];if(M&gt;a)for(_=1/Math.sqrt(M),x=0;x&lt;3;++x)b[x]*=_;else for(x=0;x&lt;3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o&lt;n;++o){for(var s=t[o],l=new Array(3),c=0;c&lt;3;++c)l[c]=e[s[c]];var u=new Array(3),f=new Array(3);for(c=0;c&lt;3;++c)u[c]=l[1][c]-l[0][c],f[c]=l[2][c]-l[0][c];var h=new Array(3),p=0;for(c=0;c&lt;3;++c){var d=(c+1)%3,g=(c+2)%3;h[c]=u[d]*f[g]-u[g]*f[d],p+=h[c]*h[c]}p=p&gt;a?1/Math.sqrt(p):0;for(c=0;c&lt;3;++c)h[c]*=p;i[o]=h}return i}},{}],434:[function(t,e,r){&quot;use strict&quot;;var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String(&quot;abc&quot;);if(t[5]=&quot;de&quot;,&quot;5&quot;===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r&lt;10;r++)e[&quot;_&quot;+String.fromCharCode(r)]=r;if(&quot;0123456789&quot;!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(&quot;&quot;))return!1;var n={};return&quot;abcdefghijklmnopqrst&quot;.split(&quot;&quot;).forEach(function(t){n[t]=t}),&quot;abcdefghijklmnopqrst&quot;===Object.keys(Object.assign({},n)).join(&quot;&quot;)}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError(&quot;Object.assign cannot be called with null or undefined&quot;);return Object(t)}(t),l=1;l&lt;arguments.length;l++){for(var c in r=Object(arguments[l]))i.call(r,c)&amp;&amp;(s[c]=r[c]);if(n){o=n(r);for(var u=0;u&lt;o.length;u++)a.call(r,o[u])&amp;&amp;(s[o[u]]=r[o[u]])}}return s}},{}],435:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n,i,a,o,s,l,c){var u=e+a+c;if(f&gt;0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c),f=Math.sqrt(2*h-u+1);e&gt;=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a&gt;=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],436:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),(&quot;eye&quot;in t||&quot;up&quot;in t)&amp;&amp;i.lookAt(0,t.eye,t.center,t.up);return i};var n=t(&quot;filtered-vector&quot;),i=t(&quot;gl-mat4/lookAt&quot;),a=t(&quot;gl-mat4/fromQuat&quot;),o=t(&quot;gl-mat4/invert&quot;),s=t(&quot;./lib/quatFromFrame&quot;);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o&gt;1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l&lt;3;++l){for(var c=0,f=0;f&lt;3;++f)c+=r[l+4*f]*i[f];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n&lt;16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=l(u-=a*p,f-=o*p,h-=s*p);u/=d,f/=d,h/=d;var g=i[2],m=i[6],v=i[10],y=g*a+m*o+v*s,x=g*u+m*f+v*h,b=l(g-=y*a+x*u,m-=y*o+x*f,v-=y*s+x*h);g/=b,m/=b,v/=b;var _=u*e+a*r,w=f*e+o*r,k=h*e+s*r;this.center.move(t,_,w,k);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+n),this.radius.set(t,Math.log(M))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],f=i[5],h=i[9],p=i[2],d=i[6],g=i[10],m=e*a+r*u,v=e*o+r*f,y=e*s+r*h,x=-(d*y-g*v),b=-(g*m-p*y),_=-(p*v-d*m),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k&gt;1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var M=this.computedRotation,A=M[0],T=M[1],S=M[2],E=M[3],C=A*w+E*x+T*_-S*b,L=T*w+E*b+S*x-A*_,z=S*w+E*_+A*b-T*x,P=E*w-A*x-T*b-S*_;if(n){x=p,b=d,_=g;var O=Math.sin(n)/l(x,b,_);x*=O,b*=O,_*=O,P=P*(w=Math.cos(e))-(C=C*w+P*x+L*_-z*b)*x-(L=L*w+P*b+z*x-C*_)*b-(z=z*w+P*_+C*b-L*x)*_}var I=c(C,L,z,P);I&gt;1e-6?(C/=I,L/=I,z/=I,P/=I):(C=L=z=0,P=1),this.rotation.set(t,C,L,z,P)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c&lt;3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)&gt;1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,c-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e&gt;0&amp;&amp;this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t&gt;0?Math.log(t):-1/0,e=e&gt;0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&amp;&amp;this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&amp;&amp;this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&amp;&amp;i&gt;0&amp;&amp;this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{&quot;./lib/quatFromFrame&quot;:435,&quot;filtered-vector&quot;:214,&quot;gl-mat4/fromQuat&quot;:250,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/lookAt&quot;:254}],437:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;repeat-string&quot;);e.exports=function(t,e,r){return n(r=&quot;undefined&quot;!=typeof r?r+&quot;&quot;:&quot; &quot;,e)+t}},{&quot;repeat-string&quot;:476}],438:[function(t,e,r){&quot;use strict&quot;;function n(t,e){if(&quot;string&quot;!=typeof t)return[t];var r=[t];&quot;string&quot;==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:[&quot;{}&quot;,&quot;[]&quot;,&quot;()&quot;],i=e.escape||&quot;___&quot;,a=!!e.flat;n.forEach(function(t){var e=new RegExp([&quot;\\&quot;,t[0],&quot;[^\\&quot;,t[0],&quot;\\&quot;,t[1],&quot;]*\\&quot;,t[1]].join(&quot;&quot;)),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s}r.forEach(function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++&gt;1e4)throw Error(&quot;References have circular dependency. Please, check them.&quot;);r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp(&quot;(\\&quot;+i+r+&quot;(?![0-9]))&quot;,&quot;g&quot;),t[0]+&quot;$1&quot;+t[1])}),e})});var o=new RegExp(&quot;\\&quot;+i+&quot;([0-9]+)&quot;);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++&gt;1e4)throw Error(&quot;Circular references in parenthesis&quot;);a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&amp;&amp;e.flat){var r,n=e&amp;&amp;e.escape||&quot;___&quot;,i=t[0];if(!i)return&quot;&quot;;for(var a=new RegExp(&quot;\\&quot;+n+&quot;([0-9]+)&quot;),o=0;i!=r;){if(o++&gt;1e4)throw Error(&quot;Circular references in &quot;+t);r=i,i=i.replace(a,s)}return i}return t.reduce(function t(e,r){return Array.isArray(r)&amp;&amp;(r=r.reduce(t,&quot;&quot;)),e+r},&quot;&quot;);function s(e,r){if(null==t[r])throw Error(&quot;Reference &quot;+r+&quot;is undefined&quot;);return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],439:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;pick-by-alias&quot;);e.exports=function(t){var e;arguments.length&gt;1&amp;&amp;(t=arguments);&quot;string&quot;==typeof t?t=t.split(/\s/).map(parseFloat):&quot;number&quot;==typeof t&amp;&amp;(t=[t]);t.length&amp;&amp;&quot;number&quot;==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&amp;&amp;(t=n(t,{left:&quot;x l left Left&quot;,top:&quot;y t top Top&quot;,width:&quot;w width W Width&quot;,height:&quot;h height W Width&quot;,bottom:&quot;b bottom Bottom&quot;,right:&quot;r right Right&quot;}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{&quot;pick-by-alias&quot;:445}],440:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),&quot;m&quot;==o&amp;&amp;i.length&gt;2&amp;&amp;(e.push([r].concat(i.splice(0,2))),o=&quot;l&quot;,r=&quot;m&quot;==r?&quot;l&quot;:&quot;L&quot;);;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length&lt;n[o])throw new Error(&quot;malformed path data&quot;);e.push([r].concat(i.splice(0,n[o])))}}),e};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi;var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},{}],441:[function(t,e,r){e.exports=function(t,e){e||(e=[0,&quot;&quot;]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||&quot;&quot;,e}},{}],442:[function(t,e,r){(function(t){(function(){var r,n,i,a,o,s;&quot;undefined&quot;!=typeof performance&amp;&amp;null!==performance&amp;&amp;performance.now?e.exports=function(){return performance.now()}:&quot;undefined&quot;!=typeof t&amp;&amp;null!==t&amp;&amp;t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,a=(r=function(){var t;return 1e9*(t=n())[0]+t[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,t(&quot;_process&quot;))},{_process:462}],443:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=t.length;if(e&lt;n){for(var r=1,a=0;a&lt;e;++a)for(var o=0;o&lt;a;++o)if(t[a]&lt;t[o])r=-r;else if(t[a]===t[o])return 0;return r}for(var s=i.mallocUint8(e),a=0;a&lt;e;++a)s[a]=0;for(var r=1,a=0;a&lt;e;++a)if(!s[a]){var l=1;s[a]=1;for(var o=t[a];o!==a;o=t[o]){if(s[o])return i.freeUint8(s),0;l+=1,s[o]=1}1&amp;l||(r=-r)}return i.freeUint8(s),r};var n=32,i=t(&quot;typedarray-pool&quot;)},{&quot;typedarray-pool&quot;:519}],444:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;typedarray-pool&quot;),i=t(&quot;invert-permutation&quot;);r.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var r,a,o,s=n.mallocUint32(e),l=n.mallocUint32(e),c=0;for(i(t,l),o=0;o&lt;e;++o)s[o]=t[o];for(o=e-1;o&gt;0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a&lt;t;++a)r[a]=a,o=o*a|0;for(a=t-1;a&gt;0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{&quot;invert-permutation&quot;:396,&quot;typedarray-pool&quot;:519}],445:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n,a,o={};if(&quot;string&quot;==typeof e&amp;&amp;(e=i(e)),Array.isArray(e)){var s={};for(a=0;a&lt;e.length;a++)s[e[a]]=!0;e=s}for(n in e)e[n]=i(e[n]);var l={};for(n in e){var c=e[n];if(Array.isArray(c))for(a=0;a&lt;c.length;a++){var u=c[a];if(r&amp;&amp;(l[u]=!0),u in t){if(o[n]=t[u],r)for(var f=a;f&lt;c.length;f++)l[c[f]]=!0;break}}else n in t&amp;&amp;(e[n]&amp;&amp;(o[n]=t[n]),r&amp;&amp;(l[n]=!0))}if(r)for(n in t)l[n]||(o[n]=t[n]);return o};var n={};function i(t){return n[t]?n[t]:(&quot;string&quot;==typeof t&amp;&amp;(t=n[t]=t.split(/\s*,\s*|\s+/)),t)}},{}],446:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o&lt;r;++o)a[0][o]=[],a[1][o]=[];for(var o=0;o&lt;i;++o){var s=t[o];a[0][s[0]].push(s),a[1][s[1]].push(s)}for(var l=[],o=0;o&lt;r;++o)a[0][o].length+a[1][o].length===0&amp;&amp;l.push([o]);function c(t,e){var r=a[e][t[e]];r.splice(r.indexOf(t),1)}function u(t,r,i){for(var o,s,l,u=0;u&lt;2;++u)if(a[u][r].length&gt;0){o=a[u][r][0],l=u;break}s=o[1^l];for(var f=0;f&lt;2;++f)for(var h=a[f][r],p=0;p&lt;h.length;++p){var d=h[p],g=d[1^f],m=n(e[t],e[r],e[s],e[g]);m&gt;0&amp;&amp;(o=d,s=g,l=f)}return i?s:(o&amp;&amp;c(o,l),s)}function f(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=u(l,f,!0);if(n(e[l],e[f],e[h],e[p])&lt;0)break;o.push(t),s=u(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(var o=0;o&lt;r;++o)for(var p=0;p&lt;2;++p){for(var d=[];a[p][o].length&gt;0;){a[0][o].length;var g=f(o,p);h(d,g)?d.push.apply(d,g):(d.length&gt;0&amp;&amp;l.push(d),d=g)}d.length&gt;0&amp;&amp;l.push(d)}return l};var n=t(&quot;compare-angle&quot;)},{&quot;compare-angle&quot;:114}],447:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s&lt;e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l&lt;=1&amp;&amp;o.push(s)}for(;o.length&gt;0;){var c=o.pop();i[c]=!1;for(var u=r[c],s=0;s&lt;u.length;++s){var f=u[s];0==--a[f]&amp;&amp;o.push(f)}}for(var h=new Array(e.length),p=[],s=0;s&lt;e.length;++s)if(i[s]){var c=p.length;h[s]=c,p.push(e[s])}else h[s]=-1;for(var d=[],s=0;s&lt;t.length;++s){var g=t[s];i[g[0]]&amp;&amp;i[g[1]]&amp;&amp;d.push([h[g[0]],h[g[1]]])}return[d,p]};var n=t(&quot;edges-to-adjacency-list&quot;)},{&quot;edges-to-adjacency-list&quot;:156}],448:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=c(t,e);t=r[0];for(var f=(e=r[1]).length,h=(t.length,n(t,e.length)),p=0;p&lt;f;++p)if(h[p].length%2==1)throw new Error(&quot;planar-graph-to-polyline: graph must be manifold&quot;);var d=i(t,e);for(var g=(d=d.filter(function(t){for(var r=t.length,n=[0],i=0;i&lt;r;++i){var a=e[t[i]],l=e[t[(i+1)%r]],c=o(-a[0],a[1]),u=o(-a[0],l[1]),f=o(l[0],a[1]),h=o(l[0],l[1]);n=s(n,s(s(c,u),s(f,h)))}return n[n.length-1]&gt;0})).length,m=new Array(g),v=new Array(g),p=0;p&lt;g;++p){m[p]=p;var y=new Array(g),x=d[p].map(function(t){return e[t]}),b=a([x]),_=0;t:for(var w=0;w&lt;g;++w)if(y[w]=0,p!==w){for(var k=d[w],M=k.length,A=0;A&lt;M;++A){var T=b(e[k[A]]);if(0!==T){T&lt;0&amp;&amp;(y[w]=1,_+=1);continue t}}y[w]=1,_+=1}v[p]=[_,p,y]}v.sort(function(t,e){return e[0]-t[0]});for(var p=0;p&lt;g;++p)for(var y=v[p],S=y[1],E=y[2],w=0;w&lt;g;++w)E[w]&amp;&amp;(m[w]=S);for(var C=function(t){for(var e=new Array(t),r=0;r&lt;t;++r)e[r]=[];return e}(g),p=0;p&lt;g;++p)C[p].push(m[p]),C[m[p]].push(p);for(var L={},z=u(f,!1),p=0;p&lt;g;++p)for(var k=d[p],M=k.length,w=0;w&lt;M;++w){var P=k[w],O=k[(w+1)%M],I=Math.min(P,O)+&quot;:&quot;+Math.max(P,O);if(I in L){var D=L[I];C[D].push(p),C[p].push(D),z[P]=z[O]=!0}else L[I]=p}function R(t){for(var e=t.length,r=0;r&lt;e;++r)if(!z[t[r]])return!1;return!0}for(var B=[],F=u(g,-1),p=0;p&lt;g;++p)m[p]!==p||R(d[p])?F[p]=-1:(B.push(p),F[p]=0);var r=[];for(;B.length&gt;0;){var N=B.pop(),j=C[N];l(j,function(t,e){return t-e});var V,U=j.length,q=F[N];if(0===q){var k=d[N];V=[k]}for(var p=0;p&lt;U;++p){var H=j[p];if(!(F[H]&gt;=0)&amp;&amp;(F[H]=1^q,B.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),V.push(k))}}0===q&amp;&amp;r.push(V)}return r};var n=t(&quot;edges-to-adjacency-list&quot;),i=t(&quot;planar-dual&quot;),a=t(&quot;point-in-big-polygon&quot;),o=t(&quot;two-product&quot;),s=t(&quot;robust-sum&quot;),l=t(&quot;uniq&quot;),c=t(&quot;./lib/trim-leaves&quot;);function u(t,e){for(var r=new Array(t),n=0;n&lt;t;++n)r[n]=e;return r}},{&quot;./lib/trim-leaves&quot;:447,&quot;edges-to-adjacency-list&quot;:156,&quot;planar-dual&quot;:446,&quot;point-in-big-polygon&quot;:452,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517,uniq:521}],449:[function(t,e,r){&quot;use strict&quot;;e.exports=t(&quot;./quad&quot;)},{&quot;./quad&quot;:451}],450:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{dup:98}],451:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;clamp&quot;),a=t(&quot;parse-rect&quot;),o=t(&quot;array-bounds&quot;),s=t(&quot;pick-by-alias&quot;),l=t(&quot;defined&quot;),c=t(&quot;flatten-vertex-data&quot;),u=t(&quot;is-obj&quot;),f=t(&quot;dtype&quot;),h=t(&quot;math-log2&quot;);function p(t,e){for(var r=e[0],n=e[1],a=1/(e[2]-r),o=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l&lt;c;l++)s[2*l]=i((t[2*l]-r)*a,0,1),s[2*l+1]=i((t[2*l+1]-n)*o,0,1);return s}e.exports=function(t,e){e||(e={}),t=c(t,&quot;float64&quot;),e=s(e,{bounds:&quot;range bounds dataBox databox&quot;,maxDepth:&quot;depth maxDepth maxdepth level maxLevel maxlevel levels&quot;,dtype:&quot;type dtype format out dst output destination&quot;});var r=l(e.maxDepth,255),i=l(e.bounds,o(t,2));i[0]===i[2]&amp;&amp;i[2]++,i[1]===i[3]&amp;&amp;i[3]++;var d,g=p(t,i),m=t.length&gt;&gt;&gt;1;e.dtype||(e.dtype=&quot;array&quot;),&quot;string&quot;==typeof e.dtype?d=new(f(e.dtype))(m):e.dtype&amp;&amp;(d=e.dtype,Array.isArray(d)&amp;&amp;(d.length=m));for(var v=0;v&lt;m;++v)d[v]=v;var y=[],x=[],b=[],_=[];!function t(e,n,i,a,o,s){if(!a.length)return null;var l=y[o]||(y[o]=[]);var c=b[o]||(b[o]=[]);var u=x[o]||(x[o]=[]);var f=l.length;o++;if(o&gt;r){for(var h=0;h&lt;a.length;h++)l.push(a[h]),c.push(s),u.push(null,null,null,null);return f}l.push(a[0]);c.push(s);if(a.length&lt;=1)return u.push(null,null,null,null),f;var p=.5*i;var d=e+p,m=n+p;var v=[],_=[],w=[],k=[];for(var M=1,A=a.length;M&lt;A;M++){var T=a[M],S=g[2*T],E=g[2*T+1];S&lt;d?E&lt;m?v.push(T):_.push(T):E&lt;m?w.push(T):k.push(T)}s&lt;&lt;=2;u.push(t(e,n,p,v,o,s),t(e,m,p,_,o,s+1),t(d,n,p,w,o,s+2),t(d,m,p,k,o,s+3));return f}(0,0,1,d,0,1);for(var w=0,k=0;k&lt;y.length;k++){var M=y[k];if(d.set)d.set(M,w);else for(var A=0,T=M.length;A&lt;T;A++)d[A+w]=M[A];var S=w+y[k].length;_[k]=[w,S],w=S}return d.range=function(){var e,r=[],o=arguments.length;for(;o--;)r[o]=arguments[o];if(u(r[r.length-1])){var c=r.pop();r.length||null==c.x&amp;&amp;null==c.l&amp;&amp;null==c.left||(r=[c],e={}),e=s(c,{level:&quot;level maxLevel&quot;,d:&quot;d diam diameter r radius px pxSize pixel pixelSize maxD size minSize&quot;,lod:&quot;lod details ranges offsets&quot;})}else e={};r.length||(r=i);var f=a.apply(void 0,r),d=[Math.min(f.x,f.x+f.width),Math.min(f.y,f.y+f.height),Math.max(f.x,f.x+f.width),Math.max(f.y,f.y+f.height)],g=d[0],m=d[1],v=d[2],w=d[3],k=p([g,m,v,w],i),M=k[0],A=k[1],T=k[2],S=k[3],C=l(e.level,y.length);if(null!=e.d){var L;&quot;number&quot;==typeof e.d?L=[e.d,e.d]:e.d.length&amp;&amp;(L=e.d),C=Math.min(Math.max(Math.ceil(-h(Math.abs(L[0])/(i[2]-i[0]))),Math.ceil(-h(Math.abs(L[1])/(i[3]-i[1])))),C)}if(C=Math.min(C,y.length),e.lod)return function(t,e,r,i,a){for(var o=[],s=0;s&lt;a;s++){var l=b[s],c=_[s][0],u=E(t,e,s),f=E(r,i,s),h=n.ge(l,u),p=n.gt(l,f,h,l.length-1);o[s]=[h+c,p+c]}return o}(M,A,T,S,C);var z=[];return function e(r,n,i,a,o,s){if(null!==o&amp;&amp;null!==s){var l=r+i,c=n+i;if(!(M&gt;l||A&gt;c||T&lt;r||S&lt;n||a&gt;=C||o===s)){var u=y[a];void 0===s&amp;&amp;(s=u.length);for(var f=o;f&lt;s;f++){var h=u[f],p=t[2*h],d=t[2*h+1];p&gt;=g&amp;&amp;p&lt;=v&amp;&amp;d&gt;=m&amp;&amp;d&lt;=w&amp;&amp;z.push(h)}var b=x[a],_=b[4*o+0],k=b[4*o+1],E=b[4*o+2],L=b[4*o+3],P=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n&gt;t.length)return null;return r}(b,o+1),O=.5*i,I=a+1;e(r,n,O,I,_,k||E||L||P),e(r,n+O,O,I,k,E||L||P),e(r+O,n,O,I,E,L||P),e(r+O,n+O,O,I,L,P)}}}(0,0,1,0,0,1),z},d;function E(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s&lt;r;s++)n&lt;&lt;=2,n+=t&lt;i?e&lt;a?0:1:e&lt;a?2:3,o*=.5,i+=t&lt;i?-o:o,a+=e&lt;a?-o:o;return n}}},{&quot;array-bounds&quot;:52,&quot;binary-search-bounds&quot;:450,clamp:102,defined:148,dtype:153,&quot;flatten-vertex-data&quot;:215,&quot;is-obj&quot;:402,&quot;math-log2&quot;:412,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445}],452:[function(t,e,r){e.exports=function(t){for(var e=t.length,r=[],a=[],s=0;s&lt;e;++s)for(var u=t[s],f=u.length,h=f-1,p=0;p&lt;f;h=p++){var d=u[h],g=u[p];d[0]===g[0]?a.push([d,g]):r.push([d,g])}if(0===r.length)return 0===a.length?c:(m=l(a),function(t){return m(t[0],t[1])?0:1});var m;var v=i(r),y=function(t,e){return function(r){var i=o.le(e,r[0]);if(i&lt;0)return 1;var a=t[i];if(!a){if(!(i&gt;0&amp;&amp;e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]&lt;l[1][0])if(c&lt;0)a=a.left;else{if(!(c&gt;0))return 0;s=-1,a=a.right}else if(c&gt;0)a=a.left;else{if(!(c&lt;0))return 0;s=1,a=a.right}}return s}}(v.slabs,v.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t(&quot;robust-orientation&quot;)[3],i=t(&quot;slab-decomposition&quot;),a=t(&quot;interval-tree-1d&quot;),o=t(&quot;binary-search-bounds&quot;);function s(){return!0}function l(t){for(var e={},r=0;r&lt;t.length;++r){var n=t[r],i=n[0][0],o=n[0][1],l=n[1][1],c=[Math.min(o,l),Math.max(o,l)];i in e?e[i].push(c):e[i]=[c]}var u={},f=Object.keys(e);for(r=0;r&lt;f.length;++r){var h=e[f[r]];u[f[r]]=a(h)}return function(t){return function(e,r){var n=t[e];return!!n&amp;&amp;!!n.queryPoint(r,s)}}(u)}function c(t){return 1}},{&quot;binary-search-bounds&quot;:78,&quot;interval-tree-1d&quot;:395,&quot;robust-orientation&quot;:483,&quot;slab-decomposition&quot;:499}],453:[function(t,e,r){var n,i=t(&quot;./lib/build-log&quot;),a=t(&quot;./lib/epsilon&quot;),o=t(&quot;./lib/intersecter&quot;),s=t(&quot;./lib/segment-chainer&quot;),l=t(&quot;./lib/segment-selector&quot;),c=t(&quot;./lib/geojson&quot;),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?u=i():!1===t&amp;&amp;(u=!1),!1!==u&amp;&amp;u.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,u);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,u).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,u),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,u),inverted:t.inverted1&amp;&amp;t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,u),inverted:t.inverted1&amp;&amp;!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,u),inverted:!t.inverted1&amp;&amp;t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,u),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,u),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},&quot;object&quot;==typeof window&amp;&amp;(window.PolyBool=n),e.exports=n},{&quot;./lib/build-log&quot;:454,&quot;./lib/epsilon&quot;:455,&quot;./lib/geojson&quot;:456,&quot;./lib/intersecter&quot;:457,&quot;./lib/segment-chainer&quot;:459,&quot;./lib/segment-selector&quot;:460}],454:[function(t,e,r){e.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n(&quot;check&quot;,{seg1:t,seg2:e})},segmentChop:function(t,e){return n(&quot;div_seg&quot;,{seg:t,pt:e}),n(&quot;chop&quot;,{seg:t,pt:e})},statusRemove:function(t){return n(&quot;pop_seg&quot;,{seg:t})},segmentUpdate:function(t){return n(&quot;seg_update&quot;,{seg:t})},segmentNew:function(t,e){return n(&quot;new_seg&quot;,{seg:t,primary:e})},segmentRemove:function(t){return n(&quot;rem_seg&quot;,{seg:t})},tempStatus:function(t,e,r){return n(&quot;temp_status&quot;,{seg:t,above:e,below:r})},rewind:function(t){return n(&quot;rewind&quot;,{seg:t})},status:function(t,e,r){return n(&quot;status&quot;,{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n(&quot;vert&quot;,{x:e}))},log:function(t){return&quot;string&quot;!=typeof t&amp;&amp;(t=JSON.stringify(t,!1,&quot;  &quot;)),n(&quot;log&quot;,{txt:t})},reset:function(){return n(&quot;reset&quot;)},selected:function(t){return n(&quot;selected&quot;,{segs:t})},chainStart:function(t){return n(&quot;chain_start&quot;,{seg:t})},chainRemoveHead:function(t,e){return n(&quot;chain_rem_head&quot;,{index:t,pt:e})},chainRemoveTail:function(t,e){return n(&quot;chain_rem_tail&quot;,{index:t,pt:e})},chainNew:function(t,e){return n(&quot;chain_new&quot;,{pt1:t,pt2:e})},chainMatch:function(t){return n(&quot;chain_match&quot;,{index:t})},chainClose:function(t){return n(&quot;chain_close&quot;,{index:t})},chainAddHead:function(t,e){return n(&quot;chain_add_head&quot;,{index:t,pt:e})},chainAddTail:function(t,e){return n(&quot;chain_add_tail&quot;,{index:t,pt:e})},chainConnect:function(t,e){return n(&quot;chain_con&quot;,{index1:t,index2:e})},chainReverse:function(t){return n(&quot;chain_rev&quot;,{index:t})},chainJoin:function(t,e){return n(&quot;chain_join&quot;,{index1:t,index2:e})},done:function(){return n(&quot;done&quot;)}}}},{}],455:[function(t,e,r){e.exports=function(t){&quot;number&quot;!=typeof t&amp;&amp;(t=1e-10);var e={epsilon:function(e){return&quot;number&quot;==typeof e&amp;&amp;(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)&gt;=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l&lt;t||l-(a*a+s*s)&gt;-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])&lt;t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])&lt;t},pointsSame:function(t,r){return e.pointsSameX(t,r)&amp;&amp;e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]&lt;r[1]?-1:1:t[0]&lt;r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)&lt;t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],c=a*l-o*s;if(Math.abs(c)&lt;t)return!1;var u=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*u)/c,p=(a*f-o*u)/c,d={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return d.alongA=h&lt;=-t?-2:h&lt;t?-1:h-1&lt;=-t?0:h-1&lt;t?1:2,d.alongB=p&lt;=-t?-2:p&lt;t?-1:p-1&lt;=-t?0:p-1&lt;t?1:2,d},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l&lt;r.length;l++){var c=r[l][0],u=r[l][1];u-i&gt;t!=o-i&gt;t&amp;&amp;(a-c)*(i-u)/(o-u)+c-n&gt;t&amp;&amp;(s=!s),a=c,o=u}return s}};return e}},{}],456:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){if(e.length&lt;=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i&lt;e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if(&quot;Polygon&quot;===e.type)return t.polygon(r(e.coordinates));if(&quot;MultiPolygon&quot;===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i&lt;e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error(&quot;PolyBool: Cannot convert GeoJSON object to PolyBool polygon&quot;)},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}r=t.polygon(t.segments(r));var a=i(null);function o(t,e){for(var r=0;r&lt;t.children.length;r++){if(n(e,(s=t.children[r]).region))return void o(s,e)}var a=i(e);for(r=0;r&lt;t.children.length;r++){var s;n((s=t.children[r]).region,e)&amp;&amp;(a.children.push(s),t.children.splice(r,1),r--)}t.children.push(a)}for(var s=0;s&lt;r.regions.length;s++){var l=r.regions[s];l.length&lt;3||o(a,l)}function c(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o&lt;t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r&lt;0!==e&amp;&amp;a.reverse(),a.push([a[0][0],a[0][1]]),a}var u=[];function f(t){var e=[c(t.region,!1)];u.push(e);for(var r=0;r&lt;t.children.length;r++)e.push(h(t.children[r]))}function h(t){for(var e=0;e&lt;t.children.length;e++)f(t.children[e]);return c(t.region,!0)}for(s=0;s&lt;a.children.length;s++)f(a.children[s]);return u.length&lt;=0?{type:&quot;Polygon&quot;,coordinates:[]}:1==u.length?{type:&quot;Polygon&quot;,coordinates:u[0]}:{type:&quot;MultiPolygon&quot;,coordinates:u}}};e.exports=n},{}],457:[function(t,e,r){var n=t(&quot;./linked-list&quot;);e.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(t,r){a.insertBefore(t,function(n){return function(t,r,n,i,a,o){var s=e.pointsCompare(r,a);return 0!==s?s:e.pointsSame(n,o)?0:t!==i?t?1:-1:e.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(t.isStart,t.pt,r,n.isStart,n.pt,n.other.pt)&lt;0})}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&amp;&amp;r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,o){var s=n.create();function c(t){return s.findTransition(function(r){var n,i,a,o,s,l;return n=t,i=r.ev,a=n.seg.start,o=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(a,s,l)?e.pointsCollinear(o,s,l)?1:e.pointAboveOrOnLine(o,s,l)?1:-1:e.pointAboveOrOnLine(a,s,l)?1:-1)&gt;0})}function u(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&amp;&amp;r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),p=e.pointsSame(s,u);if(h&amp;&amp;p)return n;var d=!h&amp;&amp;e.pointBetween(o,c,u),g=!p&amp;&amp;e.pointBetween(s,c,u);if(h)return g?l(n,s):l(t,u),n;d&amp;&amp;(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&amp;&amp;(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&amp;&amp;l(t,u)),0===f.alongB&amp;&amp;(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&amp;&amp;l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&amp;&amp;r.vert(h.pt[0]),h.isStart){r&amp;&amp;r.segmentNew(h.seg,h.primary);var p=c(h),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function m(){if(d){var t=u(h,d);if(t)return t}return!!g&amp;&amp;u(h,g)}r&amp;&amp;r.tempStatus(h.seg,!!d&amp;&amp;d.seg,!!g&amp;&amp;g.seg);var v,y,x=m();if(x)t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&amp;&amp;(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=h.seg.myFill,r&amp;&amp;r.segmentUpdate(x.seg),h.other.remove(),h.remove();if(a.getHead()!==h){r&amp;&amp;r.rewind(h.seg);continue}t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=g?g.seg.myFill.above:i,h.seg.myFill.above=y?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&amp;&amp;(v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v}),r&amp;&amp;r.status(h.seg,!!d&amp;&amp;d.seg,!!g&amp;&amp;g.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error(&quot;PolyBool: Zero-length segment detected; your epsilon is probably too small or too large&quot;);if(s.exists(b.prev)&amp;&amp;s.exists(b.next)&amp;&amp;u(b.prev.ev,b.next.ev),r&amp;&amp;r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&amp;&amp;r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l&lt;t.length;l++){n=o,o=t[l];var c=e.pointsCompare(n,o);0!==c&amp;&amp;s((i=c&lt;0?n:o,a=c&lt;0?o:n,{id:r?r.segmentId():-1,start:i,end:a,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(t){return c(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach(function(t){s(i(t.start,t.end,t),!0)}),r.forEach(function(t){s(i(t.start,t.end,t),!1)}),c(e,n)}}}},{&quot;./linked-list&quot;:458}],458:[function(t,e,r){e.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&amp;&amp;e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&amp;&amp;!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&amp;&amp;(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&amp;&amp;(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},{}],459:[function(t,e,r){e.exports=function(t,e,r){var n=[],i=[];return t.forEach(function(t){var a=t.start,o=t.end;if(e.pointsSame(a,o))console.warn(&quot;PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large&quot;);else{r&amp;&amp;r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u&lt;n.length;u++){var f=(m=n[u])[0],h=(m[1],m[m.length-1]);if(m[m.length-2],e.pointsSame(f,a)){if(M(u,!0,!0))break}else if(e.pointsSame(f,o)){if(M(u,!0,!1))break}else if(e.pointsSame(h,a)){if(M(u,!1,!0))break}else if(e.pointsSame(h,o)&amp;&amp;M(u,!1,!1))break}if(c===s)return n.push([a,o]),void(r&amp;&amp;r.chainNew(a,o));if(c===l){r&amp;&amp;r.chainMatch(s.index);var p=s.index,d=s.matches_pt1?o:a,g=s.matches_head,m=n[p],v=g?m[0]:m[m.length-1],y=g?m[1]:m[m.length-2],x=g?m[m.length-1]:m[0],b=g?m[m.length-2]:m[1];return e.pointsCollinear(y,v,d)&amp;&amp;(g?(r&amp;&amp;r.chainRemoveHead(s.index,d),m.shift()):(r&amp;&amp;r.chainRemoveTail(s.index,d),m.pop()),v=y),e.pointsSame(x,d)?(n.splice(p,1),e.pointsCollinear(b,x,v)&amp;&amp;(g?(r&amp;&amp;r.chainRemoveTail(s.index,v),m.pop()):(r&amp;&amp;r.chainRemoveHead(s.index,v),m.shift())),r&amp;&amp;r.chainClose(s.index),void i.push(m)):void(g?(r&amp;&amp;r.chainAddHead(s.index,d),m.unshift(d)):(r&amp;&amp;r.chainAddTail(s.index,d),m.push(d)))}var _=s.index,w=l.index;r&amp;&amp;r.chainConnect(_,w);var k=n[_].length&lt;n[w].length;s.matches_head?l.matches_head?k?(A(_),T(_,w)):(A(w),T(w,_)):T(w,_):l.matches_head?T(_,w):k?(A(_),T(w,_)):(A(w),T(_,w))}function M(t,e,r){return c.index=t,c.matches_head=e,c.matches_pt1=r,c===s?(c=l,!1):(c=null,!0)}function A(t){r&amp;&amp;r.chainReverse(t),n[t].reverse()}function T(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],c=o[0],u=o[1];e.pointsCollinear(l,s,c)&amp;&amp;(r&amp;&amp;r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,c,u)&amp;&amp;(r&amp;&amp;r.chainRemoveHead(i,c),o.shift()),r&amp;&amp;r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}}),i}},{}],460:[function(t,e,r){function n(t,e,r){var n=[];return t.forEach(function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&amp;&amp;t.otherFill.above?2:0)+(t.otherFill&amp;&amp;t.otherFill.below?1:0);0!==e[i]&amp;&amp;n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})}),r&amp;&amp;r.selected(n),n}var i={union:function(t,e){return n(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],e)},intersect:function(t,e){return n(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],e)},difference:function(t,e){return n(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],e)},differenceRev:function(t,e){return n(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],e)},xor:function(t,e){return n(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],e)}};e.exports=i},{}],461:[function(t,e,r){&quot;use strict&quot;;var n=new Float64Array(4),i=new Float64Array(4),a=new Float64Array(4);e.exports=function(t,e,r,o,s){n.length&lt;o.length&amp;&amp;(n=new Float64Array(o.length),i=new Float64Array(o.length),a=new Float64Array(o.length));for(var l=0;l&lt;o.length;++l)n[l]=t[l]-o[l],i[l]=e[l]-t[l],a[l]=r[l]-t[l];var c=0,u=0,f=0,h=0,p=0,d=0;for(l=0;l&lt;o.length;++l){var g=i[l],m=a[l],v=n[l];c+=g*g,u+=g*m,f+=m*m,h+=v*g,p+=v*m,d+=v*v}var y,x,b,_,w,k=Math.abs(c*f-u*u),M=u*p-f*h,A=u*h-c*p;if(M+A&lt;=k)if(M&lt;0)A&lt;0&amp;&amp;h&lt;0?(A=0,-h&gt;=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d):(M=0,p&gt;=0?(A=0,y=d):-p&gt;=f?(A=1,y=f+2*p+d):y=p*(A=-p/f)+d);else if(A&lt;0)A=0,h&gt;=0?(M=0,y=d):-h&gt;=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d;else{var T=1/k;y=(M*=T)*(c*M+u*(A*=T)+2*h)+A*(u*M+f*A+2*p)+d}else M&lt;0?(b=f+p)&gt;(x=u+h)?(_=b-x)&gt;=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d:(M=0,b&lt;=0?(A=1,y=f+2*p+d):p&gt;=0?(A=0,y=d):y=p*(A=-p/f)+d):A&lt;0?(b=c+h)&gt;(x=u+p)?(_=b-x)&gt;=(w=c-2*u+f)?(A=1,M=0,y=f+2*p+d):y=(M=1-(A=_/w))*(c*M+u*A+2*h)+A*(u*M+f*A+2*p)+d:(A=0,b&lt;=0?(M=1,y=c+2*h+d):h&gt;=0?(M=0,y=d):y=h*(M=-h/c)+d):(_=f+p-u-h)&lt;=0?(M=0,A=1,y=f+2*p+d):_&gt;=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d;var S=1-M-A;for(l=0;l&lt;o.length;++l)s[l]=S*t[l]+M*e[l]+A*r[l];return y&lt;0?0:y}},{}],462:[function(t,e,r){var n,i,a=e.exports={};function o(){throw new Error(&quot;setTimeout has not been defined&quot;)}function s(){throw new Error(&quot;clearTimeout has not been defined&quot;)}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&amp;&amp;setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n=&quot;function&quot;==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i=&quot;function&quot;==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],f=!1,h=-1;function p(){f&amp;&amp;c&amp;&amp;(f=!1,c.length?u=c.concat(u):h=-1,u.length&amp;&amp;d())}function d(){if(!f){var t=l(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++h&lt;e;)c&amp;&amp;c[h].run();h=-1,e=u.length}c=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&amp;&amp;clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function m(){}a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length&gt;1)for(var r=1;r&lt;arguments.length;r++)e[r-1]=arguments[r];u.push(new g(t,e)),1!==u.length||f||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title=&quot;browser&quot;,a.browser=!0,a.env={},a.argv=[],a.version=&quot;&quot;,a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(t){return[]},a.binding=function(t){throw new Error(&quot;process.binding is not supported&quot;)},a.cwd=function(){return&quot;/&quot;},a.chdir=function(t){throw new Error(&quot;process.chdir is not supported&quot;)},a.umask=function(){return 0}},{}],463:[function(t,e,r){e.exports=t(&quot;gl-quat/slerp&quot;)},{&quot;gl-quat/slerp&quot;:279}],464:[function(t,e,r){(function(r){for(var n=t(&quot;performance-now&quot;),i=&quot;undefined&quot;==typeof window?r:window,a=[&quot;moz&quot;,&quot;webkit&quot;],o=&quot;AnimationFrame&quot;,s=i[&quot;request&quot;+o],l=i[&quot;cancel&quot;+o]||i[&quot;cancelRequest&quot;+o],c=0;!s&amp;&amp;c&lt;a.length;c++)s=i[a[c]+&quot;Request&quot;+o],l=i[a[c]+&quot;Cancel&quot;+o]||i[a[c]+&quot;CancelRequest&quot;+o];if(!s||!l){var u=0,f=0,h=[];s=function(t){if(0===h.length){var e=n(),r=Math.max(0,1e3/60-(e-u));u=r+e,setTimeout(function(){var t=h.slice(0);h.length=0;for(var e=0;e&lt;t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout(function(){throw t},0)}},Math.round(r))}return h.push({handle:++f,callback:t,cancelled:!1}),f},l=function(t){for(var e=0;e&lt;h.length;e++)h[e].handle===t&amp;&amp;(h[e].cancelled=!0)}}e.exports=function(t){return s.call(i,t)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=s,t.cancelAnimationFrame=l}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;performance-now&quot;:442}],465:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;big-rat/add&quot;);e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a&lt;r;++a)i[a]=n(t[a],e[a]);return i}},{&quot;big-rat/add&quot;:62}],466:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=new Array(t.length),r=0;r&lt;t.length;++r)e[r]=n(t[r]);return e};var n=t(&quot;big-rat&quot;)},{&quot;big-rat&quot;:65}],467:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;big-rat&quot;),i=t(&quot;big-rat/mul&quot;);e.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s&lt;a;++s)o[s]=i(t[s],r);return o}},{&quot;big-rat&quot;:65,&quot;big-rat/mul&quot;:74}],468:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;big-rat/sub&quot;);e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a&lt;r;++a)i[a]=n(t[a],e[a]);return i}},{&quot;big-rat/sub&quot;:76}],469:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;compare-cell&quot;),i=t(&quot;compare-oriented-cell&quot;),a=t(&quot;cell-orientation&quot;);e.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o&lt;e;++o){var s=t[o],l=a(s);if(0!==l){if(r&gt;0){var c=t[r-1];if(0===n(s,c)&amp;&amp;a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{&quot;cell-orientation&quot;:99,&quot;compare-cell&quot;:115,&quot;compare-oriented-cell&quot;:116}],470:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;array-bounds&quot;),i=t(&quot;color-normalize&quot;),a=t(&quot;update-diff&quot;),o=t(&quot;pick-by-alias&quot;),s=t(&quot;object-assign&quot;),l=t(&quot;flatten-vertex-data&quot;),c=t(&quot;to-float32&quot;),u=c.float32,f=c.fract32;e.exports=function(t,e){&quot;function&quot;==typeof t?(e||(e={}),e.regl=t):e=t;e.length&amp;&amp;(e.positions=e);if(!(t=e.regl).hasExtension(&quot;ANGLE_instanced_arrays&quot;))throw Error(&quot;regl-error2d: `ANGLE_instanced_arrays` extension should be enabled&quot;);var r,c,p,d,g,m,v=t._gl,y={color:&quot;black&quot;,capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:&quot;dynamic&quot;,type:&quot;uint8&quot;,data:new Uint8Array(0)}),c=t.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array(0)}),p=t.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array(0)}),g=t.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array(0)}),m=t.buffer({usage:&quot;static&quot;,type:&quot;float&quot;,data:h}),k(e),r=t({vert:&quot;\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t&quot;,frag:&quot;\n\t\tprecision mediump float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t&quot;,uniforms:{range:t.prop(&quot;range&quot;),lineWidth:t.prop(&quot;lineWidth&quot;),capSize:t.prop(&quot;capSize&quot;),opacity:t.prop(&quot;opacity&quot;),scale:t.prop(&quot;scale&quot;),translate:t.prop(&quot;translate&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translateFract:t.prop(&quot;translateFract&quot;),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:m,stride:24,offset:0},lineOffset:{buffer:m,stride:24,offset:8},capOffset:{buffer:m,stride:24,offset:16}},primitive:&quot;triangles&quot;,blend:{enable:!0,color:[0,0,0,0],equation:{rgb:&quot;add&quot;,alpha:&quot;add&quot;},func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},depth:{enable:!1},scissor:{enable:!0,box:t.prop(&quot;viewport&quot;)},viewport:t.prop(&quot;viewport&quot;),stencil:!1,instances:t.prop(&quot;count&quot;),count:h.length}),s(b,{update:k,draw:_,destroy:M,regl:t,gl:v,canvas:v.canvas,groups:x}),b;function b(t){t?k(t):null===t&amp;&amp;M(),_()}function _(e){if(&quot;number&quot;==typeof e)return w(e);e&amp;&amp;!Array.isArray(e)&amp;&amp;(e=[e]),t._refresh(),x.forEach(function(t,r){t&amp;&amp;(e&amp;&amp;(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){&quot;number&quot;==typeof t&amp;&amp;(t=x[t]),null!=t&amp;&amp;t&amp;&amp;t.count&amp;&amp;t.color&amp;&amp;t.opacity&amp;&amp;t.positions&amp;&amp;t.positions.length&gt;1&amp;&amp;(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&amp;&amp;t.after(t))}function k(t){if(t){null!=t.length?&quot;number&quot;==typeof t[0]&amp;&amp;(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?(&quot;function&quot;==typeof t?t={after:t}:&quot;number&quot;==typeof t[0]&amp;&amp;(t={positions:t}),t=o(t,{color:&quot;color colors fill&quot;,capSize:&quot;capSize cap capsize cap-size&quot;,lineWidth:&quot;lineWidth line-width width line thickness&quot;,opacity:&quot;opacity alpha&quot;,range:&quot;range dataBox&quot;,viewport:&quot;viewport viewBox&quot;,errors:&quot;errors error&quot;,positions:&quot;positions position data points&quot;}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,&quot;float64&quot;),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t=&quot;transparent&quot;),!Array.isArray(t)||&quot;number&quot;==typeof t[0]){var n=t;t=Array(r);for(var a=0;a&lt;r;a++)t[a]=n}if(t.length&lt;r)throw Error(&quot;Not enough colors&quot;);for(var o=new Uint8Array(4*r),s=0;s&lt;r;s++){var l=i(t[s],&quot;uint8&quot;);o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:v.drawingBufferWidth,height:v.drawingBufferHeight},e}}]),u):u}),e||r){var h=x.reduce(function(t,e,r){return t+(e?e.count:0)},0),m=new Float64Array(2*h),_=new Uint8Array(4*h),w=new Float32Array(4*h);x.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&amp;&amp;(_.set(a,4*i),w.set(o,4*i),m.set(r,2*i))}}),c(u(m)),p(f(m)),d(_),g(w)}}}function M(){c.destroy(),p.destroy(),d.destroy(),g.destroy(),m.destroy()}};var h=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{&quot;array-bounds&quot;:52,&quot;color-normalize&quot;:107,&quot;flatten-vertex-data&quot;:215,&quot;object-assign&quot;:434,&quot;pick-by-alias&quot;:445,&quot;to-float32&quot;:512,&quot;update-diff&quot;:523}],471:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-normalize&quot;),i=t(&quot;array-bounds&quot;),a=t(&quot;object-assign&quot;),o=t(&quot;glslify&quot;),s=t(&quot;pick-by-alias&quot;),l=t(&quot;flatten-vertex-data&quot;),c=t(&quot;earcut&quot;),u=t(&quot;array-normalize&quot;),f=t(&quot;to-float32&quot;),h=f.float32,p=f.fract32,d=t(&quot;es6-weak-map&quot;),g=t(&quot;parse-rect&quot;);function m(t,e){if(!(this instanceof m))return new m(t,e);if(&quot;function&quot;==typeof t?(e||(e={}),e.regl=t):e=t,e.length&amp;&amp;(e.positions=e),!(t=e.regl).hasExtension(&quot;ANGLE_instanced_arrays&quot;))throw Error(&quot;regl-error2d: `ANGLE_instanced_arrays` extension should be enabled&quot;);this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=m.shaders.has(t)?m.shaders.get(t):m.shaders.set(t,m.createShaders(t)).get(t),this.update(e)}e.exports=m,m.dashMult=2,m.maxPatternLength=256,m.precisionThreshold=3e6,m.maxPoints=1e4,m.maxLines=2048,m.shaders=new d,m.createShaders=function(t){var e,r=t.buffer({usage:&quot;static&quot;,type:&quot;float&quot;,data:[0,1,0,0,1,1,1,0]}),n={primitive:&quot;triangle strip&quot;,instances:t.prop(&quot;count&quot;),count:4,offset:0,uniforms:{miterMode:function(t,e){return&quot;round&quot;===e.join?2:1},miterLimit:t.prop(&quot;miterLimit&quot;),scale:t.prop(&quot;scale&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translateFract:t.prop(&quot;translateFract&quot;),translate:t.prop(&quot;translate&quot;),thickness:t.prop(&quot;thickness&quot;),dashPattern:t.prop(&quot;dashTexture&quot;),opacity:t.prop(&quot;opacity&quot;),pixelRatio:t.context(&quot;pixelRatio&quot;),id:t.prop(&quot;id&quot;),dashSize:t.prop(&quot;dashLength&quot;),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop(&quot;depth&quot;)},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:&quot;add&quot;,alpha:&quot;add&quot;},func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop(&quot;viewport&quot;)},viewport:t.prop(&quot;viewport&quot;)},i=t(a({vert:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n       + positionFract * scale + translateFract\n       + position * scaleFract\n       + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n&quot;]),frag:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\n\nuniform float dashSize, pixelRatio, thickness, opacity, id;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n&quot;]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop(&quot;positionFractBuffer&quot;),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop(&quot;positionFractBuffer&quot;),stride:8,offset:16,divisor:1},color:{buffer:t.prop(&quot;colorBuffer&quot;),stride:4,offset:0,divisor:1}}},n));try{e=t(a({cull:{enable:!0,face:&quot;back&quot;},vert:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n  return ( val &lt; 0.0 || 0.0 &lt; val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n\t// adjust scale for horizontal bars\n\tvec2 scale = max(scale, MIN_DIFF);\n\tvec2 scaleRatio = scale * viewport.zw;\n\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) &lt; MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) &lt; MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) &lt;= REVERSE_THRESHOLD &amp;&amp; abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) &lt;  length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) &lt;= REVERSE_THRESHOLD &amp;&amp; abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) &lt;  length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse &amp;&amp; baClipping &gt; 0. &amp;&amp; baClipping &lt; length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse &amp;&amp; abClipping &gt; 0. &amp;&amp; abClipping &lt; length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * scale + translate;\n\tvec2 aBotPosition = (aBotCoord) * scale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * scale + translate;\n\tvec2 bBotPosition = (bBotCoord) * scale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position  * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n&quot;]),frag:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart &lt; -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd &lt; -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart &lt; 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius &gt; cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd &lt; 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius &gt; cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n&quot;]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop(&quot;colorBuffer&quot;),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop(&quot;colorBuffer&quot;),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:&quot;triangle&quot;,elements:function(t,e){return e.triangles},offset:0,vert:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n       + positionFract * scale + translateFract\n       + position * scaleFract\n       + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n&quot;]),frag:o([&quot;precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n&quot;]),uniforms:{scale:t.prop(&quot;scale&quot;),color:t.prop(&quot;fill&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translateFract:t.prop(&quot;translateFract&quot;),translate:t.prop(&quot;translate&quot;),opacity:t.prop(&quot;opacity&quot;),pixelRatio:t.context(&quot;pixelRatio&quot;),id:t.prop(&quot;id&quot;),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop(&quot;positionBuffer&quot;),stride:8,offset:8},positionFract:{buffer:t.prop(&quot;positionFractBuffer&quot;),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},m.defaults={dashes:null,join:&quot;miter&quot;,miterLimit:1,thickness:10,cap:&quot;square&quot;,color:&quot;black&quot;,opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},m.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&amp;&amp;(t=this).update.apply(t,e),this.draw()},m.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&amp;&amp;Array.isArray(e))return(n=t).draw.apply(n,e);&quot;number&quot;==typeof e&amp;&amp;(e=t.passes[e]),e&amp;&amp;e.count&gt;1&amp;&amp;e.opacity&amp;&amp;(t.regl._refresh(),e.fill&amp;&amp;e.triangles&amp;&amp;e.triangles.length&gt;2&amp;&amp;t.shaders.fill(e),e.thickness&amp;&amp;(e.scale[0]*e.viewport.width&gt;m.precisionThreshold||e.scale[1]*e.viewport.height&gt;m.precisionThreshold?t.shaders.rect(e):&quot;rect&quot;===e.join||!e.join&amp;&amp;(e.thickness&lt;=2||e.count&gt;=m.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},m.prototype.update=function(t){var e=this;if(t){null!=t.length?&quot;number&quot;==typeof t[0]&amp;&amp;(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if(&quot;number&quot;==typeof t[0]&amp;&amp;(t={positions:t}),t=s(t,{positions:&quot;positions points data coords&quot;,thickness:&quot;thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth&quot;,join:&quot;lineJoin linejoin join type mode&quot;,miterLimit:&quot;miterlimit miterLimit&quot;,dashes:&quot;dash dashes dasharray dash-array dashArray&quot;,color:&quot;color colour stroke colors colours stroke-color strokeColor&quot;,fill:&quot;fill fill-color fillColor&quot;,opacity:&quot;alpha opacity&quot;,overlay:&quot;overlay crease overlap intersect&quot;,close:&quot;closed close closed-path closePath&quot;,range:&quot;range dataBox&quot;,viewport:&quot;viewport viewBox&quot;,hole:&quot;holes hole hollow&quot;}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:&quot;linear&quot;,min:&quot;linear&quot;}),colorBuffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;uint8&quot;,data:new Uint8Array}),positionBuffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array}),positionFractBuffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array})},t=a({},m.defaults,t)),null!=t.thickness&amp;&amp;(d.thickness=parseFloat(t.thickness)),null!=t.opacity&amp;&amp;(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&amp;&amp;(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&amp;&amp;(d.overlay=!!t.overlay,f&lt;m.maxLines&amp;&amp;(d.depth=2*(m.maxLines-1-f%m.maxLines)/m.maxLines-1)),null!=t.join&amp;&amp;(d.join=t.join),null!=t.hole&amp;&amp;(d.hole=t.hole),null!=t.fill&amp;&amp;(d.fill=t.fill?n(t.fill,&quot;uint8&quot;):null),null!=t.viewport&amp;&amp;(d.viewport=g(t.viewport)),d.viewport||(d.viewport=g([o.drawingBufferWidth,o.drawingBufferHeight])),null!=t.close&amp;&amp;(d.close=t.close),null===t.positions&amp;&amp;(t.positions=[]),t.positions){var v,y;if(t.positions.x&amp;&amp;t.positions.y){var x=t.positions.x,b=t.positions.y;y=d.count=Math.max(x.length,b.length),v=new Float64Array(2*y);for(var _=0;_&lt;y;_++)v[2*_]=x[_],v[2*_+1]=b[_]}else v=l(t.positions,&quot;float64&quot;),y=d.count=Math.floor(v.length/2);var w=d.bounds=i(v,2);if(d.fill){for(var k=[],M={},A=0,T=0,S=0,E=d.count;T&lt;E;T++){var C=v[2*T],L=v[2*T+1];isNaN(C)||isNaN(L)||null==C||null==L?(C=v[2*A],L=v[2*A+1],M[T]=A):A=T,k[S++]=C,k[S++]=L}for(var z=c(k,d.hole||[]),P=0,O=z.length;P&lt;O;P++)null!=M[z[P]]&amp;&amp;(z[P]=M[z[P]]);d.triangles=z}var I=new Float64Array(v);u(I,2,w);var D=new Float64Array(2*y+6);d.close?v[0]===v[2*y-2]&amp;&amp;v[1]===v[2*y-1]?(D[0]=I[2*y-4],D[1]=I[2*y-3]):(D[0]=I[2*y-2],D[1]=I[2*y-1]):(D[0]=I[0],D[1]=I[1]),D.set(I,2),d.close?v[0]===v[2*y-2]&amp;&amp;v[1]===v[2*y-1]?(D[2*y+2]=I[2],D[2*y+3]=I[3],d.count-=1):(D[2*y+2]=I[0],D[2*y+3]=I[1],D[2*y+4]=I[2],D[2*y+5]=I[3]):(D[2*y+2]=I[2*y-2],D[2*y+3]=I[2*y-1],D[2*y+4]=I[2*y-2],D[2*y+5]=I[2*y-1]),d.positionBuffer(h(D)),d.positionFractBuffer(p(D))}if(t.range?d.range=t.range:d.range||(d.range=d.bounds),(t.range||t.positions)&amp;&amp;d.count){var R=d.bounds,B=R[2]-R[0],F=R[3]-R[1],N=d.range[2]-d.range[0],j=d.range[3]-d.range[1];d.scale=[B/N,F/j],d.translate=[-d.range[0]/N+R[0]/N||0,-d.range[1]/j+R[1]/j||0],d.scaleFract=p(d.scale),d.translateFract=p(d.translate)}if(t.dashes){var V,U=0;if(!t.dashes||t.dashes.length&lt;2)U=1,V=new Uint8Array([255,255,255,255,255,255,255,255]);else{U=0;for(var q=0;q&lt;t.dashes.length;++q)U+=t.dashes[q];V=new Uint8Array(U*m.dashMult);for(var H=0,G=255,W=0;W&lt;2;W++)for(var Y=0;Y&lt;t.dashes.length;++Y){for(var X=0,Z=t.dashes[Y]*m.dashMult*.5;X&lt;Z;++X)V[H++]=G;G^=255}}d.dashLength=U,d.dashTexture({channels:1,data:V,width:V.length,height:1,mag:&quot;linear&quot;,min:&quot;linear&quot;},0,0)}if(t.color){var $=d.count,J=t.color;J||(J=&quot;transparent&quot;);var K=new Uint8Array(4*$+4);if(Array.isArray(J)&amp;&amp;&quot;number&quot;!=typeof J[0]){for(var Q=0;Q&lt;$;Q++){var tt=n(J[Q],&quot;uint8&quot;);K.set(tt,4*Q)}K.set(n(J[0],&quot;uint8&quot;),4*$)}else for(var et=n(J,&quot;uint8&quot;),rt=0;rt&lt;$+1;rt++)K.set(et,4*rt);d.colorBuffer({usage:&quot;dynamic&quot;,type:&quot;uint8&quot;,data:K})}}else e.passes[f]=null}),t.length&lt;this.passes.length){for(var f=t.length;f&lt;this.passes.length;f++){var d=e.passes[f];d&amp;&amp;(d.colorBuffer.destroy(),d.positionBuffer.destroy(),d.dashTexture.destroy())}this.passes.length=t.length}for(var v=[],y=0;y&lt;this.passes.length;y++)null!==e.passes[y]&amp;&amp;v.push(e.passes[y]);return this.passes=v,this}},m.prototype.destroy=function(){return this.passes.forEach(function(t){t.colorBuffer.destroy(),t.positionBuffer.destroy(),t.dashTexture.destroy()}),this.passes.length=0,this}},{&quot;array-bounds&quot;:52,&quot;array-normalize&quot;:53,&quot;color-normalize&quot;:107,earcut:155,&quot;es6-weak-map&quot;:208,&quot;flatten-vertex-data&quot;:215,glslify:390,&quot;object-assign&quot;:434,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445,&quot;to-float32&quot;:512}],472:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;./scatter&quot;),i=t(&quot;object-assign&quot;);e.exports=function(t,e){var r=new n(t,e),a=r.render.bind(r);return i(a,{render:a,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),a}},{&quot;./scatter&quot;:473,&quot;object-assign&quot;:434}],473:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;color-normalize&quot;),i=t(&quot;array-bounds&quot;),a=t(&quot;color-id&quot;),o=t(&quot;point-cluster&quot;),s=t(&quot;object-assign&quot;),l=t(&quot;glslify&quot;),c=t(&quot;pick-by-alias&quot;),u=t(&quot;update-diff&quot;),f=t(&quot;flatten-vertex-data&quot;),h=t(&quot;is-iexplorer&quot;),p=t(&quot;to-float32&quot;),d=t(&quot;parse-rect&quot;);function g(t,e){var r=this;if(!(this instanceof g))return new g(t,e);&quot;function&quot;==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&amp;&amp;e.length&amp;&amp;(e.positions=e);var n,i=(t=e.regl)._gl,a=[];this.tooManyColors=h,n=t.texture({data:new Uint8Array(1020),width:255,height:1,type:&quot;uint8&quot;,format:&quot;rgba&quot;,wrapS:&quot;clamp&quot;,wrapT:&quot;clamp&quot;,mag:&quot;nearest&quot;,min:&quot;nearest&quot;}),s(this,{regl:t,gl:i,groups:[],markerCache:[null],markerTextures:[null],palette:a,paletteIds:{},paletteTexture:n,maxColors:255,maxSize:100,canvas:i.canvas}),this.update(e);var o={uniforms:{pixelRatio:t.context(&quot;pixelRatio&quot;),palette:n,paletteSize:function(t,e){return[r.tooManyColors?0:255,n.height]},scale:t.prop(&quot;scale&quot;),scaleFract:t.prop(&quot;scaleFract&quot;),translate:t.prop(&quot;translate&quot;),translateFract:t.prop(&quot;translateFract&quot;),opacity:t.prop(&quot;opacity&quot;),marker:t.prop(&quot;markerTexture&quot;)},attributes:{x:function(t,e){return e.xAttr||{buffer:e.positionBuffer,stride:8,offset:0}},y:function(t,e){return e.yAttr||{buffer:e.positionBuffer,stride:8,offset:4}},xFract:function(t,e){return e.xAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:0}},yFract:function(t,e){return e.yAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:4}},size:function(t,e){return e.size.length?{buffer:e.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*e.size/r.maxSize)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:e.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/r.maxSize)]}},colorId:function(t,e){return e.color.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(4*e.color,4*e.color+4):[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(4*e.borderColor,4*e.borderColor+4):[e.borderColor]}},isActive:function(t,e){return!0===e.activation?{constant:[1]}:e.activation?e.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:&quot;src alpha&quot;,dstRGB:&quot;one minus src alpha&quot;,srcAlpha:&quot;one minus dst alpha&quot;,dstAlpha:&quot;one&quot;}},scissor:{enable:!0,box:t.prop(&quot;viewport&quot;)},viewport:t.prop(&quot;viewport&quot;),stencil:{enable:!1},depth:{enable:!1},elements:t.prop(&quot;elements&quot;),count:t.prop(&quot;count&quot;),offset:t.prop(&quot;offset&quot;),primitive:&quot;points&quot;},c=s({},o);c.frag=l([&quot;precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\n\nuniform sampler2D marker;\nuniform float pixelRatio, opacity;\n\nfloat smoothStep(float x, float y) {\n  return 1.0 / (1.0 + exp(50.0*(x - y)));\n}\n\nvoid main() {\n  float dist = texture2D(marker, gl_PointCoord).r, delta = fragWidth;\n\n  // max-distance alpha\n  if (dist &lt; 0.003) discard;\n\n  // null-border case\n  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\n    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\n    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\n  }\n  else {\n    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\n    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\n\n    vec4 color = fragBorderColor;\n    color.a *= borderColorAmt;\n    color = mix(color, fragColor, colorAmt);\n    color.a *= opacity;\n\n    gl_FragColor = color;\n  }\n\n}\n&quot;]),c.vert=l([&quot;precision mediump float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\nuniform float pixelRatio;\nuniform sampler2D palette;\n\nconst float maxSize = 100.;\nconst float borderLevel = .5;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragPointSize, fragBorderRadius,\n    fragWidth, fragBorderColorLevel, fragColorLevel;\n\nvec2 paletteCoord(float id) {\n  return vec2(\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\n  );\n}\nvec2 paletteCoord(vec2 id) {\n  return vec2(\n    (id.x + .5) / paletteSize.x,\n    (id.y + .5) / paletteSize.y\n  );\n}\nvec4 getColor(vec4 id) {\n  // zero-palette means we deal with direct buffer\n  if (paletteSize.x == 0.) return id / 255.;\n  return texture2D(palette, paletteCoord(id.xy));\n}\n\nvoid main() {\n  if (isActive == 0.) return;\n\n  vec2 position = vec2(x, y);\n  vec2 positionFract = vec2(xFract, yFract);\n\n  vec4 color = getColor(colorId);\n  vec4 borderColor = getColor(borderColorId);\n\n  float size = size * maxSize / 255.;\n  float borderSize = borderSize * maxSize / 255.;\n\n  gl_PointSize = 2. * size * pixelRatio;\n  fragPointSize = size * pixelRatio;\n\n  vec2 pos = (position + translate) * scale\n      + (positionFract + translateFract) * scale\n      + (position + translate) * scaleFract\n      + (positionFract + translateFract) * scaleFract;\n\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n  fragColor = color;\n  fragBorderColor = borderColor;\n  fragWidth = 1. / gl_PointSize;\n\n  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\n  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\n}\n&quot;]),this.drawMarker=t(c);var u=s({},o);u.frag=l([&quot;precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\n\nuniform float opacity;\nvarying float fragBorderRadius, fragWidth;\n\nfloat smoothStep(float edge0, float edge1, float x) {\n\tfloat t;\n\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n\treturn t * t * (3.0 - 2.0 * t);\n}\n\nvoid main() {\n\tfloat radius, alpha = 1.0, delta = fragWidth;\n\n\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\n\n\tif (radius &gt; 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n&quot;]),u.vert=l([&quot;precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nvec2 paletteCoord(float id) {\n  return vec2(\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\n  );\n}\nvec2 paletteCoord(vec2 id) {\n  return vec2(\n    (id.x + .5) / paletteSize.x,\n    (id.y + .5) / paletteSize.y\n  );\n}\n\nvec4 getColor(vec4 id) {\n  // zero-palette means we deal with direct buffer\n  if (paletteSize.x == 0.) return id / 255.;\n  return texture2D(palette, paletteCoord(id.xy));\n}\n\nvoid main() {\n  // ignore inactive points\n  if (isActive == 0.) return;\n\n  vec2 position = vec2(x, y);\n  vec2 positionFract = vec2(xFract, yFract);\n\n  vec4 color = getColor(colorId);\n  vec4 borderColor = getColor(borderColorId);\n\n  float size = size * maxSize / 255.;\n  float borderSize = borderSize * maxSize / 255.;\n\n  gl_PointSize = (size + borderSize) * pixelRatio;\n\n  vec2 pos = (position + translate) * scale\n      + (positionFract + translateFract) * scale\n      + (position + translate) * scaleFract\n      + (positionFract + translateFract) * scaleFract;\n\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n  fragColor = color;\n  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n  fragWidth = 1. / gl_PointSize;\n}\n&quot;]),h&amp;&amp;(u.frag=u.frag.replace(&quot;smoothstep&quot;,&quot;smoothStep&quot;),c.frag=c.frag.replace(&quot;smoothstep&quot;,&quot;smoothStep&quot;)),this.drawCircle=t(u)}e.exports=g,g.defaults={color:&quot;black&quot;,borderColor:&quot;transparent&quot;,borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];return e.length&amp;&amp;(t=this).update.apply(t,e),this.draw(),this},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.groups;if(1===e.length&amp;&amp;Array.isArray(e[0])&amp;&amp;(null===e[0][0]||Array.isArray(e[0][0]))&amp;&amp;(e=e[0]),this.regl._refresh(),e.length)for(var i=0;i&lt;e.length;i++)t.drawItem(i,e[i]);else n.forEach(function(e,r){t.drawItem(r)});return this},g.prototype.drawItem=function(t,e){var r=this.groups,n=r[t];if(&quot;number&quot;==typeof e&amp;&amp;(t=e,n=r[e],e=null),n&amp;&amp;n.count&amp;&amp;n.opacity){n.activation[0]&amp;&amp;this.drawCircle(this.getMarkerDrawOptions(0,n,e));for(var i=[],a=1;a&lt;n.activation.length;a++)n.activation[a]&amp;&amp;(!0===n.activation[a]||n.activation[a].data.length)&amp;&amp;i.push.apply(i,this.getMarkerDrawOptions(a,n,e));i.length&amp;&amp;this.drawMarker(i)}},g.prototype.getMarkerDrawOptions=function(t,e,r){var n=e.range,i=e.tree,a=e.viewport,o=e.activation,l=e.selectionBuffer,c=e.count;this.regl;if(!i)return r?[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],count:r.length,elements:r,offset:0})]:[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],offset:0})];var u=[],f=i.range(n,{lod:!0,px:[(n[2]-n[0])/a.width,(n[3]-n[1])/a.height]});if(r){for(var h=o[t].data,p=new Uint8Array(c),d=0;d&lt;r.length;d++){var g=r[d];p[g]=h?h[g]:1}l.subdata(p)}for(var m=f.length;m--;){var v=f[m],y=v[0],x=v[1];u.push(s({},e,{markerTexture:this.markerTextures[t],activation:r?l:o[t],offset:y,count:x-y}))}return u},g.prototype.update=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){1===e.length&amp;&amp;Array.isArray(e[0])&amp;&amp;(e=e[0]);var n=this.groups,a=this.gl,l=this.regl,h=this.maxSize,m=this.maxColors,v=this.palette;this.groups=n=e.map(function(e,r){var y=n[r];if(void 0===e)return y;null===e?e={positions:null}:&quot;function&quot;==typeof e?e={ondraw:e}:&quot;number&quot;==typeof e[0]&amp;&amp;(e={positions:e}),null===(e=c(e,{positions:&quot;positions data points&quot;,snap:&quot;snap cluster lod tree&quot;,size:&quot;sizes size radius&quot;,borderSize:&quot;borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline&quot;,color:&quot;colors color fill fill-color fillColor&quot;,borderColor:&quot;borderColors borderColor stroke stroke-color strokeColor&quot;,marker:&quot;markers marker shape&quot;,range:&quot;range dataBox databox&quot;,viewport:&quot;viewport viewPort viewBox viewbox&quot;,opacity:&quot;opacity alpha transparency&quot;,bounds:&quot;bound bounds boundaries limits&quot;})).positions&amp;&amp;(e.positions=[]),y||(n[r]=y={id:r,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;stream&quot;,type:&quot;uint8&quot;}),sizeBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;uint8&quot;}),colorBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;uint8&quot;}),positionBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;float&quot;}),positionFractBuffer:l.buffer({data:new Uint8Array(0),usage:&quot;dynamic&quot;,type:&quot;float&quot;})},e=s({},g.defaults,e)),!e.positions||&quot;marker&quot;in e||(e.marker=y.marker,delete y.marker),!e.marker||&quot;positions&quot;in e||(e.positions=y.positions,delete y.positions);var x=0,b=0;if(u(y,e,[{snap:!0,size:function(t,e){return null==t&amp;&amp;(t=g.defaults.size),x+=t&amp;&amp;t.length?1:0,t},borderSize:function(t,e){return null==t&amp;&amp;(t=g.defaults.borderSize),x+=t&amp;&amp;t.length?1:0,t},opacity:parseFloat,color:function(e,r){return null==e&amp;&amp;(e=g.defaults.color),e=t.updateColor(e),b++,e},borderColor:function(e,r){return null==e&amp;&amp;(e=g.defaults.borderColor),e=t.updateColor(e),b++,e},bounds:function(t,e,r){return&quot;range&quot;in r||(r.range=null),t},positions:function(t,e,r){var n=e.snap,a=e.positionBuffer,s=e.positionFractBuffer,c=e.selectionBuffer;if(t.x||t.y)return t.x.length?e.xAttr={buffer:l.buffer(t.x),offset:0,stride:4,count:t.x.length}:e.xAttr={buffer:t.x.buffer,offset:4*t.x.offset||0,stride:4*(t.x.stride||1),count:t.x.count},t.y.length?e.yAttr={buffer:l.buffer(t.y),offset:0,stride:4,count:t.y.length}:e.yAttr={buffer:t.y.buffer,offset:4*t.y.offset||0,stride:4*(t.y.stride||1),count:t.y.count},e.count=Math.max(e.xAttr.count,e.yAttr.count),t;t=f(t,&quot;float64&quot;);var u=e.count=Math.floor(t.length/2),h=e.bounds=u?i(t,2):null;if(r.range||e.range||(delete e.range,r.range=h),r.marker||e.marker||(delete e.marker,r.marker=null),n&amp;&amp;(!0===n||u&gt;n)?e.tree=o(t,{bounds:h}):n&amp;&amp;n.length&amp;&amp;(e.tree=n),e.tree){var d={primitive:&quot;points&quot;,usage:&quot;static&quot;,data:e.tree,type:&quot;uint32&quot;};e.elements?e.elements(d):e.elements=l.elements(d)}return a({data:p.float(t),usage:&quot;dynamic&quot;}),s({data:p.fract(t),usage:&quot;dynamic&quot;}),c({data:new Uint8Array(u),type:&quot;uint8&quot;,usage:&quot;stream&quot;}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach(function(t){return t&amp;&amp;t.destroy&amp;&amp;t.destroy()}),i.length=0,e&amp;&amp;&quot;number&quot;!=typeof e[0]){for(var a=[],o=0,s=Math.min(e.length,r.count);o&lt;s;o++){var c=t.addMarker(e[o]);a[c]||(a[c]=new Uint8Array(r.count)),a[c][o]=1}for(var u=0;u&lt;a.length;u++)if(a[u]){var f={data:a[u],type:&quot;uint8&quot;,usage:&quot;static&quot;};i[u]?i[u](f):i[u]=l.buffer(f),i[u].data=a[u]}}else{i[t.addMarker(e)]=!0}return e},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=p.fract(e.scale),e.translateFract=p.fract(e.translate),t},viewport:function(t){return d(t||[a.drawingBufferWidth,a.drawingBufferHeight])}}]),x){var _=y.count,w=y.size,k=y.borderSize,M=y.sizeBuffer,A=new Uint8Array(2*_);if(w.length||k.length)for(var T=0;T&lt;_;T++)A[2*T]=Math.round(255*(null==w[T]?w:w[T])/h),A[2*T+1]=Math.round(255*(null==k[T]?k:k[T])/h);M({data:A,usage:&quot;dynamic&quot;})}if(b){var S,E=y.count,C=y.color,L=y.borderColor,z=y.colorBuffer;if(t.tooManyColors){if(C.length||L.length){S=new Uint8Array(8*E);for(var P=0;P&lt;E;P++){var O=C[P];S[8*P]=v[4*O],S[8*P+1]=v[4*O+1],S[8*P+2]=v[4*O+2],S[8*P+3]=v[4*O+3];var I=L[P];S[8*P+4]=v[4*I],S[8*P+5]=v[4*I+1],S[8*P+6]=v[4*I+2],S[8*P+7]=v[4*I+3]}}}else if(C.length||L.length){S=new Uint8Array(4*E+2);for(var D=0;D&lt;E;D++)null!=C[D]&amp;&amp;(S[4*D]=C[D]%m,S[4*D+1]=Math.floor(C[D]/m)),null!=L[D]&amp;&amp;(S[4*D+2]=L[D]%m,S[4*D+3]=Math.floor(L[D]/m))}z({data:S||new Uint8Array(0),type:&quot;uint8&quot;,usage:&quot;dynamic&quot;})}return y})}},g.prototype.addMarker=function(t){var e,r=this.markerTextures,n=this.regl,i=this.markerCache,a=null==t?0:i.indexOf(t);if(a&gt;=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o&lt;s;o++)e[o]=255*t[o]}var l=Math.floor(Math.sqrt(e.length));return a=r.length,i.push(t),r.push(n.texture({channels:1,data:e,radius:l,mag:&quot;linear&quot;,min:&quot;linear&quot;})),a},g.prototype.updateColor=function(t){var e=this.paletteIds,r=this.palette,i=this.maxColors;Array.isArray(t)||(t=[t]);var o=[];if(&quot;number&quot;==typeof t[0]){var s=[];if(Array.isArray(t))for(var l=0;l&lt;t.length;l+=4)s.push(t.slice(l,l+4));else for(var c=0;c&lt;t.length;c+=4)s.push(t.subarray(c,c+4));t=s}for(var u=0;u&lt;t.length;u++){var f=t[u];f=n(f,&quot;uint8&quot;);var h=a(f,!1);if(null==e[h]){var p=r.length;e[h]=Math.floor(p/4),r[p]=f[0],r[p+1]=f[1],r[p+2]=f[2],r[p+3]=f[3]}o[u]=e[h]}return!this.tooManyColors&amp;&amp;r.length&gt;i*i*4&amp;&amp;(this.tooManyColors=!0),this.updatePalette(r),1===o.length?o[0]:o},g.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n&gt;1)for(var i=.25*(t=t.slice()).length%e;i&lt;n*e;i++)t.push(0,0,0,0);r.height&lt;n&amp;&amp;r.resize(e,n),r.subimage({width:Math.min(.25*t.length,e),height:n,data:t},0,0)}},g.prototype.destroy=function(){return this.groups.forEach(function(t){t.sizeBuffer.destroy(),t.positionBuffer.destroy(),t.positionFractBuffer.destroy(),t.colorBuffer.destroy(),t.activation.forEach(function(t){return t&amp;&amp;t.destroy&amp;&amp;t.destroy()}),t.selectionBuffer.destroy(),t.elements&amp;&amp;t.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(t){return t&amp;&amp;t.destroy&amp;&amp;t.destroy()}),this}},{&quot;array-bounds&quot;:52,&quot;color-id&quot;:105,&quot;color-normalize&quot;:107,&quot;flatten-vertex-data&quot;:215,glslify:390,&quot;is-iexplorer&quot;:400,&quot;object-assign&quot;:434,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445,&quot;point-cluster&quot;:449,&quot;to-float32&quot;:512,&quot;update-diff&quot;:523}],474:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;regl-scatter2d/scatter&quot;),i=t(&quot;pick-by-alias&quot;),a=t(&quot;array-bounds&quot;),o=t(&quot;raf&quot;),s=t(&quot;array-range&quot;),l=t(&quot;parse-rect&quot;),c=t(&quot;flatten-vertex-data&quot;);function u(t,e){if(!(this instanceof u))return new u(t,e);this.traces=[],this.passes={},this.regl=t,this.scatter=n(t),this.canvas=this.scatter.canvas}function f(t,e,r){return(null!=t.id?t.id:t)&lt;&lt;16|(255&amp;e)&lt;&lt;8|255&amp;r}function h(t,e,r){var n,i,a,o,s=t[e],l=t[r];return s.length&gt;2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x+s.width,i=s.y+s.height),l.length&gt;2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,n,o,i]}function p(t){if(&quot;number&quot;==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}e.exports=u,u.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&amp;&amp;(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&amp;&amp;(this.planned=o(function(){e.draw(),e.dirty=!0,e.planned=null})):(this.draw(),this.dirty=!0,o(function(){e.dirty=!1})),this)},u.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;n&lt;e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);for(var i=[],a=0,o=0;o&lt;this.traces.length;o++){for(var s=this.traces[o],l=this.traces[o].passes,c=0;c&lt;l.length;c++)i.push(this.passes[l[c]]);s.passOffset=a,a+=s.passes.length}return(t=this.scatter).update.apply(t,i),this}},u.prototype.updateItem=function(t,e){var r=this.regl;if(null===e)return this.traces[t]=null,this;if(!e)return this;var n,o=i(e,{data:&quot;data items columns rows values dimensions samples x&quot;,snap:&quot;snap cluster&quot;,size:&quot;sizes size radius&quot;,color:&quot;colors color fill fill-color fillColor&quot;,opacity:&quot;opacity alpha transparency opaque&quot;,borderSize:&quot;borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline&quot;,borderColor:&quot;borderColors borderColor bordercolor stroke stroke-color strokeColor&quot;,marker:&quot;markers marker shape&quot;,range:&quot;range ranges databox dataBox&quot;,viewport:&quot;viewport viewBox viewbox&quot;,domain:&quot;domain domains area areas&quot;,padding:&quot;pad padding paddings pads margin margins&quot;,transpose:&quot;transpose transposed&quot;,diagonal:&quot;diagonal diag showDiagonal&quot;,upper:&quot;upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf&quot;,lower:&quot;lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower&quot;}),s=this.traces[t]||(this.traces[t]={id:t,buffer:r.buffer({usage:&quot;dynamic&quot;,type:&quot;float&quot;,data:new Uint8Array}),color:&quot;black&quot;,marker:null,size:12,borderColor:&quot;transparent&quot;,borderSize:1,viewport:l([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=o.color&amp;&amp;(s.color=o.color),null!=o.size&amp;&amp;(s.size=o.size),null!=o.marker&amp;&amp;(s.marker=o.marker),null!=o.borderColor&amp;&amp;(s.borderColor=o.borderColor),null!=o.borderSize&amp;&amp;(s.borderSize=o.borderSize),null!=o.opacity&amp;&amp;(s.opacity=o.opacity),o.viewport&amp;&amp;(s.viewport=l(o.viewport)),null!=o.diagonal&amp;&amp;(s.diagonal=o.diagonal),null!=o.upper&amp;&amp;(s.upper=o.upper),null!=o.lower&amp;&amp;(s.lower=o.lower),o.data){s.buffer(c(o.data)),s.columns=o.data.length,s.count=o.data[0].length,s.bounds=[];for(var u=0;u&lt;s.columns;u++)s.bounds[u]=a(o.data[u],1)}o.range&amp;&amp;(s.range=o.range,n=s.range&amp;&amp;&quot;number&quot;!=typeof s.range[0]),o.domain&amp;&amp;(s.domain=o.domain);var d=!1;null!=o.padding&amp;&amp;(Array.isArray(o.padding)&amp;&amp;o.padding.length===s.columns&amp;&amp;&quot;number&quot;==typeof o.padding[o.padding.length-1]?(s.padding=o.padding.map(p),d=!0):s.padding=p(o.padding));var g=s.columns,m=s.count,v=s.viewport.width,y=s.viewport.height,x=s.viewport.x,b=s.viewport.y,_=v/g,w=y/g;s.passes=[];for(var k=0;k&lt;g;k++)for(var M=0;M&lt;g;M++)if((s.diagonal||M!==k)&amp;&amp;(s.upper||!(k&gt;M))&amp;&amp;(s.lower||!(k&lt;M))){var A=f(s.id,k,M),T=this.passes[A]||(this.passes[A]={});if(o.data&amp;&amp;(o.transpose?T.positions={x:{buffer:s.buffer,offset:M,count:m,stride:g},y:{buffer:s.buffer,offset:k,count:m,stride:g}}:T.positions={x:{buffer:s.buffer,offset:M*m,count:m},y:{buffer:s.buffer,offset:k*m,count:m}},T.bounds=h(s.bounds,k,M)),o.domain||o.viewport||o.data){var S=d?h(s.padding,k,M):s.padding;if(s.domain){var E=h(s.domain,k,M),C=E[0],L=E[1],z=E[2],P=E[3];T.viewport=[x+C*v+S[0],b+L*y+S[1],x+z*v-S[2],b+P*y-S[3]]}else T.viewport=[x+M*_+_*S[0],b+k*w+w*S[1],x+(M+1)*_-_*S[2],b+(k+1)*w-w*S[3]]}o.color&amp;&amp;(T.color=s.color),o.size&amp;&amp;(T.size=s.size),o.marker&amp;&amp;(T.marker=s.marker),o.borderSize&amp;&amp;(T.borderSize=s.borderSize),o.borderColor&amp;&amp;(T.borderColor=s.borderColor),o.opacity&amp;&amp;(T.opacity=s.opacity),o.range&amp;&amp;(T.range=n?h(s.range,k,M):s.range||T.bounds),s.passes.push(A)}return this},u.prototype.draw=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=[],i=0;i&lt;e.length;i++)if(&quot;number&quot;==typeof e[i]){var a=this.traces[e[i]],o=a.passes,l=a.passOffset;n.push.apply(n,s(l,l+o.length))}else if(e[i].length){var c=e[i],u=this.traces[i],f=u.passes,h=u.passOffset;f=f.map(function(t,e){n[h+e]=c})}(t=this.scatter).draw.apply(t,n)}else this.scatter.draw();return this},u.prototype.destroy=function(){return this.traces.forEach(function(t){t.buffer&amp;&amp;t.buffer.destroy&amp;&amp;t.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{&quot;array-bounds&quot;:52,&quot;array-range&quot;:54,&quot;flatten-vertex-data&quot;:215,&quot;parse-rect&quot;:439,&quot;pick-by-alias&quot;:445,raf:464,&quot;regl-scatter2d/scatter&quot;:473}],475:[function(t,e,r){var n,i;n=this,i=function(){function t(t,e){this.id=V++,this.type=t,this.data=e}function e(t){return&quot;[&quot;+function t(e){if(0===e.length)return[];var r=e.charAt(0),n=e.charAt(e.length-1);if(1&lt;e.length&amp;&amp;r===n&amp;&amp;('&quot;'===r||&quot;'&quot;===r))return['&quot;'+e.substr(1,e.length-2).replace(/\\/g,&quot;\\\\&quot;).replace(/&quot;/g,'\\&quot;')+'&quot;'];if(r=/\[(false|true|null|\d+|'[^']*'|&quot;[^&quot;]*&quot;)\]/.exec(e))return t(e.substr(0,r.index)).concat(t(r[1])).concat(t(e.substr(r.index+r[0].length)));if(1===(r=e.split(&quot;.&quot;)).length)return['&quot;'+e.replace(/\\/g,&quot;\\\\&quot;).replace(/&quot;/g,'\\&quot;')+'&quot;'];for(e=[],n=0;n&lt;r.length;++n)e=e.concat(t(r[n]));return e}(t).join(&quot;][&quot;)+&quot;]&quot;}function r(t){return&quot;string&quot;==typeof t?t.split():t}function n(t){return&quot;string&quot;==typeof t?document.querySelector(t):t}function i(t){var e,i,a,o,s=t||{};t={};var l=[],c=[],u=&quot;undefined&quot;==typeof window?1:window.devicePixelRatio,f=!1,h=function(t){},p=function(){};if(&quot;string&quot;==typeof s?e=document.querySelector(s):&quot;object&quot;==typeof s&amp;&amp;(&quot;string&quot;==typeof s.nodeName&amp;&amp;&quot;function&quot;==typeof s.appendChild&amp;&amp;&quot;function&quot;==typeof s.getBoundingClientRect?e=s:&quot;function&quot;==typeof s.drawArrays||&quot;function&quot;==typeof s.drawElements?a=(o=s).canvas:(&quot;gl&quot;in s?o=s.gl:&quot;canvas&quot;in s?a=n(s.canvas):&quot;container&quot;in s&amp;&amp;(i=n(s.container)),&quot;attributes&quot;in s&amp;&amp;(t=s.attributes),&quot;extensions&quot;in s&amp;&amp;(l=r(s.extensions)),&quot;optionalExtensions&quot;in s&amp;&amp;(c=r(s.optionalExtensions)),&quot;onDone&quot;in s&amp;&amp;(h=s.onDone),&quot;profile&quot;in s&amp;&amp;(f=!!s.profile),&quot;pixelRatio&quot;in s&amp;&amp;(u=+s.pixelRatio))),e&amp;&amp;(&quot;canvas&quot;===e.nodeName.toLowerCase()?a=e:i=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&amp;&amp;(e=(n=t.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),i.width=r*e,i.height=r*n,j(i.style,{width:e+&quot;px&quot;,height:n+&quot;px&quot;})}var i=document.createElement(&quot;canvas&quot;);return j(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&amp;&amp;(i.style.position=&quot;absolute&quot;,j(t.style,{margin:0,padding:0})),window.addEventListener(&quot;resize&quot;,n,!1),n(),{canvas:i,onDestroy:function(){window.removeEventListener(&quot;resize&quot;,n),t.removeChild(i)}}}(i||document.body,0,u)))return null;a=e.canvas,p=e.onDestroy}o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r(&quot;webgl&quot;)||r(&quot;experimental-webgl&quot;)||r(&quot;webgl-experimental&quot;)}(a,t)}return o?{gl:o,canvas:a,container:i,extensions:l,optionalExtensions:c,pixelRatio:u,profile:f,onDone:h,onDestroy:p}:(p(),h(&quot;webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org&quot;),null)}function a(t,e){for(var r=Array(t),n=0;n&lt;t;++n)r[n]=e(n);return r}function o(t){var e,r;return e=(65535&lt;t)&lt;&lt;4,e|=r=(255&lt;(t&gt;&gt;&gt;=e))&lt;&lt;3,(e|=r=(15&lt;(t&gt;&gt;&gt;=r))&lt;&lt;2)|(r=(3&lt;(t&gt;&gt;&gt;=r))&lt;&lt;1)|t&gt;&gt;&gt;r&gt;&gt;1}function s(){function t(t){t:{for(var e=16;268435456&gt;=e;e*=16)if(t&lt;=e){t=e;break t}t=0}return 0&lt;(e=r[o(t)&gt;&gt;2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[o(t.byteLength)&gt;&gt;2].push(t)}var r=a(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function l(t){return!!t&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;Array.isArray(t.shape)&amp;&amp;Array.isArray(t.stride)&amp;&amp;&quot;number&quot;==typeof t.offset&amp;&amp;t.shape.length===t.stride.length&amp;&amp;(Array.isArray(t.data)||Y(t.data))}function c(t,e,r,n,i,a){for(var o=0;o&lt;e;++o)for(var s=t[o],l=0;l&lt;r;++l)for(var c=s[l],u=0;u&lt;n;++u)i[a++]=c[u]}function u(t){return 0|$[Object.prototype.toString.call(t)]}function f(t,e){for(var r=0;r&lt;e.length;++r)t[r]=e[r]}function h(t,e,r,n,i,a,o){for(var s=0,l=0;l&lt;r;++l)for(var c=0;c&lt;n;++c)t[s++]=e[i*l+a*c+o]}function p(t,e,r,n){function i(e){this.id=c++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&amp;&amp;(this.stats={size:0})}function a(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function o(t,e,r,n,i,o){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0&lt;e.length)if(Array.isArray(e[0])){i=tt(e);for(var s=n=1;s&lt;i.length;++s)n*=i[s];t.dimension=n,a(t,e=Q(e,i,t.dtype),r),o?t.persistentData=e:G.freeType(e)}else&quot;number&quot;==typeof e[0]?(t.dimension=i,f(i=G.allocType(t.dtype,e.length),e),a(t,i,r),o?t.persistentData=i:G.freeType(i)):Y(e[0])&amp;&amp;(t.dimension=e[0].length,t.dtype=n||u(e[0])||5126,a(t,e=Q(e,[e.length,e[0].length],t.dtype),r),o?t.persistentData=e:G.freeType(e))}else if(Y(e))t.dtype=n||u(e),t.dimension=i,a(t,e,r),o&amp;&amp;(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(l(e)){i=e.shape;var c=e.stride,p=(s=e.offset,0),d=0,g=0,m=0;1===i.length?(p=i[0],d=1,g=c[0],m=0):2===i.length&amp;&amp;(p=i[0],d=i[1],g=c[0],m=c[1]),t.dtype=n||u(e.data)||5126,t.dimension=d,h(i=G.allocType(t.dtype,p*d),e.data,p,d,g,m,s),a(t,i,r),o?t.persistentData=i:G.freeType(i)}}function s(r){e.bufferCount--;for(var i=0;i&lt;n.state.length;++i){var a=n.state[i];a.buffer===r&amp;&amp;(t.disableVertexAttribArray(i),a.buffer=null)}t.deleteBuffer(r.buffer),r.buffer=null,delete p[r.id]}var c=0,p={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var d=[];return r.profile&amp;&amp;(e.getTotalBufferSize=function(){var t=0;return Object.keys(p).forEach(function(e){t+=p[e].stats.size}),t}),{create:function(n,a,c,d){function g(e){var n=35044,i=null,a=0,s=0,c=1;return Array.isArray(e)||Y(e)||l(e)?i=e:&quot;number&quot;==typeof e?a=0|e:e&amp;&amp;(&quot;data&quot;in e&amp;&amp;(i=e.data),&quot;usage&quot;in e&amp;&amp;(n=K[e.usage]),&quot;type&quot;in e&amp;&amp;(s=J[e.type]),&quot;dimension&quot;in e&amp;&amp;(c=0|e.dimension),&quot;length&quot;in e&amp;&amp;(a=0|e.length)),m.bind(),i?o(m,i,n,s,c,d):(a&amp;&amp;t.bufferData(m.type,a,n),m.dtype=s||5121,m.usage=n,m.dimension=c,m.byteLength=a),r.profile&amp;&amp;(m.stats.size=m.byteLength*et[m.dtype]),g}e.bufferCount++;var m=new i(a);return p[m.id]=m,c||g(n),g._reglType=&quot;buffer&quot;,g._buffer=m,g.subdata=function(e,r){var n,i=0|(r||0);if(m.bind(),Y(e))t.bufferSubData(m.type,i,e);else if(Array.isArray(e)){if(0&lt;e.length)if(&quot;number&quot;==typeof e[0]){var a=G.allocType(m.dtype,e.length);f(a,e),t.bufferSubData(m.type,i,a),G.freeType(a)}else(Array.isArray(e[0])||Y(e[0]))&amp;&amp;(n=tt(e),a=Q(e,n,m.dtype),t.bufferSubData(m.type,i,a),G.freeType(a))}else if(l(e)){n=e.shape;var o=e.stride,s=a=0,c=0,p=0;1===n.length?(a=n[0],s=1,c=o[0],p=0):2===n.length&amp;&amp;(a=n[0],s=n[1],c=o[0],p=o[1]),n=Array.isArray(e.data)?m.dtype:u(e.data),h(n=G.allocType(n,a*s),e.data,a,s,c,p,e.offset),t.bufferSubData(m.type,i,n),G.freeType(n)}return g},r.profile&amp;&amp;(g.stats=m.stats),g.destroy=function(){s(m)},g},createStream:function(t,e){var r=d.pop();return r||(r=new i(t)),r.bind(),o(r,e,35040,0,1,!1),r},destroyStream:function(t){d.push(t)},clear:function(){X(p).forEach(s),d.forEach(s)},getBuffer:function(t){return t&amp;&amp;t._buffer instanceof i?t._buffer:null},restore:function(){X(p).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:o}}function d(t,e,r,n){function i(t){this.id=c++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,o,s,c,u){if(n.buffer.bind(),i){var f=u;u||Y(i)&amp;&amp;(!l(i)||Y(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)}else t.bufferData(34963,c,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=c;if(f=u,!u){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0&gt;(i=s)&amp;&amp;(i=n.buffer.byteLength,5123===f?i&gt;&gt;=1:5125===f&amp;&amp;(i&gt;&gt;=2)),n.vertCount=i,i=o,0&gt;o&amp;&amp;(i=4,1===(o=n.buffer.dimension)&amp;&amp;(i=0),2===o&amp;&amp;(i=1),3===o&amp;&amp;(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&amp;&amp;(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if(&quot;number&quot;==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||Y(t)||l(t)?e=t:(&quot;data&quot;in t&amp;&amp;(e=t.data),&quot;usage&quot;in t&amp;&amp;(r=K[t.usage]),&quot;primitive&quot;in t&amp;&amp;(n=rt[t.primitive]),&quot;count&quot;in t&amp;&amp;(i=0|t.count),&quot;type&quot;in t&amp;&amp;(h=u[t.type]),&quot;length&quot;in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&amp;&amp;5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return s}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,s(t),s._reglType=&quot;elements&quot;,s._elements=f,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return&quot;function&quot;==typeof t&amp;&amp;t._elements instanceof i?t._elements:null},clear:function(){X(s).forEach(o)}}}function g(t){for(var e=G.allocType(5123,t.length),r=0;r&lt;t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{nt[0]=t[r];var n=(a=it[0])&gt;&gt;&gt;31&lt;&lt;15,i=(a&lt;&lt;1&gt;&gt;&gt;24)-127,a=a&gt;&gt;13&amp;1023;e[r]=-24&gt;i?n:-14&gt;i?n+(a+1024&gt;&gt;-14-i):15&lt;i?n+31744:n+(i+15&lt;&lt;10)+a}return e}function m(t){return Array.isArray(t)||Y(t)}function v(t){return&quot;[object &quot;+t+&quot;]&quot;}function y(t){return Array.isArray(t)&amp;&amp;(0===t.length||&quot;number&quot;==typeof t[0])}function x(t){return!(!Array.isArray(t)||0===t.length||!m(t[0]))}function b(t){return Object.prototype.toString.call(t)}function _(t){if(!t)return!1;var e=b(t);return 0&lt;=pt.indexOf(e)||(y(t)||x(t)||l(t))}function w(t,e){36193===t.type?(t.data=g(e),G.freeType(e)):t.data=e}function k(t,e,r,n,i,a){if(t=&quot;undefined&quot;!=typeof gt[t]?gt[t]:st[t]*dt[e],a&amp;&amp;(t*=6),i){for(n=0;1&lt;=r;)n+=t*r*r,r/=2;return n}return t*r*n}function M(t,e,r,n,i,a,o){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,e){if(&quot;object&quot;==typeof e&amp;&amp;e){&quot;premultiplyAlpha&quot;in e&amp;&amp;(t.premultiplyAlpha=e.premultiplyAlpha),&quot;flipY&quot;in e&amp;&amp;(t.flipY=e.flipY),&quot;alignment&quot;in e&amp;&amp;(t.unpackAlignment=e.alignment),&quot;colorSpace&quot;in e&amp;&amp;(t.colorSpace=q[e.colorSpace]),&quot;type&quot;in e&amp;&amp;(t.type=H[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;&quot;shape&quot;in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&amp;&amp;(i=e.shape[2],a=!0)):(&quot;radius&quot;in e&amp;&amp;(r=n=e.radius),&quot;width&quot;in e&amp;&amp;(r=e.width),&quot;height&quot;in e&amp;&amp;(n=e.height),&quot;channels&quot;in e&amp;&amp;(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,&quot;format&quot;in e&amp;&amp;(r=e.format,n=t.internalformat=W[r],t.format=pt[n],r in H&amp;&amp;!(&quot;type&quot;in e)&amp;&amp;(t.type=H[r]),r in J&amp;&amp;(t.compressed=!0),r=!0),!a&amp;&amp;r?t.channels=st[t.format]:a&amp;&amp;!r&amp;&amp;t.channels!==ot[t.format]&amp;&amp;(t.format=t.internalformat=ot[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function p(t,e){var r=null;if(_(e)?r=e:e&amp;&amp;(u(t,e),&quot;x&quot;in e&amp;&amp;(t.xOffset=0|e.x),&quot;y&quot;in e&amp;&amp;(t.yOffset=0|e.y),_(e.data)&amp;&amp;(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if(Y(r))t.channels=t.channels||4,t.data=r,&quot;type&quot;in e||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(r)]);else if(y(r)){switch(t.channels=t.channels||4,a=(n=r).length,t.type){case 5121:case 5123:case 5125:case 5126:(a=G.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=g(n)}t.alignment=1,t.needsFree=!0}else if(l(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(n)]);a=r.shape;var o,s,c,f,h=r.stride;3===a.length?(c=a[2],f=h[2]):f=c=1,o=a[0],s=a[1],a=h[0],h=h[1],t.alignment=1,t.width=o,t.height=s,t.channels=c,t.format=t.internalformat=ot[c],t.needsFree=!0,o=f,r=r.offset,c=t.width,f=t.height,s=t.channels;for(var p=G.allocType(36193===t.type?5126:t.type,c*f*s),d=0,v=0;v&lt;f;++v)for(var k=0;k&lt;c;++k)for(var M=0;M&lt;s;++M)p[d++]=n[a*k+h*v+o*M+r];w(t,p)}else if(b(r)===lt||b(r)===ct)b(r)===lt?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(b(r)===ut)t.element=r,t.width=r.width,t.height=r.height,t.channels=4;else if(b(r)===ft)t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(b(r)===ht)t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(x(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=m(r[0][0])?h||r[0][0].length:h||1,o=Z.shape(r),c=1,f=0;f&lt;o.length;++f)c*=o[f];c=G.allocType(36193===t.type?5126:t.type,c),Z.flatten(r,o,&quot;&quot;,c),w(t,c),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=ot[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function d(e,r,i,a,o){var s=e.element,l=e.data,c=e.internalformat,u=e.format,h=e.type,p=e.width,d=e.height;f(e),s?t.texSubImage2D(r,o,i,a,u,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,c,p,d,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,p,d)):t.texSubImage2D(r,o,i,a,p,d,u,h,l)}function v(){return dt.pop()||new h}function M(t){t.needsFree&amp;&amp;G.freeType(t.data),h.call(t),dt.push(t)}function A(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function T(t,e,r){var n=t.images[0]=v();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function S(t,e){var r=null;if(_(e))c(r=t.images[0]=v(),t),p(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i&lt;n.length;++i)c(r=t.images[i]=v(),t),r.width&gt;&gt;=i,r.height&gt;&gt;=i,p(r,n[i]),t.mipmask|=1&lt;&lt;i;else c(r=t.images[0]=v(),t),p(r,e),t.mipmask=1;c(t,t.images[0])}function E(e,r){for(var i=e.images,a=0;a&lt;i.length&amp;&amp;i[a];++a){var o=i[a],s=r,l=a,c=o.element,u=o.data,h=o.internalformat,p=o.format,d=o.type,g=o.width,m=o.height,v=o.channels;f(o),c?t.texImage2D(s,l,p,p,d,c):o.compressed?t.compressedTexImage2D(s,l,h,g,m,0,u):o.needsCopy?(n(),t.copyTexImage2D(s,l,p,o.xOffset,o.yOffset,g,m,0)):((o=!u)&amp;&amp;(u=G.zero.allocType(d,g*m*v)),t.texImage2D(s,l,p,g,m,0,p,d,u),o&amp;&amp;u&amp;&amp;G.zero.freeType(u))}}function C(){var t=gt.pop()||new A;s.call(t);for(var e=t.mipmask=0;16&gt;e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;r&lt;e.length;++r)e[r]&amp;&amp;M(e[r]),e[r]=null;gt.push(t)}function z(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function P(t,e){&quot;min&quot;in e&amp;&amp;(t.minFilter=U[e.min],0&lt;=at.indexOf(t.minFilter)&amp;&amp;!(&quot;faces&quot;in e)&amp;&amp;(t.genMipmaps=!0)),&quot;mag&quot;in e&amp;&amp;(t.magFilter=V[e.mag]);var r=t.wrapS,n=t.wrapT;if(&quot;wrap&quot;in e){var i=e.wrap;&quot;string&quot;==typeof i?r=n=N[i]:Array.isArray(i)&amp;&amp;(r=N[i[0]],n=N[i[1]])}else&quot;wrapS&quot;in e&amp;&amp;(r=N[e.wrapS]),&quot;wrapT&quot;in e&amp;&amp;(n=N[e.wrapT]);if(t.wrapS=r,t.wrapT=n,&quot;anisotropic&quot;in e&amp;&amp;(t.anisotropic=e.anisotropic),&quot;mipmap&quot;in e){switch(r=!1,typeof e.mipmap){case&quot;string&quot;:t.mipmapHint=F[e.mipmap],r=t.genMipmaps=!0;break;case&quot;boolean&quot;:r=t.genMipmaps=e.mipmap;break;case&quot;object&quot;:t.genMipmaps=!1,r=!0}!r||&quot;min&quot;in e||(t.minFilter=9984)}}function O(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&amp;&amp;t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&amp;&amp;(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function I(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=mt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new z,o.profile&amp;&amp;(this.stats={size:0})}function D(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function R(){var e=xt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function B(e){var r=e.texture,n=e.unit,i=e.target;0&lt;=n&amp;&amp;(t.activeTexture(33984+n),t.bindTexture(i,null),xt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete vt[e.id],a.textureCount--}var F={&quot;don't care&quot;:4352,&quot;dont care&quot;:4352,nice:4354,fast:4353},N={repeat:10497,clamp:33071,mirror:33648},V={nearest:9728,linear:9729},U=j({mipmap:9987,&quot;nearest mipmap nearest&quot;:9984,&quot;linear mipmap nearest&quot;:9985,&quot;nearest mipmap linear&quot;:9986,&quot;linear mipmap linear&quot;:9987},V),q={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,&quot;rgb5 a1&quot;:32820},W={alpha:6406,luminance:6409,&quot;luminance alpha&quot;:6410,rgb:6407,rgba:6408,rgba4:32854,&quot;rgb5 a1&quot;:32855,rgb565:36194},J={};e.ext_srgb&amp;&amp;(W.srgb=35904,W.srgba=35906),e.oes_texture_float&amp;&amp;(H.float32=H.float=5126),e.oes_texture_half_float&amp;&amp;(H.float16=H[&quot;half float&quot;]=36193),e.webgl_depth_texture&amp;&amp;(j(W,{depth:6402,&quot;depth stencil&quot;:34041}),j(H,{uint16:5123,uint32:5125,&quot;depth stencil&quot;:34042})),e.webgl_compressed_texture_s3tc&amp;&amp;j(J,{&quot;rgb s3tc dxt1&quot;:33776,&quot;rgba s3tc dxt1&quot;:33777,&quot;rgba s3tc dxt3&quot;:33778,&quot;rgba s3tc dxt5&quot;:33779}),e.webgl_compressed_texture_atc&amp;&amp;j(J,{&quot;rgb atc&quot;:35986,&quot;rgba atc explicit alpha&quot;:35987,&quot;rgba atc interpolated alpha&quot;:34798}),e.webgl_compressed_texture_pvrtc&amp;&amp;j(J,{&quot;rgb pvrtc 4bppv1&quot;:35840,&quot;rgb pvrtc 2bppv1&quot;:35841,&quot;rgba pvrtc 4bppv1&quot;:35842,&quot;rgba pvrtc 2bppv1&quot;:35843}),e.webgl_compressed_texture_etc1&amp;&amp;(J[&quot;rgb etc1&quot;]=36196);var K=Array.prototype.slice.call(t.getParameter(34467));Object.keys(J).forEach(function(t){var e=J[t];0&lt;=K.indexOf(e)&amp;&amp;(W[t]=e)});var Q=Object.keys(W);r.textureFormats=Q;var tt=[];Object.keys(W).forEach(function(t){tt[W[t]]=t});var et=[];Object.keys(H).forEach(function(t){et[H[t]]=t});var rt=[];Object.keys(V).forEach(function(t){rt[V[t]]=t});var nt=[];Object.keys(U).forEach(function(t){nt[U[t]]=t});var it=[];Object.keys(N).forEach(function(t){it[N[t]]=t});var pt=Q.reduce(function(t,e){var r=W[e];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r?t[r]=r:32855===r||0&lt;=e.indexOf(&quot;rgba&quot;)?t[r]=6408:t[r]=6407,t},{}),dt=[],gt=[],mt=0,vt={},yt=r.maxTextureUnits,xt=Array(yt).map(function(){return null});return j(I.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0&gt;e){for(var r=0;r&lt;yt;++r){var n=xt[r];if(n){if(0&lt;n.bindCount)continue;n.unit=-1}xt[r]=this,e=r;break}o.profile&amp;&amp;a.maxTextureUnits&lt;e+1&amp;&amp;(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0&gt;=--this.refCount&amp;&amp;B(this)}}),o.profile&amp;&amp;(a.getTotalTextureSize=function(){var t=0;return Object.keys(vt).forEach(function(e){t+=vt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var a=C();return&quot;number&quot;==typeof t?T(a,0|t,&quot;number&quot;==typeof e?0|e:0|t):t?(P(r,t),S(a,t)):T(a,1,1),r.genMipmaps&amp;&amp;(a.mipmask=(a.width&lt;&lt;1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,D(i),E(a,3553),O(r,3553),R(),L(a),o.profile&amp;&amp;(i.stats.size=k(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return vt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width&gt;&gt;a)-e,o.height=o.height||(i.height&gt;&gt;a)-r,D(i),d(o,3553,e,r,a),R(),M(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&amp;&amp;s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l,c=i.channels,u=i.type,f=0;i.mipmask&gt;&gt;f;++f){var h=a&gt;&gt;f,p=s&gt;&gt;f;if(!h||!p)break;l=G.zero.allocType(u,h*p*c),t.texImage2D(3553,f,i.format,h,p,0,i.format,i.type,l),l&amp;&amp;G.zero.freeType(l)}return R(),o.profile&amp;&amp;(i.stats.size=k(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType=&quot;texture2d&quot;,n._texture=i,o.profile&amp;&amp;(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function f(t,e,r,n,i,a){var s,l=h.texInfo;for(z.call(l),s=0;6&gt;s;++s)g[s]=C();if(&quot;number&quot;!=typeof t&amp;&amp;t){if(&quot;object&quot;==typeof t)if(e)S(g[0],t),S(g[1],e),S(g[2],r),S(g[3],n),S(g[4],i),S(g[5],a);else if(P(l,t),u(h,t),&quot;faces&quot;in t)for(t=t.faces,s=0;6&gt;s;++s)c(g[s],h),S(g[s],t[s]);else for(s=0;6&gt;s;++s)S(g[s],t)}else for(t=0|t||1,s=0;6&gt;s;++s)T(g[s],t,t);for(c(h,g[0]),h.mipmask=l.genMipmaps?(g[0].width&lt;&lt;1)-1:g[0].mipmask,h.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,D(h),s=0;6&gt;s;++s)E(g[s],34069+s);for(O(l,34067),R(),o.profile&amp;&amp;(h.stats.size=k(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=tt[h.internalformat],f.type=et[h.type],f.mag=rt[l.magFilter],f.min=nt[l.minFilter],f.wrapS=it[l.wrapS],f.wrapT=it[l.wrapT],s=0;6&gt;s;++s)L(g[s]);return f}var h=new I(34067);vt[h.id]=h,a.cubeCount++;var g=Array(6);return f(e,r,n,i,s,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=v();return c(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width&gt;&gt;i)-r,a.height=a.height||(h.height&gt;&gt;i)-n,D(h),d(a,34069+t,r,n,i),R(),M(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,D(h);for(var r=0;6&gt;r;++r)for(var n=0;h.mipmask&gt;&gt;n;++n)t.texImage2D(34069+r,n,h.format,e&gt;&gt;n,e&gt;&gt;n,0,h.format,h.type,null);return R(),o.profile&amp;&amp;(h.stats.size=k(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType=&quot;textureCube&quot;,f._texture=h,o.profile&amp;&amp;(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e&lt;yt;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),xt[e]=null;X(vt).forEach(B),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){X(vt).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32&gt;r;++r)if(0!=(e.mipmask&amp;1&lt;&lt;r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width&gt;&gt;r,e.height&gt;&gt;r,0,e.internalformat,e.type,null);else for(var n=0;6&gt;n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width&gt;&gt;r,e.height&gt;&gt;r,0,e.internalformat,e.type,null);O(e.texInfo,e.target)})}}}function A(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&amp;&amp;(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&amp;&amp;(t.texture&amp;&amp;t.texture._texture.decRef(),t.renderbuffer&amp;&amp;t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&amp;&amp;(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&amp;&amp;(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return&quot;object&quot;==typeof t&amp;&amp;(i=t.data,&quot;target&quot;in t&amp;&amp;(e=0|t.target)),&quot;texture2d&quot;===(t=i._reglType)?r=i:&quot;textureCube&quot;===t?r=i:&quot;renderbuffer&quot;===t&amp;&amp;(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&amp;&amp;(t.texture||t.renderbuffer)}function p(t,e,r){t&amp;&amp;(t.texture?t.texture.resize(e,r):t.renderbuffer&amp;&amp;t.renderbuffer.resize(e,r))}function d(){this.id=k++,M[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function m(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete M[e.id]}function v(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n&lt;i.length;++n)c(36064+n,i[n]);for(n=i.length;n&lt;r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),c(36096,e.depthAttachment),c(36128,e.stencilAttachment),c(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,x.next?x.next.framebuffer:null),x.cur=x.next,t.getError()}function y(t,e){function r(t,e){var i,a=0,o=0,s=!0,c=!0;i=null;var p=!0,d=&quot;rgba&quot;,m=&quot;uint8&quot;,y=1,x=null,w=null,k=null,M=!1;&quot;number&quot;==typeof t?(a=0|t,o=0|e||a):t?(&quot;shape&quot;in t?(a=(o=t.shape)[0],o=o[1]):(&quot;radius&quot;in t&amp;&amp;(a=o=t.radius),&quot;width&quot;in t&amp;&amp;(a=t.width),&quot;height&quot;in t&amp;&amp;(o=t.height)),(&quot;color&quot;in t||&quot;colors&quot;in t)&amp;&amp;(i=t.color||t.colors,Array.isArray(i)),i||(&quot;colorCount&quot;in t&amp;&amp;(y=0|t.colorCount),&quot;colorTexture&quot;in t&amp;&amp;(p=!!t.colorTexture,d=&quot;rgba4&quot;),&quot;colorType&quot;in t&amp;&amp;(m=t.colorType,!p)&amp;&amp;(&quot;half float&quot;===m||&quot;float16&quot;===m?d=&quot;rgba16f&quot;:&quot;float&quot;!==m&amp;&amp;&quot;float32&quot;!==m||(d=&quot;rgba32f&quot;)),&quot;colorFormat&quot;in t&amp;&amp;(d=t.colorFormat,0&lt;=b.indexOf(d)?p=!0:0&lt;=_.indexOf(d)&amp;&amp;(p=!1))),(&quot;depthTexture&quot;in t||&quot;depthStencilTexture&quot;in t)&amp;&amp;(M=!(!t.depthTexture&amp;&amp;!t.depthStencilTexture)),&quot;depth&quot;in t&amp;&amp;(&quot;boolean&quot;==typeof t.depth?s=t.depth:(x=t.depth,c=!1)),&quot;stencil&quot;in t&amp;&amp;(&quot;boolean&quot;==typeof t.stencil?c=t.stencil:(w=t.stencil,s=!1)),&quot;depthStencil&quot;in t&amp;&amp;(&quot;boolean&quot;==typeof t.depthStencil?s=c=t.depthStencil:(k=t.depthStencil,c=s=!1))):a=o=1;var A=null,T=null,S=null,E=null;if(Array.isArray(i))A=i.map(u);else if(i)A=[u(i)];else for(A=Array(y),i=0;i&lt;y;++i)A[i]=f(a,o,p,d,m);for(a=a||A[0].width,o=o||A[0].height,x?T=u(x):s&amp;&amp;!c&amp;&amp;(T=f(a,o,M,&quot;depth&quot;,&quot;uint32&quot;)),w?S=u(w):c&amp;&amp;!s&amp;&amp;(S=f(a,o,!1,&quot;stencil&quot;,&quot;uint8&quot;)),k?E=u(k):!x&amp;&amp;!w&amp;&amp;c&amp;&amp;s&amp;&amp;(E=f(a,o,M,&quot;depth stencil&quot;,&quot;depth stencil&quot;)),s=null,i=0;i&lt;A.length;++i)l(A[i]),A[i]&amp;&amp;A[i].texture&amp;&amp;(c=yt[A[i].texture._texture.format]*xt[A[i].texture._texture.type],null===s&amp;&amp;(s=c));return l(T),l(S),l(E),g(n),n.width=a,n.height=o,n.colorAttachments=A,n.depthAttachment=T,n.stencilAttachment=S,n.depthStencilAttachment=E,r.color=A.map(h),r.depth=h(T),r.stencil=h(S),r.depthStencil=h(E),r.width=n.width,r.height=n.height,v(n),r}var n=new d;return a.framebufferCount++,r(t,e),j(r,{resize:function(t,e){var i=0|t,a=0|e||i;if(i===n.width&amp;&amp;a===n.height)return r;for(var o=n.colorAttachments,s=0;s&lt;o.length;++s)p(o[s],i,a);return p(n.depthAttachment,i,a),p(n.stencilAttachment,i,a),p(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,v(n),r},_reglType:&quot;framebuffer&quot;,_framebuffer:n,destroy:function(){m(n),g(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=[&quot;rgba&quot;],_=[&quot;rgba4&quot;,&quot;rgb565&quot;,&quot;rgb5 a1&quot;];e.ext_srgb&amp;&amp;_.push(&quot;srgba&quot;),e.ext_color_buffer_half_float&amp;&amp;_.push(&quot;rgba16f&quot;,&quot;rgb16f&quot;),e.webgl_color_buffer_float&amp;&amp;_.push(&quot;rgba32f&quot;);var w=[&quot;uint8&quot;];e.oes_texture_half_float&amp;&amp;w.push(&quot;half float&quot;,&quot;float16&quot;),e.oes_texture_float&amp;&amp;w.push(&quot;float&quot;,&quot;float32&quot;);var k=0,M={};return j(x,{getFramebuffer:function(t){return&quot;function&quot;==typeof t&amp;&amp;&quot;framebuffer&quot;===t._reglType&amp;&amp;(t=t._framebuffer)instanceof d?t:null},create:y,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i=&quot;rgba&quot;;var l=&quot;uint8&quot;,c=1;if(&quot;number&quot;==typeof t?o=0|t:t?(&quot;shape&quot;in t?o=t.shape[0]:(&quot;radius&quot;in t&amp;&amp;(o=0|t.radius),&quot;width&quot;in t?o=0|t.width:&quot;height&quot;in t&amp;&amp;(o=0|t.height)),(&quot;color&quot;in t||&quot;colors&quot;in t)&amp;&amp;(s=t.color||t.colors,Array.isArray(s)),s||(&quot;colorCount&quot;in t&amp;&amp;(c=0|t.colorCount),&quot;colorType&quot;in t&amp;&amp;(l=t.colorType),&quot;colorFormat&quot;in t&amp;&amp;(i=t.colorFormat)),&quot;depth&quot;in t&amp;&amp;(a.depth=t.depth),&quot;stencil&quot;in t&amp;&amp;(a.stencil=t.stencil),&quot;depthStencil&quot;in t&amp;&amp;(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i&lt;s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(c),s={radius:o,format:i,type:l},i=0;i&lt;c;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i&lt;t.length;++i)c=t[i],o=o||c.width,a.color[i]={target:34069,data:t[i]};for(i=0;6&gt;i;++i){for(c=0;c&lt;t.length;++c)a.color[c].target=34069+i;0&lt;i&amp;&amp;(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=y(a)}return j(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),j(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t&lt;i.length;++t)i[t].resize(n);for(t=0;6&gt;t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:&quot;framebufferCube&quot;,destroy:function(){r.forEach(function(t){t.destroy()})}})},clear:function(){X(M).forEach(m)},restore:function(){X(M).forEach(function(e){e.framebuffer=t.createFramebuffer(),v(e)})}})}function T(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function S(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r&lt;t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?c:u)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(t,e){this.id=p++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],n.profile&amp;&amp;(this.stats={uniformsCount:0,attributesCount:0})}function l(r,s){var l,c;l=o(35632,r.fragId),c=o(35633,r.vertId);var u=r.program=t.createProgram();t.attachShader(u,l),t.attachShader(u,c),t.linkProgram(u);var f=t.getProgramParameter(u,35718);n.profile&amp;&amp;(r.stats.uniformsCount=f);var h=r.uniforms;for(l=0;l&lt;f;++l)if(c=t.getActiveUniform(u,l))if(1&lt;c.size)for(var p=0;p&lt;c.size;++p){var d=c.name.replace(&quot;[0]&quot;,&quot;[&quot;+p+&quot;]&quot;);a(h,new i(d,e.id(d),t.getUniformLocation(u,d),c))}else a(h,new i(c.name,e.id(c.name),t.getUniformLocation(u,c.name),c));for(f=t.getProgramParameter(u,35721),n.profile&amp;&amp;(r.stats.attributesCount=f),h=r.attributes,l=0;l&lt;f;++l)(c=t.getActiveAttrib(u,l))&amp;&amp;a(h,new i(c.name,e.id(c.name),t.getAttribLocation(u,c.name),c))}var c={},u={},f={},h=[],p=0;return n.profile&amp;&amp;(r.getMaxUniformsCount=function(){var t=0;return h.forEach(function(e){e.stats.uniformsCount&gt;t&amp;&amp;(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach(function(e){e.stats.attributesCount&gt;t&amp;&amp;(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);X(c).forEach(e),c={},X(u).forEach(e),u={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,f={},r.shaderCount=0},program:function(t,e,n){var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a),i[t]=a,h.push(a)),a},restore:function(){c={},u={};for(var t=0;t&lt;h.length;++t)l(h[t])},shader:o,frag:-1,vert:-1}}function E(t,e,r,n,i,a,o){function s(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;return Y(i)?u=i:i&amp;&amp;(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r(),i=l*c*4,u||(5121===a?u=new Uint8Array(i):5126===a&amp;&amp;(u=u||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,c,6408,a,u),u}return function(t){return t&amp;&amp;&quot;framebuffer&quot;in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=s(t)}),r}(t):s(t)}}function C(t){return Array.prototype.slice.call(t)}function L(t){return C(t).join(&quot;&quot;)}function z(){function t(){var t=[],e=[];return j(function(){t.push.apply(t,C(arguments))},{def:function(){var n=&quot;v&quot;+r++;return e.push(n),0&lt;arguments.length&amp;&amp;(t.push(n,&quot;=&quot;),t.push.apply(t,C(arguments)),t.push(&quot;;&quot;)),n},toString:function(){return L([0&lt;e.length?&quot;var &quot;+e+&quot;;&quot;:&quot;&quot;,L(t)])}})}function e(){function e(t,e){n(t,e,&quot;=&quot;,r.def(t,e),&quot;;&quot;)}var r=t(),n=t(),i=r.toString,a=n.toString;return j(function(){r.apply(r,C(arguments))},{def:r.def,entry:r,exit:n,save:e,set:function(t,n,i){e(t,n),r(t,n,&quot;=&quot;,i,&quot;;&quot;)},toString:function(){return i()+a()}})}var r=0,n=[],i=[],a=t(),o={};return{global:a,link:function(t){for(var e=0;e&lt;i.length;++e)if(i[e]===t)return n[e];return e=&quot;g&quot;+r++,n.push(e),i.push(t),e},block:t,proc:function(t,r){function n(){var t=&quot;a&quot;+i.length;return i.push(t),t}var i=[];r=r||0;for(var a=0;a&lt;r;++a)n();var s=(a=e()).toString;return o[t]=j(a,{arg:n,toString:function(){return L([&quot;function(&quot;,i.join(),&quot;){&quot;,s(),&quot;}&quot;])}})},scope:e,cond:function(){var t=L(arguments),r=e(),n=e(),i=r.toString,a=n.toString;return j(r,{then:function(){return r.apply(r,C(arguments)),this},else:function(){return n.apply(n,C(arguments)),this},toString:function(){var e=a();return e&amp;&amp;(e=&quot;else{&quot;+e+&quot;}&quot;),L([&quot;if(&quot;,t,&quot;){&quot;,i(),&quot;}&quot;,e])}})},compile:function(){var t=['&quot;use strict&quot;;',a,&quot;return {&quot;];Object.keys(o).forEach(function(e){t.push('&quot;',e,'&quot;:',o[e].toString(),&quot;,&quot;)}),t.push(&quot;}&quot;);var e=L(t).replace(/;/g,&quot;;\n&quot;).replace(/}/g,&quot;}\n&quot;).replace(/{/g,&quot;{\n&quot;);return Function.apply(null,n.concat(e)).apply(null,i)}}}function P(t){return Array.isArray(t)||Y(t)||l(t)}function O(t){return t.sort(function(t,e){return&quot;viewport&quot;===t?-1:&quot;viewport&quot;===e?1:t&lt;e?-1:1})}function I(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function D(t){return t&amp;&amp;!(t.thisDep||t.contextDep||t.propDep)}function R(t){return new I(!1,!1,!1,t)}function B(t,e){var r=t.type;return 0===r?new I(!0,1&lt;=(r=t.data.length),2&lt;=r,e):4===r?new I((r=t.data).thisDep,r.contextDep,r.propDep,e):new I(3===r,2===r,1===r,e)}function F(t,e,r,n,i,o,s,l,c,u,f,h,p,d,g){function v(t){return t.replace(&quot;.&quot;,&quot;_&quot;)}function y(t,e,r){var n=v(t);nt.push(t),et[n]=tt[n]=!!r,it[n]=e}function x(t,e,r){var n=v(t);nt.push(t),Array.isArray(r)?(tt[n]=r.slice(),et[n]=r.slice()):tt[n]=et[n]=r,at[n]=e}function b(){var t=z(),r=t.link,n=t.global;t.id=lt++,t.batchId=&quot;0&quot;;var i=r(ot),a=t.shared={props:&quot;a0&quot;};Object.keys(ot).forEach(function(t){a[t]=n.def(i,&quot;.&quot;,t)});var o=t.next={},s=t.current={};Object.keys(at).forEach(function(t){Array.isArray(tt[t])&amp;&amp;(o[t]=n.def(a.next,&quot;.&quot;,t),s[t]=n.def(a.current,&quot;.&quot;,t))});var l=t.constants={};Object.keys(st).forEach(function(t){l[t]=n.def(JSON.stringify(st[t]))}),t.invoke=function(e,n){switch(n.type){case 0:var i=[&quot;this&quot;,a.context,a.props,t.batchId];return e.def(r(n.data),&quot;.call(&quot;,i.slice(0,Math.max(n.data.length+1,4)),&quot;)&quot;);case 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def(&quot;this&quot;,n.data);case 4:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){if((t=e.id(t))in c)return c[t];var n=u.scope[t];return n||(n=u.scope[t]=new Z),c[t]=r(n)},t}function _(t,e){var r=t.static,n=t.dynamic;if(&quot;framebuffer&quot;in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),R(function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,&quot;.next&quot;,r),n=n.context,e.set(n,&quot;.framebufferWidth&quot;,r+&quot;.width&quot;),e.set(n,&quot;.framebufferHeight&quot;,r+&quot;.height&quot;),r})):R(function(t,e){var r=t.shared;return e.set(r.framebuffer,&quot;.next&quot;,&quot;null&quot;),r=r.context,e.set(r,&quot;.framebufferWidth&quot;,r+&quot;.drawingBufferWidth&quot;),e.set(r,&quot;.framebufferHeight&quot;,r+&quot;.drawingBufferHeight&quot;),&quot;null&quot;})}if(&quot;framebuffer&quot;in n){var a=n.framebuffer;return B(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;r=e.def(i,&quot;.getFramebuffer(&quot;,r,&quot;)&quot;);return e.set(i,&quot;.next&quot;,r),n=n.context,e.set(n,&quot;.framebufferWidth&quot;,r+&quot;?&quot;+r+&quot;.width:&quot;+n+&quot;.drawingBufferWidth&quot;),e.set(n,&quot;.framebufferHeight&quot;,r+&quot;?&quot;+r+&quot;.height:&quot;+n+&quot;.drawingBufferHeight&quot;),r})}return null}function w(t){function r(t){if(t in n){var r=e.id(n[t]);return(t=R(function(){return r})).id=r,t}if(t in i){var a=i[t];return B(a,function(t,e){var r=t.invoke(e,a);return e.def(t.shared.strings,&quot;.id(&quot;,r,&quot;)&quot;)})}return null}var n=t.static,i=t.dynamic,a=r(&quot;frag&quot;),o=r(&quot;vert&quot;),s=null;return D(a)&amp;&amp;D(o)?(s=f.program(o.id,a.id),t=R(function(t,e){return t.link(s)})):t=new I(a&amp;&amp;a.thisDep||o&amp;&amp;o.thisDep,a&amp;&amp;a.contextDep||o&amp;&amp;o.contextDep,a&amp;&amp;a.propDep||o&amp;&amp;o.propDep,function(t,e){var r,n,i=t.shared.shader;return r=a?a.append(t,e):e.def(i,&quot;.&quot;,&quot;frag&quot;),n=o?o.append(t,e):e.def(i,&quot;.&quot;,&quot;vert&quot;),e.def(i+&quot;.program(&quot;+n+&quot;,&quot;+r+&quot;)&quot;)}),{frag:a,vert:o,progVar:t,program:s}}function k(t,e){function r(t,e){if(t in n){var r=0|n[t];return R(function(t,n){return e&amp;&amp;(t.OFFSET=r),r})}if(t in i){var o=i[t];return B(o,function(t,r){var n=t.invoke(r,o);return e&amp;&amp;(t.OFFSET=n),n})}return e&amp;&amp;a?R(function(t,e){return t.OFFSET=&quot;0&quot;,0}):null}var n=t.static,i=t.dynamic,a=function(){if(&quot;elements&quot;in n){var t=n.elements;P(t)?t=o.getElements(o.create(t,!0)):t&amp;&amp;(t=o.getElements(t));var e=R(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null});return e.value=t,e}if(&quot;elements&quot;in i){var r=i.elements;return B(r,function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def(&quot;null&quot;);n=e.def(n,&quot;(&quot;,a,&quot;)&quot;),a=t.cond(n).then(o,&quot;=&quot;,i,&quot;.createStream(&quot;,a,&quot;);&quot;).else(o,&quot;=&quot;,i,&quot;.getElements(&quot;,a,&quot;);&quot;);return e.entry(a),e.exit(t.cond(n).then(i,&quot;.destroyStream(&quot;,o,&quot;);&quot;)),t.ELEMENTS=o})}return null}(),s=r(&quot;offset&quot;,!0);return{elements:a,primitive:function(){if(&quot;primitive&quot;in n){var t=n.primitive;return R(function(e,r){return rt[t]})}if(&quot;primitive&quot;in i){var e=i.primitive;return B(e,function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,&quot;[&quot;,i,&quot;]&quot;)})}return a?D(a)?a.value?R(function(t,e){return e.def(t.ELEMENTS,&quot;.primType&quot;)}):R(function(){return 4}):new I(a.thisDep,a.contextDep,a.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,&quot;?&quot;,r,&quot;.primType:&quot;,4)}):null}(),count:function(){if(&quot;count&quot;in n){var t=0|n.count;return R(function(){return t})}if(&quot;count&quot;in i){var e=i.count;return B(e,function(t,r){return t.invoke(r,e)})}return a?D(a)?a?s?new I(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,&quot;.vertCount-&quot;,t.OFFSET)}):R(function(t,e){return e.def(t.ELEMENTS,&quot;.vertCount&quot;)}):R(function(){return-1}):new I(a.thisDep||s.thisDep,a.contextDep||s.contextDep,a.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,&quot;?&quot;,r,&quot;.vertCount-&quot;,t.OFFSET,&quot;:-1&quot;):e.def(r,&quot;?&quot;,r,&quot;.vertCount:-1&quot;)}):null}(),instances:r(&quot;instances&quot;,!1),offset:s}}function M(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var r=n[t],a=e.id(t),s=new Z;if(P(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(c=i.getBuffer(r))s.state=1,s.buffer=c,s.type=0;else if(&quot;constant&quot;in r){var l=r.constant;s.buffer=&quot;null&quot;,s.state=2,&quot;number&quot;==typeof l?s.x=l:bt.forEach(function(t,e){e&lt;l.length&amp;&amp;(s[t]=l[e])})}else{var c=P(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),u=0|r.offset,f=0|r.stride,h=0|r.size,p=!!r.normalized,d=0;&quot;type&quot;in r&amp;&amp;(d=J[r.type]),r=0|r.divisor,s.buffer=c,s.state=1,s.size=h,s.normalized=p,s.type=d||c.dtype,s.offset=u,s.stride=f,s.divisor=r}o[t]=R(function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach(function(t){n[t]=s[t]}),s.buffer&amp;&amp;(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+&quot;.dtype&quot;),r[a]=n})}),Object.keys(a).forEach(function(t){var e=a[t];o[t]=B(e,function(t,r){function n(t){r(l[t],&quot;=&quot;,i,&quot;.&quot;,t,&quot;|0;&quot;)}var i=t.invoke(r,e),a=t.shared,o=a.isBufferArgs,s=a.buffer,l={isStream:r.def(!1)},c=new Z;c.state=1,Object.keys(c).forEach(function(t){l[t]=r.def(&quot;&quot;+c[t])});var u=l.buffer,f=l.type;return r(&quot;if(&quot;,o,&quot;(&quot;,i,&quot;)){&quot;,l.isStream,&quot;=true;&quot;,u,&quot;=&quot;,s,&quot;.createStream(&quot;,34962,&quot;,&quot;,i,&quot;);&quot;,f,&quot;=&quot;,u,&quot;.dtype;&quot;,&quot;}else{&quot;,u,&quot;=&quot;,s,&quot;.getBuffer(&quot;,i,&quot;);&quot;,&quot;if(&quot;,u,&quot;){&quot;,f,&quot;=&quot;,u,&quot;.dtype;&quot;,'}else if(&quot;constant&quot; in ',i,&quot;){&quot;,l.state,&quot;=&quot;,2,&quot;;&quot;,&quot;if(typeof &quot;+i+'.constant === &quot;number&quot;){',l[bt[0]],&quot;=&quot;,i,&quot;.constant;&quot;,bt.slice(1).map(function(t){return l[t]}).join(&quot;=&quot;),&quot;=0;&quot;,&quot;}else{&quot;,bt.map(function(t,e){return l[t]+&quot;=&quot;+i+&quot;.constant.length&gt;&quot;+e+&quot;?&quot;+i+&quot;.constant[&quot;+e+&quot;]:0;&quot;}).join(&quot;&quot;),&quot;}}else{&quot;,&quot;if(&quot;,o,&quot;(&quot;,i,&quot;.buffer)){&quot;,u,&quot;=&quot;,s,&quot;.createStream(&quot;,34962,&quot;,&quot;,i,&quot;.buffer);&quot;,&quot;}else{&quot;,u,&quot;=&quot;,s,&quot;.getBuffer(&quot;,i,&quot;.buffer);&quot;,&quot;}&quot;,f,'=&quot;type&quot; in ',i,&quot;?&quot;,a.glTypes,&quot;[&quot;,i,&quot;.type]:&quot;,u,&quot;.dtype;&quot;,l.normalized,&quot;=!!&quot;,i,&quot;.normalized;&quot;),n(&quot;size&quot;),n(&quot;offset&quot;),n(&quot;stride&quot;),n(&quot;divisor&quot;),r(&quot;}}&quot;),r.exit(&quot;if(&quot;,l.isStream,&quot;){&quot;,s,&quot;.destroyStream(&quot;,u,&quot;);&quot;,&quot;}&quot;),l})}),o}function A(t,e,r,n,i){var o=_(t),s=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return&quot;width&quot;in r?n=0|r.width:t=!1,&quot;height&quot;in r?o=0|r.height:t=!1,new I(!t&amp;&amp;e&amp;&amp;e.thisDep,!t&amp;&amp;e&amp;&amp;e.contextDep,!t&amp;&amp;e&amp;&amp;e.propDep,function(t,e){var i=t.shared.context,a=n;&quot;width&quot;in r||(a=e.def(i,&quot;.&quot;,&quot;framebufferWidth&quot;,&quot;-&quot;,s));var c=o;return&quot;height&quot;in r||(c=e.def(i,&quot;.&quot;,&quot;framebufferHeight&quot;,&quot;-&quot;,l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=B(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,&quot;.x|0&quot;),a=e.def(r,&quot;.y|0&quot;);return[i,a,e.def('&quot;width&quot; in ',r,&quot;?&quot;,r,&quot;.width|0:&quot;,&quot;(&quot;,n,&quot;.&quot;,&quot;framebufferWidth&quot;,&quot;-&quot;,i,&quot;)&quot;),r=e.def('&quot;height&quot; in ',r,&quot;?&quot;,r,&quot;.height|0:&quot;,&quot;(&quot;,n,&quot;.&quot;,&quot;framebufferHeight&quot;,&quot;-&quot;,a,&quot;)&quot;)]}),e&amp;&amp;(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new I(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,&quot;.&quot;,&quot;framebufferWidth&quot;),e.def(r,&quot;.&quot;,&quot;framebufferHeight&quot;)]}):null}var i=t.static,a=t.dynamic;if(t=n(&quot;viewport&quot;)){var o=t;t=new I(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,&quot;.viewportWidth&quot;,r[2]),e.set(n,&quot;.viewportHeight&quot;,r[3]),r})}return{viewport:t,scissor_box:n(&quot;scissor.box&quot;)}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,i={};return nt.forEach(function(t){function e(e,a){if(t in r){var s=e(r[t]);i[o]=R(function(){return s})}else if(t in n){var l=n[t];i[o]=B(l,function(t,e){return a(t,e,t.invoke(e,l))})}}var o=v(t);switch(t){case&quot;cull.enable&quot;:case&quot;blend.enable&quot;:case&quot;dither&quot;:case&quot;stencil.enable&quot;:case&quot;depth.enable&quot;:case&quot;scissor.enable&quot;:case&quot;polygonOffset.enable&quot;:case&quot;sample.alpha&quot;:case&quot;sample.enable&quot;:case&quot;depth.mask&quot;:return e(function(t){return t},function(t,e,r){return r});case&quot;depth.func&quot;:return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,&quot;[&quot;,r,&quot;]&quot;)});case&quot;depth.range&quot;:return e(function(t){return t},function(t,e,r){return[e.def(&quot;+&quot;,r,&quot;[0]&quot;),e=e.def(&quot;+&quot;,r,&quot;[1]&quot;)]});case&quot;blend.func&quot;:return e(function(t){return[wt[&quot;srcRGB&quot;in t?t.srcRGB:t.src],wt[&quot;dstRGB&quot;in t?t.dstRGB:t.dst],wt[&quot;srcAlpha&quot;in t?t.srcAlpha:t.src],wt[&quot;dstAlpha&quot;in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('&quot;',t,n,'&quot; in ',r,&quot;?&quot;,r,&quot;.&quot;,t,n,&quot;:&quot;,r,&quot;.&quot;,t)}t=t.constants.blendFuncs;var i=n(&quot;src&quot;,&quot;RGB&quot;),a=n(&quot;dst&quot;,&quot;RGB&quot;),o=(i=e.def(t,&quot;[&quot;,i,&quot;]&quot;),e.def(t,&quot;[&quot;,n(&quot;src&quot;,&quot;Alpha&quot;),&quot;]&quot;));return[i,a=e.def(t,&quot;[&quot;,a,&quot;]&quot;),o,t=e.def(t,&quot;[&quot;,n(&quot;dst&quot;,&quot;Alpha&quot;),&quot;]&quot;)]});case&quot;blend.equation&quot;:return e(function(t){return&quot;string&quot;==typeof t?[$[t],$[t]]:&quot;object&quot;==typeof t?[$[t.rgb],$[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond(&quot;typeof &quot;,r,'===&quot;string&quot;')).then(i,&quot;=&quot;,a,&quot;=&quot;,n,&quot;[&quot;,r,&quot;];&quot;),t.else(i,&quot;=&quot;,n,&quot;[&quot;,r,&quot;.rgb];&quot;,a,&quot;=&quot;,n,&quot;[&quot;,r,&quot;.alpha];&quot;),e(t),[i,a]});case&quot;blend.color&quot;:return e(function(t){return a(4,function(e){return+t[e]})},function(t,e,r){return a(4,function(t){return e.def(&quot;+&quot;,r,&quot;[&quot;,t,&quot;]&quot;)})});case&quot;stencil.mask&quot;:return e(function(t){return 0|t},function(t,e,r){return e.def(r,&quot;|0&quot;)});case&quot;stencil.func&quot;:return e(function(t){return[kt[t.cmp||&quot;keep&quot;],t.ref||0,&quot;mask&quot;in t?t.mask:-1]},function(t,e,r){return[t=e.def('&quot;cmp&quot; in ',r,&quot;?&quot;,t.constants.compareFuncs,&quot;[&quot;,r,&quot;.cmp]&quot;,&quot;:&quot;,7680),e.def(r,&quot;.ref|0&quot;),e=e.def('&quot;mask&quot; in ',r,&quot;?&quot;,r,&quot;.mask|0:-1&quot;)]});case&quot;stencil.opFront&quot;:case&quot;stencil.opBack&quot;:return e(function(e){return[&quot;stencil.opBack&quot;===t?1029:1028,Mt[e.fail||&quot;keep&quot;],Mt[e.zfail||&quot;keep&quot;],Mt[e.zpass||&quot;keep&quot;]]},function(e,r,n){function i(t){return r.def('&quot;',t,'&quot; in ',n,&quot;?&quot;,a,&quot;[&quot;,n,&quot;.&quot;,t,&quot;]:&quot;,7680)}var a=e.constants.stencilOps;return[&quot;stencil.opBack&quot;===t?1029:1028,i(&quot;fail&quot;),i(&quot;zfail&quot;),i(&quot;zpass&quot;)]});case&quot;polygonOffset.offset&quot;:return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,&quot;.factor|0&quot;),e=e.def(r,&quot;.units|0&quot;)]});case&quot;cull.face&quot;:return e(function(t){var e=0;return&quot;front&quot;===t?e=1028:&quot;back&quot;===t&amp;&amp;(e=1029),e},function(t,e,r){return e.def(r,'===&quot;front&quot;?',1028,&quot;:&quot;,1029)});case&quot;lineWidth&quot;:return e(function(t){return t},function(t,e,r){return r});case&quot;frontFace&quot;:return e(function(t){return At[t]},function(t,e,r){return e.def(r+'===&quot;cw&quot;?2304:2305')});case&quot;colorMask&quot;:return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return a(4,function(t){return&quot;!!&quot;+r+&quot;[&quot;+t+&quot;]&quot;})});case&quot;sample.coverage&quot;:return e(function(t){return[&quot;value&quot;in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('&quot;value&quot; in ',r,&quot;?+&quot;,r,&quot;.value:1&quot;),e=e.def(&quot;!!&quot;,r,&quot;.invert&quot;)]})}}),i}(t),u=w(t),f=s.viewport;return f&amp;&amp;(c.viewport=f),(s=s[f=v(&quot;scissor.box&quot;)])&amp;&amp;(c[f]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0&lt;Object.keys(c).length}).profile=function(t){var e,r=t.static;if(t=t.dynamic,&quot;profile&quot;in r){var n=!!r.profile;(e=R(function(t,e){return n})).enable=n}else if(&quot;profile&quot;in t){var i=t.profile;e=B(i,function(t,e){return t.invoke(e,i)})}return e}(t),o.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var e,n=r[t];if(&quot;number&quot;==typeof n||&quot;boolean&quot;==typeof n)e=R(function(){return n});else if(&quot;function&quot;==typeof n){var o=n._reglType;&quot;texture2d&quot;===o||&quot;textureCube&quot;===o?e=R(function(t){return t.link(n)}):&quot;framebuffer&quot;!==o&amp;&amp;&quot;framebufferCube&quot;!==o||(e=R(function(t){return t.link(n.color[0])}))}else m(n)&amp;&amp;(e=R(function(t){return t.global.def(&quot;[&quot;,a(n.length,function(t){return n[t]}),&quot;]&quot;)}));e.value=n,i[t]=e}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=B(e,function(t,r){return t.invoke(r,e)})}),i}(r),o.attributes=M(e),o.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=R(function(t,e){return&quot;number&quot;==typeof r||&quot;boolean&quot;==typeof r?&quot;&quot;+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=B(e,function(t,r){return t.invoke(r,e)})}),n}(n),o}function T(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach(function(a){e.save(n,&quot;.&quot;+a),i(n,&quot;.&quot;,a,&quot;=&quot;,r[a].append(t,e),&quot;;&quot;)}),e(i)}function S(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;Q&amp;&amp;(i=e.def(s.extensions,&quot;.webgl_draw_buffers&quot;));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,&quot;.next&quot;),n||e(&quot;if(&quot;,t,&quot;!==&quot;,o,&quot;.cur){&quot;),e(&quot;if(&quot;,t,&quot;){&quot;,a,&quot;.bindFramebuffer(&quot;,36160,&quot;,&quot;,t,&quot;.framebuffer);&quot;),Q&amp;&amp;e(i,&quot;.drawBuffersWEBGL(&quot;,s,&quot;[&quot;,t,&quot;.colorAttachments.length]);&quot;),e(&quot;}else{&quot;,a,&quot;.bindFramebuffer(&quot;,36160,&quot;,null);&quot;),Q&amp;&amp;e(i,&quot;.drawBuffersWEBGL(&quot;,l,&quot;);&quot;),e(&quot;}&quot;,o,&quot;.cur=&quot;,t,&quot;;&quot;),n||e(&quot;}&quot;)}function E(t,e,r){var n=t.shared,i=n.gl,o=t.current,s=t.next,l=n.current,c=n.next,u=t.cond(l,&quot;.dirty&quot;);nt.forEach(function(e){var n,f;if(!((e=v(e))in r.state))if(e in s){n=s[e],f=o[e];var h=a(tt[e].length,function(t){return u.def(n,&quot;[&quot;,t,&quot;]&quot;)});u(t.cond(h.map(function(t,e){return t+&quot;!==&quot;+f+&quot;[&quot;+e+&quot;]&quot;}).join(&quot;||&quot;)).then(i,&quot;.&quot;,at[e],&quot;(&quot;,h,&quot;);&quot;,h.map(function(t,e){return f+&quot;[&quot;+e+&quot;]=&quot;+t}).join(&quot;;&quot;),&quot;;&quot;))}else n=u.def(c,&quot;.&quot;,e),h=t.cond(n,&quot;!==&quot;,l,&quot;.&quot;,e),u(h),e in it?h(t.cond(n).then(i,&quot;.enable(&quot;,it[e],&quot;);&quot;).else(i,&quot;.disable(&quot;,it[e],&quot;);&quot;),l,&quot;.&quot;,e,&quot;=&quot;,n,&quot;;&quot;):h(i,&quot;.&quot;,at[e],&quot;(&quot;,n,&quot;);&quot;,l,&quot;.&quot;,e,&quot;=&quot;,n,&quot;;&quot;)}),0===Object.keys(r.state).length&amp;&amp;u(l,&quot;.dirty=false;&quot;),e(u)}function C(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;O(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var c=l.append(t,e);if(it[i]){var u=it[i];D(l)?e(s,c?&quot;.enable(&quot;:&quot;.disable(&quot;,u,&quot;);&quot;):e(t.cond(c).then(s,&quot;.enable(&quot;,u,&quot;);&quot;).else(s,&quot;.disable(&quot;,u,&quot;);&quot;)),e(o,&quot;.&quot;,i,&quot;=&quot;,c,&quot;;&quot;)}else if(m(c)){var f=a[i];e(s,&quot;.&quot;,at[i],&quot;(&quot;,c,&quot;);&quot;,c.map(function(t,e){return f+&quot;[&quot;+e+&quot;]=&quot;+t}).join(&quot;;&quot;),&quot;;&quot;)}else e(s,&quot;.&quot;,at[i],&quot;(&quot;,c,&quot;);&quot;,o,&quot;.&quot;,i,&quot;=&quot;,c,&quot;;&quot;)}})}function L(t,e){K&amp;&amp;(t.instancing=e.def(t.shared.extensions,&quot;.angle_instanced_arrays&quot;))}function F(t,e,r,n,i){function a(){return&quot;undefined&quot;==typeof performance?&quot;Date.now()&quot;:&quot;performance.now()&quot;}function o(t){t(c=e.def(),&quot;=&quot;,a(),&quot;;&quot;),&quot;string&quot;==typeof i?t(h,&quot;.count+=&quot;,i,&quot;;&quot;):t(h,&quot;.count++;&quot;),d&amp;&amp;(n?t(u=e.def(),&quot;=&quot;,g,&quot;.getNumPendingQueries();&quot;):t(g,&quot;.beginQuery(&quot;,h,&quot;);&quot;))}function s(t){t(h,&quot;.cpuTime+=&quot;,a(),&quot;-&quot;,c,&quot;;&quot;),d&amp;&amp;(n?t(g,&quot;.pushScopeStats(&quot;,u,&quot;,&quot;,g,&quot;.getNumPendingQueries(),&quot;,h,&quot;);&quot;):t(g,&quot;.endQuery();&quot;))}function l(t){var r=e.def(p,&quot;.profile&quot;);e(p,&quot;.profile=&quot;,t,&quot;;&quot;),e.exit(p,&quot;.profile=&quot;,r,&quot;;&quot;)}var c,u,f=t.shared,h=t.stats,p=f.current,g=f.timer;if(r=r.profile){if(D(r))return void(r.enable?(o(e),s(e.exit),l(&quot;true&quot;)):l(&quot;false&quot;));l(r=r.append(t,e))}else r=e.def(p,&quot;.profile&quot;);o(f=t.block()),e(&quot;if(&quot;,r,&quot;){&quot;,f,&quot;}&quot;),s(t=t.block()),e.exit(&quot;if(&quot;,r,&quot;){&quot;,t,&quot;}&quot;)}function N(t,e,r,n,i){function a(r,n,i){function a(){e(&quot;if(!&quot;,u,&quot;.buffer){&quot;,l,&quot;.enableVertexAttribArray(&quot;,c,&quot;);}&quot;);var r,a=i.type;r=i.size?e.def(i.size,&quot;||&quot;,n):n,e(&quot;if(&quot;,u,&quot;.type!==&quot;,a,&quot;||&quot;,u,&quot;.size!==&quot;,r,&quot;||&quot;,p.map(function(t){return u+&quot;.&quot;+t+&quot;!==&quot;+i[t]}).join(&quot;||&quot;),&quot;){&quot;,l,&quot;.bindBuffer(&quot;,34962,&quot;,&quot;,f,&quot;.buffer);&quot;,l,&quot;.vertexAttribPointer(&quot;,[c,r,a,i.normalized,i.stride,i.offset],&quot;);&quot;,u,&quot;.type=&quot;,a,&quot;;&quot;,u,&quot;.size=&quot;,r,&quot;;&quot;,p.map(function(t){return u+&quot;.&quot;+t+&quot;=&quot;+i[t]+&quot;;&quot;}).join(&quot;&quot;),&quot;}&quot;),K&amp;&amp;(a=i.divisor,e(&quot;if(&quot;,u,&quot;.divisor!==&quot;,a,&quot;){&quot;,t.instancing,&quot;.vertexAttribDivisorANGLE(&quot;,[c,a],&quot;);&quot;,u,&quot;.divisor=&quot;,a,&quot;;}&quot;))}function s(){e(&quot;if(&quot;,u,&quot;.buffer){&quot;,l,&quot;.disableVertexAttribArray(&quot;,c,&quot;);&quot;,&quot;}if(&quot;,bt.map(function(t,e){return u+&quot;.&quot;+t+&quot;!==&quot;+h[e]}).join(&quot;||&quot;),&quot;){&quot;,l,&quot;.vertexAttrib4f(&quot;,c,&quot;,&quot;,h,&quot;);&quot;,bt.map(function(t,e){return u+&quot;.&quot;+t+&quot;=&quot;+h[e]+&quot;;&quot;}).join(&quot;&quot;),&quot;}&quot;)}var l=o.gl,c=e.def(r,&quot;.location&quot;),u=e.def(o.attributes,&quot;[&quot;,c,&quot;]&quot;);r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],p=[&quot;buffer&quot;,&quot;normalized&quot;,&quot;offset&quot;,&quot;stride&quot;];1===r?a():2===r?s():(e(&quot;if(&quot;,r,&quot;===&quot;,1,&quot;){&quot;),a(),e(&quot;}else{&quot;),s(),e(&quot;}&quot;))}var o=t.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(Tt))return;var c=t.scopeAttrib(s);o={},Object.keys(new Z).forEach(function(t){o[t]=e.def(c,&quot;.&quot;,t)})}a(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function j(t,r,n,i,o){for(var s,l=t.shared,c=l.gl,u=0;u&lt;i.length;++u){var f,h=(g=i[u]).name,p=g.info.type,d=n.uniforms[h],g=t.link(g)+&quot;.location&quot;;if(d){if(!o(d))continue;if(D(d)){if(h=d.value,35678===p||35680===p)r(c,&quot;.uniform1i(&quot;,g,&quot;,&quot;,(p=t.link(h._texture||h.color[0]._texture))+&quot;.bind());&quot;),r.exit(p,&quot;.unbind();&quot;);else if(35674===p||35675===p||35676===p)d=2,35675===p?d=3:35676===p&amp;&amp;(d=4),r(c,&quot;.uniformMatrix&quot;,d,&quot;fv(&quot;,g,&quot;,false,&quot;,h=t.global.def(&quot;new Float32Array([&quot;+Array.prototype.slice.call(h)+&quot;])&quot;),&quot;);&quot;);else{switch(p){case 5126:s=&quot;1f&quot;;break;case 35664:s=&quot;2f&quot;;break;case 35665:s=&quot;3f&quot;;break;case 35666:s=&quot;4f&quot;;break;case 35670:case 5124:s=&quot;1i&quot;;break;case 35671:case 35667:s=&quot;2i&quot;;break;case 35672:case 35668:s=&quot;3i&quot;;break;case 35673:s=&quot;4i&quot;;break;case 35669:s=&quot;4i&quot;}r(c,&quot;.uniform&quot;,s,&quot;(&quot;,g,&quot;,&quot;,m(h)?Array.prototype.slice.call(h):h,&quot;);&quot;)}continue}f=d.append(t,r)}else{if(!o(Tt))continue;f=r.def(l.uniforms,&quot;[&quot;,e.id(h),&quot;]&quot;)}switch(35678===p?r(&quot;if(&quot;,f,&quot;&amp;&amp;&quot;,f,'._reglType===&quot;framebuffer&quot;){',f,&quot;=&quot;,f,&quot;.color[0];&quot;,&quot;}&quot;):35680===p&amp;&amp;r(&quot;if(&quot;,f,&quot;&amp;&amp;&quot;,f,'._reglType===&quot;framebufferCube&quot;){',f,&quot;=&quot;,f,&quot;.color[0];&quot;,&quot;}&quot;),h=1,p){case 35678:case 35680:p=r.def(f,&quot;._texture&quot;),r(c,&quot;.uniform1i(&quot;,g,&quot;,&quot;,p,&quot;.bind());&quot;),r.exit(p,&quot;.unbind();&quot;);continue;case 5124:case 35670:s=&quot;1i&quot;;break;case 35667:case 35671:s=&quot;2i&quot;,h=2;break;case 35668:case 35672:s=&quot;3i&quot;,h=3;break;case 35669:case 35673:s=&quot;4i&quot;,h=4;break;case 5126:s=&quot;1f&quot;;break;case 35664:s=&quot;2f&quot;,h=2;break;case 35665:s=&quot;3f&quot;,h=3;break;case 35666:s=&quot;4f&quot;,h=4;break;case 35674:s=&quot;Matrix2fv&quot;;break;case 35675:s=&quot;Matrix3fv&quot;;break;case 35676:s=&quot;Matrix4fv&quot;}if(r(c,&quot;.uniform&quot;,s,&quot;(&quot;,g,&quot;,&quot;),&quot;M&quot;===s.charAt(0)){g=Math.pow(p-35674+2,2);var v=t.global.def(&quot;new Float32Array(&quot;,g,&quot;)&quot;);r(&quot;false,(Array.isArray(&quot;,f,&quot;)||&quot;,f,&quot; instanceof Float32Array)?&quot;,f,&quot;:(&quot;,a(g,function(t){return v+&quot;[&quot;+t+&quot;]=&quot;+f+&quot;[&quot;+t+&quot;]&quot;}),&quot;,&quot;,v,&quot;)&quot;)}else r(1&lt;h?a(h,function(t){return f+&quot;[&quot;+t+&quot;]&quot;}):f);r(&quot;);&quot;)}}function V(t,e,r,n){function i(i){var a=h[i];return a?a.contextDep&amp;&amp;n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(f,&quot;.&quot;,i)}function a(){function t(){r(l,&quot;.drawElementsInstancedANGLE(&quot;,[d,m,v,g+&quot;&lt;&lt;((&quot;+v+&quot;-5121)&gt;&gt;1)&quot;,s],&quot;);&quot;)}function e(){r(l,&quot;.drawArraysInstancedANGLE(&quot;,[d,g,m,s],&quot;);&quot;)}p?y?t():(r(&quot;if(&quot;,p,&quot;){&quot;),t(),r(&quot;}else{&quot;),e(),r(&quot;}&quot;)):e()}function o(){function t(){r(u+&quot;.drawElements(&quot;+[d,m,v,g+&quot;&lt;&lt;((&quot;+v+&quot;-5121)&gt;&gt;1)&quot;]+&quot;);&quot;)}function e(){r(u+&quot;.drawArrays(&quot;+[d,g,m]+&quot;);&quot;)}p?y?t():(r(&quot;if(&quot;,p,&quot;){&quot;),t(),r(&quot;}else{&quot;),e(),r(&quot;}&quot;)):e()}var s,l,c=t.shared,u=c.gl,f=c.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&amp;&amp;n.contextDynamic||i.propDep)&amp;&amp;(a=r),i=i.append(t,a)):i=a.def(f,&quot;.&quot;,&quot;elements&quot;),i&amp;&amp;a(&quot;if(&quot;+i+&quot;)&quot;+u+&quot;.bindBuffer(34963,&quot;+i+&quot;.buffer.buffer);&quot;),i}(),d=i(&quot;primitive&quot;),g=i(&quot;offset&quot;),m=function(){var i=h.count,a=e;return i?((i.contextDep&amp;&amp;n.contextDynamic||i.propDep)&amp;&amp;(a=r),i=i.append(t,a)):i=a.def(f,&quot;.&quot;,&quot;count&quot;),i}();if(&quot;number&quot;==typeof m){if(0===m)return}else r(&quot;if(&quot;,m,&quot;){&quot;),r.exit(&quot;}&quot;);K&amp;&amp;(s=i(&quot;instances&quot;),l=t.instancing);var v=p+&quot;.type&quot;,y=h.elements&amp;&amp;D(h.elements);K&amp;&amp;(&quot;number&quot;!=typeof s||0&lt;=s)?&quot;string&quot;==typeof s?(r(&quot;if(&quot;,s,&quot;&gt;0){&quot;),a(),r(&quot;}else if(&quot;,s,&quot;&lt;0){&quot;),o(),r(&quot;}&quot;)):a():o()}function q(t,e,r,n,i){return i=(e=b()).proc(&quot;body&quot;,i),K&amp;&amp;(e.instancing=i.def(e.shared.extensions,&quot;.angle_instanced_arrays&quot;)),t(e,i,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),V(t,e,e,r)}function G(t,e,r,n){function i(){return!0}t.batchId=&quot;a1&quot;,L(t,e),N(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),V(t,e,e,r)}function W(t,e,r,n){function i(t){return t.contextDep&amp;&amp;o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,&quot;for(&quot;,s,&quot;=0;&quot;,s,&quot;&lt;&quot;,&quot;a1&quot;,&quot;;++&quot;,s,&quot;){&quot;,l,&quot;=&quot;,&quot;a0&quot;,&quot;[&quot;,s,&quot;];&quot;,u,&quot;}&quot;,c.exit),r.needsContext&amp;&amp;T(t,u,r.context),r.needsFramebuffer&amp;&amp;S(t,u,r.framebuffer),C(t,u,r.state,i),r.profile&amp;&amp;i(r.profile)&amp;&amp;F(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,a),N(t,u,r,n.attributes,i),j(t,c,r,n.uniforms,a),j(t,u,r,n.uniforms,i),V(t,c,u,r)):(e=t.global.def(&quot;{}&quot;),n=r.shader.progVar.append(t,u),l=u.def(n,&quot;.id&quot;),c=u.def(e,&quot;[&quot;,l,&quot;]&quot;),u(t.shared.gl,&quot;.useProgram(&quot;,n,&quot;.program);&quot;,&quot;if(!&quot;,c,&quot;){&quot;,c,&quot;=&quot;,e,&quot;[&quot;,l,&quot;]=&quot;,t.link(function(e){return q(G,t,r,e,2)}),&quot;(&quot;,n,&quot;);}&quot;,c,&quot;.call(this,a0[&quot;,s,&quot;],&quot;,s,&quot;);&quot;))}function Y(t,r){function n(e){var n=r.shader[e];n&amp;&amp;i.set(a.shader,&quot;.&quot;+e,n.append(t,i))}var i=t.proc(&quot;scope&quot;,3);t.batchId=&quot;a2&quot;;var a=t.shared,o=a.current;T(t,i,r.context),r.framebuffer&amp;&amp;r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);m(n)?n.forEach(function(r,n){i.set(t.next[e],&quot;[&quot;+n+&quot;]&quot;,r)}):i.set(a.next,&quot;.&quot;+e,n)}),F(t,i,r,!0,!0),[&quot;elements&quot;,&quot;offset&quot;,&quot;count&quot;,&quot;instances&quot;,&quot;primitive&quot;].forEach(function(e){var n=r.draw[e];n&amp;&amp;i.set(a.draw,&quot;.&quot;+e,&quot;&quot;+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,&quot;[&quot;+e.id(n)+&quot;]&quot;,r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){i.set(a,&quot;.&quot;+t,n[t])})}),n(&quot;vert&quot;),n(&quot;frag&quot;),0&lt;Object.keys(r.state).length&amp;&amp;(i(o,&quot;.dirty=true;&quot;),i.exit(o,&quot;.dirty=true;&quot;)),i(&quot;a1(&quot;,t.shared.context,&quot;,a0,&quot;,t.batchId,&quot;);&quot;)}function X(t,e,r){var n=e.static[r];if(n&amp;&amp;function(t){if(&quot;object&quot;==typeof t&amp;&amp;!m(t)){for(var e=Object.keys(t),r=0;r&lt;e.length;++r)if(U.isDynamic(t[e[r]]))return!0;return!1}}(n)){var i=t.global,a=Object.keys(n),o=!1,s=!1,l=!1,c=t.global.def(&quot;{}&quot;);a.forEach(function(e){var r=n[e];if(U.isDynamic(r))&quot;function&quot;==typeof r&amp;&amp;(r=n[e]=U.unbox(r)),e=B(r,null),o=o||e.thisDep,l=l||e.propDep,s=s||e.contextDep;else{switch(i(c,&quot;.&quot;,e,&quot;=&quot;),typeof r){case&quot;number&quot;:i(r);break;case&quot;string&quot;:i('&quot;',r,'&quot;');break;case&quot;object&quot;:Array.isArray(r)&amp;&amp;i(&quot;[&quot;,r.join(),&quot;]&quot;);break;default:i(t.link(r))}i(&quot;;&quot;)}}),e.dynamic[r]=new U.DynamicVariable(4,{thisDep:o,contextDep:s,propDep:l,ref:c,append:function(t,e){a.forEach(function(r){var i=n[r];U.isDynamic(i)&amp;&amp;(i=t.invoke(e,i),e(c,&quot;.&quot;,r,&quot;=&quot;,i,&quot;;&quot;))})}}),delete e.static[r]}}var Z=u.Record,$={add:32774,subtract:32778,&quot;reverse subtract&quot;:32779};r.ext_blend_minmax&amp;&amp;($.min=32775,$.max=32776);var K=r.angle_instanced_arrays,Q=r.webgl_draw_buffers,tt={dirty:!0,profile:g.profile},et={},nt=[],it={},at={};y(&quot;dither&quot;,3024),y(&quot;blend.enable&quot;,3042),x(&quot;blend.color&quot;,&quot;blendColor&quot;,[0,0,0,0]),x(&quot;blend.equation&quot;,&quot;blendEquationSeparate&quot;,[32774,32774]),x(&quot;blend.func&quot;,&quot;blendFuncSeparate&quot;,[1,0,1,0]),y(&quot;depth.enable&quot;,2929,!0),x(&quot;depth.func&quot;,&quot;depthFunc&quot;,513),x(&quot;depth.range&quot;,&quot;depthRange&quot;,[0,1]),x(&quot;depth.mask&quot;,&quot;depthMask&quot;,!0),x(&quot;colorMask&quot;,&quot;colorMask&quot;,[!0,!0,!0,!0]),y(&quot;cull.enable&quot;,2884),x(&quot;cull.face&quot;,&quot;cullFace&quot;,1029),x(&quot;frontFace&quot;,&quot;frontFace&quot;,2305),x(&quot;lineWidth&quot;,&quot;lineWidth&quot;,1),y(&quot;polygonOffset.enable&quot;,32823),x(&quot;polygonOffset.offset&quot;,&quot;polygonOffset&quot;,[0,0]),y(&quot;sample.alpha&quot;,32926),y(&quot;sample.enable&quot;,32928),x(&quot;sample.coverage&quot;,&quot;sampleCoverage&quot;,[1,!1]),y(&quot;stencil.enable&quot;,2960),x(&quot;stencil.mask&quot;,&quot;stencilMask&quot;,-1),x(&quot;stencil.func&quot;,&quot;stencilFunc&quot;,[519,0,-1]),x(&quot;stencil.opFront&quot;,&quot;stencilOpSeparate&quot;,[1028,7680,7680,7680]),x(&quot;stencil.opBack&quot;,&quot;stencilOpSeparate&quot;,[1029,7680,7680,7680]),y(&quot;scissor.enable&quot;,3089),x(&quot;scissor.box&quot;,&quot;scissor&quot;,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),x(&quot;viewport&quot;,&quot;viewport&quot;,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var ot={gl:t,context:p,strings:e,next:et,current:tt,draw:h,elements:o,buffer:i,shader:f,attributes:u.state,uniforms:c,framebuffer:l,extensions:r,timer:d,isBufferArgs:P},st={primTypes:rt,compareFuncs:kt,blendFuncs:wt,blendEquations:$,stencilOps:Mt,glTypes:J,orientationType:At};Q&amp;&amp;(st.backBuffer=[1029],st.drawBuffer=a(n.maxDrawbuffers,function(t){return 0===t?[0]:a(t,function(t){return 36064+t})}));var lt=0;return{next:et,current:tt,procs:function(){var t=b(),e=t.proc(&quot;poll&quot;),r=t.proc(&quot;refresh&quot;),i=t.block();e(i),r(i);var o,s=t.shared,l=s.gl,c=s.next,u=s.current;i(u,&quot;.dirty=false;&quot;),S(t,e),S(t,r,null,!0),K&amp;&amp;(o=t.link(K));for(var f=0;f&lt;n.maxAttributes;++f){var h=r.def(s.attributes,&quot;[&quot;,f,&quot;]&quot;),p=t.cond(h,&quot;.buffer&quot;);p.then(l,&quot;.enableVertexAttribArray(&quot;,f,&quot;);&quot;,l,&quot;.bindBuffer(&quot;,34962,&quot;,&quot;,h,&quot;.buffer.buffer);&quot;,l,&quot;.vertexAttribPointer(&quot;,f,&quot;,&quot;,h,&quot;.size,&quot;,h,&quot;.type,&quot;,h,&quot;.normalized,&quot;,h,&quot;.stride,&quot;,h,&quot;.offset);&quot;).else(l,&quot;.disableVertexAttribArray(&quot;,f,&quot;);&quot;,l,&quot;.vertexAttrib4f(&quot;,f,&quot;,&quot;,h,&quot;.x,&quot;,h,&quot;.y,&quot;,h,&quot;.z,&quot;,h,&quot;.w);&quot;,h,&quot;.buffer=null;&quot;),r(p),K&amp;&amp;r(o,&quot;.vertexAttribDivisorANGLE(&quot;,f,&quot;,&quot;,h,&quot;.divisor);&quot;)}return Object.keys(it).forEach(function(n){var a=it[n],o=i.def(c,&quot;.&quot;,n),s=t.block();s(&quot;if(&quot;,o,&quot;){&quot;,l,&quot;.enable(&quot;,a,&quot;)}else{&quot;,l,&quot;.disable(&quot;,a,&quot;)}&quot;,u,&quot;.&quot;,n,&quot;=&quot;,o,&quot;;&quot;),r(s),e(&quot;if(&quot;,o,&quot;!==&quot;,u,&quot;.&quot;,n,&quot;){&quot;,s,&quot;}&quot;)}),Object.keys(at).forEach(function(n){var o,s,f=at[n],h=tt[n],p=t.block();p(l,&quot;.&quot;,f,&quot;(&quot;),m(h)?(f=h.length,o=t.global.def(c,&quot;.&quot;,n),s=t.global.def(u,&quot;.&quot;,n),p(a(f,function(t){return o+&quot;[&quot;+t+&quot;]&quot;}),&quot;);&quot;,a(f,function(t){return s+&quot;[&quot;+t+&quot;]=&quot;+o+&quot;[&quot;+t+&quot;];&quot;}).join(&quot;&quot;)),e(&quot;if(&quot;,a(f,function(t){return o+&quot;[&quot;+t+&quot;]!==&quot;+s+&quot;[&quot;+t+&quot;]&quot;}).join(&quot;||&quot;),&quot;){&quot;,p,&quot;}&quot;)):(o=i.def(c,&quot;.&quot;,n),s=i.def(u,&quot;.&quot;,n),p(o,&quot;);&quot;,u,&quot;.&quot;,n,&quot;=&quot;,o,&quot;;&quot;),e(&quot;if(&quot;,o,&quot;!==&quot;,s,&quot;){&quot;,p,&quot;}&quot;)),r(p)}),t.compile()}(),compile:function(t,e,r,n,i){var a=b();return a.stats=a.link(i),Object.keys(e.static).forEach(function(t){X(a,e,t)}),_t.forEach(function(e){X(a,t,e)}),r=A(t,e,r,n),function(t,e){var r=t.proc(&quot;draw&quot;,1);L(t,r),T(t,r,e.context),S(t,r,e.framebuffer),E(t,r,e),C(t,r,e.state),F(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,&quot;.useProgram(&quot;,n,&quot;.program);&quot;),e.shader.program)H(t,r,e,e.shader.program);else{var i=t.global.def(&quot;{}&quot;),a=r.def(n,&quot;.id&quot;),o=r.def(i,&quot;[&quot;,a,&quot;]&quot;);r(t.cond(o).then(o,&quot;.call(this,a0);&quot;).else(o,&quot;=&quot;,i,&quot;[&quot;,a,&quot;]=&quot;,t.link(function(r){return q(H,t,e,r,1)}),&quot;(&quot;,n,&quot;);&quot;,o,&quot;.call(this,a0);&quot;))}0&lt;Object.keys(e.state).length&amp;&amp;r(t.shared.current,&quot;.dirty=true;&quot;)}(a,r),Y(a,r),function(t,e){function r(t){return t.contextDep&amp;&amp;i||t.propDep}var n=t.proc(&quot;batch&quot;,2);t.batchId=&quot;0&quot;,L(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(T(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&amp;&amp;i&amp;&amp;(o=!0),o||S(t,n,s)):S(t,n,null),e.state.viewport&amp;&amp;e.state.viewport.propDep&amp;&amp;(i=!0),E(t,n,e),C(t,n,e.state,function(t){return!r(t)}),e.profile&amp;&amp;r(e.profile)||F(t,n,e,!1,&quot;a1&quot;),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&amp;&amp;i||a.propDep)W(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,&quot;.useProgram(&quot;,a,&quot;.program);&quot;),e.shader.program)W(t,n,e,e.shader.program);else{var s=t.global.def(&quot;{}&quot;),l=(o=n.def(a,&quot;.id&quot;),n.def(s,&quot;[&quot;,o,&quot;]&quot;));n(t.cond(l).then(l,&quot;.call(this,a0,a1);&quot;).else(l,&quot;=&quot;,s,&quot;[&quot;,o,&quot;]=&quot;,t.link(function(r){return q(W,t,e,r,2)}),&quot;(&quot;,a,&quot;);&quot;,l,&quot;.call(this,a0,a1);&quot;))}0&lt;Object.keys(e.state).length&amp;&amp;n(t.shared.current,&quot;.dirty=true;&quot;)}(a,r),a.compile()}}}function N(t,e){for(var r=0;r&lt;t.length;++r)if(t[r]===e)return r;return-1}var j=function(t,e){for(var r=Object.keys(e),n=0;n&lt;r.length;++n)t[r[n]]=e[r[n]];return t},V=0,U={DynamicVariable:t,define:function(r,n){return new t(r,e(n+&quot;&quot;))},isDynamic:function(e){return&quot;function&quot;==typeof e&amp;&amp;!e._reglType||e instanceof t},unbox:function(e,r){return&quot;function&quot;==typeof e?new t(0,e):e},accessor:e},q={next:&quot;function&quot;==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:&quot;function&quot;==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},H=&quot;undefined&quot;!=typeof performance&amp;&amp;performance.now?function(){return performance.now()}:function(){return+new Date},G=s();G.zero=s();var W=function(t,e){var r=1;e.ext_texture_filter_anisotropic&amp;&amp;(r=t.getParameter(34047));var n=1,i=1;e.webgl_draw_buffers&amp;&amp;(n=t.getParameter(34852),i=t.getParameter(36063));var a=!!e.oes_texture_float;if(a){a=t.createTexture(),t.bindTexture(3553,a),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var o=t.createFramebuffer();if(t.bindFramebuffer(36160,o),t.framebufferTexture2D(36160,36064,3553,a,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))a=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=G.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?a=!1:(t.deleteFramebuffer(o),t.deleteTexture(a),a=1===s[0]),G.freeType(s)}}return s=!0,s=t.createTexture(),o=G.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,o),G.freeType(o),t.bindTexture(34067,null),t.deleteTexture(s),s=!t.getError(),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:a,npotTextureCube:s}},Y=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},X=function(t){return Object.keys(t).map(function(e){return t[e]})},Z={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a&lt;e.length;++a)i*=e[a];else i=0;switch(r=n||G.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e&lt;n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a&lt;n;++a)for(var o=t[a],s=0;s&lt;e;++s)r[i++]=o[s];break;case 3:c(t,e[0],e[1],e[2],r,0);break;default:!function t(e,r,n,i,a){for(var o=1,s=n+1;s&lt;r.length;++s)o*=r[s];var l=r[n];if(4==r.length-n){var u=r[n+1],f=r[n+2];for(r=r[n+3],s=0;s&lt;l;++s)c(e[s],u,f,r,i,a),a+=o}else for(s=0;s&lt;l;++s)t(e[s],r,n+1,i,a),a+=o}(t,e,0,r,0)}return r}},$={&quot;[object Int8Array]&quot;:5120,&quot;[object Int16Array]&quot;:5122,&quot;[object Int32Array]&quot;:5124,&quot;[object Uint8Array]&quot;:5121,&quot;[object Uint8ClampedArray]&quot;:5121,&quot;[object Uint16Array]&quot;:5123,&quot;[object Uint32Array]&quot;:5125,&quot;[object Float32Array]&quot;:5126,&quot;[object Float64Array]&quot;:5121,&quot;[object ArrayBuffer]&quot;:5121},J={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},K={dynamic:35048,stream:35040,static:35044},Q=Z.flatten,tt=Z.shape,et=[];et[5120]=1,et[5122]=2,et[5124]=4,et[5121]=1,et[5123]=2,et[5125]=4,et[5126]=4;var rt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,&quot;line loop&quot;:2,&quot;line strip&quot;:3,&quot;triangle strip&quot;:5,&quot;triangle fan&quot;:6},nt=new Float32Array(1),it=new Uint32Array(nt.buffer),at=[9984,9986,9985,9987],ot=[0,6409,6410,6407,6408],st={};st[6409]=st[6406]=st[6402]=1,st[34041]=st[6410]=2,st[6407]=st[35904]=3,st[6408]=st[35906]=4;var lt=v(&quot;HTMLCanvasElement&quot;),ct=v(&quot;CanvasRenderingContext2D&quot;),ut=v(&quot;ImageBitmap&quot;),ft=v(&quot;HTMLImageElement&quot;),ht=v(&quot;HTMLVideoElement&quot;),pt=Object.keys($).concat([lt,ct,ut,ft,ht]),dt=[];dt[5121]=1,dt[5126]=4,dt[36193]=2,dt[5123]=2,dt[5125]=4;var gt=[];gt[32854]=2,gt[32855]=2,gt[36194]=2,gt[34041]=4,gt[33776]=.5,gt[33777]=.5,gt[33778]=1,gt[33779]=1,gt[35986]=.5,gt[35987]=1,gt[34798]=1,gt[35840]=.5,gt[35841]=.25,gt[35842]=.5,gt[35843]=.25,gt[36196]=.5;var mt=[];mt[32854]=2,mt[32855]=2,mt[36194]=2,mt[33189]=2,mt[36168]=1,mt[34041]=4,mt[35907]=4,mt[34836]=16,mt[34842]=8,mt[34843]=6;var vt=function(t,e,r,n,i){function a(t){this.id=c++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&amp;&amp;(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete u[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,&quot;rgb5 a1&quot;:32855,depth:33189,stencil:36168,&quot;depth stencil&quot;:34041};e.ext_srgb&amp;&amp;(s.srgba=35907),e.ext_color_buffer_half_float&amp;&amp;(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&amp;&amp;(s.rgba32f=34836);var l=[];Object.keys(s).forEach(function(t){l[s[t]]=t});var c=0,u={};return a.prototype.decRef=function(){0&gt;=--this.refCount&amp;&amp;o(this)},i.profile&amp;&amp;(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if(&quot;object&quot;==typeof e&amp;&amp;e?(&quot;shape&quot;in e?(n=0|(a=e.shape)[0],a=0|a[1]):(&quot;radius&quot;in e&amp;&amp;(n=a=0|e.radius),&quot;width&quot;in e&amp;&amp;(n=0|e.width),&quot;height&quot;in e&amp;&amp;(a=0|e.height)),&quot;format&quot;in e&amp;&amp;(u=s[e.format])):&quot;number&quot;==typeof e?(n=0|e,a=&quot;number&quot;==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&amp;&amp;(c.stats.size=mt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&amp;&amp;a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&amp;&amp;(c.stats.size=mt[c.format]*c.width*c.height),o)},o._reglType=&quot;renderbuffer&quot;,o._renderbuffer=c,i.profile&amp;&amp;(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=[&quot;x&quot;,&quot;y&quot;,&quot;z&quot;,&quot;w&quot;],_t=&quot;blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset&quot;.split(&quot; &quot;),wt={0:0,1:1,zero:0,one:1,&quot;src color&quot;:768,&quot;one minus src color&quot;:769,&quot;src alpha&quot;:770,&quot;one minus src alpha&quot;:771,&quot;dst color&quot;:774,&quot;one minus dst color&quot;:775,&quot;dst alpha&quot;:772,&quot;one minus dst alpha&quot;:773,&quot;constant color&quot;:32769,&quot;one minus constant color&quot;:32770,&quot;constant alpha&quot;:32771,&quot;one minus constant alpha&quot;:32772,&quot;src alpha saturate&quot;:776},kt={never:512,less:513,&quot;&lt;&quot;:513,equal:514,&quot;=&quot;:514,&quot;==&quot;:514,&quot;===&quot;:514,lequal:515,&quot;&lt;=&quot;:515,greater:516,&quot;&gt;&quot;:516,notequal:517,&quot;!=&quot;:517,&quot;!==&quot;:517,gequal:518,&quot;&gt;=&quot;:518,always:519},Mt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,&quot;increment wrap&quot;:34055,&quot;decrement wrap&quot;:34056,invert:5386},At={cw:2304,ccw:2305},Tt=new I(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&amp;&amp;w.update(),Q=null;else{Q=q.next(e),f();for(var t=Z.length-1;0&lt;=t;--t){var r=Z[t];r&amp;&amp;r(z,null,0)}m.flush(),w&amp;&amp;w.update()}}function r(){!Q&amp;&amp;0&lt;Z.length&amp;&amp;(Q=q.next(e))}function n(){Q&amp;&amp;(q.cancel(e),Q=null)}function a(t){t.preventDefault(),n(),$.forEach(function(t){t()})}function o(t){m.getError(),y.restore(),D.restore(),O.restore(),R.restore(),B.restore(),V.restore(),w&amp;&amp;w.restore(),G.procs.refresh(),r(),J.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];U.isDynamic(i)?r[n]=U.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}var r=e(t.context||{}),n=e(t.uniforms||{}),i=e(t.attributes||{}),a=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+&quot;.&quot;+n]=e[n]})}}var r=j({},t);return delete r.uniforms,delete r.attributes,delete r.context,&quot;stencil&quot;in r&amp;&amp;r.stencil.op&amp;&amp;(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e(&quot;blend&quot;),e(&quot;depth&quot;),e(&quot;cull&quot;),e(&quot;stencil&quot;),e(&quot;polygonOffset&quot;),e(&quot;scissor&quot;),e(&quot;sample&quot;),r}(t));t={gpuTime:0,cpuTime:0,count:0};var o=(r=G.compile(a,i,n,r,t)).draw,s=r.batch,l=r.scope,c=[];return j(function(t,e){var r;if(&quot;function&quot;==typeof t)return l.call(this,null,t,0);if(&quot;function&quot;==typeof e)if(&quot;number&quot;==typeof t)for(r=0;r&lt;t;++r)l.call(this,null,e,r);else{if(!Array.isArray(t))return l.call(this,t,e,0);for(r=0;r&lt;t.length;++r)l.call(this,t[r],e,r)}else if(&quot;number&quot;==typeof t){if(0&lt;t)return s.call(this,function(t){for(;c.length&lt;t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return o.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function l(t,e){var r=0;G.procs.poll();var n=e.color;n&amp;&amp;(m.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),&quot;depth&quot;in e&amp;&amp;(m.clearDepth(+e.depth),r|=256),&quot;stencil&quot;in e&amp;&amp;(m.clearStencil(0|e.stencil),r|=1024),m.clear(r)}function c(t){return Z.push(t),r(),{cancel:function(){var e=N(Z,t);Z[e]=function t(){var e=N(Z,t);Z[e]=Z[Z.length-1],--Z.length,0&gt;=Z.length&amp;&amp;n()}}}}function u(){var t=Y.viewport,e=Y.scissor_box;t[0]=t[1]=e[0]=e[1]=0,z.viewportWidth=z.framebufferWidth=z.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,z.viewportHeight=z.framebufferHeight=z.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){z.tick+=1,z.time=g(),u(),G.procs.poll()}function h(){u(),G.procs.refresh(),w&amp;&amp;w.update()}function g(){return(H()-k)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i&lt;e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('&quot;'+a+'&quot; extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach(function(t){if(!r(t))throw Error(&quot;(regl): error restoring extension &quot;+t)})}}}(m,t);if(!y)return null;var x=function(){var t={&quot;&quot;:0},e=[&quot;&quot;];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),b={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},_=y.extensions,w=function(t,e){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(t,e,n){var i=s.pop()||new r;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=n,l.push(i)}var i=e.ext_disjoint_timer_query;if(!i)return null;var a=[],o=[],s=[],l=[],c=[],u=[];return{beginQuery:function(t){var e=a.pop()||i.createQueryEXT();i.beginQueryEXT(35007,e),o.push(e),n(o.length-1,o.length,t)},endQuery:function(){i.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,e;if(0!==(t=o.length)){u.length=Math.max(u.length,t+1),c.length=Math.max(c.length,t+1),c[0]=0;var r=u[0]=0;for(e=t=0;e&lt;o.length;++e){var n=o[e];i.getQueryObjectEXT(n,34919)?(r+=i.getQueryObjectEXT(n,34918),a.push(n)):o[t++]=n,c[e+1]=r,u[e+1]=t}for(o.length=t,e=t=0;e&lt;l.length;++e){var f=(r=l[e]).startQueryIndex;n=r.endQueryIndex,r.sum+=c[n]-c[f],f=u[f],(n=u[n])===f?(r.stats.gpuTime+=r.sum/1e6,s.push(r)):(r.startQueryIndex=f,r.endQueryIndex=n,l[t++]=r)}l.length=t}},getNumPendingQueries:function(){return o.length},clear:function(){a.push.apply(a,o);for(var t=0;t&lt;a.length;t++)i.deleteQueryEXT(a[t]);o.length=0,a.length=0},restore:function(){o.length=0,a.length=0}}}(0,_),k=H(),C=m.drawingBufferWidth,L=m.drawingBufferHeight,z={tick:0,time:0,viewportWidth:C,viewportHeight:L,framebufferWidth:C,framebufferHeight:L,drawingBufferWidth:C,drawingBufferHeight:L,pixelRatio:t.pixelRatio},P=W(m,_),O=(C=function(t,e,r,n){for(t=r.maxAttributes,e=Array(t),r=0;r&lt;t;++r)e[r]=new T;return{Record:T,scope:{},state:e}}(m,_,P),p(m,b,t,C)),I=d(m,_,O,b),D=S(m,x,b,t),R=M(m,_,P,function(){G.procs.poll()},z,b,t),B=vt(m,_,0,b,t),V=A(m,_,P,R,B,b),G=F(m,x,_,P,O,I,0,V,{},C,D,{elements:null,primitive:4,count:-1,offset:0,instances:-1},z,w,t),Y=(x=E(m,V,G.procs.poll,z),G.next),X=m.canvas,Z=[],$=[],J=[],K=[t.onDestroy],Q=null;X&amp;&amp;(X.addEventListener(&quot;webglcontextlost&quot;,a,!1),X.addEventListener(&quot;webglcontextrestored&quot;,o,!1));var tt=V.setFBO=s({framebuffer:U.define.call(null,1,&quot;framebuffer&quot;)});return h(),v=j(s,{clear:function(t){if(&quot;framebuffer&quot;in t)if(t.framebuffer&amp;&amp;&quot;framebufferCube&quot;===t.framebuffer_reglType)for(var e=0;6&gt;e;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(t,l);else l(0,t)},prop:U.define.bind(null,1),context:U.define.bind(null,2),this:U.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return I.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:B.create,framebuffer:V.create,framebufferCube:V.createCube,attributes:v,frame:c,on:function(t,e){var r;switch(t){case&quot;frame&quot;:return c(e);case&quot;lost&quot;:r=$;break;case&quot;restore&quot;:r=J;break;case&quot;destroy&quot;:r=K}return r.push(e),{cancel:function(){for(var t=0;t&lt;r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:P,hasExtension:function(t){return 0&lt;=P.extensions.indexOf(t.toLowerCase())},read:x,destroy:function(){Z.length=0,n(),X&amp;&amp;(X.removeEventListener(&quot;webglcontextlost&quot;,a),X.removeEventListener(&quot;webglcontextrestored&quot;,o)),D.clear(),V.clear(),B.clear(),R.clear(),I.clear(),O.clear(),w&amp;&amp;w.clear(),K.forEach(function(t){t()})},_gl:m,_refresh:h,poll:function(){f(),w&amp;&amp;w.update()},now:g,stats:b}),t.onDone(null,v),v}},&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?e.exports=i():n.createREGL=i()},{}],476:[function(t,e,r){&quot;use strict&quot;;var n,i=&quot;&quot;;e.exports=function(t,e){if(&quot;string&quot;!=typeof t)throw new TypeError(&quot;expected a string&quot;);if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||&quot;undefined&quot;==typeof n)n=t,i=&quot;&quot;;else if(i.length&gt;=r)return i.substr(0,r);for(;r&gt;i.length&amp;&amp;e&gt;1;)1&amp;e&amp;&amp;(i+=t),e&gt;&gt;=1,t+=t;return i=(i+=t).substr(0,r)}},{}],477:[function(t,e,r){(function(t){e.exports=t.performance&amp;&amp;t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{}],478:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i&gt;=0;--i){var a=r,o=t[i],s=(r=a+o)-a,l=o-s;l&amp;&amp;(t[--n]=r,r=l)}for(var c=0,i=n;i&lt;e;++i){var a=t[i],o=r,s=(r=a+o)-a,l=o-s;l&amp;&amp;(t[c++]=l)}return t[c++]=r,t.length=c,t}},{}],479:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;),a=t(&quot;robust-scale&quot;),o=t(&quot;robust-compress&quot;),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n&lt;t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a&lt;t.length;++a)a!==e&amp;&amp;(i[o++]=t[n][a]);return r}function c(t){if(2===t.length)return[&quot;sum(prod(&quot;,t[0][0],&quot;,&quot;,t[1][1],&quot;),prod(-&quot;,t[0][1],&quot;,&quot;,t[1][0],&quot;))&quot;].join(&quot;&quot;);for(var e=[],r=0;r&lt;t.length;++r)e.push([&quot;scale(&quot;,c(l(t,r)),&quot;,&quot;,(n=r,1&amp;n?&quot;-&quot;:&quot;&quot;),t[0][r],&quot;)&quot;].join(&quot;&quot;));return function t(e){if(1===e.length)return e[0];if(2===e.length)return[&quot;sum(&quot;,e[0],&quot;,&quot;,e[1],&quot;)&quot;].join(&quot;&quot;);var r=e.length&gt;&gt;1;return[&quot;sum(&quot;,t(e.slice(0,r)),&quot;,&quot;,t(e.slice(r)),&quot;)&quot;].join(&quot;&quot;)}(e);var n}function u(t){return new Function(&quot;sum&quot;,&quot;scale&quot;,&quot;prod&quot;,&quot;compress&quot;,[&quot;function robustDeterminant&quot;,t,&quot;(m){return compress(&quot;,c(function(t){for(var e=new Array(t),r=0;r&lt;t;++r){e[r]=new Array(t);for(var n=0;n&lt;t;++n)e[r][n]=[&quot;m[&quot;,r,&quot;][&quot;,n,&quot;]&quot;].join(&quot;&quot;)}return e}(t)),&quot;)};return robustDeterminant&quot;,t].join(&quot;&quot;))(i,a,n,o)}var f=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;f.length&lt;s;)f.push(u(f.length));for(var t=[],r=[&quot;function robustDeterminant(m){switch(m.length){&quot;],n=0;n&lt;s;++n)t.push(&quot;det&quot;+n),r.push(&quot;case &quot;,n,&quot;:return det&quot;,n,&quot;(m);&quot;);r.push(&quot;}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant&quot;),t.push(&quot;CACHE&quot;,&quot;gen&quot;,r.join(&quot;&quot;));var i=Function.apply(void 0,t);for(e.exports=i.apply(void 0,f.concat([f,u])),n=0;n&lt;f.length;++n)e.exports[n]=f[n]}()},{&quot;robust-compress&quot;:478,&quot;robust-scale&quot;:485,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],480:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;);e.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a&lt;t.length;++a)r=i(r,n(t[a],e[a]));return r}},{&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],481:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;),a=t(&quot;robust-subtract&quot;),o=t(&quot;robust-scale&quot;),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n&lt;t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a&lt;t.length;++a)a!==e&amp;&amp;(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[&quot;sum(&quot;,t[0],&quot;,&quot;,t[1],&quot;)&quot;].join(&quot;&quot;);var e=t.length&gt;&gt;1;return[&quot;sum(&quot;,c(t.slice(0,e)),&quot;,&quot;,c(t.slice(e)),&quot;)&quot;].join(&quot;&quot;)}function u(t,e){if(&quot;m&quot;===t.charAt(0)){if(&quot;w&quot;===e.charAt(0)){var r=t.split(&quot;[&quot;);return[&quot;w&quot;,e.substr(1),&quot;m&quot;,r[0].substr(1)].join(&quot;&quot;)}return[&quot;prod(&quot;,t,&quot;,&quot;,e,&quot;)&quot;].join(&quot;&quot;)}return u(e,t)}function f(t){if(2===t.length)return[[&quot;diff(&quot;,u(t[0][0],t[1][1]),&quot;,&quot;,u(t[1][0],t[0][1]),&quot;)&quot;].join(&quot;&quot;)];for(var e=[],r=0;r&lt;t.length;++r)e.push([&quot;scale(&quot;,c(f(l(t,r))),&quot;,&quot;,(n=r,!0&amp;n?&quot;-&quot;:&quot;&quot;),t[0][r],&quot;)&quot;].join(&quot;&quot;));return e;var n}function h(t,e){for(var r=[],n=0;n&lt;e-2;++n)r.push([&quot;prod(m&quot;,t,&quot;[&quot;,n,&quot;],m&quot;,t,&quot;[&quot;,n,&quot;])&quot;].join(&quot;&quot;));return c(r)}function p(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r&lt;t;++r){e[r]=new Array(t);for(var n=0;n&lt;t;++n)e[r][n]=[&quot;m&quot;,n,&quot;[&quot;,t-r-2,&quot;]&quot;].join(&quot;&quot;)}return e}(t),u=0;u&lt;t;++u)s[0][u]=&quot;1&quot;,s[t-1][u]=&quot;w&quot;+u;for(u=0;u&lt;t;++u)0==(1&amp;u)?e.push.apply(e,f(l(s,u))):r.push.apply(r,f(l(s,u)));var p=c(e),d=c(r),g=&quot;exactInSphere&quot;+t,m=[];for(u=0;u&lt;t;++u)m.push(&quot;m&quot;+u);var v=[&quot;function &quot;,g,&quot;(&quot;,m.join(),&quot;){&quot;];for(u=0;u&lt;t;++u){v.push(&quot;var w&quot;,u,&quot;=&quot;,h(u,t),&quot;;&quot;);for(var y=0;y&lt;t;++y)y!==u&amp;&amp;v.push(&quot;var w&quot;,u,&quot;m&quot;,y,&quot;=scale(w&quot;,u,&quot;,m&quot;,y,&quot;[0]);&quot;)}return v.push(&quot;var p=&quot;,p,&quot;,n=&quot;,d,&quot;,d=diff(p,n);return d[d.length-1];}return &quot;,g),new Function(&quot;sum&quot;,&quot;diff&quot;,&quot;prod&quot;,&quot;scale&quot;,v.join(&quot;&quot;))(i,a,n,o)}var d=[function(){return 0},function(){return 0},function(){return 0}];!function(){for(;d.length&lt;=s;)d.push(p(d.length));for(var t=[],r=[&quot;slow&quot;],n=0;n&lt;=s;++n)t.push(&quot;a&quot;+n),r.push(&quot;o&quot;+n);var i=[&quot;function testInSphere(&quot;,t.join(),&quot;){switch(arguments.length){case 0:case 1:return 0;&quot;];for(n=2;n&lt;=s;++n)i.push(&quot;case &quot;,n,&quot;:return o&quot;,n,&quot;(&quot;,t.slice(0,n).join(),&quot;);&quot;);i.push(&quot;}var s=new Array(arguments.length);for(var i=0;i&lt;arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere&quot;),r.push(i.join(&quot;&quot;));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=p(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n&lt;=s;++n)e.exports[n]=d[n]}()},{&quot;robust-scale&quot;:485,&quot;robust-subtract&quot;:487,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],482:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-determinant&quot;),i=6;function a(t){for(var e=&quot;robustLinearSolve&quot;+t+&quot;d&quot;,r=[&quot;function &quot;,e,&quot;(A,b){return [&quot;],i=0;i&lt;t;++i){r.push(&quot;det([&quot;);for(var a=0;a&lt;t;++a){a&gt;0&amp;&amp;r.push(&quot;,&quot;),r.push(&quot;[&quot;);for(var o=0;o&lt;t;++o)o&gt;0&amp;&amp;r.push(&quot;,&quot;),o===i?r.push(&quot;+b[&quot;,a,&quot;]&quot;):r.push(&quot;+A[&quot;,a,&quot;][&quot;,o,&quot;]&quot;);r.push(&quot;]&quot;)}r.push(&quot;]),&quot;)}r.push(&quot;det(A)]}return &quot;,e);var s=new Function(&quot;det&quot;,r.join(&quot;&quot;));return s(t&lt;6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length&lt;i;)o.push(a(o.length));for(var t=[],r=[&quot;function dispatchLinearSolve(A,b){switch(A.length){&quot;],n=0;n&lt;i;++n)t.push(&quot;s&quot;+n),r.push(&quot;case &quot;,n,&quot;:return s&quot;,n,&quot;(A,b);&quot;);r.push(&quot;}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve&quot;),t.push(&quot;CACHE&quot;,&quot;g&quot;,r.join(&quot;&quot;));var s=Function.apply(void 0,t);for(e.exports=s.apply(void 0,o.concat([o,a])),n=0;n&lt;i;++n)e.exports[n]=o[n]}()},{&quot;robust-determinant&quot;:479}],483:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;robust-sum&quot;),a=t(&quot;robust-scale&quot;),o=t(&quot;robust-subtract&quot;),s=5;function l(t,e){for(var r=new Array(t.length-1),n=1;n&lt;t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a&lt;t.length;++a)a!==e&amp;&amp;(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[&quot;sum(&quot;,t[0],&quot;,&quot;,t[1],&quot;)&quot;].join(&quot;&quot;);var e=t.length&gt;&gt;1;return[&quot;sum(&quot;,c(t.slice(0,e)),&quot;,&quot;,c(t.slice(e)),&quot;)&quot;].join(&quot;&quot;)}function u(t){if(2===t.length)return[[&quot;sum(prod(&quot;,t[0][0],&quot;,&quot;,t[1][1],&quot;),prod(-&quot;,t[0][1],&quot;,&quot;,t[1][0],&quot;))&quot;].join(&quot;&quot;)];for(var e=[],r=0;r&lt;t.length;++r)e.push([&quot;scale(&quot;,c(u(l(t,r))),&quot;,&quot;,(n=r,1&amp;n?&quot;-&quot;:&quot;&quot;),t[0][r],&quot;)&quot;].join(&quot;&quot;));return e;var n}function f(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r&lt;t;++r){e[r]=new Array(t);for(var n=0;n&lt;t;++n)e[r][n]=[&quot;m&quot;,n,&quot;[&quot;,t-r-1,&quot;]&quot;].join(&quot;&quot;)}return e}(t),f=[],h=0;h&lt;t;++h)0==(1&amp;h)?e.push.apply(e,u(l(s,h))):r.push.apply(r,u(l(s,h))),f.push(&quot;m&quot;+h);var p=c(e),d=c(r),g=&quot;orientation&quot;+t+&quot;Exact&quot;,m=[&quot;function &quot;,g,&quot;(&quot;,f.join(),&quot;){var p=&quot;,p,&quot;,n=&quot;,d,&quot;,d=sub(p,n);return d[d.length-1];};return &quot;,g].join(&quot;&quot;);return new Function(&quot;sum&quot;,&quot;prod&quot;,&quot;scale&quot;,&quot;sub&quot;,m)(i,n,a,o)}var h=f(3),p=f(4),d=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i&gt;0){if(a&lt;=0)return o;n=i+a}else{if(!(i&lt;0))return o;if(a&gt;=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o&gt;=s||o&lt;=-s?o:h(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+h*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b&gt;_||-b&gt;_?b:p(t,e,r,n)}];!function(){for(;d.length&lt;=s;)d.push(f(d.length));for(var t=[],r=[&quot;slow&quot;],n=0;n&lt;=s;++n)t.push(&quot;a&quot;+n),r.push(&quot;o&quot;+n);var i=[&quot;function getOrientation(&quot;,t.join(),&quot;){switch(arguments.length){case 0:case 1:return 0;&quot;];for(n=2;n&lt;=s;++n)i.push(&quot;case &quot;,n,&quot;:return o&quot;,n,&quot;(&quot;,t.slice(0,n).join(),&quot;);&quot;);i.push(&quot;}var s=new Array(arguments.length);for(var i=0;i&lt;arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation&quot;),r.push(i.join(&quot;&quot;));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=f(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n&lt;=s;++n)e.exports[n]=d[n]}()},{&quot;robust-scale&quot;:485,&quot;robust-subtract&quot;:487,&quot;robust-sum&quot;:488,&quot;two-product&quot;:517}],484:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-sum&quot;),i=t(&quot;robust-scale&quot;);e.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length&lt;e.length)for(var a=0;a&lt;t.length;++a)r=n(r,i(e,t[a]));else for(var a=0;a&lt;e.length;++a)r=n(r,i(t,e[a]));return r}},{&quot;robust-scale&quot;:485,&quot;robust-sum&quot;:488}],485:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;two-product&quot;),i=t(&quot;two-sum&quot;);e.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],c=0;n(t[0],e,s),s[0]&amp;&amp;(o[c++]=s[0]);for(var u=1;u&lt;r;++u){n(t[u],e,l);var f=s[1];i(f,l[0],s),s[0]&amp;&amp;(o[c++]=s[0]);var h=l[1],p=s[1],d=h+p,g=d-h,m=p-g;s[1]=d,m&amp;&amp;(o[c++]=m)}s[1]&amp;&amp;(o[c++]=s[1]);0===c&amp;&amp;(o[c++]=0);return o.length=c,o}},{&quot;two-product&quot;:517,&quot;two-sum&quot;:518}],486:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a&gt;0&amp;&amp;o&gt;0||a&lt;0&amp;&amp;o&lt;0)return!1;var s=n(r,t,e),l=n(i,t,e);if(s&gt;0&amp;&amp;l&gt;0||s&lt;0&amp;&amp;l&lt;0)return!1;if(0===a&amp;&amp;0===o&amp;&amp;0===s&amp;&amp;0===l)return function(t,e,r,n){for(var i=0;i&lt;2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u),h=Math.max(c,u);if(h&lt;s||l&lt;f)return!1}return!0}(t,e,r,i);return!0};var n=t(&quot;robust-orientation&quot;)[3]},{&quot;robust-orientation&quot;:483}],487:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&amp;&amp;1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],-e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=-e[c],d=u(p);h&lt;d?(a=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(a=p,(c+=1)&lt;n&amp;&amp;(p=-e[c],d=u(p)));l&lt;r&amp;&amp;h&lt;d||c&gt;=n?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=-e[c],d=u(p)));var g,m,v=i+a,y=v-i,x=a-y,b=x,_=v;for(;l&lt;r&amp;&amp;c&lt;n;)h&lt;d?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=-e[c],d=u(p))),(x=(a=b)-(y=(v=i+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g;for(;l&lt;r;)(x=(a=b)-(y=(v=(i=f)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(l+=1)&lt;r&amp;&amp;(f=t[l]);for(;c&lt;n;)(x=(a=b)-(y=(v=(i=p)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(c+=1)&lt;n&amp;&amp;(p=-e[c]);b&amp;&amp;(o[s++]=b);_&amp;&amp;(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],488:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&amp;&amp;1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=e[c],d=u(p);h&lt;d?(a=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(a=p,(c+=1)&lt;n&amp;&amp;(p=e[c],d=u(p)));l&lt;r&amp;&amp;h&lt;d||c&gt;=n?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=e[c],d=u(p)));var g,m,v=i+a,y=v-i,x=a-y,b=x,_=v;for(;l&lt;r&amp;&amp;c&lt;n;)h&lt;d?(i=f,(l+=1)&lt;r&amp;&amp;(f=t[l],h=u(f))):(i=p,(c+=1)&lt;n&amp;&amp;(p=e[c],d=u(p))),(x=(a=b)-(y=(v=i+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g;for(;l&lt;r;)(x=(a=b)-(y=(v=(i=f)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(l+=1)&lt;r&amp;&amp;(f=t[l]);for(;c&lt;n;)(x=(a=b)-(y=(v=(i=p)+a)-i))&amp;&amp;(o[s++]=x),b=_-((g=_+v)-(m=g-_))+(v-m),_=g,(c+=1)&lt;n&amp;&amp;(p=e[c]);b&amp;&amp;(o[s++]=b);_&amp;&amp;(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],489:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t&lt;0?-1:t&gt;0?1:0}},{}],490:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return i(n(t))};var n=t(&quot;boundary-cells&quot;),i=t(&quot;reduce-simplicial-complex&quot;)},{&quot;boundary-cells&quot;:82,&quot;reduce-simplicial-complex&quot;:469}],491:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,s){r=r||0,&quot;undefined&quot;==typeof s&amp;&amp;(s=function(t){for(var e=t.length,r=0,n=0;n&lt;e;++n)r=0|Math.max(r,t[n].length);return r-1}(t));if(0===t.length||s&lt;1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a&lt;r;++a)n[a]=t[a]&lt;e|0;return n}(e,+r),c=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,c=0;c&lt;r;++c)for(var u=t[c],e=u.length,f=0;f&lt;e;++f)for(var h=0;h&lt;f;++h){var p=u[h],d=u[f];s[l++]=0|Math.min(p,d),s[l++]=0|Math.max(p,d)}a(n(s,[l/2|0,2]));for(var g=2,c=2;c&lt;l;c+=2)s[c-2]===s[c]&amp;&amp;s[c-1]===s[c+1]||(s[g++]=s[c],s[g++]=s[c+1]);return n(s,[g/2|0,2])}(t,s),u=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),c=0,u=0;u&lt;s;++u){var f=o[2*u],h=o[2*u+1];if(r[f]!==r[h]){var p=e[f],d=e[h];o[2*c]=f,o[2*c+1]=h,l[c++]=(d-a)/(d-p)}}return t.shape[0]=c,n(l,[c])}(c,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s&lt;n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o&lt;l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}r[2*o+1]=n;for(;++o&lt;e;)r[2*o]=r[2*o+1]=n;return r}(c,0|e.length),h=o(s)(t,c.data,f,l),p=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i&lt;e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(c),d=[].slice.call(u.data,0,u.shape[0]);return i.free(l),i.free(c.data),i.free(u.data),i.free(f),{cells:h,vertexIds:p,vertexWeights:d}};var n=t(&quot;ndarray&quot;),i=t(&quot;typedarray-pool&quot;),a=t(&quot;ndarray-sort&quot;),o=t(&quot;./lib/codegen&quot;)},{&quot;./lib/codegen&quot;:492,ndarray:430,&quot;ndarray-sort&quot;:428,&quot;typedarray-pool&quot;:519}],492:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=a[t];e||(e=a[t]=function(t){var e=0,r=new Array(t+1);r[0]=[[]];for(var a=1;a&lt;=t;++a)for(var o=r[a]=i(a),s=0;s&lt;o.length;++s)e=Math.max(e,o[a].length);var l=[&quot;function B(C,E,i,j){&quot;,&quot;var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];&quot;,&quot;while(l&lt;h){&quot;,&quot;var m=(l+h)&gt;&gt;1,v=E[2*m+1];&quot;,&quot;if(v===b){return m}&quot;,&quot;if(b&lt;v){h=m}else{l=m+1}&quot;,&quot;}&quot;,&quot;return l;&quot;,&quot;};&quot;,&quot;function getContour&quot;,t,&quot;d(F,E,C,S){&quot;,&quot;var n=F.length,R=[];&quot;,&quot;for(var i=0;i&lt;n;++i){var c=F[i],l=c.length;&quot;];function c(t){if(!(t.length&lt;=0)){l.push(&quot;R.push(&quot;);for(var e=0;e&lt;t.length;++e){var r=t[e];e&gt;0&amp;&amp;l.push(&quot;,&quot;),l.push(&quot;[&quot;);for(var n=0;n&lt;r.length;++n){var i=r[n];n&gt;0&amp;&amp;l.push(&quot;,&quot;),l.push(&quot;B(C,E,c[&quot;,i[0],&quot;],c[&quot;,i[1],&quot;])&quot;)}l.push(&quot;]&quot;)}l.push(&quot;);&quot;)}}for(var a=t+1;a&gt;1;--a){a&lt;t+1&amp;&amp;l.push(&quot;else &quot;),l.push(&quot;if(l===&quot;,a,&quot;){&quot;);for(var u=[],s=0;s&lt;a;++s)u.push(&quot;(S[c[&quot;+s+&quot;]]&lt;&lt;&quot;+s+&quot;)&quot;);l.push(&quot;var M=&quot;,u.join(&quot;+&quot;),&quot;;if(M===0||M===&quot;,(1&lt;&lt;a)-1,&quot;){continue}switch(M){&quot;);for(var o=r[a-1],s=0;s&lt;o.length;++s)l.push(&quot;case &quot;,s,&quot;:&quot;),c(o[s]),l.push(&quot;break;&quot;);l.push(&quot;}}&quot;)}return l.push(&quot;}return R;};return getContour&quot;,t,&quot;d&quot;),new Function(&quot;pool&quot;,l.join(&quot;&quot;))(n)}(t));return e};var n=t(&quot;typedarray-pool&quot;),i=t(&quot;marching-simplex-table&quot;),a={}},{&quot;marching-simplex-table&quot;:407,&quot;typedarray-pool&quot;:519}],493:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;bit-twiddle&quot;),i=t(&quot;union-find&quot;);function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],a)-i(c+e[2],o);default:var u=t.slice(0);u.sort();var f=e.slice(0);f.sort();for(var h=0;h&lt;r;++h)if(n=u[h]-f[h])return n;return 0}}function o(t,e){return a(t[0],e[0])}function s(t,e){if(e){for(var r=t.length,n=new Array(r),i=0;i&lt;r;++i)n[i]=[t[i],e[i]];n.sort(o);for(i=0;i&lt;r;++i)t[i]=n[i][0],e[i]=n[i][1];return t}return t.sort(a),t}function l(t){if(0===t.length)return[];for(var e=1,r=t.length,n=1;n&lt;r;++n){var i=t[n];if(a(i,t[n-1])){if(n===e){e++;continue}t[e++]=i}}return t.length=e,t}function c(t,e){for(var r=0,n=t.length-1,i=-1;r&lt;=n;){var o=r+n&gt;&gt;1,s=a(t[o],e);s&lt;=0?(0===s&amp;&amp;(i=o),r=o+1):s&gt;0&amp;&amp;(n=o-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,o=r.length;i&lt;o;++i)r[i]=[];for(var s=[],l=(i=0,e.length);i&lt;l;++i)for(var u=e[i],f=u.length,h=1,p=1&lt;&lt;f;h&lt;p;++h){s.length=n.popCount(h);for(var d=0,g=0;g&lt;f;++g)h&amp;1&lt;&lt;g&amp;&amp;(s[d++]=u[g]);var m=c(t,s);if(!(m&lt;0))for(;r[m++].push(i),!(m&gt;=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e&lt;0)return[];for(var r=[],i=(1&lt;&lt;e+1)-1,a=0;a&lt;t.length;++a)for(var o=t[a],l=i;l&lt;1&lt;&lt;o.length;l=n.nextCombination(l)){for(var c=new Array(e+1),u=0,f=0;f&lt;o.length;++f)l&amp;1&lt;&lt;f&amp;&amp;(c[u++]=o[f]);r.push(c)}return s(r)}r.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n&lt;i;++n)e=r(e,t[n].length);return e-1},r.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n&lt;i;++n)for(var a=t[n],o=0,s=a.length;o&lt;s;++o)e=r(e,a[o]);return e+1},r.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r&lt;n;++r)e[r]=t[r].slice(0);return e},r.compareCells=a,r.normalize=s,r.unique=l,r.findCell=c,r.incidence=u,r.dual=function(t,e){if(!e)return u(l(f(t,0)),t);for(var r=new Array(e),n=0;n&lt;e;++n)r[n]=[];n=0;for(var i=t.length;n&lt;i;++n)for(var a=t[n],o=0,s=a.length;o&lt;s;++o)r[a[o]].push(n);return r},r.explode=function(t){for(var e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0|i.length,o=1,l=1&lt;&lt;a;o&lt;l;++o){for(var c=[],u=0;u&lt;a;++u)o&gt;&gt;&gt;u&amp;1&amp;&amp;c.push(i[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r&lt;n;++r)for(var i=t[r],a=0,o=i.length;a&lt;o;++a){for(var l=new Array(i.length-1),c=0,u=0;c&lt;o;++c)c!==a&amp;&amp;(l[u++]=i[c]);e.push(l)}return s(e)},r.connectedComponents=function(t,e){return e?function(t,e){for(var r=new i(e),n=0;n&lt;t.length;++n)for(var a=t[n],o=0;o&lt;a.length;++o)for(var s=o+1;s&lt;a.length;++s)r.link(a[o],a[s]);var l=[],c=r.ranks;for(n=0;n&lt;c.length;++n)c[n]=-1;for(n=0;n&lt;t.length;++n){var u=r.find(t[n][0]);c[u]&lt;0?(c[u]=l.length,l.push([t[n].slice(0)])):l[c[u]].push(t[n].slice(0))}return l}(t,e):function(t){for(var e=l(s(f(t,0))),r=new i(e.length),n=0;n&lt;t.length;++n)for(var a=t[n],o=0;o&lt;a.length;++o)for(var u=c(e,[a[o]]),h=o+1;h&lt;a.length;++h)r.link(u,c(e,[a[h]]));var p=[],d=r.ranks;for(n=0;n&lt;d.length;++n)d[n]=-1;for(n=0;n&lt;t.length;++n){var g=r.find(c(e,[t[n][0]]));d[g]&lt;0?(d[g]=p.length,p.push([t[n].slice(0)])):p[d[g]].push(t[n].slice(0))}return p}(t)}},{&quot;bit-twiddle&quot;:79,&quot;union-find&quot;:520}],494:[function(t,e,r){arguments[4][79][0].apply(r,arguments)},{dup:79}],495:[function(t,e,r){arguments[4][493][0].apply(r,arguments)},{&quot;bit-twiddle&quot;:494,dup:493,&quot;union-find&quot;:496}],496:[function(t,e,r){&quot;use strict&quot;;function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e&lt;t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},n.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o&lt;s?a[r]=n:s&lt;o?a[n]=r:(a[n]=r,++i[r])}}},{}],497:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){for(var a=e.length,o=t.length,s=new Array(a),l=new Array(a),c=new Array(a),u=new Array(a),f=0;f&lt;a;++f)s[f]=l[f]=-1,c[f]=1/0,u[f]=!1;for(var f=0;f&lt;o;++f){var h=t[f];if(2!==h.length)throw new Error(&quot;Input must be a graph&quot;);var p=h[1],d=h[0];-1!==l[d]?l[d]=-2:l[d]=p,-1!==s[p]?s[p]=-2:s[p]=d}function g(t){if(u[t])return 1/0;var r,i,a,o,c,f=s[t],h=l[t];return f&lt;0||h&lt;0?1/0:(r=e[t],i=e[f],a=e[h],o=Math.abs(n(r,i,a)),c=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)),o/c)}function m(t,e){var r=M[t],n=M[e];M[t]=n,M[e]=r,A[r]=e,A[n]=t}function v(t){return c[M[t]]}function y(t){return 1&amp;t?t-1&gt;&gt;1:(t&gt;&gt;1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n&lt;S){var o=v(n);o&lt;r&amp;&amp;(a=n,r=o)}if(i&lt;S){var s=v(i);s&lt;r&amp;&amp;(a=i)}if(a===t)return t;m(t,a),t=a}}function b(t){for(var e=v(t);t&gt;0;){var r=y(t);if(r&gt;=0){var n=v(r);if(e&lt;n){m(t,r),t=r;continue}}return t}}function _(){if(S&gt;0){var t=M[0];return m(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=M[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]&gt;=0&amp;&amp;(s[r]=e),l[e]&gt;=0&amp;&amp;(l[e]=r),A[e]&gt;=0&amp;&amp;w(A[e],g(e)),A[r]&gt;=0&amp;&amp;w(A[r],g(r))}}for(var M=[],A=new Array(a),f=0;f&lt;a;++f){var T=c[f]=g(f);T&lt;1/0?(A[f]=M.length,M.push(f)):A[f]=-1}for(var S=M.length,f=S&gt;&gt;1;f&gt;=0;--f)x(f);for(;;){var E=_();if(E&lt;0||c[E]&gt;r)break;k(E)}for(var C=[],f=0;f&lt;a;++f)u[f]||(A[f]=C.length,C.push(e[f].slice()));C.length;function L(t,e){if(t[e]&lt;0)return e;var r=e,n=e;do{var i=t[n];if(!u[n]||i&lt;0||i===n)break;if(i=t[n=i],!u[n]||i&lt;0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}var z=[];return t.forEach(function(t){var e=L(s,t[0]),r=L(l,t[1]);if(e&gt;=0&amp;&amp;r&gt;=0&amp;&amp;e!==r){var n=A[e],i=A[r];n!==i&amp;&amp;z.push([n,i])}}),i.unique(i.normalize(z)),{positions:C,edges:z}};var n=t(&quot;robust-orientation&quot;),i=t(&quot;simplicial-complex&quot;)},{&quot;robust-orientation&quot;:483,&quot;simplicial-complex&quot;:495}],498:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){var r,a,o,s;if(e[0][0]&lt;e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]&gt;e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]&lt;t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]&gt;t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),c=n(r,a,o);if(l&lt;0){if(c&lt;=0)return l}else if(l&gt;0){if(c&gt;=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l&lt;0){if(c&lt;=0)return l}else if(l&gt;0){if(c&gt;=0)return l}else if(c)return c;return a[0]-s[0]};var n=t(&quot;robust-orientation&quot;);function i(t,e){var r,i,a,o;if(e[0][0]&lt;e[1][0])r=e[0],i=e[1];else{if(!(e[0][0]&gt;e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return l&lt;c?l-c:s&gt;u?s-u:l-u}r=e[1],i=e[0]}t[0][1]&lt;t[1][1]?(a=t[0],o=t[1]):(a=t[1],o=t[0]);var f=n(i,r,a);return f||((f=n(i,r,o))||o-i)}},{&quot;robust-orientation&quot;:483}],499:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=t.length,r=2*e,n=new Array(r),a=0;a&lt;e;++a){var l=t[a],c=l[0][0]&lt;l[1][0];n[2*a]=new f(l[0][0],l,c,a),n[2*a+1]=new f(l[1][0],l,!c,a)}n.sort(function(t,e){var r=t.x-e.x;return r||((r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1]))});for(var h=i(o),p=[],d=[],g=[],a=0;a&lt;r;){for(var m=n[a].x,v=[];a&lt;r;){var y=n[a];if(y.x!==m)break;a+=1,y.segment[0][0]===y.x&amp;&amp;y.segment[1][0]===y.x?y.create&amp;&amp;(y.segment[0][1]&lt;y.segment[1][1]?(v.push(new u(y.segment[0][1],y.index,!0,!0)),v.push(new u(y.segment[1][1],y.index,!1,!1))):(v.push(new u(y.segment[1][1],y.index,!0,!1)),v.push(new u(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}p.push(h.root),d.push(m),g.push(v)}return new s(p,d,g)};var n=t(&quot;binary-search-bounds&quot;),i=t(&quot;functional-red-black-tree&quot;),a=t(&quot;robust-orientation&quot;),o=t(&quot;./lib/order-segments&quot;);function s(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function l(t,e){return t.y-e}function c(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]&lt;o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=a(n,i,e);if(s&lt;0)t=t.left;else if(s&gt;0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e&lt;0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&amp;&amp;(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&amp;&amp;(s=r.key),e&gt;0){var u=c(this.slabs[e-1],t);u&amp;&amp;(s?o(u.key,s)&gt;0&amp;&amp;(s=u.key,i=u.value):(i=u.value,s=u.key))}var f=this.horizontal[e];if(f.length&gt;0){var h=n.ge(f,t[1],l);if(h&lt;f.length){var p=f[h];if(t[1]===p.y){if(p.closed)return p.index;for(;h&lt;f.length-1&amp;&amp;f[h+1].y===t[1];)if((p=f[h+=1]).closed)return p.index;if(p.y===t[1]&amp;&amp;!p.start){if((h+=1)&gt;=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]&gt;s[1][0]&amp;&amp;(d=-d),d&gt;0&amp;&amp;(i=p.index)}else i=p.index;else p.y!==t[1]&amp;&amp;(i=p.index)}}}return i}},{&quot;./lib/order-segments&quot;:498,&quot;binary-search-bounds&quot;:78,&quot;functional-red-black-tree&quot;:218,&quot;robust-orientation&quot;:483}],500:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;robust-dot-product&quot;),i=t(&quot;robust-sum&quot;);function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i&lt;0?i=0:i&gt;1&amp;&amp;(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l&lt;o;++l)s[l]=i*t[l]+a*r[l];return s}e.exports=function(t,e){for(var r=[],n=[],i=a(t[t.length-1],e),s=t[t.length-1],l=t[0],c=0;c&lt;t.length;++c,s=l){var u=a(l=t[c],e);if(i&lt;0&amp;&amp;u&gt;0||i&gt;0&amp;&amp;u&lt;0){var f=o(s,u,l,i);r.push(f),n.push(f.slice())}u&lt;0?n.push(l.slice()):u&gt;0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l&lt;t.length;++l,i=s){var c=a(s=t[l],e);(n&lt;0&amp;&amp;c&gt;0||n&gt;0&amp;&amp;c&lt;0)&amp;&amp;r.push(o(i,c,s,n)),c&gt;=0&amp;&amp;r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l&lt;t.length;++l,i=s){var c=a(s=t[l],e);(n&lt;0&amp;&amp;c&gt;0||n&gt;0&amp;&amp;c&lt;0)&amp;&amp;r.push(o(i,c,s,n)),c&lt;=0&amp;&amp;r.push(s.slice()),n=c}return r}},{&quot;robust-dot-product&quot;:480,&quot;robust-sum&quot;:488}],501:[function(t,e,r){!function(){&quot;use strict&quot;;var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function e(r){return function(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=&quot;&quot;;for(a=0;a&lt;d;a++)if(&quot;string&quot;==typeof r[a])g+=r[a];else if(Array.isArray(r[a])){if((s=r[a])[2])for(i=n[p],o=0;o&lt;s[2].length;o++){if(!i.hasOwnProperty(s[2][o]))throw new Error(e('[sprintf] property &quot;%s&quot; does not exist',s[2][o]));i=i[s[2][o]]}else i=s[1]?n[s[1]]:n[p++];if(t.not_type.test(s[8])&amp;&amp;t.not_primitive.test(s[8])&amp;&amp;i instanceof Function&amp;&amp;(i=i()),t.numeric_arg.test(s[8])&amp;&amp;&quot;number&quot;!=typeof i&amp;&amp;isNaN(i))throw new TypeError(e(&quot;[sprintf] expecting number but found %T&quot;,i));switch(t.number.test(s[8])&amp;&amp;(f=i&gt;=0),s[8]){case&quot;b&quot;:i=parseInt(i,10).toString(2);break;case&quot;c&quot;:i=String.fromCharCode(parseInt(i,10));break;case&quot;d&quot;:case&quot;i&quot;:i=parseInt(i,10);break;case&quot;j&quot;:i=JSON.stringify(i,null,s[6]?parseInt(s[6]):0);break;case&quot;e&quot;:i=s[7]?parseFloat(i).toExponential(s[7]):parseFloat(i).toExponential();break;case&quot;f&quot;:i=s[7]?parseFloat(i).toFixed(s[7]):parseFloat(i);break;case&quot;g&quot;:i=s[7]?String(Number(i.toPrecision(s[7]))):parseFloat(i);break;case&quot;o&quot;:i=(parseInt(i,10)&gt;&gt;&gt;0).toString(8);break;case&quot;s&quot;:i=String(i),i=s[7]?i.substring(0,s[7]):i;break;case&quot;t&quot;:i=String(!!i),i=s[7]?i.substring(0,s[7]):i;break;case&quot;T&quot;:i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s[7]?i.substring(0,s[7]):i;break;case&quot;u&quot;:i=parseInt(i,10)&gt;&gt;&gt;0;break;case&quot;v&quot;:i=i.valueOf(),i=s[7]?i.substring(0,s[7]):i;break;case&quot;x&quot;:i=(parseInt(i,10)&gt;&gt;&gt;0).toString(16);break;case&quot;X&quot;:i=(parseInt(i,10)&gt;&gt;&gt;0).toString(16).toUpperCase()}t.json.test(s[8])?g+=i:(!t.number.test(s[8])||f&amp;&amp;!s[3]?h=&quot;&quot;:(h=f?&quot;+&quot;:&quot;-&quot;,i=i.toString().replace(t.sign,&quot;&quot;)),c=s[4]?&quot;0&quot;===s[4]?&quot;0&quot;:s[4].charAt(1):&quot; &quot;,u=s[6]-(h+i).length,l=s[6]&amp;&amp;u&gt;0?c.repeat(u):&quot;&quot;,g+=s[5]?h+i+l:&quot;0&quot;===c?h+l+i:l+h+i)}return g}(function(e){if(i[e])return i[e];var r,n=e,a=[],o=0;for(;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push(&quot;%&quot;);else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError(&quot;[sprintf] unexpected placeholder&quot;);if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError(&quot;[sprintf] failed to parse named argument key&quot;);for(s.push(c[1]);&quot;&quot;!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError(&quot;[sprintf] failed to parse named argument key&quot;);s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error(&quot;[sprintf] mixing positional and named placeholders is not (yet) supported&quot;);a.push(r)}n=n.substring(r[0].length)}return i[e]=a}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var i=Object.create(null);&quot;undefined&quot;!=typeof r&amp;&amp;(r.sprintf=e,r.vsprintf=n),&quot;undefined&quot;!=typeof window&amp;&amp;(window.sprintf=e,window.vsprintf=n)}()},{}],502:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;parenthesis&quot;);e.exports=function(t,e,r){if(null==t)throw Error(&quot;First argument should be a string&quot;);if(null==e)throw Error(&quot;Separator should be a string or a RegExp&quot;);r?(&quot;string&quot;==typeof r||Array.isArray(r))&amp;&amp;(r={ignore:r}):r={},null==r.escape&amp;&amp;(r.escape=!0),null==r.ignore?r.ignore=[&quot;[]&quot;,&quot;()&quot;,&quot;{}&quot;,&quot;&lt;&gt;&quot;,'&quot;&quot;',&quot;''&quot;,&quot;``&quot;,&quot;\u201c\u201d&quot;,&quot;\xab\xbb&quot;]:(&quot;string&quot;==typeof r.ignore&amp;&amp;(r.ignore=[r.ignore]),r.ignore=r.ignore.map(function(t){return 1===t.length&amp;&amp;(t+=t),t}));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s&lt;a.length;s++){var l=a[s],c=a[s+1];&quot;\\&quot;===l[l.length-1]&amp;&amp;&quot;\\&quot;!==l[l.length-2]?(o.push(l+e+c),s++):o.push(l)}a=o}for(s=0;s&lt;a.length;s++)i[0]=a[s],a[s]=n.stringify(i,{flat:!0});return a}},{parenthesis:438}],503:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e=t.length,r=new Array(e),n=new Array(e),i=new Array(e),a=new Array(e),o=new Array(e),s=new Array(e),l=0;l&lt;e;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var c,u=0,f=[],h=[];function p(e){var l=[e],c=[e];for(r[e]=n[e]=u,i[e]=!0,u+=1;c.length&gt;0;){e=c[c.length-1];var p=t[e];if(a[e]&lt;p.length){for(var d=a[e];d&lt;p.length;++d){var g=p[d];if(r[g]&lt;0){r[g]=n[g]=u,i[g]=!0,u+=1,l.push(g),c.push(g);break}i[g]&amp;&amp;(n[e]=0|Math.min(n[e],n[g])),o[g]&gt;=0&amp;&amp;s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){for(var m=[],v=[],y=0,d=l.length-1;d&gt;=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);for(var b=new Array(y),d=0;d&lt;v.length;d++)for(var _=0;_&lt;v[d].length;_++)b[--y]=v[d][_];h.push(b)}c.pop()}}}for(var l=0;l&lt;e;++l)r[l]&lt;0&amp;&amp;p(l);for(var l=0;l&lt;h.length;l++){var d=h[l];if(0!==d.length){d.sort(function(t,e){return t-e}),c=[d[0]];for(var g=1;g&lt;d.length;g++)d[g]!==d[g-1]&amp;&amp;c.push(d[g]);h[l]=c}}return{components:f,adjacencyList:h}}},{}],504:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){return t.split(&quot;&quot;).map(function(t){return t in n?n[t]:&quot;&quot;}).join(&quot;&quot;)};var n={&quot; &quot;:&quot; &quot;,0:&quot;\u2070&quot;,1:&quot;\xb9&quot;,2:&quot;\xb2&quot;,3:&quot;\xb3&quot;,4:&quot;\u2074&quot;,5:&quot;\u2075&quot;,6:&quot;\u2076&quot;,7:&quot;\u2077&quot;,8:&quot;\u2078&quot;,9:&quot;\u2079&quot;,&quot;+&quot;:&quot;\u207a&quot;,&quot;-&quot;:&quot;\u207b&quot;,a:&quot;\u1d43&quot;,b:&quot;\u1d47&quot;,c:&quot;\u1d9c&quot;,d:&quot;\u1d48&quot;,e:&quot;\u1d49&quot;,f:&quot;\u1da0&quot;,g:&quot;\u1d4d&quot;,h:&quot;\u02b0&quot;,i:&quot;\u2071&quot;,j:&quot;\u02b2&quot;,k:&quot;\u1d4f&quot;,l:&quot;\u02e1&quot;,m:&quot;\u1d50&quot;,n:&quot;\u207f&quot;,o:&quot;\u1d52&quot;,p:&quot;\u1d56&quot;,r:&quot;\u02b3&quot;,s:&quot;\u02e2&quot;,t:&quot;\u1d57&quot;,u:&quot;\u1d58&quot;,v:&quot;\u1d5b&quot;,w:&quot;\u02b7&quot;,x:&quot;\u02e3&quot;,y:&quot;\u02b8&quot;,z:&quot;\u1dbb&quot;}},{}],505:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){if(t.dimension&lt;=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=a(t,e),n=r.length,i=new Array(n),o=new Array(n),s=0;s&lt;n;++s)i[s]=[r[s]],o[s]=[s];return{positions:i,cells:o}}(t,e);var r=t.order.join()+&quot;-&quot;+t.dtype,s=o[r],e=+e||0;s||(s=o[r]=function(t,e){var r=t.length,a=[&quot;'use strict';&quot;],o=&quot;surfaceNets&quot;+t.join(&quot;_&quot;)+&quot;d&quot;+e;a.push(&quot;var contour=genContour({&quot;,&quot;order:[&quot;,t.join(),&quot;],&quot;,&quot;scalarArguments: 3,&quot;,&quot;phase:function phaseFunc(p,a,b,c) { return (p &gt; c)|0 },&quot;),&quot;generic&quot;===e&amp;&amp;a.push(&quot;getters:[0],&quot;);for(var s=[],l=[],c=0;c&lt;r;++c)s.push(&quot;d&quot;+c),l.push(&quot;d&quot;+c);for(var c=0;c&lt;1&lt;&lt;r;++c)s.push(&quot;v&quot;+c),l.push(&quot;v&quot;+c);for(var c=0;c&lt;1&lt;&lt;r;++c)s.push(&quot;p&quot;+c),l.push(&quot;p&quot;+c);s.push(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;),l.push(&quot;a&quot;,&quot;c&quot;),a.push(&quot;vertex:function vertexFunc(&quot;,s.join(),&quot;){&quot;);for(var u=[],c=0;c&lt;1&lt;&lt;r;++c)u.push(&quot;(p&quot;+c+&quot;&lt;&lt;&quot;+c+&quot;)&quot;);a.push(&quot;var m=(&quot;,u.join(&quot;+&quot;),&quot;)|0;if(m===0||m===&quot;,(1&lt;&lt;(1&lt;&lt;r))-1,&quot;){return}&quot;);var f=[],h=[];1&lt;&lt;(1&lt;&lt;r)&lt;=128?(a.push(&quot;switch(m){&quot;),h=a):a.push(&quot;switch(m&gt;&gt;&gt;7){&quot;);for(var c=0;c&lt;1&lt;&lt;(1&lt;&lt;r);++c){if(1&lt;&lt;(1&lt;&lt;r)&gt;128&amp;&amp;c%128==0){f.length&gt;0&amp;&amp;h.push(&quot;}}&quot;);var p=&quot;vExtra&quot;+f.length;a.push(&quot;case &quot;,c&gt;&gt;&gt;7,&quot;:&quot;,p,&quot;(m&amp;0x7f,&quot;,l.join(),&quot;);break;&quot;),h=[&quot;function &quot;,p,&quot;(m,&quot;,l.join(),&quot;){switch(m){&quot;],f.push(h)}h.push(&quot;case &quot;,127&amp;c,&quot;:&quot;);for(var d=new Array(r),g=new Array(r),m=new Array(r),v=new Array(r),y=0,x=0;x&lt;r;++x)d[x]=[],g[x]=[],m[x]=0,v[x]=0;for(var x=0;x&lt;1&lt;&lt;r;++x)for(var b=0;b&lt;r;++b){var _=x^1&lt;&lt;b;if(!(_&gt;x)&amp;&amp;!(c&amp;1&lt;&lt;_)!=!(c&amp;1&lt;&lt;x)){var w=1;c&amp;1&lt;&lt;_?g[b].push(&quot;v&quot;+_+&quot;-v&quot;+x):(g[b].push(&quot;v&quot;+x+&quot;-v&quot;+_),w=-w),w&lt;0?(d[b].push(&quot;-v&quot;+x+&quot;-v&quot;+_),m[b]+=2):(d[b].push(&quot;v&quot;+x+&quot;+v&quot;+_),m[b]-=2),y+=1;for(var k=0;k&lt;r;++k)k!==b&amp;&amp;(_&amp;1&lt;&lt;k?v[k]+=1:v[k]-=1)}}for(var M=[],b=0;b&lt;r;++b)if(0===d[b].length)M.push(&quot;d&quot;+b+&quot;-0.5&quot;);else{var A=&quot;&quot;;m[b]&lt;0?A=m[b]+&quot;*c&quot;:m[b]&gt;0&amp;&amp;(A=&quot;+&quot;+m[b]+&quot;*c&quot;);var T=d[b].length/y*.5,S=.5+v[b]/y*.5;M.push(&quot;d&quot;+b+&quot;-&quot;+S+&quot;-&quot;+T+&quot;*(&quot;+d[b].join(&quot;+&quot;)+A+&quot;)/(&quot;+g[b].join(&quot;+&quot;)+&quot;)&quot;)}h.push(&quot;a.push([&quot;,M.join(),&quot;]);&quot;,&quot;break;&quot;)}a.push(&quot;}},&quot;),f.length&gt;0&amp;&amp;h.push(&quot;}}&quot;);for(var E=[],c=0;c&lt;1&lt;&lt;r-1;++c)E.push(&quot;v&quot;+c);E.push(&quot;c0&quot;,&quot;c1&quot;,&quot;p0&quot;,&quot;p1&quot;,&quot;a&quot;,&quot;b&quot;,&quot;c&quot;),a.push(&quot;cell:function cellFunc(&quot;,E.join(),&quot;){&quot;);var C=i(r-1);a.push(&quot;if(p0){b.push(&quot;,C.map(function(t){return&quot;[&quot;+t.map(function(t){return&quot;v&quot;+t})+&quot;]&quot;}).join(),&quot;)}else{b.push(&quot;,C.map(function(t){var e=t.slice();return e.reverse(),&quot;[&quot;+e.map(function(t){return&quot;v&quot;+t})+&quot;]&quot;}).join(),&quot;)}}});function &quot;,o,&quot;(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return &quot;,o,&quot;;&quot;);for(var c=0;c&lt;f.length;++c)a.push(f[c].join(&quot;&quot;));return new Function(&quot;genContour&quot;,a.join(&quot;&quot;))(n)}(t.order,t.dtype));return s(t,e)};var n=t(&quot;ndarray-extract-contour&quot;),i=t(&quot;triangulate-hypercube&quot;),a=t(&quot;zero-crossings&quot;);var o={}},{&quot;ndarray-extract-contour&quot;:419,&quot;triangulate-hypercube&quot;:515,&quot;zero-crossings&quot;:548}],506:[function(t,e,r){&quot;use strict&quot;;Object.defineProperty(r,&quot;__esModule&quot;,{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&amp;&amp;(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&amp;&amp;s.return&amp;&amp;s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError(&quot;Invalid attempt to destructure non-iterable instance&quot;)}}(),i=2*Math.PI,a=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},o=function(t,e){var r=.551915024494,n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},s=function(t,e,r,n){var i=t*n-e*r&lt;0?-1:1,a=(t*r+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return a&gt;1&amp;&amp;(a=1),a&lt;-1&amp;&amp;(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,g=void 0===d?0:d,m=t.sweepFlag,v=void 0===m?0:m,y=[];if(0===u||0===f)return[];var x=Math.sin(p*i/360),b=Math.cos(p*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&amp;&amp;0===w)return[];u=Math.abs(u),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);k&gt;1&amp;&amp;(u*=Math.sqrt(k),f*=Math.sqrt(k));var M=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y&lt;0&amp;&amp;(y=0),y/=d*v+g*m;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,k=(h-x)/a,M=(p-b)/o,A=(-h-x)/a,T=(-p-b)/o,S=s(1,0,k,M),E=s(k,M,A,T);return 0===c&amp;&amp;E&gt;0&amp;&amp;(E-=i),1===c&amp;&amp;E&lt;0&amp;&amp;(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(M,4),T=A[0],S=A[1],E=A[2],C=A[3],L=Math.max(Math.ceil(Math.abs(C)/(i/4)),1);C/=L;for(var z=0;z&lt;L;z++)y.push(o(E,C)),E+=C;return y.map(function(t){var e=a(t[0],u,f,b,x,T,S),r=e.x,n=e.y,i=a(t[1],u,f,b,x,T,S),o=i.x,s=i.y,l=a(t[2],u,f,b,x,T,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}})},e.exports=r.default},{}],507:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;parse-svg-path&quot;),i=t(&quot;abs-svg-path&quot;),a=t(&quot;normalize-svg-path&quot;),o=t(&quot;is-svg-path&quot;),s=t(&quot;assert&quot;);e.exports=function(t){Array.isArray(t)&amp;&amp;1===t.length&amp;&amp;&quot;string&quot;==typeof t[0]&amp;&amp;(t=t[0]);&quot;string&quot;==typeof t&amp;&amp;(s(o(t),&quot;String is not an SVG path.&quot;),t=n(t));if(s(Array.isArray(t),&quot;Argument should be a string or an array of path segments.&quot;),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r&lt;l;r++)for(var c=t[r].slice(1),u=0;u&lt;c.length;u+=2)c[u+0]&lt;e[0]&amp;&amp;(e[0]=c[u+0]),c[u+1]&lt;e[1]&amp;&amp;(e[1]=c[u+1]),c[u+0]&gt;e[2]&amp;&amp;(e[2]=c[u+0]),c[u+1]&gt;e[3]&amp;&amp;(e[3]=c[u+1]);return e}},{&quot;abs-svg-path&quot;:47,assert:55,&quot;is-svg-path&quot;:404,&quot;normalize-svg-path&quot;:508,&quot;parse-svg-path&quot;:440}],508:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,p=0,d=0,g=t.length;d&lt;g;d++){var m=t[d],v=m[0];switch(v){case&quot;M&quot;:l=m[1],c=m[2];break;case&quot;A&quot;:var y=n({px:h,py:p,cx:m[6],cy:m[7],rx:m[1],ry:m[2],xAxisRotation:m[3],largeArcFlag:m[4],sweepFlag:m[5]});if(!y.length)continue;for(var x,b=0;b&lt;y.length;b++)x=y[b],m=[&quot;C&quot;,x.x1,x.y1,x.x2,x.y2,x.x,x.y],b&lt;y.length-1&amp;&amp;r.push(m);break;case&quot;S&quot;:var _=h,w=p;&quot;C&quot;!=e&amp;&amp;&quot;S&quot;!=e||(_+=_-o,w+=w-s),m=[&quot;C&quot;,_,w,m[1],m[2],m[3],m[4]];break;case&quot;T&quot;:&quot;Q&quot;==e||&quot;T&quot;==e?(u=2*h-u,f=2*p-f):(u=h,f=p),m=a(h,p,u,f,m[1],m[2]);break;case&quot;Q&quot;:u=m[1],f=m[2],m=a(h,p,m[1],m[2],m[3],m[4]);break;case&quot;L&quot;:m=i(h,p,m[1],m[2]);break;case&quot;H&quot;:m=i(h,p,m[1],p);break;case&quot;V&quot;:m=i(h,p,h,m[1]);break;case&quot;Z&quot;:m=i(h,p,l,c)}e=v,h=m[m.length-2],p=m[m.length-1],m.length&gt;4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}return r};var n=t(&quot;svg-arc-to-cubic-bezier&quot;);function i(t,e,r,n){return[&quot;C&quot;,t,e,r,n,r,n]}function a(t,e,r,n,i,a){return[&quot;C&quot;,t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{&quot;svg-arc-to-cubic-bezier&quot;:506}],509:[function(t,e,r){(function(r){&quot;use strict&quot;;var n=t(&quot;svg-path-bounds&quot;),i=t(&quot;parse-svg-path&quot;),a=t(&quot;draw-svg-path&quot;),o=t(&quot;is-svg-path&quot;),s=t(&quot;bitmap-sdf&quot;),l=document.createElement(&quot;canvas&quot;),c=l.getContext(&quot;2d&quot;);e.exports=function(t,e){if(!o(t))throw Error(&quot;Argument should be valid svg path string&quot;);e||(e={});var u,f;e.shape?(u=e.shape[0],f=e.shape[1]):(u=l.width=e.w||e.width||200,f=l.height=e.h||e.height||200);var h=Math.min(u,f),p=e.stroke||0,d=e.viewbox||e.viewBox||n(t),g=[u/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;c.fillStyle=&quot;black&quot;,c.fillRect(0,0,u,f),c.fillStyle=&quot;white&quot;,p&amp;&amp;(&quot;number&quot;!=typeof p&amp;&amp;(p=1),c.strokeStyle=p&gt;0?&quot;white&quot;:&quot;black&quot;,c.lineWidth=Math.abs(p));if(c.translate(.5*u,.5*f),c.scale(m,m),r.Path2D){var v=new Path2D(t);c.fill(v),p&amp;&amp;c.stroke(v)}else{var y=i(t);a(c,y),c.fill(),p&amp;&amp;c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{})},{&quot;bitmap-sdf&quot;:80,&quot;draw-svg-path&quot;:152,&quot;is-svg-path&quot;:404,&quot;parse-svg-path&quot;:440,&quot;svg-path-bounds&quot;:507}],510:[function(t,e,r){(function(r){&quot;use strict&quot;;e.exports=function t(e,r,i){var i=i||{};var o=a[e];o||(o=a[e]={&quot; &quot;:{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length&lt;=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o&lt;e.length;++o)for(var s=e[o],l=0;l&lt;3;++l){var c=r[s[l]];n[i++]=c[0],n[i++]=c[1]+1.4,a=Math.max(c[0],a)}return{data:n,shape:a}}(n(r,{triangles:!0,font:e,textAlign:i.textAlign||&quot;left&quot;,textBaseline:&quot;alphabetic&quot;}));else{for(var l=r.split(/(\d|\s)/),c=new Array(l.length),u=0,f=0,h=0;h&lt;l.length;++h)c[h]=t(e,l[h]),u+=c[h].data.length,f+=c[h].shape,h&gt;0&amp;&amp;(f+=.02);for(var p=new Float32Array(u),d=0,g=-.5*f,h=0;h&lt;c.length;++h){for(var m=c[h].data,v=0;v&lt;m.length;v+=2)p[d++]=m[v]+g,p[d++]=m[v+1];g+=c[h].shape+.02}s=o[r]={data:p,shape:f}}return s};var n=t(&quot;vectorize-text&quot;),i=window||r.global||{},a=i.__TEXT_CACHE||{};i.__TEXT_CACHE={}}).call(this,t(&quot;_process&quot;))},{_process:462,&quot;vectorize-text&quot;:524}],511:[function(t,e,r){!function(t){var r=/^\s+/,n=/\s+$/,i=0,a=t.round,o=t.min,s=t.max,l=t.random;function c(e,l){if(l=l||{},(e=e||&quot;&quot;)instanceof c)return e;if(!(this instanceof c))return new c(e,l);var u=function(e){var i={r:0,g:0,b:0},a=1,l=null,c=null,u=null,f=!1,h=!1;&quot;string&quot;==typeof e&amp;&amp;(e=function(t){t=t.replace(r,&quot;&quot;).replace(n,&quot;&quot;).toLowerCase();var e,i=!1;if(S[t])t=S[t],i=!0;else if(&quot;transparent&quot;==t)return{r:0,g:0,b:0,a:0,format:&quot;name&quot;};if(e=j.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=j.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=j.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=j.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=j.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=j.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=j.hex8.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),a:R(e[4]),format:i?&quot;name&quot;:&quot;hex8&quot;};if(e=j.hex6.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:i?&quot;name&quot;:&quot;hex&quot;};if(e=j.hex4.exec(t))return{r:P(e[1]+&quot;&quot;+e[1]),g:P(e[2]+&quot;&quot;+e[2]),b:P(e[3]+&quot;&quot;+e[3]),a:R(e[4]+&quot;&quot;+e[4]),format:i?&quot;name&quot;:&quot;hex8&quot;};if(e=j.hex3.exec(t))return{r:P(e[1]+&quot;&quot;+e[1]),g:P(e[2]+&quot;&quot;+e[2]),b:P(e[3]+&quot;&quot;+e[3]),format:i?&quot;name&quot;:&quot;hex&quot;};return!1}(e));&quot;object&quot;==typeof e&amp;&amp;(V(e.r)&amp;&amp;V(e.g)&amp;&amp;V(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*L(p,255),g:255*L(d,255),b:255*L(g,255)},f=!0,h=&quot;%&quot;===String(e.r).substr(-1)?&quot;prgb&quot;:&quot;rgb&quot;):V(e.h)&amp;&amp;V(e.s)&amp;&amp;V(e.v)?(l=I(e.s),c=I(e.v),i=function(e,r,n){e=6*L(e,360),r=L(r,100),n=L(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,l,c),f=!0,h=&quot;hsv&quot;):V(e.h)&amp;&amp;V(e.s)&amp;&amp;V(e.l)&amp;&amp;(l=I(e.s),u=I(e.l),i=function(t,e,r){var n,i,a;function o(t,e,r){return r&lt;0&amp;&amp;(r+=1),r&gt;1&amp;&amp;(r-=1),r&lt;1/6?t+6*(e-t)*r:r&lt;.5?e:r&lt;2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r&lt;.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),f=!0,h=&quot;hsl&quot;),e.hasOwnProperty(&quot;a&quot;)&amp;&amp;(a=e.a));var p,d,g;return a=C(a),{ok:f,format:e.format||h,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r&lt;1&amp;&amp;(this._r=a(this._r)),this._g&lt;1&amp;&amp;(this._g=a(this._g)),this._b&lt;1&amp;&amp;(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c&gt;.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e&lt;r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,l:c}}function f(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=a,u=a-l;if(i=0===a?0:u/a,a==l)n=0;else{switch(a){case t:n=(e-r)/u+(e&lt;r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,v:c}}function h(t,e,r,n){var i=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16))];return n&amp;&amp;i[0].charAt(0)==i[0].charAt(1)&amp;&amp;i[1].charAt(0)==i[1].charAt(1)&amp;&amp;i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(&quot;&quot;)}function p(t,e,r,n){return[O(D(n)),O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16))].join(&quot;&quot;)}function d(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s-=e/100,r.s=z(r.s),c(r)}function g(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s+=e/100,r.s=z(r.s),c(r)}function m(t){return c(t).desaturate(100)}function v(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l+=e/100,r.l=z(r.l),c(r)}function y(t,e){e=0===e?0:e||10;var r=c(t).toRgb();return r.r=s(0,o(255,r.r-a(-e/100*255))),r.g=s(0,o(255,r.g-a(-e/100*255))),r.b=s(0,o(255,r.b-a(-e/100*255))),c(r)}function x(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l-=e/100,r.l=z(r.l),c(r)}function b(t,e){var r=c(t).toHsl(),n=(r.h+e)%360;return r.h=n&lt;0?360+n:n,c(r)}function _(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function w(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+120)%360,s:e.s,l:e.l}),c({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+90)%360,s:e.s,l:e.l}),c({h:(r+180)%360,s:e.s,l:e.l}),c({h:(r+270)%360,s:e.s,l:e.l})]}function M(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+72)%360,s:e.s,l:e.l}),c({h:(r+216)%360,s:e.s,l:e.l})]}function A(t,e,r){e=e||6,r=r||30;var n=c(t).toHsl(),i=360/r,a=[c(t)];for(n.h=(n.h-(i*e&gt;&gt;1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function T(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()&lt;128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,i=this.toRgb();return e=i.r/255,r=i.g/255,n=i.b/255,.2126*(e&lt;=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r&lt;=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n&lt;=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.v);return 1==this._a?&quot;hsv(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%)&quot;:&quot;hsva(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%, &quot;+this._roundA+&quot;)&quot;},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.l);return 1==this._a?&quot;hsl(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%)&quot;:&quot;hsla(&quot;+e+&quot;, &quot;+r+&quot;%, &quot;+n+&quot;%, &quot;+this._roundA+&quot;)&quot;},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return&quot;#&quot;+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(D(n))];if(i&amp;&amp;o[0].charAt(0)==o[0].charAt(1)&amp;&amp;o[1].charAt(0)==o[1].charAt(1)&amp;&amp;o[2].charAt(0)==o[2].charAt(1)&amp;&amp;o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join(&quot;&quot;)}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return&quot;#&quot;+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?&quot;rgb(&quot;+a(this._r)+&quot;, &quot;+a(this._g)+&quot;, &quot;+a(this._b)+&quot;)&quot;:&quot;rgba(&quot;+a(this._r)+&quot;, &quot;+a(this._g)+&quot;, &quot;+a(this._b)+&quot;, &quot;+this._roundA+&quot;)&quot;},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+&quot;%&quot;,g:a(100*L(this._g,255))+&quot;%&quot;,b:a(100*L(this._b,255))+&quot;%&quot;,a:this._a}},toPercentageRgbString:function(){return 1==this._a?&quot;rgb(&quot;+a(100*L(this._r,255))+&quot;%, &quot;+a(100*L(this._g,255))+&quot;%, &quot;+a(100*L(this._b,255))+&quot;%)&quot;:&quot;rgba(&quot;+a(100*L(this._r,255))+&quot;%, &quot;+a(100*L(this._g,255))+&quot;%, &quot;+a(100*L(this._b,255))+&quot;%, &quot;+this._roundA+&quot;)&quot;},toName:function(){return 0===this._a?&quot;transparent&quot;:!(this._a&lt;1)&amp;&amp;(E[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e=&quot;#&quot;+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?&quot;GradientType = 1, &quot;:&quot;&quot;;if(t){var i=c(t);r=&quot;#&quot;+p(i._r,i._g,i._b,i._a)}return&quot;progid:DXImageTransform.Microsoft.gradient(&quot;+n+&quot;startColorstr=&quot;+e+&quot;,endColorstr=&quot;+r+&quot;)&quot;},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a&lt;1&amp;&amp;this._a&gt;=0;return e||!n||&quot;hex&quot;!==t&amp;&amp;&quot;hex6&quot;!==t&amp;&amp;&quot;hex3&quot;!==t&amp;&amp;&quot;hex4&quot;!==t&amp;&amp;&quot;hex8&quot;!==t&amp;&amp;&quot;name&quot;!==t?(&quot;rgb&quot;===t&amp;&amp;(r=this.toRgbString()),&quot;prgb&quot;===t&amp;&amp;(r=this.toPercentageRgbString()),&quot;hex&quot;!==t&amp;&amp;&quot;hex6&quot;!==t||(r=this.toHexString()),&quot;hex3&quot;===t&amp;&amp;(r=this.toHexString(!0)),&quot;hex4&quot;===t&amp;&amp;(r=this.toHex8String(!0)),&quot;hex8&quot;===t&amp;&amp;(r=this.toHex8String()),&quot;name&quot;===t&amp;&amp;(r=this.toName()),&quot;hsl&quot;===t&amp;&amp;(r=this.toHslString()),&quot;hsv&quot;===t&amp;&amp;(r=this.toHsvString()),r||this.toHexString()):&quot;name&quot;===t&amp;&amp;0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if(&quot;object&quot;==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&amp;&amp;(r[n]=&quot;a&quot;===n?t[n]:I(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&amp;&amp;c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),i=c(e).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(e,r){var n=c(e),i=c(r);return(t.max(n.getLuminance(),i.getLuminance())+.05)/(t.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,i,a=c.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:&quot;AA&quot;,size:&quot;small&quot;}).level||&quot;AA&quot;).toUpperCase(),r=(t.size||&quot;small&quot;).toLowerCase(),&quot;AA&quot;!==e&amp;&amp;&quot;AAA&quot;!==e&amp;&amp;(e=&quot;AA&quot;);&quot;small&quot;!==r&amp;&amp;&quot;large&quot;!==r&amp;&amp;(r=&quot;small&quot;);return{level:e,size:r}}(r)).level+n.size){case&quot;AAsmall&quot;:case&quot;AAAlarge&quot;:i=a&gt;=4.5;break;case&quot;AAlarge&quot;:i=a&gt;=3;break;case&quot;AAAsmall&quot;:i=a&gt;=7}return i},c.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;u&lt;e.length;u++)(n=c.readability(t,e[u]))&gt;l&amp;&amp;(l=n,s=c(e[u]));return c.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(t,[&quot;#fff&quot;,&quot;#000&quot;],r))};var S=c.names={aliceblue:&quot;f0f8ff&quot;,antiquewhite:&quot;faebd7&quot;,aqua:&quot;0ff&quot;,aquamarine:&quot;7fffd4&quot;,azure:&quot;f0ffff&quot;,beige:&quot;f5f5dc&quot;,bisque:&quot;ffe4c4&quot;,black:&quot;000&quot;,blanchedalmond:&quot;ffebcd&quot;,blue:&quot;00f&quot;,blueviolet:&quot;8a2be2&quot;,brown:&quot;a52a2a&quot;,burlywood:&quot;deb887&quot;,burntsienna:&quot;ea7e5d&quot;,cadetblue:&quot;5f9ea0&quot;,chartreuse:&quot;7fff00&quot;,chocolate:&quot;d2691e&quot;,coral:&quot;ff7f50&quot;,cornflowerblue:&quot;6495ed&quot;,cornsilk:&quot;fff8dc&quot;,crimson:&quot;dc143c&quot;,cyan:&quot;0ff&quot;,darkblue:&quot;00008b&quot;,darkcyan:&quot;008b8b&quot;,darkgoldenrod:&quot;b8860b&quot;,darkgray:&quot;a9a9a9&quot;,darkgreen:&quot;006400&quot;,darkgrey:&quot;a9a9a9&quot;,darkkhaki:&quot;bdb76b&quot;,darkmagenta:&quot;8b008b&quot;,darkolivegreen:&quot;556b2f&quot;,darkorange:&quot;ff8c00&quot;,darkorchid:&quot;9932cc&quot;,darkred:&quot;8b0000&quot;,darksalmon:&quot;e9967a&quot;,darkseagreen:&quot;8fbc8f&quot;,darkslateblue:&quot;483d8b&quot;,darkslategray:&quot;2f4f4f&quot;,darkslategrey:&quot;2f4f4f&quot;,darkturquoise:&quot;00ced1&quot;,darkviolet:&quot;9400d3&quot;,deeppink:&quot;ff1493&quot;,deepskyblue:&quot;00bfff&quot;,dimgray:&quot;696969&quot;,dimgrey:&quot;696969&quot;,dodgerblue:&quot;1e90ff&quot;,firebrick:&quot;b22222&quot;,floralwhite:&quot;fffaf0&quot;,forestgreen:&quot;228b22&quot;,fuchsia:&quot;f0f&quot;,gainsboro:&quot;dcdcdc&quot;,ghostwhite:&quot;f8f8ff&quot;,gold:&quot;ffd700&quot;,goldenrod:&quot;daa520&quot;,gray:&quot;808080&quot;,green:&quot;008000&quot;,greenyellow:&quot;adff2f&quot;,grey:&quot;808080&quot;,honeydew:&quot;f0fff0&quot;,hotpink:&quot;ff69b4&quot;,indianred:&quot;cd5c5c&quot;,indigo:&quot;4b0082&quot;,ivory:&quot;fffff0&quot;,khaki:&quot;f0e68c&quot;,lavender:&quot;e6e6fa&quot;,lavenderblush:&quot;fff0f5&quot;,lawngreen:&quot;7cfc00&quot;,lemonchiffon:&quot;fffacd&quot;,lightblue:&quot;add8e6&quot;,lightcoral:&quot;f08080&quot;,lightcyan:&quot;e0ffff&quot;,lightgoldenrodyellow:&quot;fafad2&quot;,lightgray:&quot;d3d3d3&quot;,lightgreen:&quot;90ee90&quot;,lightgrey:&quot;d3d3d3&quot;,lightpink:&quot;ffb6c1&quot;,lightsalmon:&quot;ffa07a&quot;,lightseagreen:&quot;20b2aa&quot;,lightskyblue:&quot;87cefa&quot;,lightslategray:&quot;789&quot;,lightslategrey:&quot;789&quot;,lightsteelblue:&quot;b0c4de&quot;,lightyellow:&quot;ffffe0&quot;,lime:&quot;0f0&quot;,limegreen:&quot;32cd32&quot;,linen:&quot;faf0e6&quot;,magenta:&quot;f0f&quot;,maroon:&quot;800000&quot;,mediumaquamarine:&quot;66cdaa&quot;,mediumblue:&quot;0000cd&quot;,mediumorchid:&quot;ba55d3&quot;,mediumpurple:&quot;9370db&quot;,mediumseagreen:&quot;3cb371&quot;,mediumslateblue:&quot;7b68ee&quot;,mediumspringgreen:&quot;00fa9a&quot;,mediumturquoise:&quot;48d1cc&quot;,mediumvioletred:&quot;c71585&quot;,midnightblue:&quot;191970&quot;,mintcream:&quot;f5fffa&quot;,mistyrose:&quot;ffe4e1&quot;,moccasin:&quot;ffe4b5&quot;,navajowhite:&quot;ffdead&quot;,navy:&quot;000080&quot;,oldlace:&quot;fdf5e6&quot;,olive:&quot;808000&quot;,olivedrab:&quot;6b8e23&quot;,orange:&quot;ffa500&quot;,orangered:&quot;ff4500&quot;,orchid:&quot;da70d6&quot;,palegoldenrod:&quot;eee8aa&quot;,palegreen:&quot;98fb98&quot;,paleturquoise:&quot;afeeee&quot;,palevioletred:&quot;db7093&quot;,papayawhip:&quot;ffefd5&quot;,peachpuff:&quot;ffdab9&quot;,peru:&quot;cd853f&quot;,pink:&quot;ffc0cb&quot;,plum:&quot;dda0dd&quot;,powderblue:&quot;b0e0e6&quot;,purple:&quot;800080&quot;,rebeccapurple:&quot;663399&quot;,red:&quot;f00&quot;,rosybrown:&quot;bc8f8f&quot;,royalblue:&quot;4169e1&quot;,saddlebrown:&quot;8b4513&quot;,salmon:&quot;fa8072&quot;,sandybrown:&quot;f4a460&quot;,seagreen:&quot;2e8b57&quot;,seashell:&quot;fff5ee&quot;,sienna:&quot;a0522d&quot;,silver:&quot;c0c0c0&quot;,skyblue:&quot;87ceeb&quot;,slateblue:&quot;6a5acd&quot;,slategray:&quot;708090&quot;,slategrey:&quot;708090&quot;,snow:&quot;fffafa&quot;,springgreen:&quot;00ff7f&quot;,steelblue:&quot;4682b4&quot;,tan:&quot;d2b48c&quot;,teal:&quot;008080&quot;,thistle:&quot;d8bfd8&quot;,tomato:&quot;ff6347&quot;,turquoise:&quot;40e0d0&quot;,violet:&quot;ee82ee&quot;,wheat:&quot;f5deb3&quot;,white:&quot;fff&quot;,whitesmoke:&quot;f5f5f5&quot;,yellow:&quot;ff0&quot;,yellowgreen:&quot;9acd32&quot;},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&amp;&amp;(e[t[r]]=r);return e}(S);function C(t){return t=parseFloat(t),(isNaN(t)||t&lt;0||t&gt;1)&amp;&amp;(t=1),t}function L(e,r){(function(t){return&quot;string&quot;==typeof t&amp;&amp;-1!=t.indexOf(&quot;.&quot;)&amp;&amp;1===parseFloat(t)})(e)&amp;&amp;(e=&quot;100%&quot;);var n=function(t){return&quot;string&quot;==typeof t&amp;&amp;-1!=t.indexOf(&quot;%&quot;)}(e);return e=o(r,s(0,parseFloat(e))),n&amp;&amp;(e=parseInt(e*r,10)/100),t.abs(e-r)&lt;1e-6?1:e%r/parseFloat(r)}function z(t){return o(1,s(0,t))}function P(t){return parseInt(t,16)}function O(t){return 1==t.length?&quot;0&quot;+t:&quot;&quot;+t}function I(t){return t&lt;=1&amp;&amp;(t=100*t+&quot;%&quot;),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return P(t)/255}var B,F,N,j=(F=&quot;[\\s|\\(]+(&quot;+(B=&quot;(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)&quot;)+&quot;)[,|\\s]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)\\s*\\)?&quot;,N=&quot;[\\s|\\(]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)[,|\\s]+(&quot;+B+&quot;)\\s*\\)?&quot;,{CSS_UNIT:new RegExp(B),rgb:new RegExp(&quot;rgb&quot;+F),rgba:new RegExp(&quot;rgba&quot;+N),hsl:new RegExp(&quot;hsl&quot;+F),hsla:new RegExp(&quot;hsla&quot;+N),hsv:new RegExp(&quot;hsv&quot;+F),hsva:new RegExp(&quot;hsva&quot;+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(t){return!!j.CSS_UNIT.exec(t)}&quot;undefined&quot;!=typeof e&amp;&amp;e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],512:[function(t,e,r){&quot;use strict&quot;;function n(t){if(t instanceof Float32Array)return t;if(&quot;number&quot;==typeof t)return new Float32Array([t])[0];var e=new Float32Array(t);return e.set(t),e}e.exports=n,e.exports.float32=e.exports.float=n,e.exports.fract32=e.exports.fract=function(t){if(&quot;number&quot;==typeof t)return n(t-n(t));for(var e=n(t),r=0,i=e.length;r&lt;i;r++)e[r]=t[r]-e[r];return e}},{}],513:[function(t,e,r){&quot;use strict&quot;;var n=t(&quot;parse-unit&quot;);e.exports=o;var i=96;function a(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*o(r[1],t)}function o(t,e){switch(e=e||document.body,t=(t||&quot;px&quot;).trim().toLowerCase(),e!==window&amp;&amp;e!==document||(e=document.body),t){case&quot;%&quot;:return e.clientHeight/100;case&quot;ch&quot;:case&quot;ex&quot;:return function(t,e){var r=document.createElement(&quot;div&quot;);r.style[&quot;font-size&quot;]=&quot;128&quot;+t,e.appendChild(r);var n=a(r,&quot;font-size&quot;)/128;return e.removeChild(r),n}(t,e);case&quot;em&quot;:return a(e,&quot;font-size&quot;);case&quot;rem&quot;:return a(document.body,&quot;font-size&quot;);case&quot;vw&quot;:return window.innerWidth/100;case&quot;vh&quot;:return window.innerHeight/100;case&quot;vmin&quot;:return Math.min(window.innerWidth,window.innerHeight)/100;case&quot;vmax&quot;:return Math.max(window.innerWidth,window.innerHeight)/100;case&quot;in&quot;:return i;case&quot;cm&quot;:return i/2.54;case&quot;mm&quot;:return i/25.4;case&quot;pt&quot;:return i/72;case&quot;pc&quot;:return i/6}return 1}},{&quot;parse-unit&quot;:441}],514:[function(t,e,r){var n;n=this,function(t){&quot;use strict&quot;;var e=function(t){return t},r=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){return e||(n=i=0),t[0]=(n+=t[0])*a+s,t[1]=(i+=t[1])*o+l,t}},n=function(t){var e=t.bbox;function n(t){l[0]=t[0],l[1]=t[1],s(l),l[0]&lt;c&amp;&amp;(c=l[0]),l[0]&gt;f&amp;&amp;(f=l[0]),l[1]&lt;u&amp;&amp;(u=l[1]),l[1]&gt;h&amp;&amp;(h=l[1])}function i(t){switch(t.type){case&quot;GeometryCollection&quot;:t.geometries.forEach(i);break;case&quot;Point&quot;:n(t.coordinates);break;case&quot;MultiPoint&quot;:t.coordinates.forEach(n)}}if(!e){var a,o,s=r(t),l=new Array(2),c=1/0,u=c,f=-c,h=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++e&lt;r;)a=t[e],l[0]=a[0],l[1]=a[1],s(l,e),l[0]&lt;c&amp;&amp;(c=l[0]),l[0]&gt;f&amp;&amp;(f=l[0]),l[1]&lt;u&amp;&amp;(u=l[1]),l[1]&gt;h&amp;&amp;(h=l[1])}),t.objects)i(t.objects[o]);e=t.bbox=[c,u,f,h]}return e},i=function(t,e){for(var r,n=t.length,i=n-e;i&lt;--n;)r=t[i],t[i++]=t[n],t[n]=r};function a(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,a=o(t,e);return null==r&amp;&amp;null==n?{type:&quot;Feature&quot;,properties:i,geometry:a}:null==n?{type:&quot;Feature&quot;,id:r,properties:i,geometry:a}:{type:&quot;Feature&quot;,id:r,bbox:n,properties:i,geometry:a}}function o(t,e){var n=r(t),a=t.arcs;function o(t,e){e.length&amp;&amp;e.pop();for(var r=a[t&lt;0?~t:t],o=0,s=r.length;o&lt;s;++o)e.push(n(r[o].slice(),o));t&lt;0&amp;&amp;i(e,s)}function s(t){return n(t.slice())}function l(t){for(var e=[],r=0,n=t.length;r&lt;n;++r)o(t[r],e);return e.length&lt;2&amp;&amp;e.push(e[0].slice()),e}function c(t){for(var e=l(t);e.length&lt;4;)e.push(e[0].slice());return e}function u(t){return t.map(c)}return function t(e){var r,n=e.type;switch(n){case&quot;GeometryCollection&quot;:return{type:n,geometries:e.geometries.map(t)};case&quot;Point&quot;:r=s(e.coordinates);break;case&quot;MultiPoint&quot;:r=e.coordinates.map(s);break;case&quot;LineString&quot;:r=l(e.arcs);break;case&quot;MultiLineString&quot;:r=e.arcs.map(l);break;case&quot;Polygon&quot;:r=u(e.arcs);break;case&quot;MultiPolygon&quot;:r=e.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(e)}var s=function(t,e){var r={},n={},i={},a=[],o=-1;function s(t,e){for(var n in t){var i=t[n];delete e[i.start],delete i.start,delete i.end,i.forEach(function(t){r[t&lt;0?~t:t]=1}),a.push(i)}}return e.forEach(function(r,n){var i,a=t.arcs[r&lt;0?~r:r];a.length&lt;3&amp;&amp;!a[1][0]&amp;&amp;!a[1][1]&amp;&amp;(i=e[++o],e[o]=r,e[n]=i)}),e.forEach(function(e){var r,a,o=function(e){var r,n=t.arcs[e&lt;0?~e:e],i=n[0];t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1];return e&lt;0?[r,i]:[i,r]}(e),s=o[0],l=o[1];if(r=i[s])if(delete i[r.end],r.push(e),r.end=l,a=n[l]){delete n[a.start];var c=a===r?r:r.concat(a);n[c.start=r.start]=i[c.end=a.end]=c}else n[r.start]=i[r.end]=r;else if(r=n[l])if(delete n[r.start],r.unshift(e),r.start=s,a=i[s]){delete i[a.end];var u=a===r?r:a.concat(r);n[u.start=a.start]=i[u.end=r.end]=u}else n[r.start]=i[r.end]=r;else n[(r=[e]).start=s]=i[r.end=l]=r}),s(i,n),s(n,i),e.forEach(function(t){r[t&lt;0?~t:t]||a.push([t])}),a};function l(t,e,r){var n,i,a;if(arguments.length&gt;1)n=function(t,e,r){var n,i=[],a=[];function o(t){var e=t&lt;0?~t:t;(a[e]||(a[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case&quot;GeometryCollection&quot;:e.geometries.forEach(t);break;case&quot;LineString&quot;:s(e.arcs);break;case&quot;MultiLineString&quot;:case&quot;Polygon&quot;:l(e.arcs);break;case&quot;MultiPolygon&quot;:e.arcs.forEach(l)}}(e),a.forEach(null==r?function(t){i.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&amp;&amp;i.push(t[0].i)}),i}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i&lt;a;++i)n[i]=i;return{type:&quot;MultiLineString&quot;,arcs:s(t,n)}}function c(t,e){var r={},n=[],i=[];function a(t){t.forEach(function(e){e.forEach(function(e){(r[e=e&lt;0?~e:e]||(r[e]=[])).push(t)})}),n.push(t)}function l(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],a=0;++r&lt;n;)e=i,i=t[r],a+=e[0]*i[1]-e[1]*i[0];return Math.abs(a)}(o(t,{type:&quot;Polygon&quot;,arcs:[e]}).coordinates[0])}return e.forEach(function t(e){switch(e.type){case&quot;GeometryCollection&quot;:e.geometries.forEach(t);break;case&quot;Polygon&quot;:a(e.arcs);break;case&quot;MultiPolygon&quot;:e.arcs.forEach(a)}}),n.forEach(function(t){if(!t._){var e=[],n=[t];for(t._=1,i.push(e);t=n.pop();)e.push(t),t.forEach(function(t){t.forEach(function(t){r[t&lt;0?~t:t].forEach(function(t){t._||(t._=1,n.push(t))})})})}}),n.forEach(function(t){delete t._}),{type:&quot;MultiPolygon&quot;,arcs:i.map(function(e){var n,i=[];if(e.forEach(function(t){t.forEach(function(t){t.forEach(function(t){r[t&lt;0?~t:t].length&lt;2&amp;&amp;i.push(t)})})}),(n=(i=s(t,i)).length)&gt;1)for(var a,o,c=1,u=l(i[0]);c&lt;n;++c)(a=l(i[c]))&gt;u&amp;&amp;(o=i[0],i[0]=i[c],i[c]=o,u=a);return i})}}var u=function(t,e){for(var r=0,n=t.length;r&lt;n;){var i=r+n&gt;&gt;&gt;1;t[i]&lt;e?r=i+1:n=i}return r};t.bbox=n,t.feature=function(t,e){return&quot;GeometryCollection&quot;===e.type?{type:&quot;FeatureCollection&quot;,features:e.geometries.map(function(e){return a(t,e)})}:a(t,e)},t.mesh=function(t){return o(t,l.apply(this,arguments))},t.meshArcs=l,t.merge=function(t){return o(t,c.apply(this,arguments))},t.mergeArcs=c,t.neighbors=function(t){var e={},r=t.map(function(){return[]});function n(t,r){t.forEach(function(t){t&lt;0&amp;&amp;(t=~t);var n=e[t];n?n.push(r):e[t]=[r]})}function i(t,e){t.forEach(function(t){n(t,e)})}var a={LineString:n,MultiLineString:i,Polygon:i,MultiPolygon:function(t,e){t.forEach(function(t){i(t,e)})}};for(var o in t.forEach(function t(e,r){&quot;GeometryCollection&quot;===e.type?e.geometries.forEach(function(e){t(e,r)}):e.type in a&amp;&amp;a[e.type](e.arcs,r)}),e)for(var s=e[o],l=s.length,c=0;c&lt;l;++c)for(var f=c+1;f&lt;l;++f){var h,p=s[c],d=s[f];(h=r[p])[o=u(h,d)]!==d&amp;&amp;h.splice(o,0,d),(h=r[d])[o=u(h,p)]!==p&amp;&amp;h.splice(o,0,p)}return r},t.quantize=function(t,e){if(!((e=Math.floor(e))&gt;=2))throw new Error(&quot;n must be \u22652&quot;);if(t.transform)throw new Error(&quot;already quantized&quot;);var r,i=n(t),a=i[0],o=(i[2]-a)/(e-1)||1,s=i[1],l=(i[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-a)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case&quot;GeometryCollection&quot;:t.geometries.forEach(u);break;case&quot;Point&quot;:c(t.coordinates);break;case&quot;MultiPoint&quot;:t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,i=1,c=1,u=t.length,f=t[0],h=f[0]=Math.round((f[0]-a)/o),p=f[1]=Math.round((f[1]-s)/l);i&lt;u;++i)f=t[i],r=Math.round((f[0]-a)/o),n=Math.round((f[1]-s)/l),r===h&amp;&amp;n===p||((e=t[c++])[0]=r-h,h=r,e[1]=n-p,p=n);c&lt;2&amp;&amp;((e=t[c++])[0]=0,e[1]=0),t.length=c}),t.objects)u(t.objects[r]);return t.transform={scale:[o,l],translate:[a,s]},t},t.transform=r,t.untransform=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){e||(n=i=0);var r=Math.round((t[0]-s)/a),c=Math.round((t[1]-l)/o);return t[0]=r-n,n=r,t[1]=c-i,i=c,t}},Object.defineProperty(t,&quot;__esModule&quot;,{value:!0})}(&quot;object&quot;==typeof r&amp;&amp;&quot;undefined&quot;!=typeof e?r:n.topojson=n.topojson||{})},{}],515:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){if(t&lt;0)return[];if(0===t)return[[0]];for(var e=0|Math.round(a(t+1)),r=[],o=0;o&lt;e;++o){for(var s=n.unrank(t,o),l=[0],c=0,u=0;u&lt;s.length;++u)c+=1&lt;&lt;s[u],l.push(c);i(s)&lt;1&amp;&amp;(l[0]=c,l[t]=0),r.push(l)}return r};var n=t(&quot;permutation-rank&quot;),i=t(&quot;permutation-parity&quot;),a=t(&quot;gamma&quot;)},{gamma:219,&quot;permutation-parity&quot;:443,&quot;permutation-rank&quot;:444}],516:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],n=t.right||f(r),i=t.radius||1,a=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),&quot;eye&quot;in t){var p=t.eye,d=[p[0]-e[0],p[1]-e[1],p[2]-e[2]];o(n,d,r),c(n[0],n[1],n[2])&lt;1e-6?n=f(r):s(n,n),i=c(d[0],d[1],d[2]);var g=l(r,d)/i,m=l(n,d)/i;u=Math.acos(g),a=Math.acos(m)}return i=Math.log(i),new h(t.zoomMin,t.zoomMax,e,r,n,i,a,u)};var n=t(&quot;filtered-vector&quot;),i=t(&quot;gl-mat4/invert&quot;),a=t(&quot;gl-mat4/rotate&quot;),o=t(&quot;gl-vec3/cross&quot;),s=t(&quot;gl-vec3/normalize&quot;),l=t(&quot;gl-vec3/dot&quot;);function c(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t){return Math.min(1,Math.max(-1,t))}function f(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e&gt;Math.max(r,n)?i[2]=1:r&gt;Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l&lt;3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l&lt;3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c&lt;16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t&gt;0?Math.log(t):-1/0,e=e&gt;0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a&lt;3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),u=0;for(a=0;a&lt;3;++a)r[a]-=e[a]*i/n,u+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(u);for(a=0;a&lt;3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,k=x,M=-m*x,A=-v*x,T=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a&lt;3;++a){var C=_*r[a]+w*h[a]+k*e[a];E[4*a+1]=M*r[a]+A*h[a]+T*e[a],E[4*a+2]=C,E[4*a+3]=0}var L=E[1],z=E[5],P=E[9],O=E[2],I=E[6],D=E[10],R=z*D-P*I,B=P*O-L*D,F=L*I-z*O,N=c(R,B,F);R/=N,B/=N,F/=N,E[0]=R,E[4]=B,E[8]=F;for(a=0;a&lt;3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a&lt;3;++a){u=0;for(var j=0;j&lt;3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n&lt;16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c&lt;3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];a(i,i,n,d);for(c=0;c&lt;3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=c(u-=a*p,f-=o*p,h-=s*p),g=(u/=d)*e+a*r,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;&quot;number&quot;==typeof r&amp;&amp;(a=0|r),(a&lt;0||a&gt;3)&amp;&amp;(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),g=Math.max(h,p,d);h===g?(s=s&lt;0?-1:1,l=f=0):d===g?(f=f&lt;0?-1:1,s=l=0):(l=l&lt;0?-1:1,s=f=0)}else{var m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,k=c(x-=s*w,b-=l*w,_-=f*w),M=l*(_/=k)-f*(b/=k),A=f*(x/=k)-s*_,T=s*b-l*x,S=c(M,A,T);if(M/=S,A/=S,T/=S,this.center.jump(t,H,G,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],C=e[5],L=e[9],z=E*x+C*b+L*_,P=E*M+C*A+L*T;v=R&lt;0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,z)}else{var O=e[2],I=e[6],D=e[10],R=O*s+I*l+D*f,B=O*x+I*b+D*_,F=O*M+I*A+D*T;v=Math.asin(u(R)),y=Math.atan2(F,B)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;i(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,W=U[14]/q,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,G-j*Y,W-V*Y)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e&gt;0&amp;&amp;this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s&lt;1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=c(l,f,h);if(!(p&lt;1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,g=d[0],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x&lt;.01&amp;&amp;(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))&lt;1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,k=c(b,_,w),M=i*l+a*f+o*h,A=g*l+m*f+v*h,T=(b/=k)*l+(_/=k)*f+(w/=k)*h,S=Math.asin(u(M)),E=Math.atan2(T,A),C=this.angle._state,L=C[C.length-1],z=C[C.length-2];L%=2*Math.PI;var P=Math.abs(L+2*Math.PI-E),O=Math.abs(L-E),I=Math.abs(L-2*Math.PI-E);P&lt;O&amp;&amp;(L+=2*Math.PI),I&lt;O&amp;&amp;(L-=2*Math.PI),this.angle.jump(this.angle.lastT(),L,z),this.angle.set(t,E,S)}}}}},{&quot;filtered-vector&quot;:214,&quot;gl-mat4/invert&quot;:253,&quot;gl-mat4/rotate&quot;:257,&quot;gl-vec3/cross&quot;:315,&quot;gl-vec3/dot&quot;:320,&quot;gl-vec3/normalize&quot;:337}],517:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var i=t*e,a=n*t,o=a-(a-t),s=t-o,l=n*e,c=l-(l-e),u=e-c,f=s*u-(i-o*c-s*c-o*u);if(r)return r[0]=f,r[1]=i,r;return[f,i]};var n=+(Math.pow(2,27)+1)},{}],518:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);if(r)return r[0]=o+a,r[1]=n,r;return[o+a,n]}},{}],519:[function(t,e,r){(function(e,n){&quot;use strict&quot;;var i=t(&quot;bit-twiddle&quot;),a=t(&quot;dup&quot;);e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var o=&quot;undefined&quot;!=typeof Uint8ClampedArray,s=e.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=a([32,0])),s.BUFFER||(s.BUFFER=a([32,0]));var l=s.DATA,c=s.BUFFER;function u(t){if(t){var e=t.length||t.byteLength,r=i.log2(e);l[r].push(t)}}function f(t){t=i.nextPow2(t);var e=i.log2(t),r=l[e];return r.length&gt;0?r.pop():new ArrayBuffer(t)}function h(t){return new Uint8Array(f(t),0,t)}function p(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function g(t){return new Int8Array(f(t),0,t)}function m(t){return new Int16Array(f(2*t),0,t)}function v(t){return new Int32Array(f(4*t),0,t)}function y(t){return new Float32Array(f(4*t),0,t)}function x(t){return new Float64Array(f(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(f(t),0,t):h(t)}function _(t){return new DataView(f(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),r=c[e];return r.length&gt;0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[i.log2(t.length)].push(t);else{if(&quot;[object ArrayBuffer]&quot;!==Object.prototype.toString.call(t)&amp;&amp;(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|i.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[i.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||&quot;arraybuffer&quot;===e)return f(t);switch(e){case&quot;uint8&quot;:return h(t);case&quot;uint16&quot;:return p(t);case&quot;uint32&quot;:return d(t);case&quot;int8&quot;:return g(t);case&quot;int16&quot;:return m(t);case&quot;int32&quot;:return v(t);case&quot;float&quot;:case&quot;float32&quot;:return y(t);case&quot;double&quot;:case&quot;float64&quot;:return x(t);case&quot;uint8_clamped&quot;:return b(t);case&quot;buffer&quot;:return w(t);case&quot;data&quot;:case&quot;dataview&quot;:return _(t);default:return null}return null},r.mallocArrayBuffer=f,r.mallocUint8=h,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=m,r.mallocInt32=v,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t&lt;32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,&quot;undefined&quot;!=typeof global?global:&quot;undefined&quot;!=typeof self?self:&quot;undefined&quot;!=typeof window?window:{},t(&quot;buffer&quot;).Buffer)},{&quot;bit-twiddle&quot;:79,buffer:92,dup:154}],520:[function(t,e,r){&quot;use strict&quot;;function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e&lt;t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n;var i=n.prototype;Object.defineProperty(i,&quot;length&quot;,{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},i.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o&lt;s?a[r]=n:s&lt;o?a[n]=r:(a[n]=r,++i[r])}}},{}],521:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o&lt;n;++o)if(a=i,e(i=t[o],a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a&lt;r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},{}],522:[function(t,e,r){var n=/[\'\&quot;]/;e.exports=function(t){return t?(n.test(t.charAt(0))&amp;&amp;(t=t.substr(1)),n.test(t.charAt(t.length-1))&amp;&amp;(t=t.substr(0,t.length-1)),t):&quot;&quot;}},{}],523:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n&lt;i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&amp;&amp;o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if(&quot;function&quot;==typeof a[o]&amp;&amp;void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},{}],524:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e){&quot;object&quot;==typeof e&amp;&amp;null!==e||(e={});return n(t,e.canvas||i,e.context||a,e)};var n=t(&quot;./lib/vtext&quot;),i=null,a=null;&quot;undefined&quot;!=typeof document&amp;&amp;((i=document.createElement(&quot;canvas&quot;)).width=8192,i.height=1024,a=i.getContext(&quot;2d&quot;))},{&quot;./lib/vtext&quot;:525}],525:[function(t,e,r){&quot;use strict&quot;;e.exports=function(t,e,r,n){var a=n.size||64,o=n.font||&quot;normal&quot;;return r.font=a+&quot;px &quot;+o,r.textAlign=&quot;start&quot;,r.textBaseline=&quot;alphabetic&quot;,r.direction=&quot;ltr&quot;,f(function(t,e,r,n){var a=0|Math.ceil(e.measureText(r).width+2*n);if(a&gt;8192)throw new Error(&quot;vectorize-text: String too long (sorry, this will get fixed later)&quot;);var o=3*n;t.height&lt;o&amp;&amp;(t.height=o),e.fillStyle=&quot;#000&quot;,e.fillRect(0,0,t.width,t.height),e.fillStyle=&quot;#fff&quot;,e.fillText(r,n,2*n);var s=e.getImageData(0,0,a,o);return i(s.data,[o,a,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a),n,a)},e.exports.processPixels=f;var n=t(&quot;surface-nets&quot;),i=t(&quot;ndarray&quot;),a=t(&quot;simplify-planar-graph&quot;),o=t(&quot;clean-pslg&quot;),s=t(&quot;cdt2d&quot;),l=t(&quot;planar-graph-to-polyline&quot;);function c(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function u(t,e,r,n){var i=c(t,n),a=function(t,e,r){for(var n=e.textAlign||&quot;start&quot;,i=e.textBaseline||&quot;alphabetic&quot;,a=[1&lt;&lt;30,1&lt;&lt;30],o=[0,0],s=t.length,l=0;l&lt;s;++l)for(var c=t[l],u=0;u&lt;2;++u)a[u]=0|Math.min(a[u],c[u]),o[u]=0|Math.max(o[u],c[u]);var f=0;switch(n){case&quot;center&quot;:f=-.5*(a[0]+o[0]);break;case&quot;right&quot;:case&quot;end&quot;:f=-o[0];break;case&quot;left&quot;:case&quot;start&quot;:f=-a[0];break;default:throw new Error(&quot;vectorize-text: Unrecognized textAlign: '&quot;+n+&quot;'&quot;)}var h=0;switch(i){case&quot;hanging&quot;:case&quot;top&quot;:h=-a[1];break;case&quot;middle&quot;:h=-.5*(a[1]+o[1]);break;case&quot;alphabetic&quot;:case&quot;ideographic&quot;:h=-3*r;break;case&quot;bottom&quot;:h=-o[1];break;default:throw new Error(&quot;vectorize-text: Unrecoginized textBaseline: '&quot;+i+&quot;'&quot;)}var p=1/r;return&quot;lineHeight&quot;in e?p*=+e.lineHeight:&quot;width&quot;in e?p=e.width/(o[0]-a[0]):&quot;height&quot;in e&amp;&amp;(p=e.height/(o[1]-a[1])),t.map(function(t){return[p*(t[0]+f),p*(t[1]+h)]})}(i.positions,e,r),u=i.edges,f=&quot;ccw&quot;===e.orientation;if(o(a,u),e.polygons||e.polygon||e.polyline){for(var h=l(u,a),p=new Array(h.length),d=0;d&lt;h.length;++d){for(var g=h[d],m=new Array(g.length),v=0;v&lt;g.length;++v){for(var y=g[v],x=new Array(y.length),b=0;b&lt;y.length;++b)x[b]=a[y[b]].slice();f&amp;&amp;x.reverse(),m[v]=x}p[d]=m}return p}return e.triangles||e.triangulate||e.triangle?{cells:s(a,u,{delaunay:!1,exterior:!1,interior:!0}),positions:a}:{edges:u,positions:a}}function f(t,e,r){try{return u(t,e,r,!0)}catch(t){}try{return u(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:93,&quot;clean-pslg&quot;:103,ndarray:430,&quot;planar-graph-to-polyline&quot;:448,&quot;simplify-planar-graph&quot;:497,&quot;surface-nets&quot;:505}],526:[function(t,e,r){!function(){&quot;use strict&quot;;if(&quot;undefined&quot;==typeof ses||!ses.ok||ses.ok()){&quot;undefined&quot;!=typeof ses&amp;&amp;(ses.weakMapPermitHostObjects=m);var t=!1;if(&quot;function&quot;==typeof WeakMap){var r=WeakMap;if(&quot;undefined&quot;!=typeof navigator&amp;&amp;/Firefox/.test(navigator.userAgent));else{var n=new r,i=Object.freeze({});if(n.set(i,1),1===n.get(i))return void(e.exports=WeakMap);t=!0}}Object.prototype.hasOwnProperty;var a=Object.getOwnPropertyNames,o=Object.defineProperty,s=Object.isExtensible,l=&quot;weakmap:&quot;,c=l+&quot;ident:&quot;+Math.random()+&quot;___&quot;;if(&quot;undefined&quot;!=typeof crypto&amp;&amp;&quot;function&quot;==typeof crypto.getRandomValues&amp;&amp;&quot;function&quot;==typeof ArrayBuffer&amp;&amp;&quot;function&quot;==typeof Uint8Array){var u=new ArrayBuffer(25),f=new Uint8Array(u);crypto.getRandomValues(f),c=l+&quot;rand:&quot;+Array.prototype.map.call(f,function(t){return(t%36).toString(36)}).join(&quot;&quot;)+&quot;___&quot;}if(o(Object,&quot;getOwnPropertyNames&quot;,{value:function(t){return a(t).filter(v)}}),&quot;getPropertyNames&quot;in Object){var h=Object.getPropertyNames;o(Object,&quot;getPropertyNames&quot;,{value:function(t){return h(t).filter(v)}})}!function(){var t=Object.freeze;o(Object,&quot;freeze&quot;,{value:function(e){return y(e),t(e)}});var e=Object.seal;o(Object,&quot;seal&quot;,{value:function(t){return y(t),e(t)}});var r=Object.preventExtensions;o(Object,&quot;preventExtensions&quot;,{value:function(t){return y(t),r(t)}})}();var p=!1,d=0,g=function(){this instanceof g||b();var t=[],e=[],r=d++;return Object.create(g.prototype,{get___:{value:x(function(n,i){var a,o=y(n);return o?r in o?o[r]:i:(a=t.indexOf(n))&gt;=0?e[a]:i})},has___:{value:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)&gt;=0})},set___:{value:x(function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))&gt;=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this})},delete___:{value:x(function(n){var i,a,o=y(n);return o?r in o&amp;&amp;delete o[r]:!((i=t.indexOf(n))&lt;0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),&quot;function&quot;==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new g),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new g),i.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!i&amp;&amp;i.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return i&amp;&amp;i.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==m)throw new Error(&quot;bogus call to permitHostObjects___&quot;);a=!0})}})}t&amp;&amp;&quot;undefined&quot;!=typeof Proxy&amp;&amp;(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,&quot;constructor&quot;,{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(&quot;undefined&quot;!=typeof Proxy&amp;&amp;(Proxy=void 0),e.exports=g)}function m(t){t.permitHostObjects___&amp;&amp;t.permitHostObjects___(m)}function v(t){return!(t.substr(0,l.length)==l&amp;&amp;&quot;___&quot;===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError(&quot;Not an object: &quot;+t);var e=t[c];if(e&amp;&amp;e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||&quot;undefined&quot;==typeof console||(p=!0,console.warn(&quot;WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.&quot;))}}()},{}],527:[function(t,e,r){var n=t(&quot;./hidden-store.js&quot;);e.exports=function(){var t={};return function(e){if((&quot;object&quot;!=typeof e||null===e)&amp;&amp;&quot;function&quot;!=typeof e)throw new Error(&quot;Weakmap-shim: Key must be object&quot;);var r=e.valueOf(t);return r&amp;&amp;r.identity===t?r:n(e,t)}}},{&quot;./hidden-store.js&quot;:528}],528:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,&quot;valueOf&quot;,{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],529:[function(t,e,r){var n=t(&quot;./create-store.js&quot;);e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty(&quot;value&quot;)?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return&quot;value&quot;in t(e)},delete:function(e){return delete t(e).value}}}},{&quot;./create-store.js&quot;:527}],530:[function(t,e,r){var n=t(&quot;get-canvas-context&quot;);e.exports=function(t){return n(&quot;webgl&quot;,t)}},{&quot;get-canvas-context&quot;:220}],531:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;),a=n.instance();function o(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}o.prototype=new n.baseCalendar,i(o.prototype,{name:&quot;Chinese&quot;,jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Chinese&quot;,epochs:[&quot;BEC&quot;,&quot;EC&quot;],monthNumbers:function(t,e){if(&quot;string&quot;==typeof t){var r=t.match(l);return r?r[0]:&quot;&quot;}var n=this._validateYear(t),i=t.month(),a=&quot;&quot;+this.toChineseMonth(n,i);return e&amp;&amp;a.length&lt;2&amp;&amp;(a=&quot;0&quot;+a),this.isIntercalaryMonth(n,i)&amp;&amp;(a+=&quot;i&quot;),a},monthNames:function(t){if(&quot;string&quot;==typeof t){var e=t.match(c);return e?e[0]:&quot;&quot;}var r=this._validateYear(t),n=t.month(),i=[&quot;\u4e00\u6708&quot;,&quot;\u4e8c\u6708&quot;,&quot;\u4e09\u6708&quot;,&quot;\u56db\u6708&quot;,&quot;\u4e94\u6708&quot;,&quot;\u516d\u6708&quot;,&quot;\u4e03\u6708&quot;,&quot;\u516b\u6708&quot;,&quot;\u4e5d\u6708&quot;,&quot;\u5341\u6708&quot;,&quot;\u5341\u4e00\u6708&quot;,&quot;\u5341\u4e8c\u6708&quot;][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&amp;&amp;(i=&quot;\u95f0&quot;+i),i},monthNamesShort:function(t){if(&quot;string&quot;==typeof t){var e=t.match(u);return e?e[0]:&quot;&quot;}var r=this._validateYear(t),n=t.month(),i=[&quot;\u4e00&quot;,&quot;\u4e8c&quot;,&quot;\u4e09&quot;,&quot;\u56db&quot;,&quot;\u4e94&quot;,&quot;\u516d&quot;,&quot;\u4e03&quot;,&quot;\u516b&quot;,&quot;\u4e5d&quot;,&quot;\u5341&quot;,&quot;\u5341\u4e00&quot;,&quot;\u5341\u4e8c&quot;][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&amp;&amp;(i=&quot;\u95f0&quot;+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))&quot;\u95f0&quot;===e[0]&amp;&amp;(r=!0,e=e.substring(1)),&quot;\u6708&quot;===e[e.length-1]&amp;&amp;(e=e.substring(0,e.length-1)),n=1+[&quot;\u4e00&quot;,&quot;\u4e8c&quot;,&quot;\u4e09&quot;,&quot;\u56db&quot;,&quot;\u4e94&quot;,&quot;\u516d&quot;,&quot;\u4e03&quot;,&quot;\u516b&quot;,&quot;\u4e5d&quot;,&quot;\u5341&quot;,&quot;\u5341\u4e00&quot;,&quot;\u5341\u4e8c&quot;].indexOf(e);else{var i=e[e.length-1];r=&quot;i&quot;===i||&quot;I&quot;===i}return this.toMonthIndex(t,n,r)},dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&amp;&amp;(t=t.year()),&quot;number&quot;!=typeof t||t&lt;1888||t&gt;2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&amp;&amp;e!==i||e&lt;1||e&gt;12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&amp;&amp;e&lt;=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&amp;&amp;(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e&lt;0||e&gt;(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e&lt;r?e+1:e:e+1},intercalaryMonth:function(t){return t=this._validateYear(t),f[t-f[0]]&gt;&gt;13},isIntercalaryMonth:function(t,e){t.year&amp;&amp;(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&amp;&amp;r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s&gt;&gt;9&amp;4095,c=s&gt;&gt;5&amp;15,u=31&amp;s;(i=a.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),&quot;d&quot;);var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&amp;&amp;(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e&gt;(r&gt;&gt;13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&amp;1&lt;&lt;12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if(&quot;object&quot;==typeof t)o=t,a=e||{};else{var l=&quot;number&quot;==typeof t&amp;&amp;t&gt;=1888&amp;&amp;t&lt;=2111;if(!l)throw new Error(&quot;Lunar year outside range 1888-2111&quot;);var c=&quot;number&quot;==typeof e&amp;&amp;e&gt;=1&amp;&amp;e&lt;=12;if(!c)throw new Error(&quot;Lunar month outside range 1 - 12&quot;);var u,p=&quot;number&quot;==typeof r&amp;&amp;r&gt;=1&amp;&amp;r&lt;=30;if(!p)throw new Error(&quot;Lunar day outside range 1 - 30&quot;);&quot;object&quot;==typeof n?(u=!1,a=n):(u=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=f[o.year-f[0]],m=g&gt;&gt;13;d=m?o.month&gt;m?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var v=0;v&lt;d;v++){var y=g&amp;1&lt;&lt;12-v?30:29;s+=y}var x=h[o.year-h[0]],b=new Date(x&gt;&gt;9&amp;4095,(x&gt;&gt;5&amp;15)-1,(31&amp;x)+s);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if(&quot;object&quot;==typeof t)i=t,a=e||{};else{var o=&quot;number&quot;==typeof t&amp;&amp;t&gt;=1888&amp;&amp;t&lt;=2111;if(!o)throw new Error(&quot;Solar year outside range 1888-2111&quot;);var s=&quot;number&quot;==typeof e&amp;&amp;e&gt;=1&amp;&amp;e&lt;=12;if(!s)throw new Error(&quot;Solar month outside range 1 - 12&quot;);var l=&quot;number&quot;==typeof r&amp;&amp;r&gt;=1&amp;&amp;r&lt;=31;if(!l)throw new Error(&quot;Solar day outside range 1 - 31&quot;);i={year:t,month:e,day:r},a=n||{}}var c=h[i.year-h[0]],u=i.year&lt;&lt;9|i.month&lt;&lt;5|i.day;a.year=u&gt;=c?i.year:i.year-1,c=h[a.year-h[0]];var p,d=new Date(c&gt;&gt;9&amp;4095,(c&gt;&gt;5&amp;15)-1,31&amp;c),g=new Date(i.year,i.month-1,i.day);p=Math.round((g-d)/864e5);var m,v=f[a.year-f[0]];for(m=0;m&lt;13;m++){var y=v&amp;1&lt;&lt;12-m?30:29;if(p&lt;y)break;p-=y}var x=v&gt;&gt;13;!x||m&lt;x?(a.isIntercalary=!1,a.month=1+m):m===x?(a.isIntercalary=!0,a.month=m):(a.isIntercalary=!1,a.month=m);return a.day=1+p,a}(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(s),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var n=t.year(),i=t.month(),a=this.isIntercalaryMonth(n,i),s=this.toChineseMonth(n,i),l=Object.getPrototypeOf(o.prototype).add.call(this,t,e,r);if(&quot;y&quot;===r){var c=l.year(),u=l.month(),f=this.isIntercalaryMonth(c,s),h=a&amp;&amp;f?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);h!==u&amp;&amp;l.month(h)}return l}});var s=/^\s*(-?\d\d\d\d|\d\d)[-\/](\d?\d)([iI]?)[-\/](\d?\d)/m,l=/^\d?\d[iI]?/m,c=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,u=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;n.calendars.chinese=o;var f=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],h=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],532:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Coptic&quot;,jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Coptic&quot;,epochs:[&quot;BAM&quot;,&quot;AM&quot;],monthNames:[&quot;Thout&quot;,&quot;Paopi&quot;,&quot;Hathor&quot;,&quot;Koiak&quot;,&quot;Tobi&quot;,&quot;Meshir&quot;,&quot;Paremhat&quot;,&quot;Paremoude&quot;,&quot;Pashons&quot;,&quot;Paoni&quot;,&quot;Epip&quot;,&quot;Mesori&quot;,&quot;Pi Kogi Enavot&quot;],monthNamesShort:[&quot;Tho&quot;,&quot;Pao&quot;,&quot;Hath&quot;,&quot;Koi&quot;,&quot;Tob&quot;,&quot;Mesh&quot;,&quot;Pat&quot;,&quot;Pad&quot;,&quot;Pash&quot;,&quot;Pao&quot;,&quot;Epi&quot;,&quot;Meso&quot;,&quot;PiK&quot;],dayNames:[&quot;Tkyriaka&quot;,&quot;Pesnau&quot;,&quot;Pshoment&quot;,&quot;Peftoou&quot;,&quot;Ptiou&quot;,&quot;Psoou&quot;,&quot;Psabbaton&quot;],dayNamesShort:[&quot;Tky&quot;,&quot;Pes&quot;,&quot;Psh&quot;,&quot;Pef&quot;,&quot;Pti&quot;,&quot;Pso&quot;,&quot;Psa&quot;],dayNamesMin:[&quot;Tk&quot;,&quot;Pes&quot;,&quot;Psh&quot;,&quot;Pef&quot;,&quot;Pt&quot;,&quot;Pso&quot;,&quot;Psa&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()&lt;0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[&quot;&quot;].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())&lt;0&amp;&amp;t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r&lt;=0&amp;&amp;r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],533:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Discworld&quot;,jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Discworld&quot;,epochs:[&quot;BUC&quot;,&quot;UC&quot;],monthNames:[&quot;Ick&quot;,&quot;Offle&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;Grune&quot;,&quot;August&quot;,&quot;Spune&quot;,&quot;Sektober&quot;,&quot;Ember&quot;,&quot;December&quot;],monthNamesShort:[&quot;Ick&quot;,&quot;Off&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Gru&quot;,&quot;Aug&quot;,&quot;Spu&quot;,&quot;Sek&quot;,&quot;Emb&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Octeday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Oct&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Oc&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,n.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n&gt;=2&amp;&amp;n&lt;=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||&quot;&quot;}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()&lt;0?1:0),e=i.month(),(r=i.day())+(e&gt;1?16:0)+(e&gt;2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t&gt;15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e&lt;=0?e-1:e,r,n)}});var o={20:&quot;Fruitbat&quot;,21:&quot;Anchovy&quot;};n.calendars.discworld=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],534:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Ethiopian&quot;,jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Ethiopian&quot;,epochs:[&quot;BEE&quot;,&quot;EE&quot;],monthNames:[&quot;Meskerem&quot;,&quot;Tikemet&quot;,&quot;Hidar&quot;,&quot;Tahesas&quot;,&quot;Tir&quot;,&quot;Yekatit&quot;,&quot;Megabit&quot;,&quot;Miazia&quot;,&quot;Genbot&quot;,&quot;Sene&quot;,&quot;Hamle&quot;,&quot;Nehase&quot;,&quot;Pagume&quot;],monthNamesShort:[&quot;Mes&quot;,&quot;Tik&quot;,&quot;Hid&quot;,&quot;Tah&quot;,&quot;Tir&quot;,&quot;Yek&quot;,&quot;Meg&quot;,&quot;Mia&quot;,&quot;Gen&quot;,&quot;Sen&quot;,&quot;Ham&quot;,&quot;Neh&quot;,&quot;Pag&quot;],dayNames:[&quot;Ehud&quot;,&quot;Segno&quot;,&quot;Maksegno&quot;,&quot;Irob&quot;,&quot;Hamus&quot;,&quot;Arb&quot;,&quot;Kidame&quot;],dayNamesShort:[&quot;Ehu&quot;,&quot;Seg&quot;,&quot;Mak&quot;,&quot;Iro&quot;,&quot;Ham&quot;,&quot;Arb&quot;,&quot;Kid&quot;],dayNamesMin:[&quot;Eh&quot;,&quot;Se&quot;,&quot;Ma&quot;,&quot;Ir&quot;,&quot;Ha&quot;,&quot;Ar&quot;,&quot;Ki&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()&lt;0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[&quot;&quot;].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())&lt;0&amp;&amp;t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r&lt;=0&amp;&amp;r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],535:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Hebrew&quot;,jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Hebrew&quot;,epochs:[&quot;BAM&quot;,&quot;AM&quot;],monthNames:[&quot;Nisan&quot;,&quot;Iyar&quot;,&quot;Sivan&quot;,&quot;Tammuz&quot;,&quot;Av&quot;,&quot;Elul&quot;,&quot;Tishrei&quot;,&quot;Cheshvan&quot;,&quot;Kislev&quot;,&quot;Tevet&quot;,&quot;Shevat&quot;,&quot;Adar&quot;,&quot;Adar II&quot;],monthNamesShort:[&quot;Nis&quot;,&quot;Iya&quot;,&quot;Siv&quot;,&quot;Tam&quot;,&quot;Av&quot;,&quot;Elu&quot;,&quot;Tis&quot;,&quot;Che&quot;,&quot;Kis&quot;,&quot;Tev&quot;,&quot;She&quot;,&quot;Ada&quot;,&quot;Ad2&quot;],dayNames:[&quot;Yom Rishon&quot;,&quot;Yom Sheni&quot;,&quot;Yom Shlishi&quot;,&quot;Yom Revi'i&quot;,&quot;Yom Chamishi&quot;,&quot;Yom Shishi&quot;,&quot;Yom Shabbat&quot;],dayNamesShort:[&quot;Ris&quot;,&quot;She&quot;,&quot;Shl&quot;,&quot;Rev&quot;,&quot;Cha&quot;,&quot;Shi&quot;,&quot;Sha&quot;],dayNamesMin:[&quot;Ri&quot;,&quot;She&quot;,&quot;Shl&quot;,&quot;Re&quot;,&quot;Ch&quot;,&quot;Shi&quot;,&quot;Sha&quot;],digits:null,dateFormat:&quot;dd/mm/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t&lt;0?t+1:t)+1,19)&lt;7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&amp;&amp;(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&amp;&amp;this.leapYear(t)?30:8===e&amp;&amp;5===o(this.daysInYear(t),10)?30:9===e&amp;&amp;3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?&quot;embolismic&quot;:&quot;common&quot;)+&quot; &quot;+[&quot;deficient&quot;,&quot;regular&quot;,&quot;complete&quot;][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t&lt;=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e&lt;7){for(var s=7;s&lt;=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s&lt;e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s&lt;e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return o(3*(n+1),7)&lt;3&amp;&amp;n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t&gt;=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t&lt;this.toJD(e,1,1)?7:1;t&gt;this.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],536:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Islamic&quot;,jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Islamic&quot;,epochs:[&quot;BH&quot;,&quot;AH&quot;],monthNames:[&quot;Muharram&quot;,&quot;Safar&quot;,&quot;Rabi' al-awwal&quot;,&quot;Rabi' al-thani&quot;,&quot;Jumada al-awwal&quot;,&quot;Jumada al-thani&quot;,&quot;Rajab&quot;,&quot;Sha'aban&quot;,&quot;Ramadan&quot;,&quot;Shawwal&quot;,&quot;Dhu al-Qi'dah&quot;,&quot;Dhu al-Hijjah&quot;],monthNamesShort:[&quot;Muh&quot;,&quot;Saf&quot;,&quot;Rab1&quot;,&quot;Rab2&quot;,&quot;Jum1&quot;,&quot;Jum2&quot;,&quot;Raj&quot;,&quot;Sha'&quot;,&quot;Ram&quot;,&quot;Shaw&quot;,&quot;DhuQ&quot;,&quot;DhuH&quot;],dayNames:[&quot;Yawm al-ahad&quot;,&quot;Yawm al-ithnayn&quot;,&quot;Yawm ath-thulaathaa'&quot;,&quot;Yawm al-arbi'aa'&quot;,&quot;Yawm al-kham\u012bs&quot;,&quot;Yawm al-jum'a&quot;,&quot;Yawm as-sabt&quot;],dayNamesShort:[&quot;Aha&quot;,&quot;Ith&quot;,&quot;Thu&quot;,&quot;Arb&quot;,&quot;Kha&quot;,&quot;Jum&quot;,&quot;Sab&quot;],dayNamesMin:[&quot;Ah&quot;,&quot;It&quot;,&quot;Th&quot;,&quot;Ar&quot;,&quot;Kh&quot;,&quot;Ju&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;yyyy/mm/dd&quot;,firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30&lt;11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t&lt;=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e&lt;=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],537:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Julian&quot;,jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{&quot;&quot;:{name:&quot;Julian&quot;,epochs:[&quot;BC&quot;,&quot;AD&quot;],monthNames:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],monthNamesShort:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],digits:null,dateFormat:&quot;mm/dd/yyyy&quot;,firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()&lt;0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),&quot;d&quot;),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&amp;&amp;this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)&lt;6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t&lt;0&amp;&amp;t++,e&lt;=2&amp;&amp;(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i&lt;14?1:13),o=r-Math.floor(a&gt;2?4716:4715),s=e-n-Math.floor(30.6001*i);return o&lt;=0&amp;&amp;o--,this.newDate(o,a,s)}}),n.calendars.julian=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],538:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:&quot;Mayan&quot;,jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{&quot;&quot;:{name:&quot;Mayan&quot;,epochs:[&quot;&quot;,&quot;&quot;],monthNames:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;],monthNamesShort:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;],dayNames:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;,&quot;18&quot;,&quot;19&quot;],dayNamesShort:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;,&quot;18&quot;,&quot;19&quot;],dayNamesMin:[&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;,&quot;18&quot;,&quot;19&quot;],digits:null,dateFormat:&quot;YYYY.m.d&quot;,firstDay:0,isRTL:!1,haabMonths:[&quot;Pop&quot;,&quot;Uo&quot;,&quot;Zip&quot;,&quot;Zotz&quot;,&quot;Tzec&quot;,&quot;Xul&quot;,&quot;Yaxkin&quot;,&quot;Mol&quot;,&quot;Chen&quot;,&quot;Yax&quot;,&quot;Zac&quot;,&quot;Ceh&quot;,&quot;Mac&quot;,&quot;Kankin&quot;,&quot;Muan&quot;,&quot;Pax&quot;,&quot;Kayab&quot;,&quot;Cumku&quot;,&quot;Uayeb&quot;],tzolkinMonths:[&quot;Imix&quot;,&quot;Ik&quot;,&quot;Akbal&quot;,&quot;Kan&quot;,&quot;Chicchan&quot;,&quot;Cimi&quot;,&quot;Manik&quot;,&quot;Lamat&quot;,&quot;Muluc&quot;,&quot;Oc&quot;,&quot;Chuen&quot;,&quot;Eb&quot;,&quot;Ben&quot;,&quot;Ix&quot;,&quot;Men&quot;,&quot;Cib&quot;,&quot;Caban&quot;,&quot;Etznab&quot;,&quot;Cauac&quot;,&quot;Ahau&quot;]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t&lt;0?400:0,e+&quot;.&quot;+Math.floor(t/20)+&quot;.&quot;+t%20},forYear:function(t){if((t=t.split(&quot;.&quot;)).length&lt;3)throw&quot;Invalid Mayan year&quot;;for(var e=0,r=0;r&lt;t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)&gt;19||r&gt;0&amp;&amp;n&lt;0)throw&quot;Invalid Mayan year&quot;;e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o((t-=this.jdEpoch)+8+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s((t-=this.jdEpoch)+20,20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t&lt;0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},{&quot;../main&quot;:545,&quot;object-assign&quot;:434}],539:[function(t,e,r){var n=t(&quot;../main&quot;),i=t(&quot;object-assign&quot;);function a(t){this.local=this.regionalOptions[t||&quot;&quot;]||this.regionalOptions[&quot;&quot;]}a.prototype=new n.baseCalendar;var o=n.instance(&quot;gregorian&quot;);i(a.prototype,{name:&quot;Nanakshahi&quot;,jdEpoch:2257673.5,daysPerMonth:[31